Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn2010-12-23 18:12:34 +0000
committercvs2svn2010-12-23 18:12:34 +0000
commit6bac5abf63b83c0db774645ab052a564a179f3c5 (patch)
tree7d7723b1dda1ba490352bdd2534e019c9c7b1cf3
parentbb2fff87b9edef35e79fdeb17784618ee79527d4 (diff)
downloadrt.equinox.p2-6bac5abf63b83c0db774645ab052a564a179f3c5.tar.gz
rt.equinox.p2-6bac5abf63b83c0db774645ab052a564a179f3c5.tar.xz
rt.equinox.p2-6bac5abf63b83c0db774645ab052a564a179f3c5.zip
This commit was manufactured by cvs2svn to create tag 'pre_Bug_321819'.pre_Bug_321819
Sprout from master 2010-12-23 18:12:33 UTC DJ Houghton <dj> 'Bug 333103 - [tests] Failures in nightly build' Cherrypick from R3_6_maintenance 2010-08-22 21:11:55 UTC Pascal Rapicault <prapicau> 'Bug 323322 - Resolution is unstable': bundles/org.eclipse.equinox.p2.tests/testData/helios-sr0/content.jar Delete: bundles/ie.wombat.jbdiff.test/.classpath bundles/ie.wombat.jbdiff.test/.cvsignore bundles/ie.wombat.jbdiff.test/.project bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.jdt.core.prefs bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.pde.core.prefs bundles/ie.wombat.jbdiff.test/META-INF/MANIFEST.MF bundles/ie.wombat.jbdiff.test/build.properties bundles/ie.wombat.jbdiff.test/pom.xml bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/Activator.java bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/DiffPatchTest.java bundles/ie.wombat.jbdiff.test/testData/eclipse-3.2.exe bundles/ie.wombat.jbdiff.test/testData/eclipse-3.3.exe bundles/ie.wombat.jbdiff.test/testData/null.data bundles/ie.wombat.jbdiff.test/testData/one.data bundles/ie.wombat.jbdiff.test/testData/oneXhundredX.data bundles/ie.wombat.jbdiff.test/testData/onehundred.data bundles/ie.wombat.jbdiff.test/testData/onehundredX.data bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.2.jar bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.3.jar bundles/ie.wombat.jbdiff/.classpath bundles/ie.wombat.jbdiff/.cvsignore bundles/ie.wombat.jbdiff/.project bundles/ie.wombat.jbdiff/.settings/org.eclipse.core.resources.prefs bundles/ie.wombat.jbdiff/.settings/org.eclipse.jdt.core.prefs bundles/ie.wombat.jbdiff/.settings/org.eclipse.pde.core.prefs bundles/ie.wombat.jbdiff/META-INF/MANIFEST.MF bundles/ie.wombat.jbdiff/about.html bundles/ie.wombat.jbdiff/build.properties bundles/ie.wombat.jbdiff/pom.xml bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBDiff.java bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBPatch.java bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/LICENSE.txt bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/README.txt bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/Util.java bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/readme-more.txt bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath bundles/org.eclipse.equinox.frameworkadmin.equinox/.cvsignore bundles/org.eclipse.equinox.frameworkadmin.equinox/.project bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml bundles/org.eclipse.equinox.frameworkadmin.equinox/about.html bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Log.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java bundles/org.eclipse.equinox.frameworkadmin.test/.classpath bundles/org.eclipse.equinox.frameworkadmin.test/.cvsignore bundles/org.eclipse.equinox.frameworkadmin.test/.project bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.frameworkadmin.test/about.html bundles/org.eclipse.equinox.frameworkadmin.test/build.properties bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_1/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_2/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/dummy.frameworkextension_1.0.0.jar bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.launcher.jar bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.simpleconfigurator.jar bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi.jar bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi_3.4.0.jar bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/conf/config.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/eclipse.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/configuration/config.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/eclipse.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/conf/config.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/eclipse.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/conf/config.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/eclipse.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/config.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-config.ini bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-noshare-config.ini bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Activator.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestEclipseDataArea.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java bundles/org.eclipse.equinox.frameworkadmin/.classpath bundles/org.eclipse.equinox.frameworkadmin/.cvsignore bundles/org.eclipse.equinox.frameworkadmin/.project bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.frameworkadmin/about.html bundles/org.eclipse.equinox.frameworkadmin/build.properties bundles/org.eclipse.equinox.frameworkadmin/plugin.properties bundles/org.eclipse.equinox.frameworkadmin/pom.xml bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Activator.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminFactory.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java bundles/org.eclipse.equinox.p2.artifact.optimizers/.classpath bundles/org.eclipse.equinox.p2.artifact.optimizers/.cvsignore bundles/org.eclipse.equinox.p2.artifact.optimizers/.project bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.core.resources.prefs bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties bundles/org.eclipse.equinox.p2.artifact.optimizers/optimizer.launch bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.properties bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.xml bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/Activator.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/OptimizerApplication.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/DeltaComputer.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/JarDeltaOptimizerStep.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffStep.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffZipStep.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Messages.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Pack200OptimizerStep.java bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/messages.properties bundles/org.eclipse.equinox.p2.artifact.processors/.classpath bundles/org.eclipse.equinox.p2.artifact.processors/.cvsignore bundles/org.eclipse.equinox.p2.artifact.processors/.project bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.core.resources.prefs bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.artifact.processors/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.artifact.processors/about.html bundles/org.eclipse.equinox.p2.artifact.processors/build.properties bundles/org.eclipse.equinox.p2.artifact.processors/plugin.properties bundles/org.eclipse.equinox.p2.artifact.processors/plugin.xml bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/Activator.java bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/DeltaApplier.java bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/JarDeltaProcessorStep.java bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchStep.java bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchZipStep.java bundles/org.eclipse.equinox.p2.common/.project bundles/org.eclipse.equinox.p2.common/README.TXT bundles/org.eclipse.equinox.p2.console/.classpath bundles/org.eclipse.equinox.p2.console/.cvsignore bundles/org.eclipse.equinox.p2.console/.project bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.console/Provisioning console.launch bundles/org.eclipse.equinox.p2.console/about.html bundles/org.eclipse.equinox.p2.console/build.properties bundles/org.eclipse.equinox.p2.console/plugin.properties bundles/org.eclipse.equinox.p2.console/pom.xml bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java bundles/org.eclipse.equinox.p2.core/.classpath bundles/org.eclipse.equinox.p2.core/.cvsignore bundles/org.eclipse.equinox.p2.core/.options bundles/org.eclipse.equinox.p2.core/.project bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.api.tools.prefs bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.core/OSGI-INF/agentProvider.xml bundles/org.eclipse.equinox.p2.core/OSGI-INF/eventBus.xml bundles/org.eclipse.equinox.p2.core/about.html bundles/org.eclipse.equinox.p2.core/build.properties bundles/org.eclipse.equinox.p2.core/plugin.properties bundles/org.eclipse.equinox.p2.core/pom.xml bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/AgentLocation.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/EventBusComponent.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/LogHelper.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Messages.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/StringHelper.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarEntry.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarException.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarFile.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarInputStream.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/URLUtil.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/messages.properties bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/ProvisioningListener.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/SynchronousProvisioningListener.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IAgentLocation.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgent.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgentProvider.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/package.html bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentService.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentServiceFactory.java bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/package.html bundles/org.eclipse.equinox.p2.director.app/.classpath bundles/org.eclipse.equinox.p2.director.app/.cvsignore bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch bundles/org.eclipse.equinox.p2.director.app/.project bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.director.app/about.html bundles/org.eclipse.equinox.p2.director.app/build.properties bundles/org.eclipse.equinox.p2.director.app/config.ini bundles/org.eclipse.equinox.p2.director.app/director app.launch bundles/org.eclipse.equinox.p2.director.app/director.product bundles/org.eclipse.equinox.p2.director.app/plugin.properties bundles/org.eclipse.equinox.p2.director.app/plugin.xml bundles/org.eclipse.equinox.p2.director.app/pom.xml bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Activator.java bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java bundles/org.eclipse.equinox.p2.director/.classpath bundles/org.eclipse.equinox.p2.director/.cvsignore bundles/org.eclipse.equinox.p2.director/.project bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.director/OSGI-INF/director.xml bundles/org.eclipse.equinox.p2.director/OSGI-INF/planner.xml bundles/org.eclipse.equinox.p2.director/about.html bundles/org.eclipse.equinox.p2.director/build.properties bundles/org.eclipse.equinox.p2.director/plugin.properties bundles/org.eclipse.equinox.p2.director/pom.xml bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ApplicablePatchQuery.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorActivator.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/InfiniteProgress.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PermissiveSlicer.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Slicer.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IDirector.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanExecutionHelper.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/RequestStatus.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/ProfileInclusionRules.java bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/package.html bundles/org.eclipse.equinox.p2.directorywatcher/.classpath bundles/org.eclipse.equinox.p2.directorywatcher/.cvsignore bundles/org.eclipse.equinox.p2.directorywatcher/.project bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.directorywatcher/about.html bundles/org.eclipse.equinox.p2.directorywatcher/build.properties bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryChangeListener.java bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Messages.java bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/messages.properties bundles/org.eclipse.equinox.p2.discovery/.classpath bundles/org.eclipse.equinox.p2.discovery/.cvsignore bundles/org.eclipse.equinox.p2.discovery/.gitignore bundles/org.eclipse.equinox.p2.discovery/.project bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.ltk.core.refactoring.prefs bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.team.ui.prefs bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.pde.prefs bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.discovery/about.html bundles/org.eclipse.equinox.p2.discovery/build.properties bundles/org.eclipse.equinox.p2.discovery/plugin.properties bundles/org.eclipse.equinox.p2.discovery/pom.xml bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractCatalogSource.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractDiscoveryStrategy.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Messages.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Policy.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/messages.properties bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/AbstractCatalogItem.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Certification.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/FeatureFilter.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Group.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Icon.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Messages.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Overview.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Tag.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/ValidationException.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/messages.properties bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogItemComparator.java bundles/org.eclipse.equinox.p2.engine/.classpath bundles/org.eclipse.equinox.p2.engine/.cvsignore bundles/org.eclipse.equinox.p2.engine/.options bundles/org.eclipse.equinox.p2.engine/.project bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.engine/OSGI-INF/engine.xml bundles/org.eclipse.equinox.p2.engine/OSGI-INF/profileRegistry.xml bundles/org.eclipse.equinox.p2.engine/about.html bundles/org.eclipse.equinox.p2.engine/build.properties bundles/org.eclipse.equinox.p2.engine/plugin.properties bundles/org.eclipse.equinox.p2.engine/plugin.xml bundles/org.eclipse.equinox.p2.engine/pom.xml bundles/org.eclipse.equinox.p2.engine/schema/actions.exsd bundles/org.eclipse.equinox.p2.engine/schema/touchpoints.exsd bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ActionManager.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/BeginOperationEvent.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/CommitOperationEvent.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DownloadManager.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineComponent.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineSession.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ISurrogateProfileHandler.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitEvent.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingAction.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingActionsException.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PhaseSet.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileEvent.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileLock.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepositoryFactory.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileRegistryComponent.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileWriter.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileXMLConstants.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/RollbackOperationEvent.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SizingPhaseSet.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TouchpointManager.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TransactionEvent.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IPhaseSet.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfile.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileEvent.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileRegistry.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ISizingPhaseSet.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProfileScope.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/package.html bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/package.html bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/package.html bundles/org.eclipse.equinox.p2.exemplarysetup/.classpath bundles/org.eclipse.equinox.p2.exemplarysetup/.project bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.exemplarysetup/about.html bundles/org.eclipse.equinox.p2.exemplarysetup/build.properties bundles/org.eclipse.equinox.p2.exemplarysetup/plugin.properties bundles/org.eclipse.equinox.p2.exemplarysetup/src/readme.txt bundles/org.eclipse.equinox.p2.extensionlocation/.classpath bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore bundles/org.eclipse.equinox.p2.extensionlocation/.project bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.extensionlocation/about.html bundles/org.eclipse.equinox.p2.extensionlocation/build.properties bundles/org.eclipse.equinox.p2.extensionlocation/plugin.properties bundles/org.eclipse.equinox.p2.extensionlocation/plugin.xml bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Constants.java bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Messages.java bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/messages.properties bundles/org.eclipse.equinox.p2.garbagecollector/.classpath bundles/org.eclipse.equinox.p2.garbagecollector/.cvsignore bundles/org.eclipse.equinox.p2.garbagecollector/.options bundles/org.eclipse.equinox.p2.garbagecollector/.project bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.garbagecollector/OSGI-INF/garbagecollector.xml bundles/org.eclipse.equinox.p2.garbagecollector/about.html bundles/org.eclipse.equinox.p2.garbagecollector/build.properties bundles/org.eclipse.equinox.p2.garbagecollector/plugin.properties bundles/org.eclipse.equinox.p2.garbagecollector/plugin.xml bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml bundles/org.eclipse.equinox.p2.garbagecollector/schema/GarbageCollector.exsd bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollectorComponent.java bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSet.java bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.java bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties bundles/org.eclipse.equinox.p2.jarprocessor/.classpath bundles/org.eclipse.equinox.p2.jarprocessor/.cvsignore bundles/org.eclipse.equinox.p2.jarprocessor/.externalToolBuilders/AntTaskBuilder.launch bundles/org.eclipse.equinox.p2.jarprocessor/.project bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.jarprocessor/about.html bundles/org.eclipse.equinox.p2.jarprocessor/build.properties bundles/org.eclipse.equinox.p2.jarprocessor/lib/.cvsignore bundles/org.eclipse.equinox.p2.jarprocessor/localbuild.xml bundles/org.eclipse.equinox.p2.jarprocessor/plugin.properties bundles/org.eclipse.equinox.p2.jarprocessor/plugin.xml bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Main.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/UnsignCommand.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/Unsigner.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/IProcessStep.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntSignCommand.java bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java bundles/org.eclipse.equinox.p2.metadata.generator/.classpath bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch bundles/org.eclipse.equinox.p2.metadata.generator/.project bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.0_Foundation-1.0.profile bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.1_Foundation-1.1.profile bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.2.profile bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.3.profile bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.4.profile bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.5.profile bundles/org.eclipse.equinox.p2.metadata.generator/JRE-1.1.profile bundles/org.eclipse.equinox.p2.metadata.generator/JavaSE-1.6.profile bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Plugins and Features.launch bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator SDK.launch bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Update Site.launch bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.0.profile bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.1.profile bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.2.profile bundles/org.eclipse.equinox.p2.metadata.generator/about.html bundles/org.eclipse.equinox.p2.metadata.generator/build.properties bundles/org.eclipse.equinox.p2.metadata.generator/config.ini bundles/org.eclipse.equinox.p2.metadata.generator/generator.product bundles/org.eclipse.equinox.p2.metadata.generator/p2-izer update site.launch bundles/org.eclipse.equinox.p2.metadata.generator/plugin.properties bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml bundles/org.eclipse.equinox.p2.metadata.generator/pom.xml bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Activator.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/LocalizationHelper.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IncrementalGenerator.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/URLEntry.java bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/TaskMessages.java bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/messages.properties bundles/org.eclipse.equinox.p2.metadata.repository/.classpath bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore bundles/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch bundles/org.eclipse.equinox.p2.metadata.repository/.project bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml bundles/org.eclipse.equinox.p2.metadata.repository/about.html bundles/org.eclipse.equinox.p2.metadata.repository/build.properties bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java bundles/org.eclipse.equinox.p2.metadata/.classpath bundles/org.eclipse.equinox.p2.metadata/.cvsignore bundles/org.eclipse.equinox.p2.metadata/.project bundles/org.eclipse.equinox.p2.metadata/.settings/.api_filters bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.metadata/about.html bundles/org.eclipse.equinox.p2.metadata/build.properties bundles/org.eclipse.equinox.p2.metadata/plugin.properties bundles/org.eclipse.equinox.p2.metadata/pom.xml bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/EnumDefinition.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html bundles/org.eclipse.equinox.p2.operations/.classpath bundles/org.eclipse.equinox.p2.operations/.cvsignore bundles/org.eclipse.equinox.p2.operations/.project bundles/org.eclipse.equinox.p2.operations/.settings/.api_filters bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.operations/about.html bundles/org.eclipse.equinox.p2.operations/build.properties bundles/org.eclipse.equinox.p2.operations/plugin.properties bundles/org.eclipse.equinox.p2.operations/pom.xml bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Activator.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IFailedStatusEvaluator.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IStatusCodes.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Messages.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlannerResolutionJob.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/ResolutionResult.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/SearchForUpdatesResolutionJob.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/messages.properties bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/IProfileChangeJob.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileChangeOperation.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningJob.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RepositoryTracker.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/Update.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/package.html bundles/org.eclipse.equinox.p2.publisher/.classpath bundles/org.eclipse.equinox.p2.publisher/.cvsignore bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch bundles/org.eclipse.equinox.p2.publisher/.project bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch bundles/org.eclipse.equinox.p2.publisher/Features and Bundles Publisher.launch bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.publisher/about.html bundles/org.eclipse.equinox.p2.publisher/ant_tasks/.cvsignore bundles/org.eclipse.equinox.p2.publisher/build.properties bundles/org.eclipse.equinox.p2.publisher/plugin.properties bundles/org.eclipse.equinox.p2.publisher/plugin.xml bundles/org.eclipse.equinox.p2.publisher/pom.xml bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.0_Foundation-1.0.profile bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.1_Foundation-1.1.profile bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.2.profile bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.3.profile bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.4.profile bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.5.profile bundles/org.eclipse.equinox.p2.publisher/profiles/JRE-1.1.profile bundles/org.eclipse.equinox.p2.publisher/profiles/JavaSE-1.6.profile bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.0.profile bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.1.profile bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.2.profile bundles/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootFilesAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IUpdateDescriptorAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/TaskMessages.java bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/messages.properties bundles/org.eclipse.equinox.p2.ql/.classpath bundles/org.eclipse.equinox.p2.ql/.cvsignore bundles/org.eclipse.equinox.p2.ql/.project bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.ql/about.html bundles/org.eclipse.equinox.p2.ql/build.properties bundles/org.eclipse.equinox.p2.ql/model/p2ql.bnf bundles/org.eclipse.equinox.p2.ql/plugin.properties bundles/org.eclipse.equinox.p2.ql/pom.xml bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfoReader.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java bundles/org.eclipse.equinox.p2.sar/.classpath bundles/org.eclipse.equinox.p2.sar/.cvsignore bundles/org.eclipse.equinox.p2.sar/.project bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.sar/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.sar/about.html bundles/org.eclipse.equinox.p2.sar/build.properties bundles/org.eclipse.equinox.p2.sar/pom.xml bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/DirectByteArrayOutputStream.java bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarConstants.java bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarEntry.java bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarInputStream.java bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarOutputStream.java bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarUtil.java bundles/org.eclipse.equinox.p2.tests.discovery/.classpath bundles/org.eclipse.equinox.p2.tests.discovery/.cvsignore bundles/org.eclipse.equinox.p2.tests.discovery/.gitignore bundles/org.eclipse.equinox.p2.tests.discovery/.project bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.team.ui.prefs bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.pde.prefs bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.tests.discovery/about.html bundles/org.eclipse.equinox.p2.tests.discovery/build.properties bundles/org.eclipse.equinox.p2.tests.discovery/plugin.properties bundles/org.eclipse.equinox.p2.tests.discovery/plugin.xml bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/AllDiscoveryTests.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/DiscoveryTestConstants.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryRemoteTest.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryTest.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/DirectoryParserTest.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/RemoteBundleDiscoveryStrategyTest.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/AbstractMockFactory.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogCategoryMockFactory.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogItemMockFactory.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockBundleDiscoveryStrategy.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java bundles/org.eclipse.equinox.p2.tests.discovery/test.xml bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/.project bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/build.properties bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/feature.xml bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/.project bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/build.properties bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/feature.xml bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/artifacts.jar bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/content.jar bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test1_1.0.0.201001200403.jar bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test2_1.0.0.201001200403.jar bundles/org.eclipse.equinox.p2.tests.optimizers/.classpath bundles/org.eclipse.equinox.p2.tests.optimizers/.project bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/AllTests.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Bug209233Test.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/OptimizerTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/AllTests.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/ArtifactRepositoryMock.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/AutomatedTests.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestActivator.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestData.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/AllTests.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/DirectByteArrayOutputStreamTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarEntryTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarTest.java bundles/org.eclipse.equinox.p2.tests.optimizers/testData/jarprocessor.jar.pack.gz bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2-3.3.jbdiff bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2.exe bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.3.exe bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0-3.3.0.jbdiff bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.3.0.v20070607-1300.njar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1-2.jar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1.jar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.2.jar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/alien.zip bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.jar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.sar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.jar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.sar bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/test.zip bundles/org.eclipse.equinox.p2.tests.ui/.classpath bundles/org.eclipse.equinox.p2.tests.ui/.cvsignore bundles/org.eclipse.equinox.p2.tests.ui/.project bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.tests.ui/All p2 UI tests.launch bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.tests.ui/about.html bundles/org.eclipse.equinox.p2.tests.ui/build.properties bundles/org.eclipse.equinox.p2.tests.ui/plugin.properties bundles/org.eclipse.equinox.p2.tests.ui/pom.xml bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ActionTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/AllTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ColocatedRepositoryActionTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/RemoveColocatedRepositoryActionTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UninstallActionTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UpdateActionTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/AllTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/IUPropertyPagesTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallationHistoryPageTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstalledSoftwarePageTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InvokeByHandlerTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/PreferencePagesTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RepositoryManipulationPageTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/AllTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/LicenseManagerTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AbstractQueryTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AllTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUWrapperTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/CategoryElementWrapperTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/LatestIUVersionElementWrapperTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/MockQueryProvider.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableMetadataRepositoryManagerTest.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/TranslationSupportTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/AllTests.java bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/SiteImportExportTest.java bundles/org.eclipse.equinox.p2.tests.ui/test.xml bundles/org.eclipse.equinox.p2.tests.verifier/.classpath bundles/org.eclipse.equinox.p2.tests.verifier/.project bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.tests.verifier/build.properties bundles/org.eclipse.equinox.p2.tests.verifier/plugin.xml bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/Activator.java bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java bundles/org.eclipse.equinox.p2.testserver/.classpath bundles/org.eclipse.equinox.p2.testserver/.cvsignore bundles/org.eclipse.equinox.p2.testserver/.project bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.testserver/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.testserver/build.properties bundles/org.eclipse.equinox.p2.testserver/p2 test server.launch bundles/org.eclipse.equinox.p2.testserver/plugin.xml bundles/org.eclipse.equinox.p2.testserver/pom.xml bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/AlwaysFailContext.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/FlipFlopFailContext.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/HttpConstants.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/LinearChange.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/MimeLookup.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureContext.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ChopAndDelay.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ContentLengthLier.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/FileMolester.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/HelloWorld.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/LastModifiedLier.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Redirector.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/StatusCodeResponse.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/TimeOut.java bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Truncator.java bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/artifacts.xml bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/features/aaFeature_1.0.0.jar bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/plugins/aaPlugin_1.0.0.jar bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/readme.txt bundles/org.eclipse.equinox.p2.testserver/webfiles/index.html bundles/org.eclipse.equinox.p2.testserver/webfiles/index.xml bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/compositeContent.xml bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/one/content.xml bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/two/content.xml bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/features/test.feature_1.0.0.jar bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.bundle_1.0.0.jar bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.fragment_1.0.0.jar bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/site.xml bundles/org.eclipse.equinox.p2.tools/.project bundles/org.eclipse.equinox.p2.tools/README.txt bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.cvsignore bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.project bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Activator.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/Messages.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/messages.properties bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationConstants.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Messages.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/messages.properties bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath bundles/org.eclipse.equinox.p2.touchpoint.natives/.cvsignore bundles/org.eclipse.equinox.p2.touchpoint.natives/.project bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Activator.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/ClosedBackupStoreException.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/IBackupStore.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/LazyBackupStore.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Messages.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties bundles/org.eclipse.equinox.p2.ui.admin/.classpath bundles/org.eclipse.equinox.p2.ui.admin/.cvsignore bundles/org.eclipse.equinox.p2.ui.admin/.project bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.ui.admin/about.html bundles/org.eclipse.equinox.p2.ui.admin/build.properties bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/artifact_repo_obj.gif bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gif bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/metadata_repo_obj.gif bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/profile_obj.gif bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/uninstalled_iu.gif bundles/org.eclipse.equinox.p2.ui.admin/icons/provision.gif bundles/org.eclipse.equinox.p2.ui.admin/plugin.properties bundles/org.eclipse.equinox.p2.ui.admin/plugin.xml bundles/org.eclipse.equinox.p2.ui.admin/pom.xml bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/PreferenceConstants.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java bundles/org.eclipse.equinox.p2.ui.discovery/.classpath bundles/org.eclipse.equinox.p2.ui.discovery/.cvsignore bundles/org.eclipse.equinox.p2.ui.discovery/.gitignore bundles/org.eclipse.equinox.p2.ui.discovery/.project bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.team.ui.prefs bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.pde.prefs bundles/org.eclipse.equinox.p2.ui.discovery/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.ui.discovery/about.html bundles/org.eclipse.equinox.p2.ui.discovery/build.properties bundles/org.eclipse.equinox.p2.ui.discovery/icons/etool16/find.png bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_disabled_obj.gif bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_obj.gif bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_update_obj.gif bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/message_info.gif bundles/org.eclipse.equinox.p2.ui.discovery/icons/ovr32/message_warning.gif bundles/org.eclipse.equinox.p2.ui.discovery/icons/wizban/banner-discovery.png bundles/org.eclipse.equinox.p2.ui.discovery/plugin.properties bundles/org.eclipse.equinox.p2.ui.discovery/plugin.xml bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryImages.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryUi.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/Messages.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowBundleCatalogCommandHandler.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowRepositoryCatalogCommandHandler.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/messages.properties bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositoryDiscoveryStrategy.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositorySource.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/CommonColors.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListItem.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/FilteredViewer.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientCanvas.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientToolTip.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/Messages.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/SelectionProviderAdapter.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/WorkbenchUtil.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/messages.properties bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/AbstractDiscoveryItem.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogConfiguration.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogFilter.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogPage.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CategoryItem.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryItem.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryResources.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryWizard.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/Messages.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/OverviewToolTip.java bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/messages.properties bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.cvsignore bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.project bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/about.html bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gif bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gif bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gif bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gif bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.properties bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/IAutomaticUpdaterHelpContextIds.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/StatusLineCLabelContribution.java bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties bundles/org.eclipse.equinox.p2.ui.sdk/.classpath bundles/org.eclipse.equinox.p2.ui.sdk/.cvsignore bundles/org.eclipse.equinox.p2.ui.sdk/.project bundles/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml bundles/org.eclipse.equinox.p2.ui.sdk/about.html bundles/org.eclipse.equinox.p2.ui.sdk/build.properties bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java bundles/org.eclipse.equinox.p2.ui/.classpath bundles/org.eclipse.equinox.p2.ui/.cvsignore bundles/org.eclipse.equinox.p2.ui/.project bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.ui/OSGI-INF/repositoryTracker_component.xml bundles/org.eclipse.equinox.p2.ui/OSGI-INF/serviceui.xml bundles/org.eclipse.equinox.p2.ui/about.html bundles/org.eclipse.equinox.p2.ui/build.properties bundles/org.eclipse.equinox.p2.ui/icons/obj/artifact_repo_obj.gif bundles/org.eclipse.equinox.p2.ui/icons/obj/category_obj.gif bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_obj.gif bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_obj.gif bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_update_obj.gif bundles/org.eclipse.equinox.p2.ui/icons/obj/metadata_repo_obj.gif bundles/org.eclipse.equinox.p2.ui/icons/obj/profile_obj.gif bundles/org.eclipse.equinox.p2.ui/icons/wizban/def_wizban.jpg bundles/org.eclipse.equinox.p2.ui/icons/wizban/install_wiz.gif bundles/org.eclipse.equinox.p2.ui/icons/wizban/revert_wiz.gif bundles/org.eclipse.equinox.p2.ui/icons/wizban/uninstall_wiz.gif bundles/org.eclipse.equinox.p2.ui/icons/wizban/update_wiz.gif bundles/org.eclipse.equinox.p2.ui/plugin.properties bundles/org.eclipse.equinox.p2.ui/plugin.xml bundles/org.eclipse.equinox.p2.ui/pom.xml bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementQueryDescriptor.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementWrapper.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/IProvHelpContextIds.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIImages.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryLocationQuery.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationBeginningEvent.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationEndingEvent.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/PropertyDialogAction.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ILayoutConstants.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositorySelectionListener.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ISelectableIUsPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IViewMenuProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IIUElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IRepositoryElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IDeferredQueryTreeListener.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IInputChangeListener.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUColumnConfig.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html bundles/org.eclipse.equinox.p2.updatechecker/.classpath bundles/org.eclipse.equinox.p2.updatechecker/.cvsignore bundles/org.eclipse.equinox.p2.updatechecker/.project bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml bundles/org.eclipse.equinox.p2.updatechecker/about.html bundles/org.eclipse.equinox.p2.updatechecker/build.properties bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties bundles/org.eclipse.equinox.p2.updatechecker/pom.xml bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateListener.java bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.classpath bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.cvsignore bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorFactoryImpl.java bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java bundles/org.eclipse.equinox.simpleconfigurator/.classpath bundles/org.eclipse.equinox.simpleconfigurator/.cvsignore bundles/org.eclipse.equinox.simpleconfigurator/.externalToolBuilders/Copy built version of simple configurator into metadata generator.launch bundles/org.eclipse.equinox.simpleconfigurator/.project bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF bundles/org.eclipse.equinox.simpleconfigurator/about.html bundles/org.eclipse.equinox.simpleconfigurator/build.properties bundles/org.eclipse.equinox.simpleconfigurator/localbuild.xml bundles/org.eclipse.equinox.simpleconfigurator/plugin.properties bundles/org.eclipse.equinox.simpleconfigurator/pom.xml bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/Activator.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorFactory.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorConstants.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/StateResolverUtils.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/URIUtil.java bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/Utils.java examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.cvsignore examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.project examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/Build Cloud Example.launch examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/build.properties examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/readme.txt examples/org.eclipse.equinox.p2.examples.rcp.cloud/.classpath examples/org.eclipse.equinox.p2.examples.rcp.cloud/.project examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product.launch examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/mail.ico examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.gif examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.icns examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample2.gif examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample3.gif examples/org.eclipse.equinox.p2.examples.rcp.cloud/p2.inf examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.properties examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin_customization.ini examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceConstants.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceInitializer.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.cvsignore examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.project examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/Build Discovery Example.launch examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/build.properties examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/buildProduct.xml examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/readme.txt examples/org.eclipse.equinox.p2.examples.rcp.discovery/.classpath examples/org.eclipse.equinox.p2.examples.rcp.discovery/.project examples/org.eclipse.equinox.p2.examples.rcp.discovery/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.equinox.p2.examples.rcp.discovery/META-INF/MANIFEST.MF examples/org.eclipse.equinox.p2.examples.rcp.discovery/build.properties examples/org.eclipse.equinox.p2.examples.rcp.discovery/cloud.product examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail-screenshot.png examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.ico examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.png examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc-screenshot.png examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc.png examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/pop3.png examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.gif examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.icns examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample2.gif examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample3.gif examples/org.eclipse.equinox.p2.examples.rcp.discovery/p2.inf examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.properties examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.xml examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml examples/org.eclipse.equinox.p2.examples.rcp.discovery/product_lg.gif examples/org.eclipse.equinox.p2.examples.rcp.discovery/splash.bmp examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/.project examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/Build PrestartUpdate Example.launch examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/build.properties examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/readme.txt examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.classpath examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.project examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/build.properties examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/mail.ico examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.gif examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.icns examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample2.gif examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample3.gif examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/p2.inf examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/plugin.xml examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/product_lg.gif examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/splash.bmp examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Application.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationActionBarAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchWindowAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ICommandIds.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/MessagePopupAction.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/NavigationView.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/OpenViewAction.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Perspective.java examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/View.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.classpath examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.project examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/build.properties examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/mail.ico examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.gif examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.icns examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample2.gif examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample3.gif examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/p2.inf examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.properties examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/product_lg.gif examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/splash.bmp examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Activator.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Application.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationActionBarAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchWindowAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ICommandIds.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/MessagePopupAction.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/NavigationView.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/OpenViewAction.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Perspective.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/View.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/IProvSDKHelpContextIds.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceInitializer.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.classpath examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.project examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/build.properties examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/mail.ico examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.gif examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.icns examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample2.gif examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample3.gif examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/p2.inf examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/plugin.xml examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/product_lg.gif examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/sdknoautoupdates.product examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/splash.bmp examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Activator.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Application.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationActionBarAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchWindowAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ICommandIds.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/NavigationView.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/OpenViewAction.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Perspective.java examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/View.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.classpath examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.project examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.settings/org.eclipse.jdt.core.prefs examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF examples/org.eclipse.equinox.p2.examples.rcp.sdkui/build.properties examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/mail.ico examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.gif examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.icns examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample2.gif examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample3.gif examples/org.eclipse.equinox.p2.examples.rcp.sdkui/p2.inf examples/org.eclipse.equinox.p2.examples.rcp.sdkui/plugin.xml examples/org.eclipse.equinox.p2.examples.rcp.sdkui/product_lg.gif examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product examples/org.eclipse.equinox.p2.examples.rcp.sdkui/splash.bmp examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Activator.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Application.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationActionBarAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchWindowAdvisor.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ICommandIds.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/MessagePopupAction.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/NavigationView.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/OpenViewAction.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Perspective.java examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/View.java features/org.eclipse.equinox.p2.core.feature/.project features/org.eclipse.equinox.p2.core.feature/build.properties features/org.eclipse.equinox.p2.core.feature/epl-v10.html features/org.eclipse.equinox.p2.core.feature/feature.properties features/org.eclipse.equinox.p2.core.feature/feature.xml features/org.eclipse.equinox.p2.core.feature/license.html features/org.eclipse.equinox.p2.discovery.feature/.project features/org.eclipse.equinox.p2.discovery.feature/build.properties features/org.eclipse.equinox.p2.discovery.feature/epl-v10.html features/org.eclipse.equinox.p2.discovery.feature/feature.properties features/org.eclipse.equinox.p2.discovery.feature/feature.xml features/org.eclipse.equinox.p2.discovery.feature/license.html features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpg features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html features/org.eclipse.equinox.p2.extras.feature/.project features/org.eclipse.equinox.p2.extras.feature/build.properties features/org.eclipse.equinox.p2.extras.feature/epl-v10.html features/org.eclipse.equinox.p2.extras.feature/feature.properties features/org.eclipse.equinox.p2.extras.feature/feature.xml features/org.eclipse.equinox.p2.extras.feature/license.html org.eclipse.equinox.p2.releng/.project org.eclipse.equinox.p2.releng/HOW TO RUN.txt org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/.project org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/build.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/epl-v10.html org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.xml org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/license.html org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/.project org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/build.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/epl-v10.html org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.xml org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/license.html org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/.project org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/build.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/customBuildCallbacks.xml org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/epl-v10.html org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.properties org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.xml org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/license.html org.eclipse.equinox.p2.releng/ecf.psf org.eclipse.equinox.p2.releng/examples.psf org.eclipse.equinox.p2.releng/incubator.psf org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.cvsignore org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.project org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/.project org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.project org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.settings/org.maven.ide.eclipse.prefs org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/obr.target org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/pom.xml org.eclipse.equinox.p2.releng/p2_users_R_3_6_api_cleanup_projectSet.psf org.eclipse.equinox.p2.releng/projectSet-extssh.psf org.eclipse.equinox.p2.releng/projectSet.psf
-rw-r--r--bundles/ie.wombat.jbdiff.test/.classpath7
-rw-r--r--bundles/ie.wombat.jbdiff.test/.cvsignore1
-rw-r--r--bundles/ie.wombat.jbdiff.test/.project28
-rw-r--r--bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/ie.wombat.jbdiff.test/META-INF/MANIFEST.MF12
-rw-r--r--bundles/ie.wombat.jbdiff.test/build.properties4
-rw-r--r--bundles/ie.wombat.jbdiff.test/pom.xml14
-rw-r--r--bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/Activator.java45
-rw-r--r--bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/DiffPatchTest.java112
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/eclipse-3.2.exebin180224 -> 0 bytes
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/eclipse-3.3.exebin53248 -> 0 bytes
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/null.data0
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/one.data1
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/oneXhundredX.data1
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/onehundred.data1
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/onehundredX.data1
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.2.jarbin772717 -> 0 bytes
-rw-r--r--bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.3.jarbin996050 -> 0 bytes
-rw-r--r--bundles/ie.wombat.jbdiff/.classpath7
-rw-r--r--bundles/ie.wombat.jbdiff/.cvsignore1
-rw-r--r--bundles/ie.wombat.jbdiff/.project28
-rw-r--r--bundles/ie.wombat.jbdiff/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/ie.wombat.jbdiff/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--bundles/ie.wombat.jbdiff/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/ie.wombat.jbdiff/META-INF/MANIFEST.MF10
-rw-r--r--bundles/ie.wombat.jbdiff/about.html50
-rw-r--r--bundles/ie.wombat.jbdiff/build.properties4
-rw-r--r--bundles/ie.wombat.jbdiff/pom.xml14
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBDiff.java612
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBPatch.java241
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/LICENSE.txt29
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/README.txt51
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/Util.java132
-rw-r--r--bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/readme-more.txt7
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.project39
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs340
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml13
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/about.html28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties8
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java91
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java332
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java730
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java61
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java24
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java137
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java582
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java30
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java649
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Log.java92
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java52
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java202
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties40
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java231
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.project28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.core.prefs346
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.ui.prefs9
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch45
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF17
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/about.html28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_1/META-INF/MANIFEST.MF5
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_2/META-INF/MANIFEST.MF5
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/dummy.frameworkextension_1.0.0.jarbin431 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.launcher.jarbin43719 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.simpleconfigurator.jarbin23499 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi.jarbin928386 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi_3.4.0.jarbin949391 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/conf/config.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/eclipse.ini2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/configuration/config.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/eclipse.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/conf/config.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/eclipse.ini11
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/conf/config.ini1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/eclipse.ini5
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/config.ini2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-config.ini3
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-noshare-config.ini2
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java437
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Activator.java31
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java55
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java100
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java87
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java107
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java42
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java98
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java67
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java92
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java107
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java103
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java58
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java74
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java126
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java83
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java60
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java61
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java60
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java59
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java135
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java56
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java77
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java73
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java107
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java69
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java82
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestEclipseDataArea.java59
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java54
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java108
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java66
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.project34
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs343
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF30
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/about.html28
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java331
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Activator.java51
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java329
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java442
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java73
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java29
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java144
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java176
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java109
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminFactory.java43
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java58
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java255
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java202
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs341
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.ui.prefs60
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF33
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties18
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/optimizer.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.xml38
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/Activator.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/OptimizerApplication.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/DeltaComputer.java211
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/JarDeltaOptimizerStep.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java261
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffStep.java61
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffZipStep.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java280
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java63
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Messages.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java107
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Pack200OptimizerStep.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/messages.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/META-INF/MANIFEST.MF26
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/build.properties14
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/plugin.xml19
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/Activator.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/DeltaApplier.java184
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/JarDeltaProcessorStep.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchStep.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchZipStep.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.common/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.common/README.TXT2
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs351
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF28
-rw-r--r--bundles/org.eclipse.equinox.p2.console/Provisioning console.launch22
-rw-r--r--bundles/org.eclipse.equinox.p2.console/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.console/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.console/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.console/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java745
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java308
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.options41
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.core.prefs346
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.api.tools.prefs88
-rw-r--r--bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF75
-rw-r--r--bundles/org.eclipse.equinox.p2.core/OSGI-INF/agentProvider.xml7
-rw-r--r--bundles/org.eclipse.equinox.p2.core/OSGI-INF/eventBus.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.core/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.core/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.core/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.core/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java222
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/AgentLocation.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/EventBusComponent.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java189
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java155
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java263
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java497
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/LogHelper.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Messages.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java223
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/StringHelper.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarEntry.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarException.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarFile.java141
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarInputStream.java337
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/URLUtil.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/messages.properties16
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/ProvisioningListener.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/SynchronousProvisioningListener.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IAgentLocation.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgent.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgentProvider.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java134
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java137
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/package.html27
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentService.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentServiceFactory.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/package.html20
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.cvsignore3
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch21
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.project44
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs350
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs56
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF32
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/build.properties25
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/config.ini87
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/director app.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/director.product30
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/plugin.xml33
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml10
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Activator.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java662
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java1043
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties66
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java332
-rw-r--r--bundles/org.eclipse.equinox.p2.director/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.director/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.director/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF42
-rw-r--r--bundles/org.eclipse.equinox.p2.director/OSGI-INF/director.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.director/OSGI-INF/planner.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.director/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.director/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.director/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.director/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ApplicablePatchQuery.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java112
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorActivator.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java320
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/InfiniteProgress.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java166
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PermissiveSlicer.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java279
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java1197
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java63
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java834
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Slicer.java213
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties51
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IDirector.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanExecutionHelper.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/RequestStatus.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/ProfileInclusionRules.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/package.html18
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.ui.prefs58
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF32
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/about.html38
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java289
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryChangeListener.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java221
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Messages.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java297
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/messages.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.classpath11
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.gitignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs349
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.pde.prefs24
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF13
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/plugin.properties13
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractCatalogSource.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractDiscoveryStrategy.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java320
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Messages.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Policy.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/messages.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/AbstractCatalogItem.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java152
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java366
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Certification.java102
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/FeatureFilter.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Group.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Icon.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Messages.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Overview.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Tag.java106
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/ValidationException.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/messages.properties23
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogItemComparator.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/.options3
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.core.prefs330
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF58
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/OSGI-INF/engine.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/OSGI-INF/profileRegistry.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/build.properties23
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/plugin.xml22
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/schema/actions.exsd137
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/schema/touchpoints.exsd144
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ActionManager.java127
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/BeginOperationEvent.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/CommitOperationEvent.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java172
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DownloadManager.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java123
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineComponent.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineSession.java401
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ISurrogateProfileHandler.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitEvent.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java122
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java126
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingAction.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingActionsException.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java102
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java325
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PhaseSet.java159
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java428
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileEvent.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileLock.java144
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java221
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepositoryFactory.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java180
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java302
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileRegistryComponent.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileWriter.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileXMLConstants.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java55
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java150
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/RollbackOperationEvent.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java859
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SizingPhaseSet.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java244
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TouchpointManager.java177
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TransactionEvent.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties106
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java199
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java92
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java124
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java156
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java138
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java124
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IPhaseSet.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfile.java192
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileEvent.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileRegistry.java130
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java176
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ISizingPhaseSet.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProfileScope.java100
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java372
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/package.html22
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/package.html17
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java172
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/package.html17
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs349
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF20
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/build.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.exemplarysetup/src/readme.txt1
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore4
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs330
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF35
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/build.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/plugin.xml17
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java94
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java72
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Constants.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java270
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java94
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java223
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java96
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Messages.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java373
-rw-r--r--bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/messages.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.options1
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.ui.prefs58
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF30
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/OSGI-INF/garbagecollector.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/build.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/plugin.xml26
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/schema/GarbageCollector.exsd104
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java229
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollectorComponent.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSet.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties11
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.externalToolBuilders/AntTaskBuilder.launch19
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.project44
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs345
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs60
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF16
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/build.properties26
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/lib/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/localbuild.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/plugin.xml21
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Main.java108
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java193
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java98
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java328
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java221
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html82
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/UnsignCommand.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/Unsigner.java147
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java121
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/IProcessStep.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java398
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java214
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntSignCommand.java59
-rw-r--r--bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore5
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch20
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.project44
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs353
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs60
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.0_Foundation-1.0.profile24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.1_Foundation-1.1.profile30
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.2.profile47
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.3.profile68
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.4.profile129
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.5.profile157
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/JRE-1.1.profile22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/JavaSE-1.6.profile194
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF44
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Plugins and Features.launch22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator SDK.launch24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Update Site.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.0.profile22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.1.profile23
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.2.profile24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/build.properties33
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/config.ini57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/generator.product30
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/p2-izer update site.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Activator.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java422
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/LocalizationHelper.java200
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java731
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java363
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java514
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java146
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java245
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java197
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java180
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java538
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java278
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java179
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java1402
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java142
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IncrementalGenerator.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java1434
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/URLEntry.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java223
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/TaskMessages.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/messages.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch17
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.project49
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/build.properties28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml9
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml42
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd129
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java374
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java156
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java359
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java344
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java103
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java147
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java934
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java382
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.settings/.api_filters11
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs345
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF91
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/build.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java143
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/EnumDefinition.java303
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java227
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java397
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java148
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java154
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java226
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java260
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java291
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java191
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java94
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java166
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java325
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java342
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java1734
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java428
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java342
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java96
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java139
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java392
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java134
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java94
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java157
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java490
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java293
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java89
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java176
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java147
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java227
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java135
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java171
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java107
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java184
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java61
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java631
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java283
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java356
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java204
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java149
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties72
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java305
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java774
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java198
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java470
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java111
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java200
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java59
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java400
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java205
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html16
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html18
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html17
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java172
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java167
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java102
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java100
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java519
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html18
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/.settings/.api_filters11
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF33
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Activator.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IFailedStatusEvaluator.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IStatusCodes.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Messages.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java164
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlannerResolutionJob.java123
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/ResolutionResult.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/SearchForUpdatesResolutionJob.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/messages.properties44
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/IProfileChangeJob.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java177
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileChangeOperation.java384
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningJob.java227
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java228
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RepositoryTracker.java276
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/Update.java72
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java342
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/package.html33
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.classpath8
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch20
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch20
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.project44
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs348
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/Features and Bundles Publisher.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF68
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/ant_tasks/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/build.properties29
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/plugin.xml47
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.0_Foundation-1.0.profile24
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.1_Foundation-1.1.profile30
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.2.profile47
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.3.profile68
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.4.profile129
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.5.profile157
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/JRE-1.1.profile22
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/JavaSE-1.6.profile194
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.0.profile22
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.1.profile23
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.2.profile24
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml36
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java138
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java137
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java544
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java130
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java265
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java269
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java98
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java760
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties31
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java3339
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java552
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java349
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAction.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java109
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java116
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java256
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java99
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java127
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootFilesAdvice.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IUpdateDescriptorAdvice.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java240
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java164
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAdvice.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java187
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java183
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java592
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java149
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java822
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java398
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java219
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java258
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java100
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java326
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java189
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java659
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java19
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java101
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java187
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java315
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java198
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java285
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java215
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java138
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java182
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/TaskMessages.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/messages.properties14
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs347
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF15
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/model/p2ql.bnf67
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/plugin.properties8
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html18
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfoReader.java242
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java502
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java154
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java323
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java250
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.core.prefs330
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/META-INF/MANIFEST.MF10
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/build.properties14
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/DirectByteArrayOutputStream.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarConstants.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarEntry.java188
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarInputStream.java203
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarOutputStream.java206
-rw-r--r--bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarUtil.java204
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.classpath11
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.gitignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.core.prefs349
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.pde.prefs24
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF18
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/build.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/plugin.properties17
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/plugin.xml105
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/AllDiscoveryTests.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/DiscoveryTestConstants.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java104
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryRemoteTest.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryTest.java153
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/DirectoryParserTest.java106
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/RemoteBundleDiscoveryStrategyTest.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/AbstractMockFactory.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogCategoryMockFactory.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogItemMockFactory.java112
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockBundleDiscoveryStrategy.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java88
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/test.xml63
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/.project17
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/build.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/feature.xml20
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/.project17
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/build.properties1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/feature.xml24
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/artifacts.jarbin589 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/content.jarbin994 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test1_1.0.0.201001200403.jarbin387 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test2_1.0.0.201001200403.jarbin407 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/.project28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.core.prefs343
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/AllTests.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Bug209233Test.java54
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/OptimizerTest.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/AllTests.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/ArtifactRepositoryMock.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java83
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/AutomatedTests.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestActivator.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestData.java168
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/AllTests.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/DirectByteArrayOutputStreamTest.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarEntryTest.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarTest.java150
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/jarprocessor.jar.pack.gzbin13587 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gzbin34588 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2-3.3.jbdiffbin7935 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2.exebin180224 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.3.exebin53248 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jarbin78074 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gzbin33474 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0-3.3.0.jbdiffbin24134 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njarbin40662 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.3.0.v20070607-1300.njarbin42387 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1-2.jarbin1893 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1.jarbin1958 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.2.jarbin1939 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/alien.zipbin1135 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.jarbin40669 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.sarbin50750 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.jarbin42387 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.sarbin57994 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/test.zipbin1267 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/.project28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.core.prefs354
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/All p2 UI tests.launch71
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF24
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/pom.xml34
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java172
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ActionTest.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/AllTests.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ColocatedRepositoryActionTest.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java138
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java72
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/RemoveColocatedRepositoryActionTest.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UninstallActionTest.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UpdateActionTest.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/AllTests.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/IUPropertyPagesTest.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java176
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallationHistoryPageTest.java140
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstalledSoftwarePageTest.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InvokeByHandlerTests.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/PreferencePagesTest.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RepositoryManipulationPageTest.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java98
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java221
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java20
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/AllTests.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/LicenseManagerTest.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java94
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java201
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AbstractQueryTest.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AllTests.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java55
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUWrapperTest.java156
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/CategoryElementWrapperTest.java109
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/LatestIUVersionElementWrapperTest.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/MockQueryProvider.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableMetadataRepositoryManagerTest.java275
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/TranslationSupportTests.java142
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/AllTests.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/SiteImportExportTest.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/test.xml59
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/.project28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.core.prefs351
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.ui.prefs61
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/build.properties16
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/plugin.xml9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/Activator.java55
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java308
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/.project28
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.core.prefs353
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.ui.prefs56
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/META-INF/MANIFEST.MF18
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/build.properties5
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/p2 test server.launch23
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/plugin.xml12
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java148
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/AlwaysFailContext.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/FlipFlopFailContext.java53
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/HttpConstants.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/LinearChange.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/MimeLookup.java738
-rwxr-xr-xbundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java96
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureContext.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java334
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ChopAndDelay.java141
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ContentLengthLier.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/FileMolester.java118
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/HelloWorld.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/LastModifiedLier.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Redirector.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/StatusCodeResponse.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/TimeOut.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Truncator.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/artifacts.xml29
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/features/aaFeature_1.0.0.jarbin670 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/plugins/aaPlugin_1.0.0.jarbin469 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/readme.txt2
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/index.html65
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/index.xml10
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/compositeContent.xml12
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/one/content.xml128
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/two/content.xml128
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/features/test.feature_1.0.0.jarbin847 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.bundle_1.0.0.jarbin1058 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.fragment_1.0.0.jarbin386 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/site.xml4
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.tools/README.txt1
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs330
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF49
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml236
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Activator.java32
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java115
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java128
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java255
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java144
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java246
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java347
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java284
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java93
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java106
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java99
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/Messages.java36
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java111
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java66
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java260
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java102
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/messages.properties25
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties30
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java125
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java70
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationConstants.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java278
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java184
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java134
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Messages.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java128
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java191
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java120
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/messages.properties14
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html18
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.cvsignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF25
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml113
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Activator.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java722
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/ClosedBackupStoreException.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/IBackupStore.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/LazyBackupStore.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Messages.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java139
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java166
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java120
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java103
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java145
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java154
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java114
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java48
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java92
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties47
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF41
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/artifact_repo_obj.gifbin545 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gifbin585 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/metadata_repo_obj.gifbin353 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/profile_obj.gifbin368 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/uninstalled_iu.gifbin237 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/icons/provision.gifbin368 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/plugin.properties26
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/plugin.xml101
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java73
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java90
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java121
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java212
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java135
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java216
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java151
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java92
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java258
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java224
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java245
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java74
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java50
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java257
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java147
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties69
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/PreferenceConstants.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java55
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/.gitignore1
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.core.prefs349
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.team.ui.prefs3
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.pde.prefs24
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/META-INF/MANIFEST.MF27
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/build.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/icons/etool16/find.pngbin380 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_disabled_obj.gifbin237 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_obj.gifbin585 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_update_obj.gifbin332 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/message_info.gifbin267 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/icons/ovr32/message_warning.gifbin591 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/icons/wizban/banner-discovery.pngbin4291 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/plugin.properties13
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/plugin.xml51
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryImages.java100
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryUi.java63
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/Messages.java33
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowBundleCatalogCommandHandler.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowRepositoryCatalogCommandHandler.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/messages.properties2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java295
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositoryDiscoveryStrategy.java205
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositorySource.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/CommonColors.java186
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListItem.java279
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java499
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/FilteredViewer.java245
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientCanvas.java334
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientToolTip.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/Messages.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java340
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/SelectionProviderAdapter.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java416
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/WorkbenchUtil.java206
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/messages.properties14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/AbstractDiscoveryItem.java105
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogConfiguration.java110
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogFilter.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogPage.java106
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java621
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CategoryItem.java88
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryItem.java246
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryResources.java122
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryWizard.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/Messages.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/OverviewToolTip.java194
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/messages.properties39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.project34
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF38
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gifbin73 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gifbin852 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gifbin600 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gifbin1005 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml23
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java87
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java182
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java236
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java383
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java304
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java305
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/IAutomaticUpdaterHelpContextIds.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java31
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java173
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/StatusLineCLabelContribution.java133
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties72
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters19
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF30
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/build.properties20
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties29
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml124
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java152
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java47
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java159
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java230
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java76
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java92
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties31
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java151
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF56
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/OSGI-INF/repositoryTracker_component.xml7
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/OSGI-INF/serviceui.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/about.html28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/build.properties21
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/obj/artifact_repo_obj.gifbin545 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/obj/category_obj.gifbin572 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_obj.gifbin237 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_obj.gifbin585 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_update_obj.gifbin332 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/obj/metadata_repo_obj.gifbin353 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/obj/profile_obj.gifbin368 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/wizban/def_wizban.jpgbin33456 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/wizban/install_wiz.gifbin3550 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/wizban/revert_wiz.gifbin3388 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/wizban/uninstall_wiz.gifbin3719 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/icons/wizban/update_wiz.gifbin3744 -> 0 bytes
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/plugin.properties19
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/plugin.xml50
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java223
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementQueryDescriptor.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementWrapper.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/IProvHelpContextIds.java44
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java304
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java155
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIImages.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java255
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java236
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java145
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java230
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java55
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java177
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryLocationQuery.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationBeginningEvent.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationEndingEvent.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java292
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java189
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java41
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java97
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java212
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/PropertyDialogAction.java37
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java63
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java28
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java72
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java146
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java78
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java515
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java111
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java681
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java531
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java306
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java49
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java332
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ILayoutConstants.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java23
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositorySelectionListener.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ISelectableIUsPage.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java80
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java138
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java141
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IViewMenuProvider.java24
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java229
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java34
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java111
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java85
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java347
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java69
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java215
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java654
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java254
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java272
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java307
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java127
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java157
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java116
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java97
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java71
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java168
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java166
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties239
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java65
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java42
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java149
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java196
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java79
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java163
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java124
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IIUElement.java40
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IRepositoryElement.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java127
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java101
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java242
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java81
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java92
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java120
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java174
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java108
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java75
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java96
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java67
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java61
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java46
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java51
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java150
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java91
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java179
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java55
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java52
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java43
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java60
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java45
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java56
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java131
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java96
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IDeferredQueryTreeListener.java29
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IInputChangeListener.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUColumnConfig.java173
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java82
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java233
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java128
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java106
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java77
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java168
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java152
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java35
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java99
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java173
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java488
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java30
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java256
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java68
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java184
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java358
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java438
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java954
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java416
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html39
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.project39
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs329
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF24
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml8
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/about.html38
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/build.properties10
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties12
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java190
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java58
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateListener.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java38
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project39
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs343
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.ui.prefs57
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF23
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml10
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html28
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties9
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties13
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorFactoryImpl.java22
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java541
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java142
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java96
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.classpath7
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.cvsignore4
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.externalToolBuilders/Copy built version of simple configurator into metadata generator.launch30
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.project44
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs283
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.ui.prefs61
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF27
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/about.html28
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/build.properties18
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/localbuild.xml44
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/plugin.properties13
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/pom.xml14
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java68
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/Activator.java78
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java372
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorFactory.java29
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java152
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java59
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java65
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java127
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java82
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorConstants.java49
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java241
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/StateResolverUtils.java75
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/URIUtil.java185
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/Utils.java133
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.cvsignore3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.project11
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/Build Cloud Example.launch15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/build.properties120
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml40
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/readme.txt16
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/.project28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF30
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties10
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product107
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product.launch33
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.properties19
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml159
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin_customization.ini39
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml14
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java98
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java45
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java108
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java30
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java151
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java36
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java77
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java48
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java51
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceConstants.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceInitializer.java46
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java104
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java58
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.cvsignore3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.project11
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/Build Discovery Example.launch16
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/build.properties120
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/buildProduct.xml49
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/readme.txt16
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/.classpath11
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/.project28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/META-INF/MANIFEST.MF33
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/build.properties9
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/cloud.product111
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail-screenshot.pngbin17162 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.pngbin1791 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc-screenshot.pngbin55734 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc.pngbin1356 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/pop3.pngbin17071 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.properties19
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.xml210
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml14
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java76
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java45
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java108
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java30
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java151
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java36
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java77
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java29
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java51
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java104
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java58
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/.project11
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/Build PrestartUpdate Example.launch15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/build.properties119
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml26
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/readme.txt16
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.project28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF19
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/build.properties8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/plugin.xml97
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml14
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product105
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java90
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Application.java48
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationActionBarAdvisor.java91
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchWindowAdvisor.java102
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/MessagePopupAction.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/NavigationView.java151
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/OpenViewAction.java36
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java67
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/View.java77
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.project33
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF30
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/build.properties10
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.properties23
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml183
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml14
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product107
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Activator.java61
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Application.java45
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationActionBarAdvisor.java107
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchAdvisor.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchWindowAdvisor.java30
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/MessagePopupAction.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/NavigationView.java151
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/OpenViewAction.java36
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/View.java77
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.java33
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/IProvSDKHelpContextIds.java17
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java51
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java32
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceInitializer.java32
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java104
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java143
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java54
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.project28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF27
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/build.properties8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/plugin.xml97
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/sdknoautoupdates.product98
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Activator.java61
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Application.java45
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationActionBarAdvisor.java108
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchAdvisor.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchWindowAdvisor.java29
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/NavigationView.java151
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/OpenViewAction.java36
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/View.java77
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.classpath7
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.project28
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF29
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/build.properties8
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/mail.icobin26694 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.gifbin983 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.icnsbin35301 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample2.gifbin318 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample3.gifbin173 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/p2.inf3
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/plugin.xml97
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/product_lg.gifbin9559 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product121
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/splash.bmpbin135600 -> 0 bytes
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Activator.java61
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Application.java45
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationActionBarAdvisor.java108
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchAdvisor.java21
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchWindowAdvisor.java29
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ICommandIds.java15
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/MessagePopupAction.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/NavigationView.java151
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/OpenViewAction.java36
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Perspective.java25
-rw-r--r--examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/View.java77
-rw-r--r--features/org.eclipse.equinox.p2.core.feature/.project17
-rw-r--r--features/org.eclipse.equinox.p2.core.feature/build.properties4
-rw-r--r--features/org.eclipse.equinox.p2.core.feature/epl-v10.html328
-rw-r--r--features/org.eclipse.equinox.p2.core.feature/feature.properties164
-rw-r--r--features/org.eclipse.equinox.p2.core.feature/feature.xml236
-rw-r--r--features/org.eclipse.equinox.p2.core.feature/license.html107
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/.project17
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/build.properties11
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.discovery.feature/epl-v10.html328
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.discovery.feature/feature.properties171
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/feature.xml41
-rwxr-xr-xfeatures/org.eclipse.equinox.p2.discovery.feature/license.html107
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties16
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html328
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties144
-rw-r--r--features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html79
-rw-r--r--features/org.eclipse.equinox.p2.extras.feature/.project17
-rw-r--r--features/org.eclipse.equinox.p2.extras.feature/build.properties4
-rw-r--r--features/org.eclipse.equinox.p2.extras.feature/epl-v10.html328
-rw-r--r--features/org.eclipse.equinox.p2.extras.feature/feature.properties164
-rw-r--r--features/org.eclipse.equinox.p2.extras.feature/feature.xml77
-rw-r--r--features/org.eclipse.equinox.p2.extras.feature/license.html107
-rw-r--r--org.eclipse.equinox.p2.releng/.project11
-rw-r--r--org.eclipse.equinox.p2.releng/HOW TO RUN.txt1
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/.project17
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/build.properties11
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/epl-v10.html328
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.properties152
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.xml236
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/license.html113
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/.project17
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/build.properties11
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/epl-v10.html328
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.properties151
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.xml188
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/license.html113
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/.project17
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/build.properties13
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/customBuildCallbacks.xml39
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/epl-v10.html328
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.properties151
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.xml188
-rw-r--r--org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/license.html113
-rw-r--r--org.eclipse.equinox.p2.releng/ecf.psf18
-rw-r--r--org.eclipse.equinox.p2.releng/examples.psf9
-rw-r--r--org.eclipse.equinox.p2.releng/incubator.psf10
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.cvsignore1
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.project11
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml65
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/.project17
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml87
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.project17
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/obr.target31
-rw-r--r--org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/pom.xml40
-rw-r--r--org.eclipse.equinox.p2.releng/p2_users_R_3_6_api_cleanup_projectSet.psf12
-rw-r--r--org.eclipse.equinox.p2.releng/projectSet-extssh.psf70
-rw-r--r--org.eclipse.equinox.p2.releng/projectSet.psf70
1921 files changed, 0 insertions, 179152 deletions
diff --git a/bundles/ie.wombat.jbdiff.test/.classpath b/bundles/ie.wombat.jbdiff.test/.classpath
deleted file mode 100644
index 751c8f2e5..000000000
--- a/bundles/ie.wombat.jbdiff.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/ie.wombat.jbdiff.test/.cvsignore b/bundles/ie.wombat.jbdiff.test/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/ie.wombat.jbdiff.test/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/ie.wombat.jbdiff.test/.project b/bundles/ie.wombat.jbdiff.test/.project
deleted file mode 100644
index ac8a8a03f..000000000
--- a/bundles/ie.wombat.jbdiff.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>ie.wombat.jbdiff.test</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.jdt.core.prefs b/bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index dc78f95cd..000000000
--- a/bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Tue Dec 18 11:44:16 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.pde.core.prefs b/bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 0c5082bd7..000000000
--- a/bundles/ie.wombat.jbdiff.test/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Thu Nov 01 14:26:02 CET 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/ie.wombat.jbdiff.test/META-INF/MANIFEST.MF b/bundles/ie.wombat.jbdiff.test/META-INF/MANIFEST.MF
deleted file mode 100644
index f06cbc76e..000000000
--- a/bundles/ie.wombat.jbdiff.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: JBDiff Test Plug-in
-Bundle-SymbolicName: ie.wombat.jbdiff.test
-Bundle-Version: 0.1.0.qualifier
-Bundle-Activator: ie.wombat.jbdiff.test.Activator
-Import-Package: org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.junit,
- ie.wombat.jbdiff
diff --git a/bundles/ie.wombat.jbdiff.test/build.properties b/bundles/ie.wombat.jbdiff.test/build.properties
deleted file mode 100644
index 34d2e4d2d..000000000
--- a/bundles/ie.wombat.jbdiff.test/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/bundles/ie.wombat.jbdiff.test/pom.xml b/bundles/ie.wombat.jbdiff.test/pom.xml
deleted file mode 100644
index 2671b1898..000000000
--- a/bundles/ie.wombat.jbdiff.test/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>ie.wombat.jbdiff.test</artifactId>
- <version>0.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/Activator.java b/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/Activator.java
deleted file mode 100644
index 0d0bb3f2a..000000000
--- a/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/Activator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package ie.wombat.jbdiff.test;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- private static BundleContext context;
-
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- Activator.context = context;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- Activator.context = null;
- }
-
- /**
- * @return the context
- */
- public static BundleContext getContext() {
- return context;
- }
-
-}
diff --git a/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/DiffPatchTest.java b/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/DiffPatchTest.java
deleted file mode 100644
index 5f5e7d8f7..000000000
--- a/bundles/ie.wombat.jbdiff.test/src/ie/wombat/jbdiff/test/DiffPatchTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package ie.wombat.jbdiff.test;
-
-import ie.wombat.jbdiff.JBDiff;
-import ie.wombat.jbdiff.JBPatch;
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-
-public class DiffPatchTest extends TestCase {
-
- public void testNullData() throws Exception {
- bench("null.data", "null.data");
- }
-
- public void testOneData() throws Exception {
- bench("one.data", "one.data");
- }
-
- public void testOneHundredData() throws Exception {
- bench("onehundred.data", "onehundred.data");
- }
-
- public void testOneHundredXData() throws Exception {
- bench("onehundred.data", "onehundredX.data");
- }
-
- public void testOneXHundredXData() throws Exception {
- bench("onehundred.data", "oneXhundredX.data");
- }
-
- public void testPdeCoreJar() throws Exception {
- bench("org.eclipse.pde.core_3.2.jar", "org.eclipse.pde.core_3.3.jar");
- }
-
- public void testEclipse() throws Exception {
- bench("eclipse-3.2.exe", "eclipse-3.3.exe");
- }
-
- private void bench(String resource1, String resource2) throws Exception {
-
- byte[] oldData = getTestData(resource1);
- byte[] newData = getTestData(resource2);
-
- System.out.println(resource1 + "(" + (oldData.length / 1024)
- + " kb) -> " + resource2 + "(" + (newData.length / 1024)
- + " kb)");
-
- diffAndPatchJBDiff(oldData, newData);
-
- System.out.println("");
- }
-
- /**
- * @param resource1
- * @param resource2
- * @throws IOException
- */
- private void diffAndPatchJBDiff(byte[] oldData, byte[] newData)
- throws IOException {
-
- try {
-
- long start = System.currentTimeMillis();
-
- byte[] diff = JBDiff.bsdiff(oldData, oldData.length, newData,
- newData.length);
-
- long diffEnd = System.currentTimeMillis();
-
- byte[] patch = JBPatch.bspatch(oldData, oldData.length, diff);
-
- long patchEnd = System.currentTimeMillis();
-
- System.out.println("JBDiff: Size= " + diff.length + " b ("
- + diff.length / 1024 + " kb), Diffing " + (diffEnd - start)
- + " ms, Patching: " + (patchEnd - diffEnd) + " ms");
-
- assertTrue(Arrays.equals(newData, patch));
-
- } catch (RuntimeException re) {
- System.err.println("JBDiff: error: " + re.getMessage());
- }
- }
-
- private static byte[] getTestData(String name) throws IOException {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- InputStream input = new BufferedInputStream(Activator.getContext()
- .getBundle().getEntry("testData/" + name).openStream());
- int r;
- while ((r = input.read()) != -1) {
- out.write(r);
- }
- input.close();
- out.close();
- return out.toByteArray();
- }
-} \ No newline at end of file
diff --git a/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.2.exe b/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.2.exe
deleted file mode 100644
index 7826d1ed8..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.2.exe
+++ /dev/null
Binary files differ
diff --git a/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.3.exe b/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.3.exe
deleted file mode 100644
index c5cd8f038..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/eclipse-3.3.exe
+++ /dev/null
Binary files differ
diff --git a/bundles/ie.wombat.jbdiff.test/testData/null.data b/bundles/ie.wombat.jbdiff.test/testData/null.data
deleted file mode 100644
index e69de29bb..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/null.data
+++ /dev/null
diff --git a/bundles/ie.wombat.jbdiff.test/testData/one.data b/bundles/ie.wombat.jbdiff.test/testData/one.data
deleted file mode 100644
index 56a6051ca..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/one.data
+++ /dev/null
@@ -1 +0,0 @@
-1 \ No newline at end of file
diff --git a/bundles/ie.wombat.jbdiff.test/testData/oneXhundredX.data b/bundles/ie.wombat.jbdiff.test/testData/oneXhundredX.data
deleted file mode 100644
index bb1077fd5..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/oneXhundredX.data
+++ /dev/null
@@ -1 +0,0 @@
-0123456789X0123456789X0123456789X0123456789X0123456789X0123456789X0123456789X0123456789X0123456789X0123456789X \ No newline at end of file
diff --git a/bundles/ie.wombat.jbdiff.test/testData/onehundred.data b/bundles/ie.wombat.jbdiff.test/testData/onehundred.data
deleted file mode 100644
index edd4e96b7..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/onehundred.data
+++ /dev/null
@@ -1 +0,0 @@
-0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 \ No newline at end of file
diff --git a/bundles/ie.wombat.jbdiff.test/testData/onehundredX.data b/bundles/ie.wombat.jbdiff.test/testData/onehundredX.data
deleted file mode 100644
index cb96be8dd..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/onehundredX.data
+++ /dev/null
@@ -1 +0,0 @@
-012345678901234567890123456789012345678901234567890X234567890123456789012345678901234567890123456789 \ No newline at end of file
diff --git a/bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.2.jar b/bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.2.jar
deleted file mode 100644
index f772f865e..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.2.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.3.jar b/bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.3.jar
deleted file mode 100644
index a78ea76fa..000000000
--- a/bundles/ie.wombat.jbdiff.test/testData/org.eclipse.pde.core_3.3.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/ie.wombat.jbdiff/.classpath b/bundles/ie.wombat.jbdiff/.classpath
deleted file mode 100644
index 751c8f2e5..000000000
--- a/bundles/ie.wombat.jbdiff/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/ie.wombat.jbdiff/.cvsignore b/bundles/ie.wombat.jbdiff/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/ie.wombat.jbdiff/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/ie.wombat.jbdiff/.project b/bundles/ie.wombat.jbdiff/.project
deleted file mode 100644
index 76d444192..000000000
--- a/bundles/ie.wombat.jbdiff/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>ie.wombat.jbdiff</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/ie.wombat.jbdiff/.settings/org.eclipse.core.resources.prefs b/bundles/ie.wombat.jbdiff/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index d46233b2e..000000000
--- a/bundles/ie.wombat.jbdiff/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Nov 14 12:49:16 EST 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/bundles/ie.wombat.jbdiff/.settings/org.eclipse.jdt.core.prefs b/bundles/ie.wombat.jbdiff/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f99d27198..000000000
--- a/bundles/ie.wombat.jbdiff/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-#Tue Dec 18 11:43:17 EST 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/bundles/ie.wombat.jbdiff/.settings/org.eclipse.pde.core.prefs b/bundles/ie.wombat.jbdiff/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 950e19447..000000000
--- a/bundles/ie.wombat.jbdiff/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Thu Nov 01 14:00:53 CET 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/ie.wombat.jbdiff/META-INF/MANIFEST.MF b/bundles/ie.wombat.jbdiff/META-INF/MANIFEST.MF
deleted file mode 100644
index ea5df2540..000000000
--- a/bundles/ie.wombat.jbdiff/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Jbdiff Plug-in
-Bundle-SymbolicName: ie.wombat.jbdiff
-Bundle-Version: 0.1.0.qualifier
-Import-Package: org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Export-Package: ie.wombat.jbdiff
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
diff --git a/bundles/ie.wombat.jbdiff/about.html b/bundles/ie.wombat.jbdiff/about.html
deleted file mode 100644
index bf09c26d6..000000000
--- a/bundles/ie.wombat.jbdiff/about.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-
-
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-
-
- <title>About</title>
-</head>
-
-
-<body lang="EN-US">
-
-<h3>About This Content</h3>
-
-<p>June 5, 2006</p>
-
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").
- Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
- Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
- at <a href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
- being redistributed by another party ("Redistributor") and different terms and conditions may
- apply to your use of any object code in the Content. Check the Redistributor&rsquo;s license
- that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
- indicated below, the terms and conditions of the EPL still apply to any source code in the Content
- and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you
- did not receive this Content directly from the Eclipse Foundation, the following is provided
- for informational purposes only, and you should look to the Redistributor&rsquo;s license for
- terms and conditions of use.</p>
-
-<em>
-<h4>ie.wombat.jbdiff&nbsp;</h4>
-
-<p>This library version is based on JBDiff (<a href="http://www.wombat.ie/software/jbdiff/downloads/">http://www.wombat.ie/software/jbdiff/downloads/</a>) which is also available under the OSI Approved :: BSD License (original) <a href="http://www.opensource.org/licenses/bsd-license.html">http://www.opensource.org/licenses/bsd-license.html</a><br />
-
-</p>
-
-</em>
-</body>
-</html>
diff --git a/bundles/ie.wombat.jbdiff/build.properties b/bundles/ie.wombat.jbdiff/build.properties
deleted file mode 100644
index 34d2e4d2d..000000000
--- a/bundles/ie.wombat.jbdiff/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/bundles/ie.wombat.jbdiff/pom.xml b/bundles/ie.wombat.jbdiff/pom.xml
deleted file mode 100644
index 37e283127..000000000
--- a/bundles/ie.wombat.jbdiff/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>ie.wombat.jbdiff</artifactId>
- <version>0.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBDiff.java b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBDiff.java
deleted file mode 100644
index 711fbd425..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBDiff.java
+++ /dev/null
@@ -1,612 +0,0 @@
-/*
- * Copyright (c) 2005, Joe Desbonnet, (jdesbonnet@gmail.com)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the <organization> nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package ie.wombat.jbdiff;
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.zip.GZIPOutputStream;
-
-/**
- * Java Binary Diff utility. Based on bsdiff (v4.2) by Colin Percival (see
- * http://www.daemonology.net/bsdiff/ ) and distributed under BSD license.
- *
- * <p>
- * Running this on large files will probably require an increase of the default
- * maximum heap size (use java -Xmx200m)
- * </p>
- *
- * @author Joe Desbonnet, joe@galway.net
- *
- */
-public class JBDiff {
-
- // JBDiff extensions by Stefan.Liebig@compeople.de:
- //
- // - uses GZIP compressor to compress ALL of the blocks (ctrl,diff,extra).
- // - added interfaces that allows using of JBDiff with streams and byte
- // arrays.
-
-// private static final String VERSION = "jbdiff-0.1.0.1";
-
- // This is ´jbdiff40´.
- private static final byte[] MAGIC_BYTES = new byte[] { 0x6a, 0x62, 0x64,
- 0x69, 0x66, 0x66, 0x34, 0x30 };
-
- private final static void split(int[] I, int[] V, int start, int len, int h) {
-
- int i, j, k, x, tmp, jj, kk;
-
- if (len < 16) {
- for (k = start; k < start + len; k += j) {
- j = 1;
- x = V[I[k] + h];
- for (i = 1; k + i < start + len; i++) {
- if (V[I[k + i] + h] < x) {
- x = V[I[k + i] + h];
- j = 0;
- }
-
- if (V[I[k + i] + h] == x) {
- tmp = I[k + j];
- I[k + j] = I[k + i];
- I[k + i] = tmp;
- j++;
- }
-
- }
-
- for (i = 0; i < j; i++) {
- V[I[k + i]] = k + j - 1;
- }
- if (j == 1) {
- I[k] = -1;
- }
- }
-
- return;
- }
-
- x = V[I[start + len / 2] + h];
- jj = 0;
- kk = 0;
- for (i = start; i < start + len; i++) {
- if (V[I[i] + h] < x) {
- jj++;
- }
- if (V[I[i] + h] == x) {
- kk++;
- }
- }
-
- jj += start;
- kk += jj;
-
- i = start;
- j = 0;
- k = 0;
- while (i < jj) {
- if (V[I[i] + h] < x) {
- i++;
- } else if (V[I[i] + h] == x) {
- tmp = I[i];
- I[i] = I[jj + j];
- I[jj + j] = tmp;
- j++;
- } else {
- tmp = I[i];
- I[i] = I[kk + k];
- I[kk + k] = tmp;
- k++;
- }
-
- }
-
- while (jj + j < kk) {
- if (V[I[jj + j] + h] == x) {
- j++;
- } else {
- tmp = I[jj + j];
- I[jj + j] = I[kk + k];
- I[kk + k] = tmp;
- k++;
- }
-
- }
-
- if (jj > start) {
- split(I, V, start, jj - start, h);
- }
-
- for (i = 0; i < kk - jj; i++) {
- V[I[jj + i]] = kk - 1;
- }
-
- if (jj == kk - 1) {
- I[jj] = -1;
- }
-
- if (start + len > kk) {
- split(I, V, kk, start + len - kk, h);
- }
-
- }
-
- /**
- * Fast suffix sporting. Larsson and Sadakane's qsufsort algorithm. See
- * http://www.cs.lth.se/Research/Algorithms/Papers/jesper5.ps
- *
- * @param I
- * @param V
- * @param oldBuf
- * @param oldsize
- */
- private static void qsufsort(int[] I, int[] V, byte[] oldBuf, int oldsize) {
-
- // int oldsize = oldBuf.length;
- int[] buckets = new int[256];
-
- // No need to do that in Java.
- // for ( int i = 0; i < 256; i++ ) {
- // buckets[i] = 0;
- // }
-
- for (int i = 0; i < oldsize; i++) {
- buckets[oldBuf[i] & 0xff]++;
- }
-
- for (int i = 1; i < 256; i++) {
- buckets[i] += buckets[i - 1];
- }
-
- for (int i = 255; i > 0; i--) {
- buckets[i] = buckets[i - 1];
- }
-
- buckets[0] = 0;
-
- for (int i = 0; i < oldsize; i++) {
- I[++buckets[oldBuf[i] & 0xff]] = i;
- }
-
- I[0] = oldsize;
- for (int i = 0; i < oldsize; i++) {
- V[i] = buckets[oldBuf[i] & 0xff];
- }
- V[oldsize] = 0;
-
- for (int i = 1; i < 256; i++) {
- if (buckets[i] == buckets[i - 1] + 1) {
- I[buckets[i]] = -1;
- }
- }
-
- I[0] = -1;
-
- for (int h = 1; I[0] != -(oldsize + 1); h += h) {
- int len = 0;
- int i;
- for (i = 0; i < oldsize + 1;) {
- if (I[i] < 0) {
- len -= I[i];
- i -= I[i];
- } else {
- // if(len) I[i-len]=-len;
- if (len != 0) {
- I[i - len] = -len;
- }
- len = V[I[i]] + 1 - i;
- split(I, V, i, len, h);
- i += len;
- len = 0;
- }
-
- }
-
- if (len != 0) {
- I[i - len] = -len;
- }
- }
-
- for (int i = 0; i < oldsize + 1; i++) {
- I[V[i]] = i;
- }
- }
-
- /**
- * Count the number of bytes that match in oldBuf (starting at offset
- * oldOffset) and newBuf (starting at offset newOffset).
- *
- * @param oldBuf
- * @param oldOffset
- * @param newBuf
- * @param newOffset
- * @return
- */
- private final static int matchlen(byte[] oldBuf, int oldSize,
- int oldOffset, byte[] newBuf, int newSize, int newOffset) {
- // int end = Math
- // .min(oldBuf.length - oldOffset, newBuf.length - newOffset);
- int end = Math.min(oldSize - oldOffset, newSize - newOffset);
- for (int i = 0; i < end; i++) {
- if (oldBuf[oldOffset + i] != newBuf[newOffset + i]) {
- return i;
- }
- }
- return end;
- }
-
- private final static int search(int[] I, byte[] oldBuf, int oldSize,
- byte[] newBuf, int newSize, int newBufOffset, int start, int end,
- IntByRef pos) {
-
- if (end - start < 2) {
- int x = matchlen(oldBuf, oldSize, I[start], newBuf, newSize,
- newBufOffset);
- int y = matchlen(oldBuf, oldSize, I[end], newBuf, newSize,
- newBufOffset);
-
- if (x > y) {
- pos.value = I[start];
- return x;
- } else {
- pos.value = I[end];
- return y;
- }
- }
-
- int x = start + (end - start) / 2;
- if (Util.memcmp(oldBuf, oldSize, I[x], newBuf, newSize, newBufOffset) < 0) {
- return search(I, oldBuf, oldSize, newBuf, newSize, newBufOffset, x,
- end, pos);
- } else {
- return search(I, oldBuf, oldSize, newBuf, newSize, newBufOffset,
- start, x, pos);
- }
-
- }
-
- /**
- * @param oldFile
- * @param newFile
- * @param diffFile
- * @throws IOException
- */
- public static void bsdiff(File oldFile, File newFile, File diffFile)
- throws IOException {
- InputStream oldInputStream = new BufferedInputStream(
- new FileInputStream(oldFile));
- InputStream newInputStream = new BufferedInputStream(
- new FileInputStream(newFile));
- OutputStream diffOutputStream = new FileOutputStream(diffFile);
-
- byte[] diffBytes = bsdiff(oldInputStream, (int) oldFile.length(),
- newInputStream, (int) newFile.length());
-
- diffOutputStream.write(diffBytes);
- diffOutputStream.close();
- }
-
- /**
- * @param oldInputStream
- * @param oldsize
- * @param newInputStream
- * @param newsize
- * @return
- * @throws IOException
- */
- public static byte[] bsdiff(InputStream oldInputStream, int oldsize,
- InputStream newInputStream, int newsize) throws IOException {
-
- byte[] oldBuf = new byte[oldsize];
-
- Util.readFromStream(oldInputStream, oldBuf, 0, oldsize);
- oldInputStream.close();
-
- byte[] newBuf = new byte[newsize];
- Util.readFromStream(newInputStream, newBuf, 0, newsize);
- newInputStream.close();
-
- return bsdiff(oldBuf, oldsize, newBuf, newsize);
- }
-
- /**
- * @param oldBuf
- * @param oldsize
- * @param newBuf
- * @param newsize
- * @return
- * @throws IOException
- */
- public static byte[] bsdiff(byte[] oldBuf, int oldsize, byte[] newBuf,
- int newsize) throws IOException {
-
- int[] I = new int[oldsize + 1];
- qsufsort(I, new int[oldsize + 1], oldBuf, oldsize);
-
- // diff block
- int dblen = 0;
- byte[] db = new byte[newsize];
-
- // extra block
- int eblen = 0;
- byte[] eb = new byte[newsize];
-
- /*
- * Diff file is composed as follows:
- *
- * Header (32 bytes) Data (from offset 32 to end of file)
- *
- * Header: Offset 0, length 8 bytes: file magic "jbdiff40" Offset 8,
- * length 8 bytes: length of compressed ctrl block Offset 16, length 8
- * bytes: length of compressed diff block Offset 24, length 8 bytes:
- * length of new file
- *
- * Data: 32 (length ctrlBlockLen): ctrlBlock (bzip2) 32+ctrlBlockLen
- * (length diffBlockLen): diffBlock (bzip2) 32+ctrlBlockLen+diffBlockLen
- * (to end of file): extraBlock (bzip2)
- *
- * ctrlBlock comprises a set of records, each record 12 bytes. A record
- * comprises 3 x 32 bit integers. The ctrlBlock is not compressed.
- */
-
- ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
- DataOutputStream diffOut = new DataOutputStream(byteOut);
-
- /*
- * Write as much of header as we have now. Size of ctrlBlock and
- * diffBlock must be filled in later.
- */
- diffOut.write(MAGIC_BYTES);
- diffOut.writeLong(-1); // place holder for ctrlBlockLen
- diffOut.writeLong(-1); // place holder for diffBlockLen
- diffOut.writeLong(newsize);
- diffOut.flush();
-
- GZIPOutputStream bzip2Out = new GZIPOutputStream(diffOut);
- DataOutputStream dataOut = new DataOutputStream(bzip2Out);
-
- int oldscore, scsc;
-
- int overlap, Ss, lens;
- int i;
- int scan = 0;
- int len = 0;
- int lastscan = 0;
- int lastpos = 0;
- int lastoffset = 0;
-
- IntByRef pos = new IntByRef();
- // int ctrlBlockLen = 0;
-
- while (scan < newsize) {
- oldscore = 0;
-
- for (scsc = scan += len; scan < newsize; scan++) {
-
- len = search(I, oldBuf, oldsize, newBuf, newsize, scan, 0,
- oldsize, pos);
-
- for (; scsc < scan + len; scsc++) {
- if ((scsc + lastoffset < oldsize)
- && (oldBuf[scsc + lastoffset] == newBuf[scsc])) {
- oldscore++;
- }
- }
-
- if (((len == oldscore) && (len != 0)) || (len > oldscore + 8)) {
- break;
- }
-
- if ((scan + lastoffset < oldsize)
- && (oldBuf[scan + lastoffset] == newBuf[scan])) {
- oldscore--;
- }
- }
-
- if ((len != oldscore) || (scan == newsize)) {
- int s = 0;
- int Sf = 0;
- int lenf = 0;
- for (i = 0; (lastscan + i < scan) && (lastpos + i < oldsize);) {
- if (oldBuf[lastpos + i] == newBuf[lastscan + i])
- s++;
- i++;
- if (s * 2 - i > Sf * 2 - lenf) {
- Sf = s;
- lenf = i;
- }
- }
-
- int lenb = 0;
- if (scan < newsize) {
- s = 0;
- int Sb = 0;
- for (i = 1; (scan >= lastscan + i) && (pos.value >= i); i++) {
- if (oldBuf[pos.value - i] == newBuf[scan - i])
- s++;
- if (s * 2 - i > Sb * 2 - lenb) {
- Sb = s;
- lenb = i;
- }
- }
- }
-
- if (lastscan + lenf > scan - lenb) {
- overlap = (lastscan + lenf) - (scan - lenb);
- s = 0;
- Ss = 0;
- lens = 0;
- for (i = 0; i < overlap; i++) {
- if (newBuf[lastscan + lenf - overlap + i] == oldBuf[lastpos
- + lenf - overlap + i]) {
- s++;
- }
- if (newBuf[scan - lenb + i] == oldBuf[pos.value - lenb
- + i]) {
- s--;
- }
- if (s > Ss) {
- Ss = s;
- lens = i + 1;
- }
- }
-
- lenf += lens - overlap;
- lenb -= lens;
- }
-
- // ? byte casting introduced here -- might affect things
- for (i = 0; i < lenf; i++) {
- db[dblen + i] = (byte) (newBuf[lastscan + i] - oldBuf[lastpos
- + i]);
- }
-
- for (i = 0; i < (scan - lenb) - (lastscan + lenf); i++) {
- eb[eblen + i] = newBuf[lastscan + lenf + i];
- }
-
- dblen += lenf;
- eblen += (scan - lenb) - (lastscan + lenf);
-
- /*
- * Write control block entry (3 x int)
- */
- // diffOut.writeInt( lenf );
- // diffOut.writeInt( ( scan - lenb ) - ( lastscan + lenf ) );
- // diffOut.writeInt( ( pos[0] - lenb ) - ( lastpos + lenf ) );
- // ctrlBlockLen += 12;
- dataOut.writeInt(lenf);
- dataOut.writeInt((scan - lenb) - (lastscan + lenf));
- dataOut.writeInt((pos.value - lenb) - (lastpos + lenf));
-
- lastscan = scan - lenb;
- lastpos = pos.value - lenb;
- lastoffset = pos.value - scan;
- } // end if
- } // end while loop
-
- dataOut.flush();
- bzip2Out.finish();
-
- // now compressed ctrlBlockLen
- int ctrlBlockLen = diffOut.size() - Util.HEADER_SIZE;
- // System.err.println( "Diff: ctrlBlockLen=" + ctrlBlockLen );
-
- // GZIPOutputStream gzOut;
-
- /*
- * Write diff block
- */
- // gzOut = new GZIPOutputStream( diffOut );
- bzip2Out = new GZIPOutputStream(diffOut);
- bzip2Out.write(db, 0, dblen);
- bzip2Out.finish();
- bzip2Out.flush();
- int diffBlockLen = diffOut.size() - ctrlBlockLen - Util.HEADER_SIZE;
- // System.err.println( "Diff: diffBlockLen=" + diffBlockLen );
-
- /*
- * Write extra block
- */
- // gzOut = new GZIPOutputStream( diffOut );
- bzip2Out = new GZIPOutputStream(diffOut);
- bzip2Out.write(eb, 0, eblen);
- bzip2Out.finish();
- bzip2Out.flush();
- // long extraBlockLen = diffOut.size() - diffBlockLen - ctrlBlockLen -
- // HEADER_SIZE;
- // System.err.println( "Diff: extraBlockLen=" + extraBlockLen );
-
- diffOut.close();
-
- /*
- * Write missing header info.
- */
- ByteArrayOutputStream byteHeaderOut = new ByteArrayOutputStream(
- Util.HEADER_SIZE);
- DataOutputStream headerOut = new DataOutputStream(byteHeaderOut);
- headerOut.write(MAGIC_BYTES);
- headerOut.writeLong(ctrlBlockLen); // place holder for ctrlBlockLen
- headerOut.writeLong(diffBlockLen); // place holder for diffBlockLen
- headerOut.writeLong(newsize);
- headerOut.close();
-
- // Copy header information into the diff
- byte[] diffBytes = byteOut.toByteArray();
- byte[] headerBytes = byteHeaderOut.toByteArray();
-
- System.arraycopy(headerBytes, 0, diffBytes, 0, headerBytes.length);
-
- return diffBytes;
- // /*
- // * Write missing header info. Need to reopen the file with
- // RandomAccessFile
- // * for this.
- // */
- // RandomAccessFile diff = new RandomAccessFile( diffFile, "rw" );
- // diff.seek( 8 );
- // diff.writeLong( ctrlBlockLen ); // ctrlBlockLen (compressed) @offset
- // 8
- // diff.writeLong( diffBlockLen ); // diffBlockLen (compressed) @offset
- // 16
- // diff.close();
- }
-
- /**
- * Run JBDiff from the command line. Params: oldfile newfile difffile. diff
- * file will be created.
- *
- * @param arg
- * @throws IOException
- */
- public static void main(String[] arg) throws IOException {
-
- if (arg.length != 3) {
- System.err
- .println("usage example: java -Xmx200m ie.wombat.jbdiff.JBDiff oldfile newfile patchfile\n");
- return;
- }
-
- File oldFile = new File(arg[0]);
- File newFile = new File(arg[1]);
- File diffFile = new File(arg[2]);
-
- bsdiff(oldFile, newFile, diffFile);
-
- }
-
- private static class IntByRef {
- private int value;
- }
-}
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBPatch.java b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBPatch.java
deleted file mode 100644
index 7f91ecf1b..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/JBPatch.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (c) 2005, Joe Desbonnet, (jdesbonnet@gmail.com)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the <organization> nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */package ie.wombat.jbdiff;
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.zip.GZIPInputStream;
-
-/**
- * Java Binary patcher (based on bspatch by Colin Percival)
- *
- * @author Joe Desbonnet, joe@galway.net
- */
-public class JBPatch {
-
- // JBPatch extensions by Stefan.Liebig@compeople.de:
- //
- // - uses GZIP compressor to compress ALL of the blocks (ctrl,diff,extra).
- // - added an interface that allows using of JBPatch with streams and byte
- // arrays
-
-// private static final String VERSION = "jbdiff-0.1.0";
-
- /**
- * Run JBPatch from the command line. Params: oldfile newfile patchfile.
- * newfile will be created.
- *
- * @param arg
- * @throws IOException
- */
- public static void main(String[] arg) throws IOException {
-
- if (arg.length != 3) {
- System.err
- .println("usage example: java -Xmx200m ie.wombat.jbdiff.JBPatch oldfile newfile patchfile");
- }
-
- File oldFile = new File(arg[0]);
- File newFile = new File(arg[1]);
- File diffFile = new File(arg[2]);
-
- bspatch(oldFile, newFile, diffFile);
- }
-
- /**
- * @param oldFile
- * @param newFile
- * @param diffFile
- * @throws IOException
- */
- public static void bspatch(File oldFile, File newFile, File diffFile)
- throws IOException {
- InputStream oldInputStream = new BufferedInputStream(
- new FileInputStream(oldFile));
- byte[] diffBytes = new byte[(int) diffFile.length()];
- InputStream diffInputStream = new FileInputStream(diffFile);
- Util.readFromStream(diffInputStream, diffBytes, 0, diffBytes.length);
-
- byte[] newBytes = bspatch(oldInputStream, (int) oldFile.length(),
- diffBytes);
-
- OutputStream newOutputStream = new FileOutputStream(newFile);
- newOutputStream.write(newBytes);
- newOutputStream.close();
- }
-
- /**
- * @param oldInputStream
- * @param diffInputStream
- * @return
- */
- public static byte[] bspatch(InputStream oldInputStream, int oldsize,
- byte[] diffBytes) throws IOException {
- /*
- * Read in old file (file to be patched) to oldBuf
- */
- // int oldsize = (int) oldFile.length();
- // byte[] oldBuf = new byte[oldsize + 1];
- byte[] oldBuf = new byte[oldsize];
- // InputStream oldIn = new FileInputStream( oldFile );
- Util.readFromStream(oldInputStream, oldBuf, 0, oldsize);
- oldInputStream.close();
- // oldIn.close();
-
- return JBPatch.bspatch(oldBuf, oldsize, diffBytes);
- }
-
- /**
- * @param oldBuf
- * @param oldsize
- * @param diffBytes
- * @return
- * @throws IOException
- */
- public static byte[] bspatch(byte[] oldBuf, int oldsize, byte[] diffBytes)
- throws IOException {
- return bspatch(oldBuf, oldsize, diffBytes, diffBytes.length);
- }
-
- /**
- * @param oldBuf
- * @param oldsize
- * @param diffBuf
- * @param diffSize
- * @return
- * @throws IOException
- */
- public static byte[] bspatch(byte[] oldBuf, int oldsize, byte[] diffBuf,
- int diffSize) throws IOException {
-
- DataInputStream diffIn = new DataInputStream(new ByteArrayInputStream(
- diffBuf, 0, diffSize));
-
- // skip headerMagic at header offset 0 (length 8 bytes)
- diffIn.skip(8);
-
- // ctrlBlockLen after bzip2 compression at heater offset 8 (length 8
- // bytes)
- long ctrlBlockLen = diffIn.readLong();
-
- // diffBlockLen after bzip2 compression at header offset 16 (length 8
- // bytes)
- long diffBlockLen = diffIn.readLong();
-
- // size of new file at header offset 24 (length 8 bytes)
- int newsize = (int) diffIn.readLong();
-
- // System.err.println( "newsize=" + newsize );
- // System.err.println( "ctrlBlockLen=" + ctrlBlockLen );
- // System.err.println( "diffBlockLen=" + diffBlockLen );
- // System.err.println( "newsize=" + newsize );
-
- InputStream in;
- in = new ByteArrayInputStream(diffBuf, 0, diffSize);
- in.skip(Util.HEADER_SIZE);
- DataInputStream ctrlBlockIn = new DataInputStream(new GZIPInputStream(
- in));
-
- in = new ByteArrayInputStream(diffBuf, 0, diffSize);
- in.skip(ctrlBlockLen + Util.HEADER_SIZE);
- InputStream diffBlockIn = new GZIPInputStream(in);
-
- in = new ByteArrayInputStream(diffBuf, 0, diffSize);
- in.skip(diffBlockLen + ctrlBlockLen + Util.HEADER_SIZE);
- InputStream extraBlockIn = new GZIPInputStream(in);
-
- // byte[] newBuf = new byte[newsize + 1];
- byte[] newBuf = new byte[newsize];
-
- int oldpos = 0;
- int newpos = 0;
- int[] ctrl = new int[3];
- // int nbytes;
- while (newpos < newsize) {
-
- for (int i = 0; i <= 2; i++) {
- // ctrl[i] = diffIn.readInt();
- ctrl[i] = ctrlBlockIn.readInt();
- // System.err.println (" ctrl[" + i + "]=" + ctrl[i]);
- }
-
- if (newpos + ctrl[0] > newsize) {
- throw new IOException("Corrupt patch.");
- }
-
- /*
- * Read ctrl[0] bytes from diffBlock stream
- */
-
- Util.readFromStream(diffBlockIn, newBuf, newpos, ctrl[0]);
-
- for (int i = 0; i < ctrl[0]; i++) {
- if ((oldpos + i >= 0) && (oldpos + i < oldsize)) {
- newBuf[newpos + i] += oldBuf[oldpos + i];
- }
- }
-
- newpos += ctrl[0];
- oldpos += ctrl[0];
-
- if (newpos + ctrl[1] > newsize) {
- throw new IOException("Corrupt patch.");
- }
-
- Util.readFromStream(extraBlockIn, newBuf, newpos, ctrl[1]);
-
- newpos += ctrl[1];
- oldpos += ctrl[2];
- }
-
- // TODO: Check if at end of ctrlIn
- // TODO: Check if at the end of diffIn
- // TODO: Check if at the end of extraIn
-
- // This check is not needed since the byte array has been allocated with
- // this constraint!
- // if ( newBuf.length - 1 != newsize ) {
- // throw new IOException( "Corrupt patch." );
- // }
-
- ctrlBlockIn.close();
- diffBlockIn.close();
- extraBlockIn.close();
- diffIn.close();
-
- return newBuf;
- // OutputStream out = new FileOutputStream( newFile );
- // out.write( newBuf, 0, newBuf.length - 1 );
- // out.close();
- }
-}
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/LICENSE.txt b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/LICENSE.txt
deleted file mode 100644
index 8b8b4d503..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/LICENSE.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (c) 2005, Joe Desbonnet (jdesbonnet@gmail.com).
-* Based on a direct translation of bsdiff utility by Colin Percival
-* and available at http://www.daemonology.net/bsdiff/ under the
-* same license.
-
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the <organization> nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/ \ No newline at end of file
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/README.txt b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/README.txt
deleted file mode 100644
index 82356621e..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/README.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-README file for JBDiff (Java Binary Diff)
-Version: 0.1.1
-Release date: 1 Oct 2007
-
-JBDiff (Java Binary Diff) utility is a Java translation of the bsdiff (v4.2) utility
-by Colin Percival. See http://www.daemonology.net/bsdiff/
-
-The file format is similar to, but currently not compatible with the bsdiff utility.
-This is because bsdiff uses bzip2 for compression which is not available in the
-standard Java libraries. Instead I use gzip (java.util.zip.*)
-
-The diff utility is very memory hungry. Attempting to diff very large files with
-insufficient RAM may cause your computer to 'trash' (ie become unusably slow and may
-require a reset to recover). Comparing two 20MB files will take approx 80 seconds
-on a 2GHz Pentium 4 and will require a maximum heap size of at least 220 MBytes. The
-maximum heap size can be specified using the -Xmx switch to the Java VM (see examples
-below). The patch utility has more modest resource requirements.
-
-EXAMPLES:
-
-To compare old.bin with new.bin and produce diff file new-old.diff:
-
-java -Xmx200m -classpath jbdiff.jar ie.wombat.jbdiff.JBDiff old.bin new.bin new-old.diff
-
-To patch old.bin with new-old.diff to produce new.bin:
-
-java -Xmx200m -classpath jbdiff.jar ie.wombat.jbdiff.JBPatch old.bin new.bin new-old.diff
-
-TODO:
-
-This first release is a rather blind port of the bsdiff utility. A vast bulk of
-the code ported to Java without any modification. There is scope
-for optimization (the C bsdiff runs in approx 50% faster than JBDiff).
-
-Also it would be nice to be able to produce output that is compatible with bsdiff.
-I need a bzip2 library for that.
-
-Any suggestions, feedback and bugs will be much appreciated. Please email
-to joe@galway.net
-
-LICENSE:
-
-Now available under BSD license (previously GPL).
-
-CHANGES SINCE 0.1.0 RELEASE:
-
-Change of license from GPL v2 to BSD license.
-
-Joe Desbonnet
-jdesbonnet@gmail.com
-1 Oct 2007
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/Util.java b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/Util.java
deleted file mode 100644
index 54d5eaf8d..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/Util.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (c) 2005, Joe Desbonnet, (jdesbonnet@gmail.com)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the <organization> nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package ie.wombat.jbdiff;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * @author
- * @author Joe Desbonnet, joe@galway.net
- *
- */
-public class Util {
-
- // JBDiff extensions by Stefan.Liebig@compeople.de:
- //
- // - introduced a HEADER_SIZE constant here
-
- /**
- * Length of the diff file header.
- */
- public static final int HEADER_SIZE = 32;
-
- /**
- * Equiv of C library memcmp().
- *
- * @param s1
- * @param s1offset
- * @param s2
- * @param n
- * @return
- */
- /*
- * public final static int memcmp(byte[] s1, int s1offset, byte[] s2, int
- * s2offset, int n) {
- *
- * if ((s1offset + n) > s1.length) { n = s1.length - s1offset; } if
- * ((s2offset + n) > s2.length) { n = s2.length - s2offset; } for (int i =
- * 0; i < n; i++) { if (s1[i + s1offset] != s2[i + s2offset]) { return s1[i +
- * s1offset] < s2[i + s2offset] ? -1 : 1; } }
- *
- * return 0; }
- */
-
- /**
- * Equiv of C library memcmp().
- *
- * @param s1
- * @param s1offset
- * @param s2
- * @param n
- * @return
- */
- public final static int memcmp(byte[] s1, int s1Size, int s1offset,
- byte[] s2, int s2Size, int s2offset) {
-
- int n = s1Size - s1offset;
-
- if (n > (s2Size - s2offset)) {
- n = s2Size - s2offset;
- }
- for (int i = 0; i < n; i++) {
- if (s1[i + s1offset] != s2[i + s2offset]) {
- return s1[i + s1offset] < s2[i + s2offset] ? -1 : 1;
- }
- }
-
- return 0;
- // int n = s1.length - s1offset;
- //
- // if (n > (s2.length - s2offset)) {
- // n = s2.length - s2offset;
- // }
- // for (int i = 0; i < n; i++) {
- // if (s1[i + s1offset] != s2[i + s2offset]) {
- // return s1[i + s1offset] < s2[i + s2offset] ? -1 : 1;
- // }
- // }
- //
- // return 0;
- }
-
- /**
- * Read from input stream and fill the given buffer from the given offset up
- * to length len.
- *
- * @param in
- * @param buf
- * @param offset
- * @param len
- * @throws IOException
- */
- public static final void readFromStream(InputStream in, byte[] buf,
- int offset, int len) throws IOException {
-
- int totalBytesRead = 0;
- while (totalBytesRead < len) {
- int bytesRead = in.read(buf, offset + totalBytesRead, len
- - totalBytesRead);
- if (bytesRead < 0) {
- throw new IOException(
- "Could not read expected number of bytes.");
- }
- totalBytesRead += bytesRead;
- }
- }
-
-}
diff --git a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/readme-more.txt b/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/readme-more.txt
deleted file mode 100644
index dd65be179..000000000
--- a/bundles/ie.wombat.jbdiff/src/ie/wombat/jbdiff/readme-more.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-This library version is based on JBDiff (http://www.wombat.ie/software/jbdiff/downloads/jbdiff-0.1.1.tar.gz)
-which is also available under the OSI Approved :: BSD License (original)
-http://www.opensource.org/licenses/bsd-license.html
-
-Version 0.1.0.1
- - Extended interface so that it is not only file based and uses GZIP compressor for all data structures.
-
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/CDC-1.1%Foundation-1.1"/>
- <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.frameworkadmin.equinox/.cvsignore b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.project b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.project
deleted file mode 100644
index 256472c44..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.frameworkadmin.equinox</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f84716658..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,340 +0,0 @@
-#Wed Jan 23 10:00:41 EST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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.1
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.3
-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.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=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index ad9b6dd0f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:33 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 51a335031..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Nov 21 00:29:05 EST 2006
-eclipse.preferences.version=1
-pluginProject.equinox=false
-pluginProject.extensions=false
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
deleted file mode 100644
index 07e9fa750..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin.equinox;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Import-Package: org.eclipse.core.runtime.internal.adaptor,
- org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.frameworkadmin.utils,
- org.eclipse.equinox.internal.provisional.configuratormanipulator,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.osgi.framework.internal.core,
- org.eclipse.osgi.service.datalocation;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.environment;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.resolver;version="1.1.0";resolution:=optional,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.log;version="1.3.0",
- org.osgi.service.startlevel;version="1.0.0",
- org.osgi.util.tracker;version="1.3.0"
-Export-Package: org.eclipse.equinox.internal.frameworkadmin.equinox;x-friends:="org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.simpleconfigurator.manipulator",
- org.eclipse.equinox.internal.frameworkadmin.equinox.utils;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Service-Component: OSGI-INF/fwadmin.xml
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml b/bundles/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml
deleted file mode 100644
index e3f045a71..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/OSGI-INF/fwadmin.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.frameworkadmin.equinox">
- <implementation class="org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwAdminImpl"/>
- <service>
- <provide interface="org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin"/>
- </service>
- <property name="org.eclipse.equinox.frameworkhandler.framework.name" type="String" value="Equinox"/>
- <property name="org.eclipse.equinox.frameworkhandler.framework.version" type="String" value="3.3"/>
- <property name="org.eclipse.equinox.frameworkhandler.launcher.name" type="String" value="Eclipse.exe"/>
- <property name="org.eclipse.equinox.frameworkhandler.launcher.version" type="String" value="3.2"/>
- <reference bind="setStartLevel" cardinality="1..1" interface="org.osgi.service.startlevel.StartLevel" name="StartLevel" policy="static"/>
- <reference bind="setPlatformAdmin" cardinality="1..1" interface="org.eclipse.osgi.service.resolver.PlatformAdmin" name="PlatformAdmin" policy="static"/>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/about.html b/bundles/org.eclipse.equinox.frameworkadmin.equinox/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties b/bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties
deleted file mode 100644
index db8ea728e..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- OSGI-INF/
-src.includes = about.html
-source.. = src/
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties b/bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties
deleted file mode 100644
index 121a7e4b3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-###############################################################################
-pluginName = Equinox Framework Admin for Equinox
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
deleted file mode 100644
index 3ee50ae1b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.frameworkadmin.equinox</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
deleted file mode 100644
index 8058023d9..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherImpl.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.service.log.LogService;
-
-public class EclipseLauncherImpl {
- static String getStringOfCmd(String[] cmdarray) {
- StringBuffer sb = new StringBuffer();
- for (int i = 0; i < cmdarray.length; i++) {
- sb.append(cmdarray[i]);
- sb.append(" "); //$NON-NLS-1$
- }
- return sb.toString();
- }
-
- EquinoxFwAdminImpl fwAdmin = null;
-
- EclipseLauncherImpl(EquinoxFwAdminImpl fwAdmin) {
- this.fwAdmin = fwAdmin;
- }
-
- public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, IOException, FrameworkAdminRuntimeException {
- SimpleBundlesState.checkAvailability(fwAdmin);
- Log.log(LogService.LOG_DEBUG, this, "launch(Manipulator , File )", ""); //$NON-NLS-1$ //$NON-NLS-2$
- LauncherData launcherData = manipulator.getLauncherData();
- if (launcherData.getLauncher() == null)
- return launchInMemory(manipulator, cwd);
- return launchByLauncher(manipulator, cwd);
- }
-
- private Process launchByLauncher(Manipulator manipulator, File cwd) throws IOException {
- LauncherData launcherData = manipulator.getLauncherData();
-
- if (launcherData.getLauncher() == null)
- throw new IllegalStateException(Messages.exception_launcherLocationNotSet);
- String[] cmdarray = new String[] {launcherData.getLauncher().getAbsolutePath()};
- if (cwd == null)
- cwd = launcherData.getLauncher().getParentFile();
- Process process = Runtime.getRuntime().exec(cmdarray, null, cwd);
- Log.log(LogService.LOG_DEBUG, "\t" + getStringOfCmd(cmdarray)); //$NON-NLS-1$
- return process;
- }
-
- private Process launchInMemory(Manipulator manipulator, File cwd) throws IOException {
- LauncherData launcherData = manipulator.getLauncherData();
- Utils.checkAbsoluteFile(launcherData.getFwJar(), "fwJar"); //$NON-NLS-1$
- Utils.checkAbsoluteDir(cwd, "cwd"); //$NON-NLS-1$
-
- List cmdList = new LinkedList();
- if (launcherData.getJvm() != null)
- cmdList.add(launcherData.getJvm().getAbsolutePath());
- else
- cmdList.add("java"); //$NON-NLS-1$
-
- if (launcherData.getJvmArgs() != null)
- for (int i = 0; i < launcherData.getJvmArgs().length; i++)
- cmdList.add(launcherData.getJvmArgs()[i]);
-
- cmdList.add("-jar"); //$NON-NLS-1$
- cmdList.add(Utils.getRelativePath(launcherData.getFwJar(), cwd));
-
- EquinoxManipulatorImpl.checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
- cmdList.add(EquinoxConstants.OPTION_CONFIGURATION);
- cmdList.add(Utils.getRelativePath(launcherData.getFwPersistentDataLocation(), cwd));
-
- if (launcherData.isClean())
- cmdList.add(EquinoxConstants.OPTION_CLEAN);
-
- String[] cmdarray = new String[cmdList.size()];
- cmdList.toArray(cmdarray);
- Log.log(LogService.LOG_DEBUG, "In CWD = " + cwd + "\n\t" + getStringOfCmd(cmdarray)); //$NON-NLS-1$ //$NON-NLS-2$
- Process process = Runtime.getRuntime().exec(cmdarray, null, cwd);
- return process;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
deleted file mode 100644
index 38eb443e4..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.log.LogService;
-
-public class EclipseLauncherParser {
- private static final String MAC_OS_APP_FOLDER = ".app/Contents/MacOS"; //$NON-NLS-1$
- private static final String CONFIGURATION_FOLDER = "configuration"; //$NON-NLS-1$
-
- //this figures out the location of the data area on partial data read from the <eclipse>.ini
- private URI getOSGiInstallArea(List lines, URI base) {
- File osgiInstallArea = ParserUtils.getOSGiInstallArea(lines, null, base);
- if (osgiInstallArea != null)
- return URIUtil.makeAbsolute(osgiInstallArea.toURI(), base);
- return null;
- }
-
- private void setInstall(List lines, LauncherData launcherData, File launcherFolder) {
- if (launcherData.getFwConfigLocation() == null || launcherData.getFwJar() == null) {
- ParserUtils.removeArgument(EquinoxConstants.OPTION_INSTALL, lines);
- return;
- }
- String launcherString = launcherFolder.getAbsolutePath().replace('\\', '/');
- if (launcherString.endsWith(MAC_OS_APP_FOLDER)) {
- //We can do 3 calls to getParentFile without checking because
- launcherFolder = launcherFolder.getParentFile().getParentFile().getParentFile();
- }
- if (!ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()).equals(launcherFolder)) {
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_INSTALL, launcherFolder.getAbsolutePath().replace('\\', '/'), lines);
- }
- }
-
- void read(File launcherConfigFile, LauncherData launcherData) throws IOException {
- if (!launcherConfigFile.exists())
- return;
-
- List lines = FileUtils.loadFile(launcherConfigFile);
-
- URI launcherFolder = launcherData.getLauncher().getParentFile().toURI();
- getStartup(lines, launcherFolder);
- getFrameworkJar(lines, launcherFolder, launcherData);
- URI osgiInstallArea = getOSGiInstallArea(lines, launcherFolder);
- if (osgiInstallArea == null) {
- osgiInstallArea = launcherData.getFwJar() != null ? ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()).toURI() : launcherFolder;
- }
- URI configArea = getConfigurationLocation(lines, osgiInstallArea, launcherData);
- if (configArea == null)
- throw new FrameworkAdminRuntimeException(Messages.exception_nullConfigArea, ""); //$NON-NLS-1$
- getPersistentDataLocation(lines, osgiInstallArea, configArea, launcherData);
- getLauncherLibrary(lines, launcherFolder);
- getJVMArgs(lines, launcherData);
- getProgramArgs(lines, launcherData);
- getVM(lines, launcherFolder, launcherData);
-
- Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_configFile, launcherConfigFile.getAbsolutePath()));
- }
-
- private void getFrameworkJar(List lines, URI launcherFolder, LauncherData launcherData) {
- File fwJar = launcherData.getFwJar();
- if (fwJar != null)
- return;
- URI location = ParserUtils.getFrameworkJar(lines, launcherFolder);
- if (location != null)
- launcherData.setFwJar(URIUtil.toFile(location));
- }
-
- private void getPersistentDataLocation(List lines, URI osgiInstallArea, URI configArea, LauncherData launcherData) {
- //TODO The setting of the -clean could only do properly once config.ini has been read
- if (launcherData.getFwPersistentDataLocation() == null) {
- launcherData.setFwPersistentDataLocation(URIUtil.toFile(configArea), ParserUtils.isArgumentSet(EquinoxConstants.OPTION_CLEAN, lines));
- }
- }
-
- private void getVM(List lines, URI launcherFolder, LauncherData launcherData) {
- String vm = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_VM, lines);
- if (vm == null)
- return;
-
- URI VMFullPath;
- try {
- VMFullPath = URIUtil.makeAbsolute(FileUtils.fromPath(vm), launcherFolder);
- launcherData.setJvm(URIUtil.toFile(VMFullPath));
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_VM, VMFullPath.toString(), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, vm));
- return;
- }
- }
-
- private void setVM(List lines, File vm, URI launcherFolder) {
- if (vm == null) {
- if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_VM, lines) != null)
- return;
-
- ParserUtils.removeArgument(EquinoxConstants.OPTION_VM, lines);
- return;
- }
-
- URI vmRelativePath = null;
- if (vm.isAbsolute()) {
- vmRelativePath = launcherFolder.relativize(vm.toURI());
- } else {
- //For relative files, File#toURI will create an absolute URI by resolving against the current working directory, we don't want that
- String path = vm.getPath().replace('\\', '/');
- try {
- vmRelativePath = URIUtil.fromString(path);
- } catch (URISyntaxException e) {
- vmRelativePath = launcherFolder.relativize(vm.toURI());
- }
- }
-
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_VM, FileUtils.toPath(vmRelativePath).replace('\\', '/'), lines);
- }
-
- private void getJVMArgs(List lines, LauncherData launcherData) {
- ArrayList vmargs = new ArrayList(lines.size());
- boolean foundVmArgs = false;
- for (Iterator iterator = lines.iterator(); iterator.hasNext();) {
- String line = (String) iterator.next();
- if (!foundVmArgs) {
- if (EquinoxConstants.OPTION_VMARGS.equals(line))
- foundVmArgs = true;
- continue;
- }
- vmargs.add(line);
- }
-
- launcherData.setJvmArgs(null);
- launcherData.setJvmArgs((String[]) vmargs.toArray(new String[vmargs.size()]));
- }
-
- private void setJVMArgs(List lines, LauncherData launcherData) {
- ParserUtils.removeArgument(EquinoxConstants.OPTION_VMARGS, lines);
- if (launcherData.getJvmArgs() == null || launcherData.getJvmArgs().length == 0)
- return;
- String[] args = launcherData.getJvmArgs();
- lines.add(EquinoxConstants.OPTION_VMARGS);
- for (int i = 0; i < args.length; i++) {
- lines.add(args[i]);
- }
- }
-
- private void getProgramArgs(List lines, LauncherData launcherData) {
- ArrayList args = new ArrayList(lines.size());
- for (Iterator iterator = lines.iterator(); iterator.hasNext();) {
- String line = (String) iterator.next();
- if (EquinoxConstants.OPTION_VMARGS.equals(line))
- break;
- args.add(line);
- }
- launcherData.setProgramArgs(null);
- launcherData.setProgramArgs((String[]) args.toArray(new String[args.size()]));
- }
-
- private URI getLauncherLibrary(List lines, URI launcherFolder) {
- String launcherLibrary = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, lines);
- if (launcherLibrary == null)
- return null;
- URI result = null;
- try {
- result = URIUtil.makeAbsolute(FileUtils.fromPath(launcherLibrary), launcherFolder);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, result.toString(), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, launcherLibrary));
- return null;
- }
- return result;
- }
-
- private void setLauncherLibrary(List lines, URI launcherFolder) {
- String launcherLibrary = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, lines);
- if (launcherLibrary == null)
- return;
-
- try {
- URI result = URIUtil.makeRelative(FileUtils.fromPath(launcherLibrary), launcherFolder);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_LAUNCHER_LIBRARY, FileUtils.toPath(result).replace('\\', '/'), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, launcherLibrary));
- return;
- }
- }
-
- private URI getConfigurationLocation(List lines, URI osgiInstallArea, LauncherData data) {
- String configuration = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines);
- if (configuration == null)
- try {
- return URIUtil.makeAbsolute(new URI(CONFIGURATION_FOLDER), osgiInstallArea);
- } catch (URISyntaxException e1) {
- //ignore
- }
-
- URI result = null;
- try {
- result = URIUtil.makeAbsolute(FileUtils.fromPath(configuration), osgiInstallArea);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, result.toString(), lines);
- data.setFwConfigLocation(URIUtil.toFile(result));
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, configuration));
- return null;
- }
- return result;
- }
-
- private void setConfigurationLocation(List lines, URI osgiInstallArea, LauncherData data) {
- String result = FileUtils.toPath(URIUtil.makeRelative(data.getFwConfigLocation().toURI(), osgiInstallArea));
- //We don't write the default
- if (CONFIGURATION_FOLDER.equals(result)) {
- if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines) != null)
- ParserUtils.removeArgument(EquinoxConstants.OPTION_CONFIGURATION, lines);
- return;
- }
-
- if (ParserUtils.getValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, lines) == null) {
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_CONFIGURATION, result.replace('\\', '/'), lines);
- }
- return;
- }
-
- private URI getStartup(List lines, URI launcherFolder) {
- String startup = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_STARTUP, lines);
- if (startup == null)
- return null;
-
- URI result = null;
- try {
- result = URIUtil.makeAbsolute(FileUtils.fromPath(startup), launcherFolder);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_STARTUP, result.toString(), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_absolute, startup));
- return null;
- }
- return result;
- }
-
- private void setStartup(List lines, URI launcherFolder) {
- String startup = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_STARTUP, lines);
- if (startup == null)
- return;
-
- try {
- URI result = URIUtil.makeRelative(FileUtils.fromPath(startup), launcherFolder);
- ParserUtils.setValueForArgument(EquinoxConstants.OPTION_STARTUP, FileUtils.toPath(result).replace('\\', '/'), lines);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.log_failed_make_relative, startup));
- return;
- }
- }
-
- void save(EquinoxLauncherData launcherData, boolean backup) throws IOException {
- File launcherConfigFile = EquinoxManipulatorImpl.getLauncherConfigLocation(launcherData);
-
- if (launcherConfigFile == null)
- throw new IllegalStateException(Messages.exception_launcherLocationNotSet);
- if (!Utils.createParentDir(launcherConfigFile)) {
- throw new IllegalStateException(Messages.exception_failedToCreateDir);
- }
- //Tweak all the values to make them relative
- File launcherFolder = launcherData.getLauncher().getParentFile();
- List newlines = new ArrayList();
- newlines.addAll(Arrays.asList(launcherData.getProgramArgs()));
-
- setStartup(newlines, launcherFolder.toURI());
- setInstall(newlines, launcherData, launcherFolder);
- //Get the osgi install area
- File osgiInstallArea = ParserUtils.getOSGiInstallArea(newlines, null, launcherData);
- //setInstall(lines, osgiInstallArea, launcherFolder);
- setConfigurationLocation(newlines, osgiInstallArea.toURI(), launcherData);
- setLauncherLibrary(newlines, launcherFolder.toURI());
- // setFrameworkJar(newlines, launcherData.getFwJar());
- setVM(newlines, launcherData.getJvm(), launcherFolder.toURI());
-
- //We are done, let's update the program args in the launcher data
- launcherData.setProgramArgs(null);
- launcherData.setProgramArgs((String[]) newlines.toArray(new String[newlines.size()]));
-
- //append jvm args
- setJVMArgs(newlines, launcherData);
-
- // backup file if exists.
- if (backup)
- if (launcherConfigFile.exists()) {
- File dest = Utils.getSimpleDataFormattedFile(launcherConfigFile);
- if (!launcherConfigFile.renameTo(dest))
- throw new IOException(NLS.bind(Messages.exception_failedToRename, launcherConfigFile, dest));
- Log.log(LogService.LOG_INFO, this, "save()", NLS.bind(Messages.log_renameSuccessful, launcherConfigFile, dest)); //$NON-NLS-1$
- }
-
- //only write the file if we actually have content
- if (newlines.size() > 0) {
- BufferedWriter bw = null;
- try {
- bw = new BufferedWriter(new FileWriter(launcherConfigFile));
- for (int j = 0; j < newlines.size(); j++) {
- String arg = (String) newlines.get(j);
- if (arg == null)
- continue;
- bw.write(arg);
- bw.newLine();
- }
- bw.flush();
- Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_launcherConfigSave, launcherConfigFile));
- } finally {
- if (bw != null)
- bw.close();
- }
- }
- File previousLauncherIni = launcherData.getPreviousLauncherIni();
- if (previousLauncherIni != null && !previousLauncherIni.equals(launcherConfigFile))
- previousLauncherIni.delete();
- launcherData.setLauncherConfigLocation(launcherConfigFile);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
deleted file mode 100644
index 3fab73713..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
+++ /dev/null
@@ -1,730 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.framework.internal.core.FrameworkProperties;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.log.LogService;
-
-public class EquinoxBundlesState implements BundlesState {
- static final long DEFAULT_TIMESTAMP = 0L;
- private static final boolean DEBUG = false;
- // While we recognize the amd64 architecture, we change
- // this internally to be x86_64.
- private static final String INTERNAL_AMD64 = "amd64"; //$NON-NLS-1$
- private static final String INTERNAL_ARCH_I386 = "i386"; //$NON-NLS-1$
- public static final String[] PROPS = {"osgi.os", "osgi.ws", "osgi.nl", "osgi.arch", Constants.FRAMEWORK_SYSTEMPACKAGES, "osgi.resolverMode", Constants.FRAMEWORK_EXECUTIONENVIRONMENT, "osgi.resolveOptional", "osgi.genericAliases"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
-
- static boolean checkFullySupported() {
- //TODO - This was previously doing a bogus check by attempting to instantiate a particular class - it's not clear what this is trying to do
- return true;
- }
-
- /**
- * eclipse.exe will launch a fw where plugins/org.eclipse.osgi_*.*.*.*.jar
- * is an implementation of fw.
- *
- * @param launcherData
- * @param configData
- * @return File of fwJar to be used.
- */
- static File getFwJar(LauncherData launcherData, ConfigData configData) {
- return getFwJar(launcherData, configData, true);
- //
- // // EclipseLauncherParser launcherParser = new
- // EclipseLauncherParser(launcherData);
- // // launcherParser.read();
- // if (launcherData.getFwJar() != null)
- // return launcherData.getFwJar();
- //
- // // check -D arguments of jvmArgs ?
- // String[] jvmArgs = launcherData.getJvmArgs();
- // String location = null;
- // for (int i = 0; i < jvmArgs.length; i++) {
- // if (jvmArgs[i].endsWith("-D" + "osgi.framework=")) {
- // location = jvmArgs[i].substring(("-D" + "osgi.framework=").length());
- // }
- // }
- // if (location != null)
- // return new File(location);
- //
- // File ret = getSystemBundleFromBundleInfos(launcherData, configData);
- // if (ret != null)
- // return ret;
- // return getSystemBundleBySearching(launcherData);
- }
-
- private static File getFwJar(LauncherData launcherData, ConfigData configData, boolean checkBundleInfos) {
- if (launcherData.getFwJar() != null) {
- return launcherData.getFwJar();
- }
-
- // check -D arguments of jvmArgs ?
- String[] jvmArgs = launcherData.getJvmArgs();
- String location = null;
- for (int i = 0; i < jvmArgs.length; i++) {
- if (jvmArgs[i].endsWith("-D" + "osgi.framework=")) { //$NON-NLS-1$ //$NON-NLS-2$
- location = jvmArgs[i].substring(("-D" + "osgi.framework=").length()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- if (location != null) {
- return new File(location);
- }
-
- if (checkBundleInfos) {
- File ret = getSystemBundleFromBundleInfos(configData);
- if (ret != null) {
- return ret;
- }
- }
- return null;
- // return getSystemBundleBySearching(launcherData);
- }
-
- private static long getMaxId(State state) {
- BundleDescription[] bundleDescriptions = state.getBundles();
- long maxId = DEFAULT_TIMESTAMP;
- for (int i = 0; i < bundleDescriptions.length; i++)
- if (maxId < bundleDescriptions[i].getBundleId()) {
- maxId = bundleDescriptions[i].getBundleId();
- }
- return maxId;
- }
-
- private static File getSystemBundleFromBundleInfos(BundleInfo[] bundleInfos) {
- for (int i = 0; i < bundleInfos.length; i++) {
- File match = isSystemBundle(bundleInfos[i]);
- if (match != null)
- return match;
- }
- return null;
- }
-
- protected static File getSystemBundleFromBundleInfos(ConfigData configData) {
- BundleInfo[] bundleInfos = configData.getBundles();
- return getSystemBundleFromBundleInfos(bundleInfos);
- }
-
- static long getTimeStamp(File fwPersistentDataLocation) {
- if (fwPersistentDataLocation == null)
- return DEFAULT_TIMESTAMP;
-
- File file = new File(fwPersistentDataLocation, EquinoxConstants.PERSISTENT_DIR_NAME);
- if (!file.exists() || !file.isDirectory())
- return DEFAULT_TIMESTAMP;
- long ret = file.lastModified();
- File[] lists = file.listFiles();
- if (lists == null)
- return ret;
- for (int i = 0; i < lists.length; i++)
- if (ret < lists[i].lastModified())
- ret = lists[i].lastModified();
- return ret;
- }
-
- public static File isSystemBundle(BundleInfo bundleInfo) {
- if (bundleInfo == null || bundleInfo.getLocation() == null)
- return null;
- URI bundleLocation = bundleInfo.getLocation();
- try {
- String[] clauses = Utils.getClausesManifestMainAttributes(bundleLocation, Constants.BUNDLE_SYMBOLICNAME);
- if (bundleLocation.getPath().indexOf(EquinoxConstants.FW_SYMBOLIC_NAME) > 0)
- if (EquinoxConstants.PERSISTENT_DIR_NAME.equals(Utils.getPathFromClause(clauses[0])))
- return new File(bundleLocation);
- } catch (RuntimeException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- // "osgi.os", "osgi.ws", "osgi.nl", "osgi.arch",
- // Constants.FRAMEWORK_SYSTEMPACKAGES, "osgi.resolverMode",
- // Constants.FRAMEWORK_EXECUTIONENVIRONMENT, "osgi.resolveOptional"
- static Properties setDefaultPlatformProperties() {
- Properties platformProperties = new Properties();
- // set default value
-
- String nl = Locale.getDefault().toString();
- platformProperties.setProperty("osgi.nl", nl); //$NON-NLS-1$
-
- // TODO remove EclipseEnvironmentInfo
- String os = EclipseEnvironmentInfo.guessOS(System.getProperty("os.name"));//$NON-NLS-1$);
- platformProperties.setProperty("osgi.os", os); //$NON-NLS-1$
-
- String ws = EclipseEnvironmentInfo.guessWS(os);
- platformProperties.setProperty("osgi.ws", ws); //$NON-NLS-1$
-
- // if the user didn't set the system architecture with a command line
- // argument then use the default.
- String arch = null;
- String name = FrameworkProperties.getProperty("os.arch");//$NON-NLS-1$
- // Map i386 architecture to x86
- if (name.equalsIgnoreCase(INTERNAL_ARCH_I386))
- arch = org.eclipse.osgi.service.environment.Constants.ARCH_X86;
- // Map amd64 architecture to x86_64
- else if (name.equalsIgnoreCase(INTERNAL_AMD64))
- arch = org.eclipse.osgi.service.environment.Constants.ARCH_X86_64;
- else
- arch = name;
- platformProperties.setProperty("osgi.arch", arch); //$NON-NLS-1$
-
- platformProperties.setProperty(Constants.FRAMEWORK_SYSTEMPACKAGES, FrameworkProperties.getProperty(Constants.FRAMEWORK_SYSTEMPACKAGES));
- platformProperties.setProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT, FrameworkProperties.getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT));
- platformProperties.setProperty("osgi.resolveOptional", "" + "true".equals(FrameworkProperties.getProperty("osgi.resolveOptional"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- return platformProperties;
- }
-
- EquinoxFwAdminImpl fwAdmin = null;
- BundleContext context;
- Manipulator manipulator = null;
- Properties platfromProperties = new Properties();
- long maxId = DEFAULT_TIMESTAMP;
- StateObjectFactory soFactory = null;
- State state = null;
-
- /**
- * Map of String->BundleDescription, where the key is the bundle location.
- */
- private HashMap locationStateIndex = new HashMap();
-
- /**
- * Map of String->BundleDescription, where the key is the bundle name
- * and version as defined by the {@link #getKey(BundleDescription)} method.
- */
- private HashMap nameVersionStateIndex = new HashMap();
- private final PlatformAdmin platformAdmin;
-
- /**
- * If useFwPersistentData flag equals false, this constructor will not take
- * a framework persistent data into account. Otherwise, it will.
- *
- * @param context
- * @param fwAdmin
- * @param manipulator
- * @param useFwPersistentData
- */
- EquinoxBundlesState(BundleContext context, EquinoxFwAdminImpl fwAdmin, Manipulator manipulator, PlatformAdmin admin, boolean useFwPersistentData) {
- this.context = context;
- this.fwAdmin = fwAdmin;
- this.platformAdmin = admin;
- // copy manipulator object for avoiding modifying the parameters of the
- // manipulator.
- this.manipulator = fwAdmin.getManipulator();
- this.manipulator.setConfigData(manipulator.getConfigData());
- this.manipulator.setLauncherData(manipulator.getLauncherData());
- initialize(useFwPersistentData);
- }
-
- /**
- * This constructor does NOT take a framework persistent data into account.
- * It will create State object based on the specified platformProperties.
- *
- * @param context
- * @param fwAdmin
- * @param manipulator
- * @param platformProperties
- */
- EquinoxBundlesState(BundleContext context, EquinoxFwAdminImpl fwAdmin, Manipulator manipulator, PlatformAdmin admin, Properties platformProperties) {
- super();
- this.context = context;
- this.fwAdmin = fwAdmin;
- this.platformAdmin = admin;
- // copy manipulator object for avoiding modifying the parameters of the
- // manipulator.
- this.manipulator = fwAdmin.getManipulator();
- this.manipulator.setConfigData(manipulator.getConfigData());
- this.manipulator.setLauncherData(manipulator.getLauncherData());
- LauncherData launcherData = manipulator.getLauncherData();
- ConfigData configData = manipulator.getConfigData();
- BundleInfo[] bInfos = configData.getBundles();
- this.composeNewState(launcherData, configData, platformProperties, bInfos);
- }
-
- /**
- * compose new state without reading framework persistent data. The
- * configData.getFwDependentProps() is used for the composition.
- *
- * @param launcherData
- * @param configData
- * @param bInfos
- */
- private void composeNewState(LauncherData launcherData, ConfigData configData, BundleInfo[] bInfos) {
- this.composeNewState(launcherData, configData, configData.getProperties(), bInfos);
- }
-
- /**
- * compose new state without reading framework persistent data. The given
- * properties is used for the composition. If system bundle is not included
- * in the given bInfos, the fw jar launcherData contains will be used.
- *
- * @param launcherData
- * @param configData
- * @param properties
- * @param bInfos
- */
- private void composeNewState(LauncherData launcherData, ConfigData configData, Properties properties, BundleInfo[] bInfos) {
- //Note, there use to be a lot more code in this method
- File fwJar = getSystemBundleFromBundleInfos(configData);
- launcherData.setFwJar(fwJar);
- this.setFwJar(fwJar);
- composeState(configData.getBundles(), properties, null);
- resolve(true);
- }
-
- /**
- * compose state. If it cannot compose it by somehow, false is returned.
- *
- * @param bInfos
- * @param props
- * @param fwPersistentDataLocation
- * @return if it cannot compose it by somehow, false is returned.
- * @throws IllegalArgumentException
- * @throws FrameworkAdminRuntimeException
- */
- private boolean composeState(BundleInfo[] bInfos, Dictionary props, File fwPersistentDataLocation) throws IllegalArgumentException, FrameworkAdminRuntimeException {
- BundleInfo[] infos = manipulator.getConfigData().getBundles();
- this.manipulator.getConfigData().setBundles(null);
- SimpleBundlesState.checkAvailability(fwAdmin);
- this.setStateObjectFactory();
- state = null;
- boolean flagNewState = false;
- if (fwPersistentDataLocation != null) {
- //NOTE Here there was a big chunk of code reading the framework state persisted on disk
- // and I removed it because it was causing various problems. See in previous revision
- this.manipulator.getConfigData().setBundles(infos);
- return false;
- }
- state = soFactory.createState(true);
- createStateIndexes();
- flagNewState = true;
- if (props == null) {
- this.manipulator.getConfigData().setBundles(infos);
- return false;
- }
- setPlatformPropertiesToState(props);
- setPlatformProperties(state);
-
- try {
- maxId = state.getHighestBundleId();
- } catch (NoSuchMethodError e) {
- maxId = getMaxId(state);
- }
- if (DEBUG) {
- System.out.println(""); //$NON-NLS-1$
- Log.log(LogService.LOG_DEBUG, this, "composeExpectedState()", "installBundle():"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (flagNewState) {
- int indexSystemBundle = -1;
- for (int j = 0; j < bInfos.length; j++)
- if (isSystemBundle(bInfos[j]) != null) {
- indexSystemBundle = j;
- break;
- }
-
- if (indexSystemBundle > 0) {
- BundleInfo[] newBundleInfos = new BundleInfo[bInfos.length];
- newBundleInfos[0] = bInfos[indexSystemBundle];
- System.arraycopy(bInfos, 0, newBundleInfos, 1, indexSystemBundle);
- if (indexSystemBundle < bInfos.length - 1)
- System.arraycopy(bInfos, indexSystemBundle + 1, newBundleInfos, indexSystemBundle + 1, bInfos.length - indexSystemBundle - 1);
- bInfos = newBundleInfos;
- }
- }
- for (int j = 0; j < bInfos.length; j++) {
- if (DEBUG)
- Log.log(LogService.LOG_DEBUG, this, "composeExpectedState()", "bInfos[" + j + "]=" + bInfos[j]); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- try {
- this.installBundle(bInfos[j]);
- // System.out.println("install bInfos[" + j + "]=" + bInfos[j]);
- } catch (RuntimeException e) {
- //catch the exception and continue
- Log.log(LogService.LOG_ERROR, this, "composeExpectedState()", "BundleInfo:" + bInfos[j], e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return true;
- }
-
- private BundleInfo convertSystemBundle(BundleDescription toConvert) {
- // Converting the System Bundle
- boolean markedAsStarted = false;
- int sl = BundleInfo.NO_LEVEL;
-
- URI location = null;
- String symbolicNameTarget = toConvert.getSymbolicName();
- Version versionTarget = toConvert.getVersion();
- try {
- File fwJar = manipulator.getLauncherData().getFwJar();
- if (fwJar != null) {
- URI fwJarLocation = fwJar.toURI();
- String[] clauses = Utils.getClausesManifestMainAttributes(fwJarLocation, Constants.BUNDLE_SYMBOLICNAME);
- String fwJarSymbolicName = Utils.getPathFromClause(clauses[0]);
- String fwJarVersionSt = Utils.getManifestMainAttributes(fwJarLocation, Constants.BUNDLE_VERSION);
- if (fwJarSymbolicName.equals(symbolicNameTarget) && fwJarVersionSt.equals(versionTarget.toString())) {
- location = fwJarLocation;
- markedAsStarted = true;
- }
- }
- } catch (FrameworkAdminRuntimeException e1) {
- Log.log(LogService.LOG_ERROR, "", e1); //$NON-NLS-1$
- }
- return createBundleInfo(toConvert, markedAsStarted, sl, location, null);
- }
-
- private BundleInfo createBundleInfo(BundleDescription toConvert, boolean markedAsStarted, int sl, URI location, String fragmentHost) {
- BundleInfo result = new BundleInfo();
- result.setSymbolicName(toConvert.getSymbolicName());
- result.setVersion(toConvert.getVersion().toString());
- result.setLocation(location);
- result.setResolved(toConvert.isResolved());
- result.setMarkedAsStarted(markedAsStarted);
- result.setStartLevel(sl);
- result.setBundleId(toConvert.getBundleId());
- result.setFragmentHost(fragmentHost);
- return result;
- }
-
- public BundleInfo[] convertState(BundleDescription[] bundles) {
- BundleInfo[] originalBInfos = manipulator.getConfigData().getBundles();
- Map bundleInfoMap = new HashMap();
- for (int i = 0; i < originalBInfos.length; i++) {
- bundleInfoMap.put(originalBInfos[i].getLocation(), originalBInfos[i]);
- }
-
- BundleInfo[] result = new BundleInfo[bundles.length];
- for (int i = 0; i < bundles.length; i++) {
- if (bundles[i].getBundleId() == 0 && EquinoxConstants.FW_SYMBOLIC_NAME.equals(bundles[i].getSymbolicName())) {
- result[i] = convertSystemBundle(bundles[i]);
- continue;
- }
-
- boolean markedAsStarted = false;
- int sl = BundleInfo.NO_LEVEL;
-
- //URI location = FileUtils.getEclipseRealLocation(manipulator, bundles[i].getLocation());
- //TODO: I believe this is always an absolute URI
- URI location;
- try {
- location = new URI(bundles[i].getLocation());
- } catch (URISyntaxException e) {
- e.printStackTrace();
- throw new IllegalStateException("BundleDescription conversion problem" + e.getMessage()); //$NON-NLS-1$ //TODO path_fun
- }
- String fragmentHost = null;
- BundleInfo original = (BundleInfo) bundleInfoMap.get(location);
- if (original != null) {
- markedAsStarted = original.isMarkedAsStarted();
- sl = getStartLevel(original.getStartLevel());
- fragmentHost = original.getFragmentHost();
- }
- result[i] = createBundleInfo(bundles[i], markedAsStarted, sl, location, fragmentHost);
- }
- return result;
- }
-
- public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
- SimpleBundlesState.checkAvailability(fwAdmin);
- return convertState(state.getBundles());
- }
-
- Properties getPlatformProperties() {
- return platfromProperties;
- }
-
- public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
- Set set = new HashSet();
- URI realLocation = bInfo.getLocation();
- BundleDescription bundle = getBundleByLocation(realLocation);
- ImportPackageSpecification[] imports = bundle.getImportPackages();
- for (int i = 0; i < imports.length; i++) {
- BaseDescription supplier = imports[i].getSupplier();
- if (supplier == null) {
- if (!imports[i].getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_OPTIONAL))
- throw new IllegalStateException("Internal error: import supplier should not be null"); //$NON-NLS-1$
- } else
- set.add(supplier.getSupplier());
- }
- BundleDescription[] requires = bundle.getResolvedRequires();
- for (int i = 0; i < requires.length; i++) {
- set.add(requires[i]);
- }
- BundleDescription[] bundles = new BundleDescription[set.size()];
- set.toArray(bundles);
- return convertState(bundles);
- }
-
- private int getStartLevel(int startLevel) {
- return (startLevel == BundleInfo.NO_LEVEL ? manipulator.getConfigData().getInitialBundleStartLevel() : startLevel);
- }
-
- public BundleInfo getSystemBundle() {
- BundleDescription bundle = this.getSystemBundleDescription();
- return (bundle != null ? convertSystemBundle(bundle) : null);
- }
-
- private BundleDescription getSystemBundleDescription() {
- BundleDescription bundle = state.getBundle(0);
- if (bundle == null || bundle.getHost() != null) { // null or a
- // fragment bundle.
- return null;
- }
- return (EquinoxConstants.FW_SYMBOLIC_NAME.equals(bundle.getSymbolicName()) ? bundle : null);
- }
-
- public BundleInfo[] getSystemFragmentedBundles() {
- BundleDescription bundle = this.getSystemBundleDescription();
- if (bundle == null)
- return null;
- return convertState(bundle.getFragments());
- }
-
- public String[] getUnsatisfiedConstraints(BundleInfo bInfo) {
- URI realLocation = bInfo.getLocation();
- BundleDescription description = getBundleByLocation(realLocation);
- StateHelper helper = platformAdmin.getStateHelper();
- VersionConstraint[] constraints = helper.getUnsatisfiedConstraints(description);
- String[] ret = new String[constraints.length];
- for (int i = 0; i < constraints.length; i++)
- ret[i] = constraints[i].toString();
- return ret;
- }
-
- private void initialize(boolean useFwPersistentData) {
- LauncherData launcherData = manipulator.getLauncherData();
- ConfigData configData = manipulator.getConfigData();
- BundleInfo[] bInfos = configData.getBundles();
-
- if (!useFwPersistentData) {
- composeNewState(launcherData, configData, bInfos);
- return;
- }
-
- EquinoxManipulatorImpl.checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
- if (launcherData.isClean()) {
- composeNewState(launcherData, configData, bInfos);
- } else {
- if (manipulator.getLauncherData().getFwPersistentDataLocation() == null) {
- File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configData.getProperties(), launcherData);
- if (DEBUG)
- Log.log(LogService.LOG_DEBUG, this, "initialize(useFwPersistentDat)", "installArea=" + installArea); //$NON-NLS-1$ //$NON-NLS-2$
- if (installArea == null)
- throw new IllegalStateException(Messages.exception_noInstallArea);
- File fwPersistentDataLocation = new File(installArea, "configuration"); //$NON-NLS-1$
- manipulator.getLauncherData().setFwPersistentDataLocation(fwPersistentDataLocation, false);
- }
- if (!composeState(bInfos, null, manipulator.getLauncherData().getFwPersistentDataLocation()))
- composeNewState(launcherData, configData, bInfos);
- resolve(true);
- }
- }
-
- public void installBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- SimpleBundlesState.checkAvailability(fwAdmin);
-
- URI realLocation = bInfo.getLocation();
- if (getBundleByLocation(realLocation) != null)
- return;
-
- Dictionary manifest = Utils.getOSGiManifest(realLocation);
- if (manifest == null)
- return;
-
- String newSymbolicName = (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME);
- int position = newSymbolicName.indexOf(";"); //$NON-NLS-1$
- if (position >= 0)
- newSymbolicName = newSymbolicName.substring(0, position).trim();
- String newVersion = (String) manifest.get(Constants.BUNDLE_VERSION);
-
- if (getBundleByNameVersion(newSymbolicName, newVersion) != null)
- return;
-
- try {
- bInfo.setBundleId(++maxId);
- BundleDescription newBundleDescription = soFactory.createBundleDescription(state, manifest, realLocation.toString(), bInfo.getBundleId());
- addBundleToState(newBundleDescription);
- manipulator.getConfigData().addBundle(bInfo);
- } catch (BundleException e) {
- Log.log(LogService.LOG_WARNING, this, "installBundle(BundleInfo)", e); //$NON-NLS-1$
- }
- }
-
- public boolean isFullySupported() {
- return true;
- }
-
- public boolean isResolved() {
- return state.isResolved();
- }
-
- public boolean isResolved(BundleInfo bInfo) {
- URI realLocation = bInfo.getLocation();
- BundleDescription description = getBundleByLocation(realLocation);
- if (description == null)
- return false;
- return description.isResolved();
- }
-
- public void resolve(boolean increment) {
- state.resolve(increment);
- }
-
- void setFwJar(File fwJar) {
- manipulator.getLauncherData().setFwJar(fwJar);
- }
-
- /**
- * get platforme properties from the given state.
- *
- * @param state
- */
- private void setPlatformProperties(State state) {
- Dictionary platformProperties = state.getPlatformProperties()[0];
- platfromProperties.clear();
- if (platformProperties != null) {
- for (Enumeration enumeration = platformProperties.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- Object value = platformProperties.get(key);
- platfromProperties.setProperty(key, (String) value);
- }
- }
- if (DEBUG)
- Utils.printoutProperties(System.out, "PlatformProperties[0]", platfromProperties); //$NON-NLS-1$
- }
-
- /**
- * set platfromProperties required to compose state object into
- * platformProperties of this state.
- *
- * @param props
- */
- private void setPlatformPropertiesToState(Dictionary props) {
- Properties platformProperties = setDefaultPlatformProperties();
-
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- for (int i = 0; i < PROPS.length; i++) {
- if (key.equals(PROPS[i])) {
- platformProperties.put(key, props.get(key));
- break;
- }
- }
- }
- state.setPlatformProperties(platformProperties);
- }
-
- private void setStateObjectFactory() {
- if (soFactory == null)
- soFactory = platformAdmin.getFactory();
- }
-
- public String toString() {
- if (state == null)
- return null;
- StringBuffer sb = new StringBuffer();
- BundleDescription[] bundleDescriptions = state.getBundles();
- for (int i = 0; i < bundleDescriptions.length; i++) {
- sb.append(bundleDescriptions[i].getBundleId() + ":"); //$NON-NLS-1$
- sb.append(bundleDescriptions[i].toString() + "("); //$NON-NLS-1$
- sb.append(bundleDescriptions[i].isResolved() + ")"); //$NON-NLS-1$
- String[] ees = bundleDescriptions[i].getExecutionEnvironments();
- for (int j = 0; j < ees.length; j++)
- sb.append(ees[j] + " "); //$NON-NLS-1$
- sb.append("\n"); //$NON-NLS-1$
- }
- sb.append("PlatformProperties:\n"); //$NON-NLS-1$
- Dictionary[] dics = state.getPlatformProperties();
- for (int i = 0; i < dics.length; i++) {
- for (Enumeration enumeration = dics[i].keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- String value = (String) dics[i].get(key);
- sb.append(" (" + key + "," + value + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- sb.append("\n"); //$NON-NLS-1$
- return sb.toString();
- }
-
- public void uninstallBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- SimpleBundlesState.checkAvailability(fwAdmin);
- long id = DEFAULT_TIMESTAMP;
- URI realLocation = bInfo.getLocation();
- BundleDescription bundle = getBundleByLocation(bInfo.getLocation());
- if (bundle != null)
- id = bundle.getBundleId();
-
- if (id != DEFAULT_TIMESTAMP) {
- try {
- Dictionary manifest = Utils.getOSGiManifest(bInfo.getLocation());
- if (manifest == null) {
- Log.log(LogService.LOG_WARNING, this, "uninstallBundle(BundleInfo)", NLS.bind(Messages.exception_bundleManifest, bInfo.getLocation())); //$NON-NLS-1$
- return;
- }
- BundleDescription bundleDescription = soFactory.createBundleDescription(state, manifest, realLocation.toString(), id);
- removeBundleFromState(bundleDescription);
- manipulator.getConfigData().removeBundle(bInfo);
- } catch (BundleException e) {
- Log.log(LogService.LOG_WARNING, this, "uninstallBundle(BundleInfo)", e); //$NON-NLS-1$
- }
- }
- }
-
- private BundleDescription getBundleByLocation(URI location) {
- if (location == null)
- return null;
- return (BundleDescription) locationStateIndex.get(location);
- }
-
- private BundleDescription getBundleByNameVersion(String bundleSymbolicName, String bundleVersion) {
- return (BundleDescription) nameVersionStateIndex.get(bundleSymbolicName + ";" + bundleVersion); //$NON-NLS-1$
- }
-
- /**
- * Returns a key for a bundle description containing the bundle name and version,
- * for use in the name/version state index map.
- */
- private String getKey(BundleDescription bundle) {
- return bundle.getSymbolicName() + ';' + bundle.getVersion();
- }
-
- private void createStateIndexes() {
- BundleDescription[] currentInstalledBundles = state.getBundles();
- for (int i = 0; i < currentInstalledBundles.length; i++) {
- URI location = FileUtils.getRealLocation(manipulator, currentInstalledBundles[i].getLocation());
- locationStateIndex.put(location, currentInstalledBundles[i]);
- nameVersionStateIndex.put(getKey(currentInstalledBundles[i]), currentInstalledBundles[i]);
- }
- }
-
- private void addBundleToState(BundleDescription bundleDescription) {
- state.addBundle(bundleDescription);
- URI location = FileUtils.getRealLocation(manipulator, bundleDescription.getLocation());
- locationStateIndex.put(location, bundleDescription);
- nameVersionStateIndex.put(getKey(bundleDescription), bundleDescription);
- }
-
- private void removeBundleFromState(BundleDescription bundleDescription) {
- URI location = FileUtils.getRealLocation(manipulator, bundleDescription.getLocation());
- locationStateIndex.remove(location);
- nameVersionStateIndex.remove(getKey(bundleDescription));
- state.removeBundle(bundleDescription);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java
deleted file mode 100644
index 571448384..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxConstants.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-public class EquinoxConstants {
-
- /**
- * If BundleContext#getProperty(PROP_KEY_USE_REFERENCE) does not equal "false",
- * Manipulator#save() will add "reference:" to any bundle location specified osgi.bundles in order to avoid
- * caching its bundle jar. Otherwise, it will add nothing to any bundle location.
- */
- public static final String PROP_KEY_USE_REFERENCE = "org.eclipse.equinox.frameworkadmin.equinox.useReference"; //$NON-NLS-1$
-
- public static final String PLUGINS_DIR = "plugins"; //$NON-NLS-1$
- public final static String FW_SYMBOLIC_NAME = "org.eclipse.osgi"; //$NON-NLS-1$
- public static final String DEFAULT_CONFIGURATION = "configuration"; //$NON-NLS-1$
- public static final String CONFIG_INI = "config.ini"; //$NON-NLS-1$
-
- public final static String FW_VERSION = "3.3"; //$NON-NLS-1$
- public final static String FW_NAME = "Equinox"; //$NON-NLS-1$
- public final static String LAUNCHER_VERSION = "3.2"; //$NON-NLS-1$
- public final static String LAUNCHER_NAME = "Eclipse.exe"; //$NON-NLS-1$
-
- public static final String OPTION_CONFIGURATION = "-configuration"; //$NON-NLS-1$
- public static final String OPTION_FW = "-framework"; //$NON-NLS-1$
- public static final String OPTION_VM = "-vm"; //$NON-NLS-1$
- public static final String OPTION_VMARGS = "-vmargs"; //$NON-NLS-1$
- public static final String OPTION_CLEAN = "-clean"; //$NON-NLS-1$
- public static final String OPTION_STARTUP = "-startup"; //$NON-NLS-1$
- public static final String OPTION_INSTALL = "-install"; //$NON-NLS-1$
- public static final String OPTION_LAUNCHER_LIBRARY = "--launcher.library"; //$NON-NLS-1$
-
- // System properties
- public static final String PROP_BUNDLES = "osgi.bundles"; //$NON-NLS-1$
- public static final String PROP_BUNDLES_STARTLEVEL = "osgi.bundles.defaultStartLevel"; //$NON-NLS-1$ //The start level used to install the bundles
- public static final String PROP_INITIAL_STARTLEVEL = "osgi.startLevel"; //$NON-NLS-1$ //The start level when the fwl start
- public static final String PROP_INSTALL = "osgi.install"; //$NON-NLS-1$
- public static final String PROP_ECLIPSE_COMMANDS = "eclipse.commands"; //$NON-NLS-1$
- public static final String PROP_FW_EXTENSIONS = "osgi.framework.extensions"; //$NON-NLS-1$
- public static final String PROP_OSGI_FW = "osgi.framework"; //$NON-NLS-1$
- public static final String PROP_OSGI_SYSPATH = "osgi.syspath"; //$NON-NLS-1$
- public static final String PROP_LAUNCHER_PATH = "osgi.launcherPath"; //$NON-NLS-1$
- public static final String PROP_LAUNCHER_NAME = "osgi.launcherIni"; //$NON-NLS-1$
- public static final String PROP_SHARED_CONFIGURATION_AREA = "osgi.sharedConfiguration.area"; //$NON-NLS-1$
-
- public static final String INI_EXTENSION = ".ini"; //$NON-NLS-1$
- public static final String EXE_EXTENSION = ".exe"; //$NON-NLS-1$
-
- public static final String PROP_EQUINOX_DEPENDENT_PREFIX = "osgi."; //$NON-NLS-1$
- static final String REFERENCE = "reference:"; //$NON-NLS-1$
- public static final String PERSISTENT_DIR_NAME = "org.eclipse.osgi"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java
deleted file mode 100644
index 72989059b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFrameworkAdminFactoryImpl.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulatorFactory;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminFactory;
-
-public class EquinoxFrameworkAdminFactoryImpl extends FrameworkAdminFactory {
- public FrameworkAdmin createFrameworkAdmin() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- String className = System.getProperty(ConfiguratorManipulatorFactory.SYSTEM_PROPERTY_KEY);
- if (className == null)
- return new EquinoxFwAdminImpl();
- return new EquinoxFwAdminImpl(className);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
deleted file mode 100644
index c23aa941d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwAdminImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Dictionary;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulatorFactory;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.service.resolver.PlatformAdmin;
-import org.osgi.framework.*;
-import org.osgi.service.startlevel.StartLevel;
-
-public class EquinoxFwAdminImpl implements FrameworkAdmin {
-
- boolean active = false;
-
- private ConfiguratorManipulator configuratorManipulator = null;
-
- BundleContext context = null;
-
- private boolean runningFw = false;
-
- private PlatformAdmin platformAdmin;
- private StartLevel startLevelService;
-
- public EquinoxFwAdminImpl() {
- this(null, false);
- }
-
- // private String configuratorManipulatorFactoryName = null;
-
- EquinoxFwAdminImpl(BundleContext context) {
- this(context, false);
- }
-
- EquinoxFwAdminImpl(BundleContext context, boolean runningFw) {
- this.context = context;
- this.active = true;
- this.runningFw = runningFw;
- }
-
- EquinoxFwAdminImpl(String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- this.context = null;
- this.active = true;
- this.runningFw = false;
- // this.configuratorManipulatorFactoryName = configuratorManipulatorFactoryName;
- loadConfiguratorManipulator(configuratorManipulatorFactoryName);
- }
-
- /**
- * DS component activator
- * @param aContext The bundle context
- */
- public void activate(BundleContext aContext) {
- this.context = aContext;
- this.runningFw = isRunningFw();
- Log.init(aContext);
- }
-
- void deactivate() {
- active = false;
- Log.dispose();
- }
-
- public ConfiguratorManipulator getConfiguratorManipulator() {
- return configuratorManipulator;
- }
-
- public Manipulator getManipulator() {
- return new EquinoxManipulatorImpl(context, this, platformAdmin, startLevelService, false);
- }
-
- public Manipulator getRunningManipulator() {
- if (!this.runningFw)
- return null;
- return new EquinoxManipulatorImpl(context, this, platformAdmin, startLevelService, true);
- }
-
- public boolean isActive() {
- return active;
- }
-
- /**
- * If both the vendor and the Bundle-Version in the manifest match,
- * return true. Otherwise false.
- *
- * @return flag true if the ManipulatorAdmin object can handle currently running fw launch.
- */
- boolean isRunningFw() {
- //TODO implementation for Eclipse.exe and for Equinox
- String fwVendor = context.getProperty(Constants.FRAMEWORK_VENDOR);
- if (!"Eclipse".equals(fwVendor)) //$NON-NLS-1$
- return false;
- //TODO decide if this version can be supported by this bundle.
- Dictionary header = context.getBundle(0).getHeaders();
- String versionSt = (String) header.get(Constants.BUNDLE_VERSION);
- Version version = new Version(versionSt);
- int value = version.compareTo(new Version(EquinoxConstants.FW_VERSION));
- if (value > 0) {
- return true;
- }
- // TODO need to identify the version of eclipse.exe used for this launch, if used.
- return false;
- }
-
- public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, FrameworkAdminRuntimeException, IOException {
- //return new EclipseLauncherImpl(context, this).launch(manipulator, cwd);
- return new EclipseLauncherImpl(this).launch(manipulator, cwd);
- }
-
- private void loadConfiguratorManipulator(String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- if (configuratorManipulatorFactoryName == null)
- this.configuratorManipulator = null;
- else
- this.configuratorManipulator = ConfiguratorManipulatorFactory.getInstance(configuratorManipulatorFactoryName);
- return;
- }
-
- public void setPlatformAdmin(PlatformAdmin admin) {
- this.platformAdmin = admin;
- }
-
- public void setStartLevel(StartLevel sl) {
- this.startLevelService = sl;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
deleted file mode 100644
index a96127ed7..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.service.log.LogService;
-
-public class EquinoxFwConfigFileParser {
- private static final Set KNOWN_PROPERTIES = new HashSet(Arrays.asList(new String[] {EquinoxConstants.PROP_BUNDLES, EquinoxConstants.PROP_FW_EXTENSIONS, EquinoxConstants.PROP_INITIAL_STARTLEVEL, EquinoxConstants.PROP_BUNDLES_STARTLEVEL}));
- private static final String CONFIG_DIR = "@config.dir/"; //$NON-NLS-1$
- private static final String KEY_ECLIPSE_PROV_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
- private static final String KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
- private static final String REFERENCE_SCHEME = "reference:"; //$NON-NLS-1$
- private static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
- private static boolean DEBUG = false;
-
- public EquinoxFwConfigFileParser(BundleContext context) {
- //Empty
- }
-
- private static StringBuffer toOSGiBundleListForm(BundleInfo bundleInfo, URI location) {
- StringBuffer locationString = new StringBuffer(REFERENCE_SCHEME);
- if (URIUtil.isFileURI(location))
- locationString.append(URIUtil.toUnencodedString(location));
- else if (location.getScheme() == null)
- locationString.append(FILE_PROTOCOL).append(URIUtil.toUnencodedString(location));
- else
- locationString = new StringBuffer(URIUtil.toUnencodedString(location));
-
- int startLevel = bundleInfo.getStartLevel();
- boolean toBeStarted = bundleInfo.isMarkedAsStarted();
-
- StringBuffer sb = new StringBuffer();
- sb.append(locationString);
- if (startLevel == BundleInfo.NO_LEVEL && !toBeStarted)
- return sb;
- sb.append('@');
- if (startLevel != BundleInfo.NO_LEVEL)
- sb.append(startLevel);
- if (toBeStarted)
- sb.append(":start"); //$NON-NLS-1$
- return sb;
- }
-
- private static boolean getMarkedAsStartedFormat(String startInfo) {
- if (startInfo == null)
- return false;
- startInfo = startInfo.trim();
- int colon = startInfo.indexOf(':');
- if (colon > -1) {
- return startInfo.substring(colon + 1).equals("start"); //$NON-NLS-1$
- }
- return startInfo.equals("start"); //$NON-NLS-1$
- }
-
- private static int getStartLevel(String startInfo) {
- if (startInfo == null)
- return BundleInfo.NO_LEVEL;
- startInfo = startInfo.trim();
- int colon = startInfo.indexOf(":"); //$NON-NLS-1$
- if (colon > 0) {
- try {
- return Integer.parseInt(startInfo.substring(0, colon));
- } catch (NumberFormatException e) {
- return BundleInfo.NO_LEVEL;
- }
- }
- return BundleInfo.NO_LEVEL;
- }
-
- private void readBundlesList(Manipulator manipulator, URI osgiInstallArea, Properties props) throws NumberFormatException {
- ConfigData configData = manipulator.getConfigData();
-
- BundleInfo[] fwExtensions = parseBundleList(manipulator, props.getProperty(EquinoxConstants.PROP_FW_EXTENSIONS));
- if (fwExtensions != null) {
- for (int i = 0; i < fwExtensions.length; i++) {
- fwExtensions[i].setFragmentHost(Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
- configData.addBundle(fwExtensions[i]);
- }
- }
-
- BundleInfo[] bundles = parseBundleList(manipulator, props.getProperty(EquinoxConstants.PROP_BUNDLES));
- if (bundles != null) {
- for (int i = 0; i < bundles.length; i++) {
- configData.addBundle(bundles[i]);
- }
- }
- }
-
- private BundleInfo[] parseBundleList(Manipulator manipulator, String value) {
- if (value == null || value.length() == 0)
- return null;
-
- List bundles = new ArrayList();
- String[] bInfoStrings = Utils.getTokens(value, ","); //$NON-NLS-1$
- for (int i = 0; i < bInfoStrings.length; i++) {
- String entry = bInfoStrings[i].trim();
- entry = FileUtils.removeEquinoxSpecificProtocols(entry);
-
- int indexStartInfo = entry.indexOf('@');
- String location = (indexStartInfo == -1) ? entry : entry.substring(0, indexStartInfo);
- URI realLocation = null;
- if (manipulator.getLauncherData().getFwJar() != null) {
- File parentFile = manipulator.getLauncherData().getFwJar().getParentFile();
- try {
- realLocation = URIUtil.makeAbsolute(FileUtils.fromFileURL(location), parentFile.toURI());
- } catch (URISyntaxException e) {
- // try searching as a simple location
- realLocation = FileUtils.getEclipsePluginFullLocation(location, parentFile);
- }
- }
- String slAndFlag = (indexStartInfo > -1) ? entry.substring(indexStartInfo + 1) : null;
-
- boolean markedAsStarted = getMarkedAsStartedFormat(slAndFlag);
- int startLevel = getStartLevel(slAndFlag);
-
- if (realLocation != null) {
- bundles.add(new BundleInfo(realLocation, startLevel, markedAsStarted));
- continue;
- }
- if (location != null && location.startsWith(FILE_PROTOCOL))
- try {
- bundles.add(new BundleInfo(FileUtils.fromFileURL(location), startLevel, markedAsStarted));
- continue;
- } catch (URISyntaxException e) {
- //Ignore
- }
-
- //Fallback case, we use the location as a string
- bundles.add(new BundleInfo(location, null, null, startLevel, markedAsStarted));
- }
- return (BundleInfo[]) bundles.toArray(new BundleInfo[bundles.size()]);
- }
-
- private void writeBundlesList(File fwJar, Properties props, BundleInfo[] bundles) {
- StringBuffer osgiBundlesList = new StringBuffer();
- StringBuffer osgiFrameworkExtensionsList = new StringBuffer();
- for (int j = 0; j < bundles.length; j++) {
- BundleInfo bundle = bundles[j];
-
- //framework jar does not get stored on the bundle list, figure out who that is.
- if (fwJar != null) {
- if (URIUtil.sameURI(fwJar.toURI(), bundle.getLocation()))
- continue;
- } else if (EquinoxConstants.FW_SYMBOLIC_NAME.equals(bundle.getSymbolicName()))
- continue;
-
- URI location = fwJar != null ? URIUtil.makeRelative(bundle.getLocation(), fwJar.getParentFile().toURI()) : bundle.getLocation();
-
- String fragmentHost = bundle.getFragmentHost();
- boolean isFrameworkExtension = fragmentHost != null && (fragmentHost.startsWith(EquinoxConstants.FW_SYMBOLIC_NAME) || fragmentHost.startsWith(Constants.SYSTEM_BUNDLE_SYMBOLICNAME));
-
- if (isFrameworkExtension) {
- bundle.setStartLevel(BundleInfo.NO_LEVEL);
- bundle.setMarkedAsStarted(false);
- osgiFrameworkExtensionsList.append(toOSGiBundleListForm(bundle, location));
- osgiFrameworkExtensionsList.append(',');
- } else {
- osgiBundlesList.append(toOSGiBundleListForm(bundle, location));
- osgiBundlesList.append(',');
- }
- }
- if (osgiFrameworkExtensionsList.length() > 0)
- osgiFrameworkExtensionsList.deleteCharAt(osgiFrameworkExtensionsList.length() - 1);
- props.setProperty(EquinoxConstants.PROP_FW_EXTENSIONS, osgiFrameworkExtensionsList.toString());
-
- if (osgiBundlesList.length() > 0)
- osgiBundlesList.deleteCharAt(osgiBundlesList.length() - 1);
- props.setProperty(EquinoxConstants.PROP_BUNDLES, osgiBundlesList.toString());
- }
-
- /**
- * inputFile must be not a directory but a file.
- *
- * @param manipulator
- * @param inputFile
- * @throws IOException
- */
- public void readFwConfig(Manipulator manipulator, File inputFile) throws IOException, URISyntaxException {
- if (inputFile.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.exception_inputFileIsDirectory, inputFile));
-
- //Initialize data structures
- ConfigData configData = manipulator.getConfigData();
- LauncherData launcherData = manipulator.getLauncherData();
- configData.initialize();
- configData.setBundles(null);
-
- // load configuration properties
- Properties props = loadProperties(inputFile);
-
- // load shared configuration properties
- Properties sharedConfigProperties = getSharedConfiguration(props.getProperty(EquinoxConstants.PROP_SHARED_CONFIGURATION_AREA), ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), props, manipulator.getLauncherData()));
- if (sharedConfigProperties != null) {
- sharedConfigProperties.putAll(props);
- props = sharedConfigProperties;
- }
-
- //Start figuring out stuffs
- //URI rootURI = launcherData.getLauncher() != null ? launcherData.getLauncher().getParentFile().toURI() : null;
-
- readFwJarLocation(configData, launcherData, props);
- URI configArea = inputFile.getParentFile().toURI();
- //readLauncherPath(props, rootURI);
- readp2DataArea(props, configArea);
- readSimpleConfiguratorURL(props, configArea);
- readBundlesList(manipulator, ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), props, launcherData).toURI(), props);
- readInitialStartLeve(configData, props);
- readDefaultStartLevel(configData, props);
-
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- if (KNOWN_PROPERTIES.contains(key))
- continue;
- String value = props.getProperty(key);
- configData.setProperty(key, value);
- }
- Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_configFile, inputFile.getAbsolutePath()));
- }
-
- private void readDefaultStartLevel(ConfigData configData, Properties props) {
- if (props.getProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL) != null)
- configData.setInitialBundleStartLevel(Integer.parseInt(props.getProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL)));
- }
-
- private void writeDefaultStartLevel(ConfigData configData, Properties props) {
- if (configData.getInitialBundleStartLevel() != BundleInfo.NO_LEVEL)
- props.setProperty(EquinoxConstants.PROP_BUNDLES_STARTLEVEL, Integer.toString(configData.getInitialBundleStartLevel()));
- }
-
- private void readInitialStartLeve(ConfigData configData, Properties props) {
- if (props.getProperty(EquinoxConstants.PROP_INITIAL_STARTLEVEL) != null)
- configData.setBeginningFwStartLevel(Integer.parseInt(props.getProperty(EquinoxConstants.PROP_INITIAL_STARTLEVEL)));
- }
-
- private void writeInitialStartLevel(ConfigData configData, Properties props) {
- if (configData.getBeginingFwStartLevel() != BundleInfo.NO_LEVEL)
- props.setProperty(EquinoxConstants.PROP_INITIAL_STARTLEVEL, Integer.toString(configData.getBeginingFwStartLevel()));
- }
-
- private File readFwJarLocation(ConfigData configData, LauncherData launcherData, Properties props) throws URISyntaxException {
- File fwJar = null;
- if (props.getProperty(EquinoxConstants.PROP_OSGI_FW) != null) {
- URI absoluteFwJar = null;
- absoluteFwJar = URIUtil.makeAbsolute(FileUtils.fromFileURL(props.getProperty(EquinoxConstants.PROP_OSGI_FW)), ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), props, launcherData).toURI());
-
- props.setProperty(EquinoxConstants.PROP_OSGI_FW, absoluteFwJar.toString());
- String fwJarString = props.getProperty(EquinoxConstants.PROP_OSGI_FW);
- if (fwJarString != null) {
- fwJar = URIUtil.toFile(absoluteFwJar);
- if (fwJar == null)
- throw new IllegalStateException(Messages.exception_noFrameworkLocation);
- //Here we overwrite the value read from eclipse.ini, because the value of osgi.framework always takes precedence.
- launcherData.setFwJar(fwJar);
- } else {
- throw new IllegalStateException(Messages.exception_noFrameworkLocation);
- }
- }
- if (launcherData.getFwJar() != null)
- configData.addBundle(new BundleInfo(launcherData.getFwJar().toURI()));
- return launcherData.getFwJar();
- }
-
- private void writeFwJarLocation(ConfigData configData, LauncherData launcherData, Properties props) {
- if (launcherData.getFwJar() == null)
- return;
- props.setProperty(EquinoxConstants.PROP_OSGI_FW, FileUtils.toFileURL(URIUtil.makeRelative(launcherData.getFwJar().toURI(), ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configData.getProperties(), launcherData).toURI())));
- }
-
- private static Properties loadProperties(File inputFile) throws FileNotFoundException, IOException {
- Properties props = new Properties();
- InputStream is = null;
- try {
- is = new FileInputStream(inputFile);
- props.load(is);
- } finally {
- try {
- is.close();
- } catch (IOException e) {
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_failed_reading_properties, inputFile));
- }
- is = null;
- }
- return props;
- }
-
- private File findSharedConfigIniFile(URL rootURL, String sharedConfigurationArea) {
- URL sharedConfigurationURL = null;
- try {
- sharedConfigurationURL = new URL(sharedConfigurationArea);
- } catch (MalformedURLException e) {
- // unexpected since this was written by the framework
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_url, sharedConfigurationArea));
- return null;
- }
-
- // check for a relative URL
- if (!sharedConfigurationURL.getPath().startsWith("/")) { //$NON-NLS-1$
- if (!rootURL.getProtocol().equals(sharedConfigurationURL.getProtocol())) {
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_relative_url, rootURL.toExternalForm(), sharedConfigurationArea));
- return null;
- }
- try {
- sharedConfigurationURL = new URL(rootURL, sharedConfigurationArea);
- } catch (MalformedURLException e) {
- // unexpected since this was written by the framework
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_relative_url, rootURL.toExternalForm(), sharedConfigurationArea));
- return null;
- }
- }
- File sharedConfigurationFolder = new File(sharedConfigurationURL.getPath());
- if (!sharedConfigurationFolder.isDirectory()) {
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_file_missing, sharedConfigurationFolder));
- return null;
- }
-
- File sharedConfigIni = new File(sharedConfigurationFolder, EquinoxConstants.CONFIG_INI);
- if (!sharedConfigIni.exists()) {
- Log.log(LogService.LOG_WARNING, NLS.bind(Messages.log_shared_config_file_missing, sharedConfigIni));
- return null;
- }
-
- return sharedConfigIni;
- }
-
- private void readp2DataArea(Properties props, URI configArea) throws URISyntaxException {
- if (props.getProperty(KEY_ECLIPSE_PROV_DATA_AREA) != null) {
- String url = props.getProperty(KEY_ECLIPSE_PROV_DATA_AREA);
- if (url != null) {
- if (url.startsWith(CONFIG_DIR))
- url = "file:" + url.substring(CONFIG_DIR.length()); //$NON-NLS-1$
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, URIUtil.makeAbsolute(FileUtils.fromFileURL(url), configArea).toString());
- }
- }
- }
-
- private void writep2DataArea(ConfigData configData, Properties props, URI configArea) throws URISyntaxException {
- String dataArea = getFwProperty(configData, KEY_ECLIPSE_PROV_DATA_AREA);
- if (dataArea != null) {
- if (dataArea.startsWith(CONFIG_DIR)) {
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, dataArea);
- return;
- }
- URI dataAreaURI = new URI(dataArea);
- URI relative = URIUtil.makeRelative(dataAreaURI, configArea);
- if (dataAreaURI.equals(relative)) {
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, FileUtils.toFileURL(dataAreaURI));
- return;
- }
- String result = URIUtil.toUnencodedString(relative);
- //We only relativize up to the level where the p2 and config folder are siblings (e.g. foo/p2 and foo/config)
- if (result.startsWith("../..")) //$NON-NLS-1$
- result = dataArea;
- else if (!result.equals(dataArea)) {
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, CONFIG_DIR + result);
- return;
- }
- props.setProperty(KEY_ECLIPSE_PROV_DATA_AREA, FileUtils.toFileURL(new URI(result)));
- }
- }
-
- // private void readLauncherPath(Properties props, URI root) throws URISyntaxException {
- // if (props.getProperty(EquinoxConstants.PROP_LAUNCHER_PATH) != null) {
- // URI absoluteURI = URIUtil.makeAbsolute(URIUtil.fromString(props.getProperty(EquinoxConstants.PROP_LAUNCHER_PATH)), root);
- // props.setProperty(EquinoxConstants.PROP_LAUNCHER_PATH, URIUtil.toUnencodedString(absoluteURI));
- // }
- // }
- //
- // private void writeLauncherPath(ConfigData configData, Properties props, URI root) throws URISyntaxException {
- // String value = getFwProperty(configData, EquinoxConstants.PROP_LAUNCHER_PATH);
- // if (value != null) {
- // URI launcherPathURI = FileUtils.fromPath(value);
- // String launcherPath = URIUtil.toUnencodedString(URIUtil.makeRelative(launcherPathURI, root));
- // if ("/".equals(launcherPath) || "".equals(launcherPath)) //$NON-NLS-1$ //$NON-NLS-2$
- // launcherPath = "."; //$NON-NLS-1$
- // props.setProperty(EquinoxConstants.PROP_LAUNCHER_PATH, launcherPath);
- // }
- // }
-
- private void readSimpleConfiguratorURL(Properties props, URI configArea) throws URISyntaxException {
- if (props.getProperty(KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL) != null)
- props.setProperty(KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL, URIUtil.makeAbsolute(FileUtils.fromFileURL(props.getProperty(KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL)), configArea).toString());
- }
-
- private void writeSimpleConfiguratorURL(ConfigData configData, Properties props, URI configArea) throws URISyntaxException {
- //FIXME How would someone set such a value.....
- String value = getFwProperty(configData, KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL);
- if (value != null)
- props.setProperty(KEY_ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL, FileUtils.toFileURL(URIUtil.makeRelative(URIUtil.fromString(value), configArea)));
- }
-
- private String getFwProperty(ConfigData data, String key) {
- return data.getProperty(key);
- }
-
- public void saveFwConfig(BundleInfo[] bInfos, Manipulator manipulator, boolean backup, boolean relative) throws IOException {//{
- ConfigData configData = manipulator.getConfigData();
- LauncherData launcherData = manipulator.getLauncherData();
- //Get the OSGi jar from the bundle.info
- File fwJar = EquinoxBundlesState.getSystemBundleFromBundleInfos(configData);
- launcherData.setFwJar(fwJar);
-
- File outputFile = launcherData.getFwConfigLocation();
- if (outputFile.exists()) {
- if (outputFile.isFile()) {
- if (!outputFile.getName().equals(EquinoxConstants.CONFIG_INI))
- throw new IllegalStateException(NLS.bind(Messages.exception_fwConfigLocationName, outputFile.getAbsolutePath(), EquinoxConstants.CONFIG_INI));
- } else { // Directory
- outputFile = new File(outputFile, EquinoxConstants.CONFIG_INI);
- }
- } else {
- if (!outputFile.getName().equals(EquinoxConstants.CONFIG_INI)) {
- if (!outputFile.mkdir())
- throw new IOException(NLS.bind(Messages.exception_failedToCreateDir, outputFile));
- outputFile = new File(outputFile, EquinoxConstants.CONFIG_INI);
- }
- }
- String header = "This configuration file was written by: " + this.getClass().getName(); //$NON-NLS-1$
-
- Properties configProps = new Properties();
- //URI rootURI = launcherData.getLauncher() != null ? launcherData.getLauncher().getParentFile().toURI() : null;
-
- writeFwJarLocation(configData, launcherData, configProps);
- try {
- //writeLauncherPath(configData, configProps, rootURI);
- URI configArea = manipulator.getLauncherData().getFwConfigLocation().toURI();
- writep2DataArea(configData, configProps, configArea);
- writeSimpleConfiguratorURL(configData, configProps, configArea);
- writeBundlesList(launcherData.getFwJar(), configProps, bInfos);
- writeInitialStartLevel(configData, configProps);
- writeDefaultStartLevel(configData, configProps);
- } catch (URISyntaxException e) {
- throw new FrameworkAdminRuntimeException(e, Messages.exception_errorSavingConfigIni);
- }
-
- Properties original = configData.getProperties();
- original.putAll(configProps);
- configProps = original;
-
- //Deal with the fw jar and ensure it is not set.
- //TODO This can't be done before because of the previous calls to appendProperties
-
- if (configProps == null || configProps.size() == 0) {
- Log.log(LogService.LOG_WARNING, this, "saveFwConfig() ", Messages.log_configProps); //$NON-NLS-1$
- return;
- }
- if (!Utils.createParentDir(outputFile)) {
- throw new IllegalStateException(NLS.bind(Messages.exception_failedToCreateDir, outputFile.getParent()));
- }
-
- if (DEBUG)
- Utils.printoutProperties(System.out, "configProps", configProps); //$NON-NLS-1$
-
- if (backup)
- if (outputFile.exists()) {
- File dest = Utils.getSimpleDataFormattedFile(outputFile);
- if (!outputFile.renameTo(dest))
- throw new IOException(NLS.bind(Messages.exception_failedToRename, outputFile, dest));
- Log.log(LogService.LOG_INFO, this, "saveFwConfig()", NLS.bind(Messages.log_renameSuccessful, outputFile, dest)); //$NON-NLS-1$
- }
-
- FileOutputStream out = null;
- try {
- out = new FileOutputStream(outputFile);
- // configProps = makeRelative(configProps, launcherData.getLauncher().getParentFile().toURI(), fwJar, outputFile.getParentFile(), getOSGiInstallArea(manipulator.getLauncherData()));
- filterPropertiesFromSharedArea(configProps, manipulator);
- configProps.store(out, header);
- Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_fwConfigSave, outputFile));
- } finally {
- try {
- out.flush();
- out.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- out = null;
- }
- }
-
- private void filterPropertiesFromSharedArea(Properties configProps, Manipulator manipulator) {
- LauncherData launcherData = manipulator.getLauncherData();
- //Remove from the config file that we are about to write the properties that are unchanged compared to what is in the base
- Properties sharedConfigProperties = getSharedConfiguration(configProps.getProperty(EquinoxConstants.PROP_SHARED_CONFIGURATION_AREA), ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configProps, launcherData));
- if (sharedConfigProperties == null)
- return;
- Enumeration keys = configProps.propertyNames();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- String sharedValue = sharedConfigProperties.getProperty(key);
- if (sharedValue == null)
- continue;
- String value = configProps.getProperty(key);
- if (equalsIgnoringSeparators(sharedValue, value)) {
- configProps.remove(key);
- continue;
- }
-
- if (key.equals(EquinoxConstants.PROP_BUNDLES) && equalBundleLists(manipulator, value, sharedValue)) {
- configProps.remove(key);
- continue;
- }
-
- if (key.equals(EquinoxConstants.PROP_FW_EXTENSIONS) && equalBundleLists(manipulator, value, sharedValue)) {
- configProps.remove(key);
- continue;
- }
- }
- }
-
- private boolean equalBundleLists(Manipulator manipulator, String value, String sharedValue) {
- BundleInfo[] bundles = parseBundleList(manipulator, value);
- BundleInfo[] sharedBundles = parseBundleList(manipulator, sharedValue);
- if (bundles == null || sharedBundles == null || bundles.length != sharedBundles.length)
- return false;
-
- List compareList = new ArrayList(Arrays.asList(bundles));
- compareList.removeAll(Arrays.asList(sharedBundles));
- return compareList.isEmpty();
- }
-
- private boolean equalsIgnoringSeparators(String s1, String s2) {
- if (s1 == null && s2 == null)
- return true;
- if (s1 == null || s2 == null)
- return false;
- StringBuffer sb1 = new StringBuffer(s1);
- StringBuffer sb2 = new StringBuffer(s2);
- canonicalizePathsForComparison(sb1);
- canonicalizePathsForComparison(sb2);
- return sb1.toString().equals(sb2.toString());
- }
-
- private void canonicalizePathsForComparison(StringBuffer s) {
- final String[] tokens = new String[] {"\\\\", "\\", "//", "/"}; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
- for (int t = 0; t < tokens.length; t++) {
- int idx = s.length();
- for (int i = s.length(); i != 0 && idx != -1; i--) {
- idx = s.toString().lastIndexOf(tokens[t], idx);
- if (idx != -1)
- s.replace(idx, idx + tokens[t].length(), "^"); //$NON-NLS-1$
- }
- }
- }
-
- private Properties getSharedConfiguration(String sharedConfigurationArea, File baseFile) {
- if (sharedConfigurationArea == null)
- return null;
- File sharedConfigIni;
- try {
- sharedConfigIni = findSharedConfigIniFile(baseFile.toURL(), sharedConfigurationArea);
- } catch (MalformedURLException e) {
- return null;
- }
- if (sharedConfigIni != null && sharedConfigIni.exists())
- try {
- return loadProperties(sharedConfigIni);
- } catch (FileNotFoundException e) {
- return null;
- } catch (IOException e) {
- return null;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java
deleted file mode 100644
index 869115bd4..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxLauncherData.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-
-public class EquinoxLauncherData extends LauncherData {
- File previousLauncher = null;
-
- public EquinoxLauncherData(String fwName, String fwVersion, String launcherName, String launcherVersion) {
- super(fwName, fwVersion, launcherName, launcherVersion);
- }
-
- public void setLauncher(File launcherFile) {
- if (previousLauncher == null && launcherFile != null && !launcherFile.equals(getLauncher()))
- previousLauncher = EquinoxManipulatorImpl.getLauncherConfigLocation(this);
- super.setLauncher(launcherFile);
- }
-
- File getPreviousLauncherIni() {
- return previousLauncher;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
deleted file mode 100644
index fba4751fc..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
+++ /dev/null
@@ -1,649 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.utils.SimpleBundlesState;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.service.resolver.PlatformAdmin;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.log.LogService;
-import org.osgi.service.startlevel.StartLevel;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- *
- */
-public class EquinoxManipulatorImpl implements Manipulator {
- private static final long DEFAULT_LASTMODIFIED = 0L;
- private static final boolean LOG_ILLEGALSTATEEXCEPTION = false;
- private static final String COMMA = ","; //$NON-NLS-1$
- private static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
- private static final String IGNORED = "ignored"; //$NON-NLS-1$
-
- /**
- * If the fwConfigLocation is a file and its name does not equal "config.ini",
- * throw an IllegaStateException.
- * If the fwConfigLocation is a file and its name equals "config.ini",
- * fwConfigLocation will be updated by its parent directory.
- *
- * Then, reset fwConfigLocation and fwPersistentDataLocation to be matched.
- *
- * @param launcherData
- */
- static void checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(LauncherData launcherData) {
- File fwConfigLocation = launcherData.getFwConfigLocation();
- File fwPersistentDataLocation = launcherData.getFwPersistentDataLocation();
-
- if (fwConfigLocation != null) {
- if (fwConfigLocation.isFile()) {
- if (fwConfigLocation.getName().equals(EquinoxConstants.CONFIG_INI))
- fwConfigLocation = fwConfigLocation.getParentFile();
- else
- throw new IllegalStateException(NLS.bind(Messages.exception_unexpectedfwConfigLocation, fwConfigLocation.getAbsolutePath(), EquinoxConstants.CONFIG_INI));
- launcherData.setFwConfigLocation(fwConfigLocation);
- }
- if (fwPersistentDataLocation != null) {
- if (!fwConfigLocation.equals(fwPersistentDataLocation))
- throw new IllegalStateException(NLS.bind(Messages.exception_persistantLocationNotEqualConfigLocation, fwPersistentDataLocation.getAbsolutePath(), fwConfigLocation.getAbsolutePath()));
- } else
- launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean());
- } else {
- if (fwPersistentDataLocation != null) {
- launcherData.setFwConfigLocation(fwPersistentDataLocation);
- } else {
- File home = launcherData.getHome();
- if (home == null)
- throw new IllegalStateException(Messages.exception_noLocations);
- fwConfigLocation = new File(home, "configuration"); //$NON-NLS-1$
- launcherData.setFwPersistentDataLocation(fwConfigLocation, launcherData.isClean());
- launcherData.setFwConfigLocation(fwConfigLocation);
- }
- }
- }
-
- //This returns the location of the <eclipse>.ini file
- static File getLauncherConfigLocation(LauncherData launcherData) {
- File launcherIni = launcherData.getLauncherConfigLocation();
- if (launcherIni != null)
- return launcherIni;
-
- File launcher = launcherData.getLauncher();
- if (launcher == null)
- return null;
- String launcherName = launcher.getName();
- int dotLocation = launcherName.lastIndexOf('.');
- if (dotLocation != -1)
- launcherName = launcherName.substring(0, dotLocation);
- File result = new File(launcher.getParentFile(), launcherName + EquinoxConstants.INI_EXTENSION);
- return result;
- }
-
- ConfigData configData = new ConfigData(EquinoxConstants.FW_NAME, EquinoxConstants.FW_VERSION, EquinoxConstants.LAUNCHER_NAME, EquinoxConstants.LAUNCHER_VERSION);
- EquinoxLauncherData launcherData = new EquinoxLauncherData(EquinoxConstants.FW_NAME, EquinoxConstants.FW_VERSION, EquinoxConstants.LAUNCHER_NAME, EquinoxConstants.LAUNCHER_VERSION);
- BundleContext context = null;
- private Properties platformProperties = new Properties();
-
- ServiceTracker cmTracker;
- int trackingCount = -1;
- private final PlatformAdmin platformAdmin;
- private final StartLevel startLevelService;
-
- // private final boolean runtime;
-
- ConfiguratorManipulator configuratorManipulator;
-
- EquinoxFwAdminImpl fwAdmin = null;
-
- EquinoxManipulatorImpl(BundleContext context, EquinoxFwAdminImpl fwAdmin, PlatformAdmin admin, StartLevel slService, boolean runtime) {
- this.context = context;
- this.fwAdmin = fwAdmin;
- this.platformAdmin = admin;
- this.startLevelService = slService;
- if (context != null) {
- cmTracker = new ServiceTracker(context, ConfiguratorManipulator.class.getName(), null);
- cmTracker.open();
- }
- // this.runtime = runtime;
- if (runtime)
- initializeRuntime();
- // XXX For Equinox, default value of Initial Bundle Start Level is 4.
- // Precisely speaking, it's not correct.
- // Equinox doesn't support setting initial bundle start level as an OSGi terminology.
- // Only bundles installed by config.ini and updateconfigurator will have that start level(4).
- // Others has a start level of 1.
- configData.setInitialBundleStartLevel(4);
- }
-
- public BundlesState getBundlesState() throws FrameworkAdminRuntimeException {
- if (context == null)
- return new SimpleBundlesState(fwAdmin, this, EquinoxConstants.FW_SYMBOLIC_NAME);
-
- if (!EquinoxBundlesState.checkFullySupported())
- return new SimpleBundlesState(fwAdmin, this, EquinoxConstants.FW_SYMBOLIC_NAME);
-
- if (platformProperties.isEmpty())
- return new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, false);
- // XXX checking if fwDependent or fwIndependent platformProperties are updated after the platformProperties was created might be required for better implementation.
- return new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, platformProperties);
- }
-
- public ConfigData getConfigData() throws FrameworkAdminRuntimeException {
- return configData;
- }
-
- public BundleInfo[] getExpectedState() throws IllegalArgumentException, FrameworkAdminRuntimeException {
- //Log.log(LogService.LOG_DEBUG, this, "getExpectedState()", "BEGIN");
- SimpleBundlesState.checkAvailability(fwAdmin);
-
- BundlesState bundleState = this.getBundlesState();
- if (bundleState instanceof SimpleBundlesState)
- return new BundleInfo[0];
- bundleState.resolve(true);
-
- return bundleState.getExpectedState();
- }
-
- public LauncherData getLauncherData() throws FrameworkAdminRuntimeException {
- return launcherData;
- }
-
- /**
- * Return the configuration location.
- *
- * @see Location
- */
- private File getRunningConfigurationLocation() {
- ServiceTracker tracker = null;
- Filter filter = null;
- try {
- filter = context.createFilter(Location.CONFIGURATION_FILTER);
- } catch (InvalidSyntaxException e) {
- // ignore this. It should never happen as we have tested the above format.
- }
- tracker = new ServiceTracker(context, filter, null);
- tracker.open();
- Location location = (Location) tracker.getService();
- URL url = location.getURL();
- if (!url.getProtocol().equals("file")) //$NON-NLS-1$
- return null;
- return new File(url.getFile());
- }
-
- private File getRunningLauncherFile() {
- File launcherFile = null;
- String eclipseCommandsSt = context.getProperty(EquinoxConstants.PROP_ECLIPSE_COMMANDS);
- if (eclipseCommandsSt == null)
- return null;
-
- StringTokenizer tokenizer = new StringTokenizer(eclipseCommandsSt, "\n"); //$NON-NLS-1$
- boolean found = false;
- String launcherSt = null;
- while (tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken();
- if (found) {
- launcherSt = token;
- break;
- }
- if (token.equals("-launcher")) //$NON-NLS-1$
- found = true;
- }
- if (launcherSt != null)
- launcherFile = new File(launcherSt);
- return launcherFile;
- }
-
- private Properties getRunningPlatformProperties() {
- Properties props = new Properties();
- for (int i = 0; i < EquinoxBundlesState.PROPS.length; i++) {
- String value = context.getProperty(EquinoxBundlesState.PROPS[i]);
- if (value != null)
- props.setProperty(EquinoxBundlesState.PROPS[i], value);
- }
- return props;
- }
-
- public long getTimeStamp() {
- long ret = this.getTimeStampWithoutFwPersistentData();
- if (this.launcherData.isClean())
- return ret;
- long lastModifiedFwPersistent = EquinoxBundlesState.getTimeStamp(launcherData.getFwPersistentDataLocation());
- return Math.max(ret, lastModifiedFwPersistent);
- }
-
- private long getTimeStampWithoutFwPersistentData() {
- SimpleBundlesState.checkAvailability(fwAdmin);
- File launcherConfigFile = getLauncherConfigLocation(launcherData);
- long lastModifiedLauncherConfigFile = DEFAULT_LASTMODIFIED;
- long lastModifiedFwConfigFile = DEFAULT_LASTMODIFIED;
- if (launcherConfigFile != null) {
- // use launcher. -- > load from LaucnherConfig file.
- lastModifiedLauncherConfigFile = launcherConfigFile.lastModified();
- }
- checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
-
- if (launcherData.getFwConfigLocation() != null) {
- File fwConfigFile = new File(launcherData.getFwConfigLocation(), EquinoxConstants.CONFIG_INI);
- lastModifiedFwConfigFile = fwConfigFile.lastModified();
- }
- long ret = Math.max(lastModifiedLauncherConfigFile, lastModifiedFwConfigFile);
- return ret;
- }
-
- public void initialize() {
- Log.log(LogService.LOG_DEBUG, this, "initialize()", "BEGIN"); //$NON-NLS-1$ //$NON-NLS-2$
- configData.initialize();
- launcherData.initialize();
- }
-
- private void initializeRuntime() {
- //TODO refine the implementation. using some MAGIC dependent on Eclipse.exe and Equinox implementation,
- // set parameters according to the current running fw.
-
- // 1. retrieve location data from Location services registered by equinox fw.
- String fwJarLocation = context.getProperty(EquinoxConstants.PROP_OSGI_FW);
- if (!fwJarLocation.startsWith("file:")) //$NON-NLS-1$
- throw new IllegalStateException(NLS.bind(Messages.exception_fileURLExpected, EquinoxConstants.PROP_OSGI_FW, fwJarLocation));
- File fwJar = new File(fwJarLocation.substring("file:".length())); //$NON-NLS-1$
- File fwConfigLocation = getRunningConfigurationLocation();
- File launcherFile = getRunningLauncherFile();
- launcherData.setFwJar(fwJar);
- launcherData.setFwPersistentDataLocation(fwConfigLocation, false);
- launcherData.setLauncher(launcherFile);
- launcherData.setOS(context.getProperty("osgi.os")); //$NON-NLS-1$
- try {
- this.loadWithoutFwPersistentData();
- } catch (IOException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- // 2. Create a Manipulator object fully initialized to the current running fw.
-
- ServiceReference reference = context.getServiceReference(StartLevel.class.getName());
- StartLevel startLevel = (StartLevel) context.getService(reference);
- Bundle[] bundles = context.getBundles();
- BundleInfo[] bInfos = new BundleInfo[bundles.length];
- for (int i = 0; i < bundles.length; i++) {
- // System.out.println("bundles[" + i + "]=" + bundles[i]);
- try {
- if (bundles[i].getBundleId() == 0) // SystemBundle
- bInfos[i] = new BundleInfo(bundles[i].getSymbolicName(), (String) bundles[i].getHeaders().get(Constants.BUNDLE_VERSION), FileLocator.getBundleFile(bundles[i]).getAbsoluteFile().toURI(), -1, true);
- else {
- bInfos[i] = new BundleInfo(bundles[i].getSymbolicName(), (String) bundles[i].getHeaders().get(Constants.BUNDLE_VERSION), FileLocator.getBundleFile(bundles[i]).getAbsoluteFile().toURI(), startLevel.getBundleStartLevel(bundles[i]), startLevel.isBundlePersistentlyStarted(bundles[i]));
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- configData.setBundles(bInfos);
- platformProperties = this.getRunningPlatformProperties();
-
- // copy system properties to ConfigData
- Properties props = System.getProperties();
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- String value = props.getProperty(key);
- if (toBeEliminated(key))
- continue;
- configData.setProperty(key, value);
- }
-
- // update initialBundleStartLevel
- int initialBSL = configData.getInitialBundleStartLevel();
- if (initialBSL != startLevelService.getInitialBundleStartLevel())
- configData.setInitialBundleStartLevel(startLevelService.getInitialBundleStartLevel());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator#load()
- */
- public void load() throws IllegalStateException, IOException, FrameworkAdminRuntimeException {
- Log.log(LogService.LOG_DEBUG, this, "load()", "BEGIN"); //$NON-NLS-1$//$NON-NLS-2$
- loadWithoutFwPersistentData();
-
- BundlesState bundlesState = null;
- if (EquinoxBundlesState.checkFullySupported()) {
- bundlesState = new EquinoxBundlesState(context, fwAdmin, this, platformAdmin, !launcherData.isClean());
- platformProperties = ((EquinoxBundlesState) bundlesState).getPlatformProperties();
- } else {
- bundlesState = new SimpleBundlesState(fwAdmin, this, EquinoxConstants.FW_SYMBOLIC_NAME);
- platformProperties.clear();
- }
- updateAccordingToExpectedState(bundlesState);
- // if (!useConfigurator)
- // return;
- setConfiguratorManipulator();
- if (this.configuratorManipulator == null)
- return;
- configuratorManipulator.updateBundles(this);
- return;
- }
-
- private void loadWithoutFwPersistentData() throws IOException {
- SimpleBundlesState.checkAvailability(fwAdmin);
- File launcherConfigFile = getLauncherConfigLocation(launcherData);
- if (launcherConfigFile != null && !launcherConfigFile.getName().endsWith(IGNORED)) {
- // use launcher. -- > load from LaucnherConfig file.
- // the parameters in memory will be updated.
- EclipseLauncherParser parser = new EclipseLauncherParser();
- parser.read(launcherConfigFile, launcherData);
- }
- checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
-
- File fwConfigFile = new File(launcherData.getFwConfigLocation(), EquinoxConstants.CONFIG_INI);
- EquinoxFwConfigFileParser parser = new EquinoxFwConfigFileParser(context);
- if (fwConfigFile.exists())
- try {
- parser.readFwConfig(this, fwConfigFile);
- } catch (URISyntaxException e) {
- throw new FrameworkAdminRuntimeException(e, NLS.bind(Messages.exception_errorReadingFile, fwConfigFile.getAbsolutePath()));
- }
- }
-
- // Save all parameter in memory into proper config files.
- public void save(boolean backup) throws IOException, FrameworkAdminRuntimeException {
- Log.log(LogService.LOG_DEBUG, this, "save()", "BEGIN"); //$NON-NLS-1$//$NON-NLS-2$
- SimpleBundlesState.checkAvailability(fwAdmin);
-
- try {
- updateAccordingToExpectedState(this.getBundlesState());
- } catch (IllegalStateException e) {
- // ignore.
- }
-
- boolean stateIsEmpty = configData.getBundles().length == 0;
-
- File launcherConfigFile = getLauncherConfigLocation(launcherData);
- if (launcherConfigFile != null) {
- if (!stateIsEmpty) {
- // Use launcher. -- > save LauncherConfig file.
- EclipseLauncherParser launcherParser = new EclipseLauncherParser();
- launcherParser.save(launcherData, backup);
- } else {
- // No bundles in configuration, so delete the launcher config file
- launcherConfigFile.delete();
- }
- }
-
- checkConsistencyOfFwConfigLocAndFwPersistentDataLoc(launcherData);
-
- ConfiguratorManipulator previousConfigurator = setConfiguratorManipulator();
- if (previousConfigurator != null)
- previousConfigurator.cleanup(this);
-
- BundleInfo[] newBInfos = null;
- if (configuratorManipulator != null) { // Optimize BundleInfo[]
- try {
- newBInfos = configuratorManipulator.save(this, backup);
- } catch (IllegalStateException e) {
- if (LOG_ILLEGALSTATEEXCEPTION)
- Log.log(LogService.LOG_WARNING, this, "save()", e); //$NON-NLS-1$
- newBInfos = configData.getBundles();
- }
- } else {
- newBInfos = configData.getBundles();
- }
-
- if (!stateIsEmpty) {
- // Save FwConfigFile
- EquinoxFwConfigFileParser parser = new EquinoxFwConfigFileParser(context);
- parser.saveFwConfig(newBInfos.length != 0 ? newBInfos : getConfigData().getBundles(), this, backup, false);
- } else {
- File configDir = launcherData.getFwConfigLocation();
- File outputFile = new File(configDir, EquinoxConstants.CONFIG_INI);
- if (outputFile != null && outputFile.exists()) {
- outputFile.delete();
- }
- if (configDir != null && configDir.exists()) {
- configDir.delete();
- }
- }
- }
-
- public void setConfigData(ConfigData configData) {
- this.configData.initialize();
- this.configData.setInitialBundleStartLevel(configData.getInitialBundleStartLevel());
- this.configData.setBeginningFwStartLevel(configData.getBeginingFwStartLevel());
- BundleInfo[] bInfos = configData.getBundles();
- for (int i = 0; i < bInfos.length; i++)
- this.configData.addBundle(bInfos[i]);
- this.configData.setProperties(configData.getProperties());
- if (this.configData.getFwName().equals(configData.getFwName()))
- if (this.configData.getFwVersion().equals(configData.getFwVersion())) {
- // TODO refine the algorithm to copying fw dependent props.
- // configData.getFwName()/getFwVersion()/
- // getLauncherName()/getLauncherVersion() might be taken into consideration.
- this.configData.setProperties(configData.getProperties());
- }
- }
-
- /**
- * 1. get all ServiceReferences of ConfiguratorManipulator.
- * 2. Check if there any ConfiguratorBundle in the Bundles list that can be manipulated by
- * the available ConfiguratorManipulators.
- * 3. Choose the one that will be firstly started among them.
- * 4. set the object that corresponds to the chosen ConfiguratorBundle.
- *
- */
- private ConfiguratorManipulator setConfiguratorManipulator() {
- if (context == null) {
- this.configuratorManipulator = this.fwAdmin.getConfiguratorManipulator();
- return null;
- }
- ServiceReference[] references = cmTracker.getServiceReferences();
- if (references == null)
- return null;
-
- // int count = cmTracker.getTrackingCount();
- // if (count == this.trackingCount)
- // return;
- // this.trackingCount = count;
-
- BundleInfo[] bInfos = configData.getBundles();
- int initialBSL = configData.getInitialBundleStartLevel();
- bInfos = Utils.sortBundleInfos(bInfos, initialBSL);
- //int index = -1;
- ConfiguratorManipulator previousConfiguratorManipulator = configuratorManipulator;
- configuratorManipulator = null;
- for (int i = 0; i < bInfos.length; i++) {
- URI location = bInfos[i].getLocation();
- if (!bInfos[i].isMarkedAsStarted())
- continue;
- for (int j = 0; j < references.length; j++)
- if (references[j].getProperty(ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME).equals(Utils.getPathFromClause(Utils.getManifestMainAttributes(location, Constants.BUNDLE_SYMBOLICNAME)))) {
- configuratorManipulator = (ConfiguratorManipulator) cmTracker.getService(references[j]);
- break;
- }
- if (configuratorManipulator != null)
- break;
- }
- if (configuratorManipulator != previousConfiguratorManipulator)
- return previousConfiguratorManipulator;
- return null;
- }
-
- public void setLauncherData(LauncherData value) {
- launcherData.initialize();
- launcherData.setFwConfigLocation(value.getFwConfigLocation());
- launcherData.setFwPersistentDataLocation(value.getFwPersistentDataLocation(), value.isClean());
- launcherData.setJvm(value.getJvm());
- launcherData.setJvmArgs(value.getJvmArgs());
- launcherData.setOS(value.getOS());
- if (launcherData.getFwName().equals(value.getFwName()))
- if (launcherData.getFwVersion().equals(value.getFwVersion())) {
- // TODO launcherData.getFwName()/getFwVersion()/
- // getLauncherName()/getLauncherVersion() might be taken into consideration
- // for copying .
- launcherData.setFwJar(value.getFwJar());
- launcherData.setHome(value.getHome());
- launcherData.setLauncher(value.getLauncher());
- launcherData.setLauncherConfigLocation(value.getLauncherConfigLocation());
- }
- }
-
- /**
- * Temporal implementation.
- *
- * If a property of the given key should be eliminated
- * from FwDependentProperties and FwIndependentProperties,
- * return true. Otherwise false.
- *
- * @param key
- * @return true if it should be elimineted from FwDependentProperties and FwIndependentProperties,
- */
- private boolean toBeEliminated(String key) {
- if (key.startsWith("java.")) //$NON-NLS-1$
- return true;
- return false;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("++++++++++++++++++++++++++++++++++++++++++\n" + "Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- sb.append("------------- LauncherData -----------\n"); //$NON-NLS-1$
- sb.append(launcherData.toString());
- sb.append("------------- ConfigData -----------\n"); //$NON-NLS-1$
- sb.append(configData.toString());
- sb.append("\n" + Utils.toStringProperties("platformProperties", this.platformProperties)); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("++++++++++++++++++++++++++++++++++++++++++\n"); //$NON-NLS-1$
- return sb.toString();
- }
-
- private void updateAccordingToExpectedState(BundlesState bundlesState) {
- // File newFwJar = EquinoxBundlesState.getFwJar(launcherData, configData);
- // if (bundlesState instanceof EquinoxBundlesState)
- // ((EquinoxBundlesState) bundlesState).setFwJar(newFwJar);
- //
- // if (launcherData.getFwJar() == null && newFwJar != null)
- // launcherData.setFwJar(newFwJar);
- BundleInfo[] newBundleInfos = bundlesState.getExpectedState();
- configData.setBundles(newBundleInfos);
- }
-
- public static String makeRelative(String original, String rootPath) {
- IPath path = new Path(original);
- // ensure we have an absolute path to start with
- if (!path.isAbsolute())
- return original;
-
- //Returns the original string if no relativization has been done
- IPath result = path.makeRelativeTo(new Path(rootPath));
- return path.equals(result) ? original : result.toString();
- }
-
- public static String makeRelative(String urlString, URL rootURL) {
- // we only traffic in file: URLs
- int index = urlString.indexOf(FILE_PROTOCOL);
- if (index == -1)
- return urlString;
- index = index + 5;
-
- // ensure we have an absolute path to start with
- boolean done = false;
- URL url = null;
- String file = urlString;
- while (!done) {
- try {
- url = new URL(file);
- file = url.getFile();
- } catch (java.net.MalformedURLException e) {
- done = true;
- }
- }
- if (url == null || !new File(url.getFile()).isAbsolute())
- return urlString;
-
- String rootString = rootURL.toExternalForm();
- IPath one = new Path(urlString.substring(index));
- IPath two = new Path(rootString.substring(rootString.indexOf(FILE_PROTOCOL) + 5));
- String deviceOne = one.getDevice();
- String deviceTwo = two.getDevice();
- // do checking here because we want to return the exact string we got initially if
- // we are unable to make it relative.
- if (deviceOne != deviceTwo && (deviceOne == null || !deviceOne.equalsIgnoreCase(two.getDevice())))
- return urlString;
-
- return urlString.substring(0, index) + one.makeRelativeTo(two);
- }
-
- public static String makeArrayRelative(String array, URL rootURL) {
- StringBuffer buffer = new StringBuffer();
- for (StringTokenizer tokenizer = new StringTokenizer(array, COMMA); tokenizer.hasMoreTokens();) {
- String token = tokenizer.nextToken();
- String absolute = makeRelative(token, rootURL);
- buffer.append(absolute);
- if (tokenizer.hasMoreTokens())
- buffer.append(',');
- }
- return buffer.toString();
- }
-
- public static String makeArrayAbsolute(String array, URL rootURL) {
- StringBuffer buffer = new StringBuffer();
- for (StringTokenizer tokenizer = new StringTokenizer(array, COMMA); tokenizer.hasMoreTokens();) {
- String token = tokenizer.nextToken();
- String absolute = makeAbsolute(token, rootURL);
- buffer.append(absolute);
- if (tokenizer.hasMoreTokens())
- buffer.append(',');
- }
- return buffer.toString();
- }
-
- /*
- * Make the given path absolute to the specified root, if applicable. If not, then
- * return the path as-is.
- *
- * TODO: can we use URIUtil in these #make* methods?
- */
- public static String makeAbsolute(String original, String rootPath) {
- IPath path = new Path(original);
- // ensure we have a relative path to start with
- if (path.isAbsolute())
- return original;
- IPath root = new Path(rootPath);
- return root.addTrailingSeparator().append(original.replace(':', '}')).toOSString().replace('}', ':');
- }
-
- public static String makeAbsolute(String urlString, URL rootURL) {
- // we only traffic in file: URLs
- int index = urlString.indexOf(FILE_PROTOCOL);
- if (index == -1)
- return urlString;
- index = index + 5;
-
- // ensure we have a relative path to start with
- boolean done = false;
- URL url = null;
- String file = urlString;
- while (!done) {
- try {
- url = new URL(file);
- file = url.getFile();
- } catch (java.net.MalformedURLException e) {
- done = true;
- }
- }
- if (url == null || new File(url.getFile()).isAbsolute())
- return urlString;
-
- return urlString.substring(0, index - 5) + makeAbsolute(urlString.substring(index), rootURL.toExternalForm());
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Log.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Log.java
deleted file mode 100644
index e83b92058..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Log.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import org.osgi.framework.BundleContext;
-import org.osgi.service.log.LogService;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * Utility class with static methods for logging to LogService, if available
- */
-public class Log {
- static private ServiceTracker logTracker;
- static private boolean useLog = false;
-
- public static void dispose() {
- if (logTracker != null) {
- logTracker.close();
- }
- logTracker = null;
- }
-
- public static void init(BundleContext bc) {
- logTracker = new ServiceTracker(bc, LogService.class.getName(), null);
- logTracker.open();
- }
-
- public static void log(int level, Object obj, String method, String message) {
- log(level, obj, method, message, null);
- }
-
- public static void log(int level, Object obj, String method, String message, Throwable e) {
- LogService logService = null;
- String msg = "";
- if (method == null) {
- if (obj != null)
- msg = "(" + obj.getClass().getName() + ")";
- } else if (obj == null)
- msg = "[" + method + "]" + message;
- else
- msg = "[" + method + "](" + obj.getClass().getName() + ")";
- msg += message;
- if (logTracker != null)
- logService = (LogService) logTracker.getService();
-
- if (logService != null) {
- logService.log(level, msg, e);
- } else {
- String levelSt = null;
- if (level == LogService.LOG_DEBUG)
- levelSt = "DEBUG";
- else if (level == LogService.LOG_INFO)
- levelSt = "INFO";
- else if (level == LogService.LOG_WARNING)
- levelSt = "WARNING";
- else if (level == LogService.LOG_ERROR) {
- levelSt = "ERROR";
- useLog = true;
- }
- if (useLog) {
- System.err.println("[" + levelSt + "]" + msg);
- if (e != null)
- e.printStackTrace();
- }
- }
- }
-
- public static void log(int level, Object obj, String method, Throwable e) {
- log(level, obj, method, null, e);
- }
-
- public static void log(int level, String message) {
- log(level, null, null, message, null);
- }
-
- public static void log(int level, String message, Throwable e) {
- log(level, null, null, message, e);
- }
-
- private Log() {
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java
deleted file mode 100644
index 2453f7ba3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/Messages.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.frameworkadmin.equinox.messages";//$NON-NLS-1$
-
- public static String exception_inputFileIsDirectory;
- public static String exception_fwConfigLocationName;
- public static String exception_failedToCreateDir;
- public static String exception_failedToRename;
- public static String exception_launcherLocationNotSet;
- public static String exception_noInstallArea;
- public static String exception_fileURLExpected;
- public static String exception_bundleManifest;
- public static String exception_createAbsoluteURI;
- public static String exception_nullConfigArea;
- public static String exception_noFrameworkLocation;
- public static String exception_errorSavingConfigIni;
-
- public static String log_configFile;
- public static String log_configProps;
- public static String log_renameSuccessful;
- public static String log_fwConfigSave;
- public static String log_launcherConfigSave;
- public static String log_shared_config_url;
- public static String log_shared_config_relative_url;
- public static String log_shared_config_file_missing;
- public static String log_failed_reading_properties;
- public static String log_failed_make_absolute;
- public static String log_failed_make_relative;
-
- public static String exception_unexpectedfwConfigLocation;
- public static String exception_persistantLocationNotEqualConfigLocation;
- public static String exception_noLocations;
- public static String exception_errorReadingFile;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
deleted file mode 100644
index ff4c32b12..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-import java.util.Properties;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.osgi.service.environment.Constants;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.log.LogService;
-
-public class ParserUtils {
- private static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
-
- public static File getOSGiInstallArea(List programArgs, Properties properties, LauncherData launcherData) {
- if (launcherData == null)
- return null;
-
- URI base = null;
- if (launcherData.getLauncher() != null)
- base = launcherData.getLauncher().getParentFile().toURI();
- else if (launcherData.getHome() != null)
- base = launcherData.getHome().toURI();
- File result = getOSGiInstallArea(programArgs, properties, base);
- if (result != null)
- return result;
-
- if (launcherData.getHome() != null) {
- return launcherData.getHome();
- }
-
- if (launcherData.getFwJar() != null)
- return fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath());
-
- File launcherFile = launcherData.getLauncher();
- if (launcherFile != null) {
- if (Constants.OS_MACOSX.equals(launcherData.getOS())) {
- //the equinox launcher will look 3 levels up on the mac when going from executable to launcher.jar
- //see org.eclipse.equinox.executable/library/eclipse.c : findStartupJar();
- IPath launcherPath = new Path(launcherFile.getAbsolutePath());
- if (launcherPath.segmentCount() > 4) {
- //removing "Eclipse.app/Contents/MacOS/eclipse"
- launcherPath = launcherPath.removeLastSegments(4);
- return launcherPath.toFile();
- }
- }
- return launcherFile.getParentFile();
- }
- return null;
- }
-
- public static URI getFrameworkJar(List lines, URI launcherFolder) {
- String fwk = ParserUtils.getValueForArgument(EquinoxConstants.OPTION_FW, lines);
- if (fwk == null) {
- //Search the file system using the default location
- URI location = FileUtils.getEclipsePluginFullLocation(EquinoxConstants.FW_SYMBOLIC_NAME, new File(URIUtil.toFile(launcherFolder), EquinoxConstants.PLUGINS_DIR));
- if (location != null)
- return location;
- return null;
- }
- try {
- return URIUtil.makeAbsolute(URIUtil.fromString(fwk), launcherFolder);
- } catch (URISyntaxException e) {
- Log.log(LogService.LOG_ERROR, NLS.bind(Messages.exception_createAbsoluteURI, fwk, launcherFolder));
- return null;
- }
- }
-
- //This method should only be used to determine the osgi install area when reading the eclipse.ini
- public static File getOSGiInstallArea(List args, Properties properties, URI base) {
- if (args == null)
- return null;
- String install = getValueForArgument(EquinoxConstants.OPTION_INSTALL, args);
- if (install == null && properties != null)
- install = properties.getProperty("osgi.install.area"); //$NON-NLS-1$
-
- if (install != null) {
- if (install.startsWith(FILE_PROTOCOL))
- install = install.substring(FILE_PROTOCOL.length() + 1);
- File installFile = new File(install);
- if (installFile.isAbsolute())
- return installFile;
- return URIUtil.toFile(URIUtil.makeAbsolute(installFile.toURI(), base));
- }
-
- String startup = getValueForArgument(EquinoxConstants.OPTION_STARTUP, args);
- if (startup != null && base != null) {
- if (startup.startsWith(FILE_PROTOCOL)) {
- try {
- URI startupURI = new URI(startup);
- startup = new File(startupURI).getAbsolutePath();
- } catch (URISyntaxException e) {
- startup = startup.substring(FILE_PROTOCOL.length() + 1);
- }
- }
-
- File osgiInstallArea = fromOSGiJarToOSGiInstallArea(startup);
- if (osgiInstallArea.isAbsolute())
- return osgiInstallArea;
-
- File baseFile = new File(base);
- return new File(baseFile, osgiInstallArea.getPath());
- }
- return null;
- }
-
- public static File fromOSGiJarToOSGiInstallArea(String path) {
- IPath parentFolder = new Path(path).removeLastSegments(1);
- if ("plugins".equalsIgnoreCase(parentFolder.lastSegment())) //$NON-NLS-1$
- return parentFolder.removeLastSegments(1).toFile();
- return parentFolder.toFile();
- }
-
- public static boolean isArgumentSet(String arg, List args) {
- if (arg == null || args == null)
- return false;
- for (int i = 0; i < args.size(); i++) {
- if (args.get(i) == null)
- continue;
- if (((String) args.get(i)).equalsIgnoreCase(arg)) {
- return true;
- }
- }
- return false;
- }
-
- public static String getValueForArgument(String arg, List args) {
- if (arg == null || args == null)
- return null;
- for (int i = 0; i < args.size(); i++) {
- if (args.get(i) == null)
- continue;
- if (((String) args.get(i)).equalsIgnoreCase(arg)) {
- if (i + 1 < args.size()) {
- String value = (String) args.get(i + 1);
- if (value != null && value.length() > 0 && value.charAt(0) != '-')
- return value;
- }
- }
- }
- return null;
- }
-
- public static boolean setValueForArgument(String arg, String value, List args) {
- if (arg == null || args == null)
- return false;
-
- for (int i = 0; i < args.size(); i++) {
- if (args.get(i) == null)
- continue;
- String currentArg = ((String) args.get(i)).trim();
- if (currentArg.equalsIgnoreCase(arg)) {
- if (i + 1 < args.size()) {
- String nextArg = (String) args.get(i + 1);
- if (nextArg == null || nextArg.charAt(0) != '-') {
- args.set(i + 1, value);
- } else {
- args.add(i + 1, value);
- }
- return true;
- }
- // else just append the value on the end
- args.add(value);
- return true;
- }
- }
- args.add(arg);
- args.add(value);
- return true;
- }
-
- public static boolean removeArgument(String arg, List args) {
- if (arg == null || args == null)
- return false;
- for (int i = 0; i < args.size(); i++) {
- if (args.get(i) == null)
- continue;
- String currentArg = ((String) args.get(i)).trim();
- if (currentArg.equalsIgnoreCase(arg)) {
- args.set(i, null);
- while (i + 1 < args.size() && args.get(i + 1) != null && ((String) args.get(i + 1)).charAt(0) != '-') {
- args.set(i + 1, null);
- i++;
- }
- }
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties
deleted file mode 100644
index a5d0d5083..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/messages.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-exception_inputFileIsDirectory= Illegal Argument: inputFile {0} must not be a directory.
-exception_fwConfigLocationName = Illegal State: Framework Configuration location "{0}" does not match {1}.
-exception_failedToCreateDir = Failed to create directory {0}.
-exception_failedToRename=Failed to rename {0} to {1}.
-exception_launcherLocationNotSet=The launcher location has not been set.
-exception_noInstallArea=Unable to determine osgi.install.area.
-exception_fileURLExpected= The property {0} = {1} is expected to be a \"file:\" URL.
-exception_bundleManifest= Unable to get bundle manifest for: {0}
-exception_createAbsoluteURI=Failed to create absolute URI from \"{0}\" and \"{1}\".
-exception_nullConfigArea=The configuration area is not set.
-exception_noFrameworkLocation = Unable to determinate the osgi.framework location.
-exception_errorSavingConfigIni = Error saving config.ini.
-exception_errorReadingFile = An error occured while reading {0}.
-
-log_configFile= Configuration file ({0}) has been read successfully.
-log_configProps= Configuration properties is empty.
-log_renameSuccessful= Successfully renamed {0} to {1}.
-log_fwConfigSave= Framework Configuration was saved successfully in {0}.
-log_launcherConfigSave= Launcher Configuration was saved successfully in {0}.
-log_shared_config_url=Failed creating shared configuration url for {0}.
-log_shared_config_relative_url=Failed creating shared configuration url for root: {0} and sharedConfiguration: {1}.
-log_shared_config_file_missing=Failed creating shared configuration. File missing: {0}.
-log_failed_reading_properties=Failed reading properties from file: {0}.
-log_failed_make_absolute=Failed to create absolute path for {0}.
-log_failed_make_relative=Failed to create relative path for {0}.
-
-exception_unexpectedfwConfigLocation=The specified framework configuration ({0}) location is not a directory but its name does NOT equal \"{1}\".
-exception_persistantLocationNotEqualConfigLocation=The framework persistent data location ({0}) is not the same as the framework configuration location ({1}).
-exception_noLocations=No locations are set (framework configuration, persistent data, or launcher home).
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
deleted file mode 100644
index e5a439fc3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.equinox.utils;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.osgi.service.environment.Constants;
-import org.osgi.framework.Version;
-
-public class FileUtils {
- private static String FILE_SCHEME = "file"; //$NON-NLS-1$
- private static String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
- private static String REFERENCE_PROTOCOL = "reference:"; //$NON-NLS-1$
- private static String INITIAL_PREFIX = "initial@"; //$NON-NLS-1$
-
- // based on org.eclipse.core.runtime.adaptor.EclipseStarter#searchForBundle
- public static URI getEclipseRealLocation(Manipulator manipulator, String location) {
- //if this is some form of URL just return it
- try {
- new URL(location);
- return URIUtil.makeAbsolute(new URI(location), ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI());
- } catch (URISyntaxException e) {
- // expected
- } catch (MalformedURLException e) {
- // expected
- }
-
- File base = new File(location);
- if (!base.isAbsolute()) {
- String pluginsDir = getSysPath(manipulator);
- if (pluginsDir == null)
- return null;
- base = new File(pluginsDir, location);
- }
-
- return getEclipsePluginFullLocation(base.getName(), base.getParentFile());
- }
-
- //This mimics the logic of EclipseStarter#getSysPath();
- private static String getSysPath(final Manipulator manipulator) {
- Properties properties = manipulator.getConfigData().getProperties();
- String path = (String) properties.get(EquinoxConstants.PROP_OSGI_SYSPATH);
- if (path != null)
- return path;
- path = (String) properties.get(EquinoxConstants.PROP_OSGI_FW);
- if (path != null) {
- if (path.startsWith(FILE_PROTOCOL))
- path = path.substring(FILE_PROTOCOL.length());
- File file = new File(path);
- return file.getParentFile().getAbsolutePath();
- }
-
- LauncherData launcherData = manipulator.getLauncherData();
- File home = launcherData.getHome();
- File pluginsDir = null;
- if (home != null)
- pluginsDir = new File(home, EquinoxConstants.PLUGINS_DIR);
- else if (launcherData.getFwJar() != null)
- pluginsDir = launcherData.getFwJar().getParentFile();
- else if (launcherData.getLauncher() != null) {
- File launcherDir = null;
- if (Constants.OS_MACOSX.equals(launcherData.getOS())) {
- IPath launcherPath = new Path(launcherData.getLauncher().getAbsolutePath());
- if (launcherPath.segmentCount() > 4) {
- launcherPath = launcherPath.removeLastSegments(4);
- launcherDir = launcherPath.toFile();
- }
- } else
- launcherDir = launcherData.getLauncher().getParentFile();
- pluginsDir = new File(launcherDir, EquinoxConstants.PLUGINS_DIR);
- }
- if (pluginsDir != null)
- return pluginsDir.getAbsolutePath();
- return null;
- }
-
- public static String removeEquinoxSpecificProtocols(String location) {
- if (location == null)
- return null;
- String ret = location;
- if (location.startsWith(REFERENCE_PROTOCOL))
- ret = location.substring(REFERENCE_PROTOCOL.length());
- else if (location.startsWith(INITIAL_PREFIX))
- ret = location.substring(INITIAL_PREFIX.length());
- return ret;
- }
-
- public static URI getRealLocation(Manipulator manipulator, final String location) {
- return FileUtils.getEclipseRealLocation(manipulator, removeEquinoxSpecificProtocols(location));
- }
-
- /**
- * If a bundle of the specified location is in the Eclipse plugin format (either plugin-name_version.jar
- * or as a folder named plugin-name_version ), return version string.Otherwise, return null;
- *
- * @return version string. If invalid format, return null.
- */
- private static Version getVersion(String version) {
- if (version.length() == 0)
- return Version.emptyVersion;
-
- if (version.endsWith(".jar")) //$NON-NLS-1$
- version = version.substring(0, version.length() - 4);
-
- try {
- return new Version(version);
- } catch (IllegalArgumentException e) {
- // bad format
- return null;
- }
- }
-
- /**
- * Find the named plugin in the given bundlesDir
- * @param pluginName
- * @param bundlesDir
- * @return a URL string for the found plugin, or null
- */
- // Based on org.eclipse.core.runtime.adaptor.EclipseStarter#searchFor
- public static URI getEclipsePluginFullLocation(String pluginName, File bundlesDir) {
- if (bundlesDir == null)
- return null;
- File[] candidates = bundlesDir.listFiles();
- if (candidates == null)
- return null;
-
- File result = null;
- Version maxVersion = null;
-
- for (int i = 0; i < candidates.length; i++) {
- String candidateName = candidates[i].getName();
- if (!candidateName.startsWith(pluginName))
- continue;
-
- if (candidateName.length() > pluginName.length() && candidateName.charAt(pluginName.length()) != '_') {
- // allow jar file with no _version tacked on the end
- if (!candidates[i].isFile() || (candidateName.length() != 4 + pluginName.length()) || !candidateName.endsWith(".jar")) //$NON-NLS-1$
- continue;
- }
-
- String candidateVersion = ""; //$NON-NLS-1$
- if (candidateName.length() > pluginName.length() + 1 && candidateName.charAt(pluginName.length()) == '_')
- candidateVersion = candidateName.substring(pluginName.length() + 1);
-
- Version currentVersion = getVersion(candidateVersion);
- if (currentVersion == null)
- continue;
-
- if (maxVersion == null || maxVersion.compareTo(currentVersion) < 0) {
- maxVersion = currentVersion;
- result = candidates[i];
- }
- }
- return result != null ? result.getAbsoluteFile().toURI() : null;
- }
-
- public static URI fromPath(String path) throws URISyntaxException {
- if (path.startsWith(FILE_PROTOCOL)) {
- try {
- return new URI(path);
- } catch (URISyntaxException e) {
- path = path.substring(FILE_PROTOCOL.length() + 1);
- }
- }
-
- File f = new File(path);
- if (f.isAbsolute())
- return f.toURI();
- return URIUtil.fromString(FILE_PROTOCOL + path);
- }
-
- public static String toPath(URI uri) {
- if (!FILE_SCHEME.equalsIgnoreCase(uri.getScheme()))
- return new File(URIUtil.toUnencodedString(uri)).getPath();
- return URIUtil.toFile(uri).getAbsolutePath();
- }
-
- public static String toFileURL(URI uri) {
- if (uri.getScheme() != null)
- return URIUtil.toUnencodedString(uri);
- return FILE_PROTOCOL + URIUtil.toUnencodedString(uri);
- }
-
- public static URI fromFileURL(String url) throws URISyntaxException {
- if (url.startsWith(FILE_PROTOCOL)) {
- return URIUtil.fromString(new File(url.substring(FILE_PROTOCOL.length())).isAbsolute() ? url : url.substring(FILE_PROTOCOL.length()));
- }
- throw new URISyntaxException(url, "Not a file url");
- }
-
- /**
- * Loads an ini file, returning a list of all non-blank lines in the file.
- */
- public static List loadFile(File file) throws IOException {
- BufferedReader br = null;
- try {
- br = new BufferedReader(new FileReader(file));
-
- String line;
- List list = new ArrayList();
- while ((line = br.readLine()) != null) {
- //skip whitespace
- if (line.trim().length() > 0)
- list.add(line);
- }
- return list;
- } finally {
- if (br != null)
- try {
- br.close();
- } catch (IOException e) {
- //Ignore
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.classpath b/bundles/org.eclipse.equinox.frameworkadmin.test/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/CDC-1.1%Foundation-1.1"/>
- <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.frameworkadmin.test/.cvsignore b/bundles/org.eclipse.equinox.frameworkadmin.test/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.project b/bundles/org.eclipse.equinox.frameworkadmin.test/.project
deleted file mode 100644
index 3f8865413..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.frameworkadmin.test</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index acf51d1e2..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,346 +0,0 @@
-#Mon Oct 20 11:38:02 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-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.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index ac0fd9e21..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,9 +0,0 @@
-#Wed Oct 24 10:14:02 EDT 2007
-eclipse.preferences.version=1
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index c231f4e00..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Wed Oct 24 10:11:19 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch b/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch
deleted file mode 100644
index c9e978704..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/Framework Admin Test.launch
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.equinox.p2.ui.sdk,ie.wombat.jbdiff.test,org.eclipse.equinox.p2.tools,org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.equinox.p2.selfhosting"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/IBM-1.6.0-20090519-SR5"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.equinox.frameworkadmin.tests.AllTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.frameworkadmin.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.equinox.p2.director.app.product"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.swt.win32.win32.x86@default:false,org.mortbay.jetty.util@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.jface.databinding@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.http.registry@default:default,javax.servlet@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ui.navigator@default:default,org.eclipse.text@default:default,org.eclipse.ui.ide@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.apache.lucene.analysis@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.apache.ant@default:default,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.swt@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.osgi.services@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.core.commands@default:default,org.apache.commons.el@default:default,org.eclipse.team.core@default:default,org.eclipse.search@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.security@default:default,org.eclipse.jdt.core@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.app@default:default,com.ibm.icu@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.compare@default:default,org.apache.commons.logging@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.jface.text@default:default,org.eclipse.update.core.win32@default:false,org.eclipse.osgi@-1:true,org.eclipse.core.net@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.ecf.identity@default:default,org.junit@default:default,org.eclipse.core.variables@default:default,javax.servlet.jsp@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.update.core@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ui.ide.application@default:default,org.apache.lucene@default:default,org.eclipse.team.ui@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.help.ui@default:default,org.eclipse.ui.console@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.http.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.jface@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.help.base@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ant.core@default:default,org.eclipse.ui.win32@default:false,org.eclipse.debug.ui@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.jobs@default:default,org.eclipse.debug.core@default:default,org.eclipse.help@default:default,org.eclipse.ui@default:default,org.eclipse.core.expressions@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.update.configurator@3:true,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.compare.core@default:default,org.mortbay.jetty.server@default:default,org.apache.jasper@default:default,org.eclipse.update.ui@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.resources@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.equinox.p2.testserver@default:default,org.eclipse.equinox.p2.tests@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.core.tests.harness@default:default,org.eclipse.equinox.p2.exemplarysetup@default:default,org.eclipse.jdt.core@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.p2.tests.verifier@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.tests.ui@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.http@default:default,org.eclipse.sdk@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.p2.director.app@default:default,aniefer.preferences.synchronizer@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.equinox.frameworkadmin.test@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.installer@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,ie.wombat.jbdiff@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.sar@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.pde.core@default:default,org.easymock@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.sat4j.core@default:default,org.eclipse.equinox.p2.artifact.optimizers@default:default,org.eclipse.equinox.p2.artifact.processors@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.swt.tools@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.p2.tests.optimizers@default:default,org.eclipse.pde.build@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.pde.build.tests@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,rcp@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.pde.doc.user@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.test.performance@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF
deleted file mode 100644
index 96dd29818..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Test Plug-in for Framework Admin
-Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin.test
-Bundle-Version: 1.1.0.qualifier
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.equinox.frameworkadmin,
- org.eclipse.equinox.frameworkadmin.equinox;bundle-version="1.0.100",
- org.junit;bundle-version="3.8.0"
-Bundle-Activator: org.eclipse.equinox.frameworkadmin.tests.Activator
-Import-Package: org.osgi.framework;version="1.4.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Export-Package: org.eclipse.equinox.frameworkadmin.tests
-Bundle-ActivationPolicy: lazy
-Eclipse-BundleShape: dir
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/about.html b/bundles/org.eclipse.equinox.frameworkadmin.test/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/build.properties b/bundles/org.eclipse.equinox.frameworkadmin.test/build.properties
deleted file mode 100644
index 7023dcdbf..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- dataFile/,\
- about.html
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_1/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_1/META-INF/MANIFEST.MF
deleted file mode 100644
index 3a535b6c4..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_1/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Bundle 1
-Bundle-SymbolicName: bundle_1
-Bundle-Version: 1.0.0
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_2/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_2/META-INF/MANIFEST.MF
deleted file mode 100644
index f46d7f1a1..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/bundle_2/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,5 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Bundle 2
-Bundle-SymbolicName: bundle_2
-Bundle-Version: 1.0.0
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/dummy.frameworkextension_1.0.0.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/dummy.frameworkextension_1.0.0.jar
deleted file mode 100644
index e69311419..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/dummy.frameworkextension_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.launcher.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.launcher.jar
deleted file mode 100644
index 5947c8dee..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.launcher.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.simpleconfigurator.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.simpleconfigurator.jar
deleted file mode 100644
index 8a631d83a..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.equinox.simpleconfigurator.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi.jar
deleted file mode 100644
index 20ca2696d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi_3.4.0.jar b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi_3.4.0.jar
deleted file mode 100644
index 793ad70aa..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/org.eclipse.osgi_3.4.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/conf/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/conf/config.ini
deleted file mode 100644
index c9f0304f6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/conf/config.ini
+++ /dev/null
@@ -1 +0,0 @@
-foo=bar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/eclipse.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/eclipse.ini
deleted file mode 100644
index 4f54e6223..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest1/eclipse.ini
+++ /dev/null
@@ -1,2 +0,0 @@
--configuration
-conf \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/configuration/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/configuration/config.ini
deleted file mode 100644
index c9f0304f6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/configuration/config.ini
+++ /dev/null
@@ -1 +0,0 @@
-foo=bar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/eclipse.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/eclipse.ini
deleted file mode 100644
index fbcc88191..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTest3/eclipse.ini
+++ /dev/null
@@ -1 +0,0 @@
--foobar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/conf/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/conf/config.ini
deleted file mode 100644
index c9f0304f6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/conf/config.ini
+++ /dev/null
@@ -1 +0,0 @@
-foo=bar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/eclipse.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/eclipse.ini
deleted file mode 100644
index b31688c3a..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/eclipse.ini
+++ /dev/null
@@ -1,11 +0,0 @@
--startup
-plugins\org.eclipse.equinox.launcher_1.0.200.v20090306-1900.jar
---launcher.library
-plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090306-1900
--showsplash
-org.eclipse.platform
---launcher.XXMaxPermSize
-256m
--vmargs
--Xms40m
--Xmx356m
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/conf/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/conf/config.ini
deleted file mode 100644
index c9f0304f6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/conf/config.ini
+++ /dev/null
@@ -1 +0,0 @@
-foo=bar \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/eclipse.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/eclipse.ini
deleted file mode 100644
index 06e5db00b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug285935/eclipse.ini
+++ /dev/null
@@ -1,5 +0,0 @@
--startup
-
-plugins/org.eclipse.equinox.launcher_1.0.300.v20090720.jar
--configuration
-conf \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/config.ini
deleted file mode 100644
index 7a8f3fa37..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/config.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-config.shared=false
-from.parent=true \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-config.ini
deleted file mode 100644
index f46e7259d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-config.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-osgi.sharedConfiguration.area=file\:configuration/
-config.shared=true
-
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-noshare-config.ini b/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-noshare-config.ini
deleted file mode 100644
index dd1498b48..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/dataFile/sharedconfiguration/user-noshare-config.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-config.shared=false
-
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml
deleted file mode 100644
index c9f08d58a..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.frameworkadmin.test</artifactId>
- <version>1.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java
deleted file mode 100644
index 27b5c2902..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AbstractFwkAdminTest.java
+++ /dev/null
@@ -1,437 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.List;
-import java.util.Properties;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-public abstract class AbstractFwkAdminTest extends TestCase {
- private ServiceTracker fwAdminTracker;
- private File testFolder;
-
- public AbstractFwkAdminTest(String name) {
- super(name);
- }
-
- /**
- * Copy an input stream to an output stream.
- * Optionally close the streams when done.
- * Return the number of bytes written.
- */
- public static int copyStream(InputStream in, boolean closeIn, OutputStream out, boolean closeOut) throws IOException {
- try {
- int written = 0;
- byte[] buffer = new byte[16 * 1024];
- int len;
- while ((len = in.read(buffer)) != -1) {
- out.write(buffer, 0, len);
- written += len;
- }
- return written;
- } finally {
- try {
- if (closeIn) {
- in.close();
- }
- } finally {
- if (closeOut) {
- out.close();
- }
- }
- }
- }
-
- public static boolean delete(File file) {
- if (!file.exists())
- return true;
- if (file.isDirectory()) {
- File[] children = file.listFiles();
- for (int i = 0; i < children.length; i++)
- delete(children[i]);
- }
- return file.delete();
- }
-
- public FrameworkAdmin getEquinoxFrameworkAdmin() throws BundleException {
- final String FILTER_OBJECTCLASS = "(" + Constants.OBJECTCLASS + "=" + FrameworkAdmin.class.getName() + ")";
- final String filterFwName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_NAME + "=Equinox)";
- final String filterLauncherName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_NAME + "=Eclipse.exe)";
- final String filterFwAdmin = "(&" + FILTER_OBJECTCLASS + filterFwName + filterLauncherName + ")";
-
- String FWK_ADMIN_EQ = "org.eclipse.equinox.frameworkadmin.equinox";
- Bundle b = Platform.getBundle(FWK_ADMIN_EQ);
- if (b == null)
- throw new IllegalStateException("Bundle: " + FWK_ADMIN_EQ + " is required for this test");
- b.start();
-
- if (fwAdminTracker == null) {
- Filter filter;
- try {
- filter = Activator.getContext().createFilter(filterFwAdmin);
- fwAdminTracker = new ServiceTracker(Activator.getContext(), filter, null);
- fwAdminTracker.open();
- } catch (InvalidSyntaxException e) {
- // never happens
- e.printStackTrace();
- }
- }
- return (FrameworkAdmin) fwAdminTracker.getService();
- }
-
- protected File getTestFolder(String name) {
- return getTestFolder(name, true);
- }
-
- protected File getTestFolder(String name, boolean clean) {
- Location instanceLocation = Platform.getInstanceLocation();
- URL url = instanceLocation != null ? instanceLocation.getURL() : null;
- if (instanceLocation == null || !instanceLocation.isSet() || url == null) {
- testFolder = Activator.getContext().getDataFile(name);
- } else {
- testFolder = new File(url.getFile(), name);
- }
-
- if (clean && testFolder.exists())
- delete(testFolder);
- testFolder.mkdirs();
- return testFolder;
- }
-
- protected void runTest() throws Throwable {
- super.runTest();
-
- //clean up after success
- if (testFolder != null && testFolder.exists()) {
- delete(testFolder);
- testFolder = null;
- }
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- if (fwAdminTracker != null) {
- fwAdminTracker.close();
- }
- }
-
- public void assertIsFile(File file) {
- if (!file.exists())
- fail("File: " + file.toString() + " can't be found.");
- if (!file.isFile())
- fail("File: " + file.toString() + " is expected to be a file.");
- }
-
- public void assertIsDirectory(File file) {
- if (!file.exists())
- fail("Directory: " + file.toString() + " can't be found.");
- if (!file.isDirectory())
- fail("Directory: " + file.toString() + " is expected to be a directory.");
- }
-
- public void assertNothing(File file) {
- if (file.exists())
- fail("No file or directory should be there: " + file);
- }
-
- public void assertNotContent(File file, String search) {
- if (!file.exists())
- fail("File: " + file.toString() + " can't be found.");
- try {
- BufferedReader reader = null;
- try {
- reader = new BufferedReader(new FileReader(file));
- while (reader.ready()) {
- String line = reader.readLine();
- if (line.indexOf(search) >= 0)
- fail("The string: " + search + " was not expected in this file: " + file.getAbsolutePath());
- }
- } finally {
- if (reader != null)
- reader.close();
- }
- } catch (FileNotFoundException e) {
- //ignore, caught before
- } catch (IOException e) {
- fail("String: " + search + " not found in " + file.getAbsolutePath());
- }
- }
-
- public void assertIniFileNotContain(File file, String argument, String value) {
- List args = null;
- try {
- args = FileUtils.loadFile(file);
- } catch (IOException e) {
- fail("Can't read file " + file);
- }
- String tmp = ParserUtils.getValueForArgument(argument, args);
- if (tmp == null)
- return;
-
- assertTrue(tmp.indexOf(value) == -1);
- }
-
- private String getProperty(File file, String property) {
- Properties p = new Properties();
- FileInputStream fis = null;
- try {
- fis = new FileInputStream(file);
- p.load(fis);
- } catch (FileNotFoundException e) {
- fail("Can't find file " + file);
- } catch (IOException e) {
- fail("Error reading " + file);
- } finally {
- if (fis != null)
- try {
- fis.close();
- } catch (IOException e) {
- //ignore
- }
- }
- return p.getProperty(property);
- }
-
- public void assertPropertyContains(File file, String property, String text) {
- String value = getProperty(file, property);
- if (value == null)
- fail("property: " + property + " not found in: " +file);
-
- int index = value.indexOf(text);
- if (index == -1)
- fail(text + " not found in property:" + property + " for file: " +file);
- }
-
- public void assertNotPropertyContains(File file, String property, String text) {
- String value = getProperty(file, property);
- if (value == null)
- return;
-
- int index = value.indexOf(text);
- if (index != -1)
- fail(text + " found in property:" + property + " for file: " +file);
- }
-
- public void assertEquals(String[] array1, String[] array2) {
- if (array1 == null || array2 == null) {
- if (array1 == array2)
- return;
- fail(array1 + " not equal to " + array2);
- }
- assertEquals(array1.length, array2.length);
- for (int i = 0; i < array1.length; i++) {
- assertEquals(array1[i], array2[i]);
- }
- }
-
- public void assertContent(File file, String search) {
- assertContents(file, new String [] { search } );
- }
- public void assertContents(File file, String [] lines) {
- if (!file.exists())
- fail("File: " + file.toString() + " can't be found.");
- int idx = 0;
- try {
- BufferedReader reader = null;
- try {
- reader = new BufferedReader(new FileReader(file));
- while (reader.ready()) {
- String line = reader.readLine();
- if (line.indexOf(lines[idx]) >= 0) {
- if(++idx >= lines.length)
- return;
- }
- }
- } finally {
- if (reader != null)
- reader.close();
- }
- } catch (FileNotFoundException e) {
- //ignore, caught before
- } catch (IOException e) {
- fail("String: " + lines[idx] + " not found in " + file.getAbsolutePath());
- }
- fail("String:" + lines[idx] + " not found");
- }
-
- public void startSimpleConfiguratorManipulator() {
- final String SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator";
- Bundle manipulatorBundle = Platform.getBundle(SIMPLECONFIGURATOR_MANIPULATOR);
- if (manipulatorBundle == null)
- fail("Bundle: " + SIMPLECONFIGURATOR_MANIPULATOR + " is required for this test");
- try {
- manipulatorBundle.start();
- } catch (BundleException e) {
- fail("Exception while starting up " + SIMPLECONFIGURATOR_MANIPULATOR + ' ' + e.getMessage());
- }
- }
-
- public void stopSimpleConfiguratorManipulator() {
- final String SIMPLECONFIGURATOR_MANIPULATOR = "org.eclipse.equinox.simpleconfigurator.manipulator";
- Bundle manipulatorBundle = Platform.getBundle(SIMPLECONFIGURATOR_MANIPULATOR);
- if (manipulatorBundle == null)
- return;
- try {
- manipulatorBundle.stop();
- } catch (BundleException e) {
- fail("Exception while starting up " + SIMPLECONFIGURATOR_MANIPULATOR + ' ' + e.getMessage());
- }
- }
-
- /*
- * Copy
- * - if we have a file, then copy the file
- * - if we have a directory then merge
- */
- public static void copy(String message, File source, File target) {
- if (!source.exists())
- return;
- target.getParentFile().mkdirs();
- if (source.isDirectory()) {
- if (target.exists() && target.isFile())
- target.delete();
- if (!target.exists())
- target.mkdirs();
- File[] children = source.listFiles();
- for (int i = 0; i < children.length; i++)
- copy(message, children[i], new File(target, children[i].getName()));
- return;
- }
- InputStream input = null;
- OutputStream output = null;
- try {
- input = new BufferedInputStream(new FileInputStream(source));
- output = new BufferedOutputStream(new FileOutputStream(target));
-
- byte[] buffer = new byte[8192];
- int bytesRead = 0;
- while ((bytesRead = input.read(buffer)) != -1)
- output.write(buffer, 0, bytesRead);
- } catch (IOException e) {
- fail(message + ": " + e);
- } finally {
- if (input != null) {
- try {
- input.close();
- } catch (IOException e) {
- System.err.println("Exception while trying to close input stream on: " + source.getAbsolutePath());
- e.printStackTrace();
- }
- }
- if (output != null) {
- try {
- output.close();
- } catch (IOException e) {
- System.err.println("Exception while trying to close output stream on: " + target.getAbsolutePath());
- e.printStackTrace();
- }
- }
- }
- }
-
- /*
- * Look up and return a file handle to the given entry in the bundle.
- */
- protected File getTestData(String message, String entry) {
- if (entry == null)
- fail(message + " entry is null.");
- URL base = Activator.getContext().getBundle().getEntry(entry);
- if (base == null)
- fail(message + " entry not found in bundle: " + entry);
- try {
- String osPath = new Path(FileLocator.toFileURL(base).getPath()).toOSString();
- File result = new File(osPath);
- if (!result.getCanonicalPath().equals(result.getPath()))
- fail(message + " result path: " + result.getPath() + " does not match canonical path: " + result.getCanonicalFile().getPath());
- return result;
- } catch (IOException e) {
- fail(message + ": " + e);
- }
- // avoid compile error... should never reach this code
- return null;
- }
-
- protected Manipulator getFrameworkManipulator(File configuration, File launcher) throws BundleException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configuration);
- launcherData.setLauncher(launcher);
-
- return manipulator;
- }
-
- //This is a dumb helper writing out the values as they have been passed to it.
- protected void writeEclipseIni(File location, String[] lines) {
- location.getParentFile().mkdirs();
- BufferedWriter bw = null;
- try {
- bw = new BufferedWriter(new FileWriter(location));
- for (int j = 0; j < lines.length; j++) {
- bw.write(lines[j]);
- bw.newLine();
- }
- bw.flush();
-
- } catch (IOException e) {
- fail("Fail writing eclipse.ini file");
- } finally {
- if (bw != null)
- try {
- bw.close();
- } catch (IOException e) {
- fail("Fail writing eclipse.ini file in " + location);
- }
- }
- }
-
- //This is a dumb helper writing out the values as they have been passed to it
- protected void writeConfigIni(File location, Properties properties) {
- location.getParentFile().mkdirs();
- FileOutputStream out = null;
- try {
- out = new FileOutputStream(location);
- properties.store(out, "#header");
- } catch (IOException e) {
- fail("Faile writing config.ini in" + location);
- } finally {
- try {
- out.flush();
- out.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- out = null;
- }
- }
-
- public void assertContains(String message, BundleInfo[] bundles, URI location) {
- for (int i = 0; i < bundles.length; i++) {
- if (bundles[i].getLocation().equals(location))
- return;
- }
- fail(message + " Can't find the bundle info " + location);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Activator.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Activator.java
deleted file mode 100644
index bed2838eb..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Activator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- private static BundleContext ctx;
-
- public void start(BundleContext context) throws Exception {
- ctx = context;
-
- }
-
- public void stop(BundleContext context) throws Exception {
- ctx = null;
- }
-
- public static BundleContext getContext() {
- return ctx;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
deleted file mode 100644
index 0af378a55..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/AllTests.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-
-import junit.framework.*;
-
-/**
- * Performs all automated director tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(Bug196525.class);
- suite.addTestSuite(Bug258370.class);
- suite.addTestSuite(CleanupTest.class);
- suite.addTestSuite(FrameworkExtensionTest.class);
- suite.addTestSuite(LauncherConfigLocationTest.class);
- suite.addTestSuite(LauncherDataTest.class);
- suite.addTestSuite(ManipulatorTests.class);
- suite.addTestSuite(NoConfigurationValueInEclipseIni.class);
- suite.addTestSuite(NoRenamingLauncherIni.class);
- suite.addTestSuite(OSGiVersionChange.class);
- suite.addTestSuite(ParserUtilsTest.class);
- suite.addTestSuite(ReaderTest1.class);
- suite.addTestSuite(ReaderTest2.class);
- suite.addTestSuite(ReaderTest3.class);
- suite.addTestSuite(ReaderTest4.class);
- suite.addTestSuite(ReaderTest5.class);
- suite.addTestSuite(ReaderTestBug267850.class);
- suite.addTestSuite(ReaderTestBug285935.class);
- suite.addTestSuite(RelativePathTest.class);
- suite.addTestSuite(RemovingABundle.class);
- suite.addTestSuite(RemovingAllBundles.class);
- suite.addTestSuite(RenamingLauncherIni.class);
- suite.addTestSuite(SharedConfigurationTest.class);
- suite.addTestSuite(SimpleConfiguratorComingAndGoing.class);
- suite.addTestSuite(SimpleConfiguratorTest.class);
- suite.addTestSuite(TestEclipseDataArea.class);
- suite.addTestSuite(TestRunningInstance.class);
- suite.addTestSuite(TestVMArg.class);
- suite.addTestSuite(UtilsTest.class);
- return suite;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java
deleted file mode 100644
index 69a2d6877..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug196525.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class Bug196525 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private File configurationFolder = null;
- private String launcherName = "eclipse";
- private File bundleTXT;
- private File configINI;
-
- public Bug196525(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- startSimpleConfiguratorManipulator();
- //create a configuration with osgi and simpleconfigurator in it
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = Activator.getContext().getDataFile(Bug196525.class.getName());
- configurationFolder = new File(installFolder, "configuration");
-
- bundleTXT = new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info");
- configINI = new File(configurationFolder, "config.ini");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
- }
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- try {
- assertContains("1.0", manipulator.getConfigData().getBundles(), URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))));
- assertContains("2.0", manipulator.getConfigData().getBundles(), URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))));
- } catch (URISyntaxException e) {
- fail("Unexpected failure while creating URI");
- }
- BundleInfo bundle1Bi = new BundleInfo("bundle_1", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, true);
-
- manipulator.getConfigData().addBundle(bundle1Bi);
-
- manipulator.save(false);
-
- assertContent(bundleTXT, "org.eclipse.osgi");
- assertContent(configINI, "org.eclipse.osgi");
- assertContent(bundleTXT, "org.eclipse.equinox.simpleconfigurator");
- assertContent(configINI, "org.eclipse.equinox.simpleconfigurator");
- assertContent(bundleTXT, "bundle_1");
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java
deleted file mode 100644
index 151c893a6..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/Bug258370.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class Bug258370 extends FwkAdminAndSimpleConfiguratorTest {
- public Bug258370(String name) {
- super(name);
- // TODO Auto-generated constructor stub
- }
-
- public void testComma() {
- FrameworkAdmin fwkAdmin = null;
- try {
- fwkAdmin = getEquinoxFrameworkAdmin();
- } catch (BundleException e1) {
- fail("0.0");
- }
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SimpleConfiguratorTest.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- try {
- manipulator.load();
- } catch (FrameworkAdminRuntimeException e) {
- fail("1.0");
- } catch (IOException e) {
- fail("2.0");
- }
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = null;
- BundleInfo bundle1Bi = null;
- BundleInfo bundle2Bi = null;
-
- try {
- osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- bundle1Bi = new BundleInfo("bundle_1", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, true);
- bundle2Bi = new BundleInfo("bundle_2", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_2"))), 2, true);
- } catch (URISyntaxException e) {
- fail("3.0");
- } catch (IOException e) {
- fail("4.0");
- }
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(bundle1Bi);
- manipulator.getConfigData().addBundle(bundle2Bi);
- try {
- manipulator.save(false);
- } catch (FrameworkAdminRuntimeException e) {
- fail("5.0");
- } catch (IOException e) {
- fail("6.0");
- }
-
- File configINI = new File(configurationFolder, "config.ini");
- assertContent(configINI, "org.eclipse.osgi");
- assertContent(configINI, "bundle_1");
- assertContent(configINI, "bundle_2");
- assertContent(configINI, "start,reference"); //This test for the presence of the comma.
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java
deleted file mode 100644
index d0cc6829a..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/CleanupTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-public class CleanupTest extends FwkAdminAndSimpleConfiguratorTest {
-
- public CleanupTest(String name) {
- super(name);
- }
-
- Manipulator m = null;
-
- protected void setUp() throws Exception {
- super.setUp();
- m = createMinimalConfiguration(CleanupTest.class.getName());
- }
-
- public void testSimpleConfiguratorRemoval() {
- BundleInfo[] bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.equinox.simpleconfigurator"))
- m.getConfigData().removeBundle(bis[i]);
- }
- try {
- m.save(false);
- } catch (IOException e) {
- fail("Error while saving");
- }
- assertNothing(new File(getConfigurationFolder(), "org.eclipse.equinox.simpleconfigurator"));
- assertIsDirectory(getConfigurationFolder());
-
- //Now remove osgi
- bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.osgi"))
- m.getConfigData().removeBundle(bis[i]);
- }
- try {
- m.save(false);
- } catch (IOException e) {
- fail("Error while saving");
- }
- assertNothing(getConfigurationFolder());
- assertNothing(new File(getInstallFolder(), getLauncherName() + ".ini"));
- }
-
- public void testOSGiRemoval() {
- BundleInfo[] bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.osgi"))
- m.getConfigData().removeBundle(bis[i]);
- }
- try {
- m.save(false);
- } catch (IOException e) {
- fail("Error while saving");
- }
- assertIsDirectory(new File(getConfigurationFolder(), "org.eclipse.equinox.simpleconfigurator"));
- assertIsDirectory(getConfigurationFolder());
- assertNotContent(new File(getConfigurationFolder(), "org.eclipse.equinox.simpleconfigurator/bundles.info"), "org.eclipse.osgi");
-
- bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.equinox.simpleconfigurator"))
- m.getConfigData().removeBundle(bis[i]);
- }
- try {
- m.save(false);
- } catch (IOException e) {
- fail("Error while saving");
- }
- assertNothing(getConfigurationFolder());
- assertNothing(new File(getInstallFolder(), getLauncherName() + ".ini"));
- }
-
- public void testWithMutipleBundles() throws IOException, URISyntaxException {
- BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, false);
- m.getConfigData().addBundle(bi);
- m.save(false);
-
- BundleInfo[] bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.equinox.simpleconfigurator"))
- m.getConfigData().removeBundle(bis[i]);
- }
- m.save(false);
-
- assertNothing(getBundleTxt());
- assertContent(getConfigIni(), "bundle_1");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java
deleted file mode 100644
index aecb53309..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FrameworkExtensionTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.osgi.framework.Constants;
-
-public class FrameworkExtensionTest extends FwkAdminAndSimpleConfiguratorTest {
-
- public FrameworkExtensionTest(String name) {
- super(name);
- }
-
- public void testAddRemoveFrameworkExtension() throws Exception {
- Manipulator manipulator = createMinimalConfiguration(FrameworkExtensionTest.class.getName());
- BundleInfo bundleInfo = new BundleInfo("dummy.frameworkextension", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/dummy.frameworkextension_1.0.0.jar"))), 4, false);
- bundleInfo.setFragmentHost(Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
- manipulator.getConfigData().addBundle(bundleInfo);
- manipulator.save(false);
- assertContent(getBundleTxt(), "dummy.frameworkextension");
- assertPropertyContains(getConfigIni(),"osgi.framework.extensions", "dummy.frameworkextension");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "dummy.frameworkextension");
-
- BundleInfo basicBundleInfo = new BundleInfo("dummy.frameworkextension", "1.0.0", null, -1, false);
- manipulator.getConfigData().removeBundle(basicBundleInfo);
- manipulator.save(false);
- assertNotContent(getBundleTxt(), "dummy.frameworkextension");
- assertNotPropertyContains(getConfigIni(),"osgi.framework.extensions", "dummy.frameworkextension");
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java
deleted file mode 100644
index c8b314a93..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/FwkAdminAndSimpleConfiguratorTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public abstract class FwkAdminAndSimpleConfiguratorTest extends AbstractFwkAdminTest {
- private File installFolder;
- private File configurationFolder;
- private String launcherName;
-
- public FwkAdminAndSimpleConfiguratorTest(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- startSimpleConfiguratorManipulator();
- }
-
- protected Manipulator getNewManipulator(String workArea) throws FrameworkAdminRuntimeException, IOException, BundleException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestFolder(workArea, false);
- configurationFolder = new File(installFolder, "configuration");
- launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- return manipulator;
- }
-
- protected Manipulator createMinimalConfiguration(String workArea) throws Exception {
- Manipulator manipulator = getNewManipulator(workArea);
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- try {
- manipulator.save(false);
- } catch (IOException e) {
- fail("Error while persisting");
- } catch (FrameworkAdminRuntimeException e) {
- fail("Error while persisting");
- }
- return manipulator;
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- if (installFolder != null)
- delete(installFolder);
- }
-
- public File getInstallFolder() {
- return installFolder;
- }
-
- public File getConfigurationFolder() {
- return configurationFolder;
- }
-
- public File getBundleTxt() {
- return new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info");
- }
-
- public File getConfigIni() {
- return new File(configurationFolder, "config.ini");
- }
-
- public String getLauncherName() {
- return launcherName;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java
deleted file mode 100644
index a01e523a1..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherConfigLocationTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class LauncherConfigLocationTest extends AbstractFwkAdminTest {
-
- public LauncherConfigLocationTest(String name) {
- super(name);
- }
-
- public void testCustomLauncherConfig() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(LauncherConfigLocationTest.class.getName());
- if(installFolder.exists())
- delete(installFolder);
-
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- assertNotNull("Null launcher data" + launcherData, launcherData);
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- File defaultlaunchConfig = new File(installFolder, launcherName + ".ini");
- assertEquals(defaultlaunchConfig.exists(), false);
- File launchConfig = new File(installFolder, "mylaunch.ini");
- assertEquals(launchConfig.exists(), false);
- launcherData.setLauncherConfigLocation(launchConfig);
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- assertEquals(launchConfig.exists(), true);
- assertEquals(defaultlaunchConfig.exists(), false);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java
deleted file mode 100644
index 021b5a8d0..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/LauncherDataTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-
-/**
- * @since 1.0
- */
-public class LauncherDataTest extends TestCase {
-
- /*
- * Constructor for the class.
- */
- public LauncherDataTest(String name) {
- super(name);
- }
-
- public void testRemoveProgramArg() {
- LauncherData data = new LauncherData("equinox", "1.0", "eclipse", "1.0");
- data.setProgramArgs(new String[] {"-console", "-startup", "foo"});
- data.removeProgramArg("-startup");
- assertEquals("1.0", new String[] {"-console"}, data.getProgramArgs());
-
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "-bar"});
- data.removeProgramArg("-startup");
- assertEquals("2.0", new String[] {"-console", "-bar"}, data.getProgramArgs());
-
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-startup", "foo"});
- data.removeProgramArg("-startup");
- assertEquals("3.0", new String[0], data.getProgramArgs());
-
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar"});
- data.removeProgramArg("-startup");
- assertEquals("4.0", new String[] {"-console"}, data.getProgramArgs());
-
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg("-startup");
- assertEquals("5.0", new String[] {"-console", "-xxx"}, data.getProgramArgs());
-
- // arg which doesn't start with a dash - dont' consume anything but that specific arg
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg("foo");
- assertEquals("6.0", new String[] {"-console", "-startup", "foo", "bar", "-xxx"}, data.getProgramArgs());
-
- // non-matching arg
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg("zzz");
- assertEquals("7.0", new String[] {"-console", "-startup", "foo", "bar", "-xxx"}, data.getProgramArgs());
-
- // empty string
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg("foo");
- assertEquals("8.0", new String[] {"-console", "-startup", "foo", "bar", "-xxx"}, data.getProgramArgs());
-
- // just whitespace
- data.setProgramArgs(null);
- data.setProgramArgs(new String[] {"-console", "-startup", "foo", "bar", "-xxx"});
- data.removeProgramArg(" ");
- assertEquals("9.0", new String[] {"-console", "-startup", "foo", "bar", "-xxx"}, data.getProgramArgs());
-
- }
-
- /*
- * Compare the give 2 arrays and assert whether or not they should be considered equal.
- */
- public static void assertEquals(String message, String[] one, String[] two) {
- if (one == null)
- assertNull(message, two);
- if (two == null)
- fail(message);
- assertEquals(message, one.length, two.length);
- for (int i = 0; i < one.length; i++)
- assertEquals(message, one[i], two[i]);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
deleted file mode 100644
index f3153e05f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/MacOSLikeSetup.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.osgi.service.environment.Constants;
-import org.osgi.framework.BundleException;
-
-public class MacOSLikeSetup extends FwkAdminAndSimpleConfiguratorTest {
-
- public MacOSLikeSetup(String name) {
- super(name);
- }
-
- public void testMacOSSetup() throws FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = new File(Activator.getContext().getDataFile(MacOSLikeSetup.class.getName()), "eclipse");
- File configurationFolder = new File(installFolder, "configuration");
- File launcherFolder = new File(installFolder, "Eclipse.app/Contents/MacOS/");
- File launcherName = new File(launcherFolder, "eclipse");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(launcherName);
- launcherData.setLauncherConfigLocation(new File(launcherFolder, "eclipse.ini"));
- launcherData.setOS(Constants.OS_MACOSX);
-
- //Setup the plugins as they should
- File osgiJar = new File(installFolder, "plugins/org.eclipse.osgi.jar");
- File scJar = new File(installFolder, "plugins/org.eclipse.equinox.simpleconfigurator.jar");
- File launcherJar = new File(installFolder, "plugins/org.eclipse.equinox.launcher.jar");
- copy("OSGi", new File(FileLocator.toFileURL(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar")).getPath()), osgiJar);
- copy("SC", new File(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar")).getPath()), scJar);
- copy("Startup", new File(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.launcher.jar")).getPath()), launcherJar);
-
- manipulator.getConfigData().addBundle(new BundleInfo(osgiJar.toURI()));
- manipulator.getConfigData().addBundle(new BundleInfo(scJar.toURI(), 1, true));
- manipulator.getConfigData().addBundle(new BundleInfo(launcherJar.toURI()));
-
- manipulator.getLauncherData().addProgramArg(EquinoxConstants.OPTION_STARTUP);
- manipulator.getLauncherData().addProgramArg(launcherJar.toURI().toString());
-
- manipulator.getLauncherData().setFwJar(osgiJar);
-
- try {
- manipulator.save(false);
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- File launcherIni = new File(launcherFolder, "eclipse.ini");
- assertNotContent(launcherIni, "-configuration");
- assertNotContent(launcherIni, "-install");
- assertContent(launcherIni, "-startup");
- assertContent(launcherIni, "../../../plugins/org.eclipse.equinox.launcher.jar");
- assertNotContent(launcherIni, MacOSLikeSetup.class.getName());
- assertNotContent(new File(configurationFolder, "config.ini"), MacOSLikeSetup.class.getName());
- assertTrue("bundles.info missing", new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info").exists());
-
- }
-
- public void testMacWithoutStartupOrFw() throws Exception {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = new File(Activator.getContext().getDataFile(MacOSLikeSetup.class.getName()), "eclipse");
- File configurationFolder = new File(installFolder, "configuration");
- File launcherFolder = new File(installFolder, "Eclipse.app/Contents/MacOS/");
- File launcherName = new File(launcherFolder, "eclipse");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(launcherName);
- launcherData.setOS(Constants.OS_MACOSX);
-
- File osgiJar = new File(installFolder, "plugins/org.eclipse.osgi.jar");
- File scJar = new File(installFolder, "plugins/org.eclipse.equinox.simpleconfigurator.jar");
- File bundle = new File(installFolder, "plugins/bundle_1");
- copy("OSGi", new File(FileLocator.toFileURL(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar")).getPath()), osgiJar);
- copy("SC", new File(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar")).getPath()), scJar);
- copy("bundle", new File(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1")).getPath()), bundle);
-
- manipulator.getConfigData().addBundle(new BundleInfo(osgiJar.toURI()));
- manipulator.getConfigData().addBundle(new BundleInfo(scJar.toURI(), 1, true));
- manipulator.getConfigData().addBundle(new BundleInfo(bundle.toURI()));
- manipulator.save(false);
-
- File launcherIni = new File(launcherFolder, "eclipse.ini");
- File bundleInfo = new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info");
- assertNotContent(launcherIni, "-configuration");
- assertNotContent(launcherIni, "../../../configuration");
- assertContent(bundleInfo, "file:plugins/bundle_1/");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java
deleted file mode 100644
index d758c92e3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ManipulatorTests.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.*;
-import java.util.Properties;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-
-public class ManipulatorTests extends AbstractFwkAdminTest {
-
- public ManipulatorTests(String name) {
- super(name);
- }
-
- public void testBug212361_osgiInBundlesList() throws Exception {
- File installFolder = Activator.getContext().getDataFile("212361");
- File configurationFolder = new File(installFolder, "configuration");
- Manipulator manipulator = getFrameworkManipulator(configurationFolder, new File(installFolder, "foo"));
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- Properties configIni = new Properties();
- InputStream in = new BufferedInputStream(new FileInputStream(new File(configurationFolder, "config.ini")));
- configIni.load(in);
- in.close();
-
- String bundles = (String) configIni.get("osgi.bundles");
- assertTrue(bundles.indexOf("org.eclipse.osgi") == -1);
- }
-
- public void testBug277553_installAreaFromFwJar() throws Exception {
- File folder = getTestFolder("installAreaFromFwJar");
- File fwJar = new File(folder, "plugins/org.eclipse.osgi.jar");
- fwJar.getParentFile().mkdirs();
-
- copyStream(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar").openStream(), true, new FileOutputStream(fwJar), true);
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", fwJar.toURI(), 0, true);
-
- File ini = new File(folder, "eclipse.ini");
- writeEclipseIni(ini, new String[] {"-foo", "bar", "-vmargs", "-Xmx256m"});
-
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
-
- Manipulator manipulator = fwkAdmin.getManipulator();
- manipulator.getConfigData().addBundle(osgiBi);
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwJar(fwJar);
- launcherData.setLauncher(new File(folder, "eclipse"));
-
- manipulator.load();
-
- assertEquals(manipulator.getLauncherData().getFwPersistentDataLocation(), new File(folder, "configuration"));
- }
-
- public void testBug258126_ProgramArgs_VMArgs() throws Exception {
- File installFolder = getTestFolder("258126");
- File ini = new File(installFolder, "eclipse.ini");
- writeEclipseIni(ini, new String[] {"-foo", "bar", "-vmargs", "-Xmx256m"});
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, "eclipse"));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals(launcherData.getJvmArgs(), new String[] {"-Xmx256m"});
- assertEquals(launcherData.getProgramArgs(), new String[] {"-foo", "bar"});
-
- launcherData.addJvmArg("-Xms64m");
- launcherData.addProgramArg("-console");
-
- //eclipse.ini won't save unless we actually have something in the configuration
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.save(false);
-
- assertContents(ini, new String[] {"-foo", "bar", "-console", "-vmargs", "-Xmx256m", "-Xms64m"});
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java
deleted file mode 100644
index 4cf664dcc..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoConfigurationValueInEclipseIni.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class NoConfigurationValueInEclipseIni extends FwkAdminAndSimpleConfiguratorTest {
-
- public NoConfigurationValueInEclipseIni(String name) {
- super(name);
- }
-
- public void testAbsenceOfConfigurationInEclipseINI() throws Exception {
- createMinimalConfiguration(NoConfigurationValueInEclipseIni.class.getName());
- File launcherIni = new File(getInstallFolder(), getLauncherName() + ".ini");
- assertNotContent(launcherIni, "-configuration");
- }
-
- public void testPresenceOfConfigurationInEclipseINI() throws FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile("bis" + NoConfigurationValueInEclipseIni.class.getName());
- File configurationFolder = new File(installFolder, "config2");
- String launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- try {
- manipulator.save(false);
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- File launcherIni = new File(installFolder, launcherName + ".ini");
- assertContent(launcherIni, "-configuration");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java
deleted file mode 100644
index a1966044e..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/NoRenamingLauncherIni.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class NoRenamingLauncherIni extends AbstractFwkAdminTest {
-
- public NoRenamingLauncherIni(String name) {
- super(name);
- }
-
- public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(NoRenamingLauncherIni.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- File fooINI = new File(installFolder, "foo.ini");
- assertEquals(fooINI.exists(), true);
-
- Manipulator m2 = fwkAdmin.getManipulator();
-
- LauncherData launcherData2 = m2.getLauncherData();
- launcherData2.setFwConfigLocation(configurationFolder);
- launcherData2.setLauncher(new File(installFolder, launcherName));
-
- try {
- m2.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- launcherData2.setLauncher(new File(installFolder, "bar"));
- m2.save(false);
-
- assertEquals(fooINI.exists(), false);
- assertEquals(new File(installFolder, "bar.ini").exists(), true);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java
deleted file mode 100644
index 9c57a9f05..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/OSGiVersionChange.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.osgi.framework.BundleException;
-
-public class OSGiVersionChange extends FwkAdminAndSimpleConfiguratorTest {
- private Manipulator defaultManipulator = null;
- private String workArea = OSGiVersionChange.class.getName();
-
- public OSGiVersionChange(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- defaultManipulator = createMinimalConfiguration(workArea);
- }
-
- public void testRemovalUsingSameManipulator() throws IllegalStateException, FrameworkAdminRuntimeException, IOException {
- BundleInfo[] infos = defaultManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- assertEquals(true, defaultManipulator.getConfigData().removeBundle(osgi));
- defaultManipulator.save(false);
- assertNotContent(getBundleTxt(), "org.eclipse.osgi");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "org.eclipse.osgi");
- }
-
- public void testRemovalUsingOtherManipulator() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- Manipulator newManipulator = getNewManipulator(workArea);
- BundleInfo[] infos = newManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- newManipulator.getConfigData().removeBundle(osgi);
- newManipulator.save(false);
- assertNotContent(getBundleTxt(), "org.eclipse.osgi");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "org.eclipse.osgi");
- }
-
- public void testAdditionUsingOtherManipulator() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- BundleInfo[] infos = defaultManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- assertEquals(true, defaultManipulator.getConfigData().removeBundle(osgi));
- defaultManipulator.save(false);
-
- Manipulator newManipulator = getNewManipulator(workArea);
-
- newManipulator.getConfigData().addBundle(osgi);
- newManipulator.save(false);
- assertContent(getBundleTxt(), "org.eclipse.osgi");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "org.eclipse.osgi");
- }
-
- public void testChangeVersion() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, URISyntaxException {
- BundleInfo[] infos = defaultManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- defaultManipulator.getConfigData().removeBundle(osgi);
- defaultManipulator.save(false);
-
- //These two constants describe the data file used in the test
- final String FILENAME = "org.eclipse.osgi_3.4.0.jar";
- final String VERSION = "3.4.0.v20071105";
- BundleInfo newOSGi = new BundleInfo("org.eclipse.osgi", "3.4.0.v20071105", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/" + FILENAME))), 0, true);
- defaultManipulator.getConfigData().addBundle(newOSGi);
- defaultManipulator.save(false);
- assertContent(getBundleTxt(), VERSION);
- assertContent(getConfigIni(), FILENAME);
- }
-
- public void testReadConfigWithoutOSGi() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- //First Create a configuration that does not contain OSGi
- BundleInfo[] infos = defaultManipulator.getConfigData().getBundles();
- BundleInfo osgi = null;
- for (int i = 0; i < infos.length; i++) {
- if ("org.eclipse.osgi".equals(infos[i].getSymbolicName())) {
- osgi = infos[i];
- break;
- }
- }
- defaultManipulator.getConfigData().removeBundle(osgi);
- defaultManipulator.save(false);
- assertNotContent(getBundleTxt(), "org.eclipse.osgi");
- assertNotPropertyContains(getConfigIni(),"osgi.bundles", "org.eclipse.osgi");
-
- Manipulator newManipulator = getNewManipulator(workArea);
- assertEquals(1, newManipulator.getConfigData().getBundles().length);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java
deleted file mode 100644
index 88b77bc32..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ParserUtilsTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-
-/**
- * Tests for {@link ParserUtils}.
- */
-public class ParserUtilsTest extends AbstractFwkAdminTest {
-
- public ParserUtilsTest(String name) {
- super(name);
- }
- public void testGetValueForArgument() throws Exception {
- List args = new ArrayList();
- args.add("-foo");
- args.add("bar");
- assertEquals( "bar", ParserUtils.getValueForArgument("-foo", args));
-
- args.set(1, "-bar");
- assertEquals(null, ParserUtils.getValueForArgument("-foo", args));
- }
-
- public void testRemoveArgument() throws Exception {
- String [] args = new String [] { "-bar", "-foo", "-other"};
- ParserUtils.removeArgument("-foo", Arrays.asList(args));
- assertEquals(args, new String [] {"-bar", null, "-other"});
-
- args = new String [] { "-bar", "-foo", "other"};
- ParserUtils.removeArgument("-foo", Arrays.asList(args));
- assertEquals(args, new String [] {"-bar", null, null});
-
- args = new String [] { "-bar", "-foo", "s-pecial"};
- ParserUtils.removeArgument("-foo", Arrays.asList(args));
- assertEquals(args, new String [] {"-bar", null, null});
- }
-
- public void testSetValueForArgument() throws Exception {
- List args = new ArrayList();
- ParserUtils.setValueForArgument("-foo", "bar", args);
- assertTrue(args.size() == 2);
- assertEquals(args.get(0), "-foo");
- assertEquals(args.get(1), "bar");
-
- args.add("-other");
- args.set(1, "s-pecial");
- ParserUtils.setValueForArgument("-foo", "bas", args);
- assertTrue(args.size() == 3);
- assertEquals(args.get(0), "-foo");
- assertEquals(args.get(1), "bas");
- assertEquals(args.get(2), "-other");
-
- args.remove(1);
- ParserUtils.setValueForArgument("-foo", "bas", args);
- assertTrue(args.size() == 3);
- assertEquals(args.get(0), "-foo");
- assertEquals(args.get(1), "bas");
- assertEquals(args.get(2), "-other");
- }
-
- public void testFromOSGiJarToOSGiInstallArea() {
- String path = "";
- File result =ParserUtils.fromOSGiJarToOSGiInstallArea(path);
- assertNotNull("1.0", result);
-
- path = "osgi.jar";
- result =ParserUtils.fromOSGiJarToOSGiInstallArea(path);
- assertNotNull("1.0", result);
- assertEquals("1.1", "", result.toString());
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
deleted file mode 100644
index d0fb71596..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest1.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest1 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest1(String name) {
- super(name);
- }
-
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestData(ReaderTest1.class.getName(),"dataFile/readerTest1");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- assertEquals(new File(installFolder, "conf"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
deleted file mode 100644
index fac583e0e..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest2.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Properties;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest2 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private File configurationFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest2(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- startSimpleConfiguratorManipulator();
-
- installFolder = Activator.getContext().getDataFile(ReaderTest2.class.getName());
- configurationFolder = new File(installFolder, "conf");
- writeEclipseIni(new File(installFolder, "eclipse.ini"), new String[] { "-configuration", configurationFolder.getAbsolutePath() });
- Properties properties = new Properties();
- properties.setProperty("foo", "bar");
- writeConfigIni(new File(configurationFolder, "config.ini"), properties);
- }
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals(new File(installFolder, "conf"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
deleted file mode 100644
index 4def4fd63..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest3.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest3 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest3(String name) {
- super(name);
- }
-
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestData(ReaderTest3.class.getName(),"dataFile/readerTest3");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- assertEquals(new File(installFolder, "configuration"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
deleted file mode 100644
index dd08dccdd..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest4.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Properties;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest4 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private File configurationFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest4(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- startSimpleConfiguratorManipulator();
-
- installFolder = Activator.getContext().getDataFile(ReaderTest4.class.getName());
- configurationFolder = new File(installFolder, "conf");
- writeEclipseIni(new File(installFolder, "eclipse.ini"), new String[] { "-install", installFolder.getAbsolutePath(), "-configuration", URIUtil.toUnencodedString(URIUtil.makeRelative(configurationFolder.toURI(), installFolder.toURI())) });
- Properties properties = new Properties();
- properties.setProperty("foo", "bar");
- writeConfigIni(new File(configurationFolder, "config.ini"), properties);
- }
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals(new File(installFolder, "conf"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
deleted file mode 100644
index 8363f41df..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTest5.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Properties;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTest5 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private File configurationFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTest5(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- startSimpleConfiguratorManipulator();
-
- installFolder = Activator.getContext().getDataFile(ReaderTest5.class.getName());
- configurationFolder = new File(installFolder, "configuration");
- writeEclipseIni(new File(installFolder, "eclipse.ini"), new String[] { "-install", installFolder.getAbsolutePath()});
- Properties properties = new Properties();
- properties.setProperty("foo", "bar");
- writeConfigIni(new File(configurationFolder, "config.ini"), properties);
- }
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals(configurationFolder, manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData(). getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
deleted file mode 100644
index f41cc5d09..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug267850.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTestBug267850 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTestBug267850(String name) {
- super(name);
- }
-
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestData(ReaderTestBug267850.class.getName(),"dataFile/readerTestBug267850");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- LauncherData data = manipulator.getLauncherData();
- String[] args = data.getProgramArgs();
- assertEquals("-startup", args[0]);
-// assertEquals("file:/C:/1target/provmiddle/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/plugins/org.eclipse.equinox.launcher_1.0.200.v20090306-1900.jar", args[1]);
- assertEquals("--launcher.library", args[2]);
-// assertEquals("file:/C:/1target/provmiddle/org.eclipse.equinox.frameworkadmin.test/dataFile/readerTestBug267850/plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090306-1900", args[3]);
- assertEquals("-showsplash", args[4]);
- assertEquals("org.eclipse.platform", args[5]);
- assertEquals("--launcher.XXMaxPermSize", args[6]);
- assertEquals("256m", args[7]);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
deleted file mode 100644
index 2c1f0dd0f..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/ReaderTestBug285935.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class ReaderTestBug285935 extends AbstractFwkAdminTest {
- private File installFolder = null;
- private String launcherName = "eclipse";
-
- public ReaderTestBug285935(String name) {
- super(name);
- }
-
-
- public void testConfigContent() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- installFolder = getTestData(ReaderTestBug285935.class.getName(),"dataFile/readerTestBug285935");
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- assertEquals(new File(installFolder, "conf"), manipulator.getLauncherData().getFwConfigLocation());
- assertEquals("bar", manipulator.getConfigData().getProperty("foo"));
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java
deleted file mode 100644
index 43ea1f12e..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RelativePathTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-
-public class RelativePathTest extends FwkAdminAndSimpleConfiguratorTest {
- /** Constant value indicating if the current platform is Windows */
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public RelativePathTest(String name) throws Exception {
- super(name);
- }
-
- public void testRelativePaths() throws Exception {
- File installFolder = Activator.getContext().getDataFile(RelativePathTest.class.getName());
-
- //First we copy some jars into a well
- File osgiJar = new File(installFolder, "plugins/org.eclipse.osgi.jar");
- osgiJar.getParentFile().mkdirs();
- File scJar = new File(installFolder, "plugins/org.eclipse.equinox.simpleconfigurator.jar");
-
- copyStream(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar").openStream(), true, new FileOutputStream(osgiJar), true);
- copyStream(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar").openStream(), true, new FileOutputStream(scJar), true);
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", osgiJar.toURI(), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", scJar.toURI(), 1, true);
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
- try {
- manipulator.save(false);
- } catch (IOException e) {
- fail("Error while persisting");
- } catch (FrameworkAdminRuntimeException e) {
- fail("Error while persisting");
- }
-
- //":path.jar" is a poor man approach to test relative paths
- assertNotContent(new File(configurationFolder, "config.ini"), installFolder.getAbsolutePath());
- assertNotContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), installFolder.getAbsolutePath());
- assertContent(new File(configurationFolder, "config.ini"), ":org.eclipse.equinox.simpleconfigurator.jar");
- //Note: This is testing for old style bundle locations
- assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), "file:plugins/org.eclipse.equinox.simpleconfigurator.jar");
- assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), "file:plugins/org.eclipse.osgi.jar");
-
- BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, false);
- manipulator.getConfigData().addBundle(bi);
- manipulator.save(false);
- // assertContent(new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info"), FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1")).toExternalForm());
-
- Manipulator newManipulator = fwkAdmin.getManipulator();
- LauncherData newLauncherData = newManipulator.getLauncherData();
- newLauncherData.setFwConfigLocation(configurationFolder);
- newLauncherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- }
-
- public void testMakeRelative_NonWindows() {
- if (WINDOWS)
- return;
- URL base = null;
- try {
- base = new URL("file:/eclipse/");
- } catch (MalformedURLException e) {
- e.printStackTrace();
- fail("0.98");
- }
- // data - [0] is the test data and [1] is the expected result
- String[][] data = new String[][] { //
- new String[] {"file:/home/eclipse/foo.jar", "file:../home/eclipse/foo.jar"}, //
- new String[] {"file:///home/eclipse/foo.jar", "file:../home/eclipse/foo.jar"}, //
- };
- for (int i = 0; i < data.length; i++)
- assertEquals("1." + i, data[i][1], EquinoxManipulatorImpl.makeRelative(data[i][0], base));
- }
-
- public void testMakeRelative_Windows() {
- if (!WINDOWS)
- return;
- URL base = null;
- // platform specific data
- try {
- base = new URL("file:/c:/a/eclipse/");
- } catch (MalformedURLException e) {
- e.printStackTrace();
- fail("0.99");
- }
- // data - [0] is the test data and [1] is the expected result
- String[][] data = new String[][] {new String[] {"file:c:/b/shared/plugins/bar.jar", "file:../../b/shared/plugins/bar.jar"}, //
- new String[] {"file:d:/b/shared/plugins/bar.jar", "file:d:/b/shared/plugins/bar.jar"}, //
- new String[] {"file:/c:/a/eclipse/plugins/bar.jar", "file:plugins/bar.jar"}, //
- new String[] {"file:c:/a/eclipse/plugins/bar.jar", "file:plugins/bar.jar"}, //
- new String[] {"file:/c:/a/shared/plugins/bar.jar", "file:../shared/plugins/bar.jar"}, //
- new String[] {"file:/d:/a/eclipse/plugins/bar.jar", "file:/d:/a/eclipse/plugins/bar.jar"}, //
- new String[] {"file:/c:/x/eclipse/plugins/bar.jar", "file:../../x/eclipse/plugins/bar.jar"}, //
- };
- for (int i = 0; i < data.length; i++)
- assertEquals("2." + i, data[i][1], EquinoxManipulatorImpl.makeRelative(data[i][0], base));
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java
deleted file mode 100644
index 4dc54b55c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingABundle.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class RemovingABundle extends FwkAdminAndSimpleConfiguratorTest {
-
- public RemovingABundle(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- Manipulator manipulator = createMinimalConfiguration(RemovingABundle.class.getName());
- manipulator.getConfigData().addBundle(new BundleInfo("bundle_1", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 4, false));
- manipulator.save(false);
-
- File fooINI = new File(getInstallFolder(), getLauncherName() +".ini");
- assertEquals(fooINI.exists(), true);
- assertContent(getBundleTxt(), "bundle_1");
- }
-
- public void testRemoveBundleWithoutURL() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- Manipulator m2 = getEquinoxFrameworkAdmin().getManipulator();
-
- LauncherData launcherData2 = m2.getLauncherData();
- launcherData2.setFwConfigLocation(getConfigurationFolder());
- launcherData2.setLauncher(new File(getInstallFolder(), "eclipse"));
-
- try {
- m2.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- BundleInfo info = new BundleInfo("bundle_1", "1.0.0", null, 0, false);
- m2.getConfigData().removeBundle(info);
- m2.save(false);
-
- assertNotContent(getBundleTxt(), "bundle_1");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java
deleted file mode 100644
index f30a39f0d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RemovingAllBundles.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class RemovingAllBundles extends AbstractFwkAdminTest {
-
- public RemovingAllBundles(String name) {
- super(name);
- }
-
- public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(RemovingAllBundles.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- File fooINI = new File(installFolder, "foo.ini");
- assertEquals(fooINI.exists(), true);
-
- Manipulator m2 = fwkAdmin.getManipulator();
-
- LauncherData launcherData2 = m2.getLauncherData();
- launcherData2.setFwConfigLocation(configurationFolder);
- launcherData2.setLauncher(new File(installFolder, launcherName));
-
- try {
- m2.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo[] infos = m2.getConfigData().getBundles();
- for (int i = 0; i < infos.length; i++) {
- m2.getConfigData().removeBundle(infos[i]);
- }
- m2.save(false);
-
- assertEquals(new File(configurationFolder + "/org.eclipse.equinox.simpleconfigurator", "bundles.info").exists(), false);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java
deleted file mode 100644
index 23e1ae849..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/RenamingLauncherIni.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class RenamingLauncherIni extends AbstractFwkAdminTest {
-
- public RenamingLauncherIni(String name) {
- super(name);
- }
-
- public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(RenamingLauncherIni.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- File fooINI = new File(installFolder, "foo.ini");
- assertEquals(fooINI.exists(), true);
-
- Manipulator m2 = fwkAdmin.getManipulator();
-
- LauncherData launcherData2 = m2.getLauncherData();
- launcherData2.setFwConfigLocation(configurationFolder);
- launcherData2.setLauncher(new File(installFolder, launcherName));
-
- try {
- m2.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
- launcherData2.setLauncher(new File(installFolder, "foo"));
- m2.save(false);
-
- assertEquals(new File(installFolder, "foo.ini").exists(), true);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
deleted file mode 100644
index 0bbf5e755..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SharedConfigurationTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class SharedConfigurationTest extends AbstractFwkAdminTest {
-
- public SharedConfigurationTest(String name) {
- super(name);
- }
-
- public void testDefaultConfiguration() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SharedConfigurationTest.class.getName());
- File defaultConfigurationFolder = new File(installFolder, "configuration");
- defaultConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/config.ini"), new File(defaultConfigurationFolder, "config.ini"));
-
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(defaultConfigurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals("false", manipulator.getConfigData().getProperty("config.shared"));
- assertEquals("true", manipulator.getConfigData().getProperty("from.parent"));
- }
-
- public void testSharedConfiguration() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SharedConfigurationTest.class.getName());
- File defaultConfigurationFolder = new File(installFolder, "configuration");
- defaultConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/config.ini"), new File(defaultConfigurationFolder, "config.ini"));
- File userConfigurationFolder = new File(installFolder, "user/configuration");
- userConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/user-config.ini"), new File(userConfigurationFolder, "config.ini"));
-
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(userConfigurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals("true", manipulator.getConfigData().getProperty("config.shared"));
- assertEquals("true", manipulator.getConfigData().getProperty("from.parent"));
- }
-
- public void testNotSharedConfiguration() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SharedConfigurationTest.class.getName());
- File defaultConfigurationFolder = new File(installFolder, "configuration");
- defaultConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/config.ini"), new File(defaultConfigurationFolder, "config.ini"));
- File userConfigurationFolder = new File(installFolder, "user/configuration");
- userConfigurationFolder.mkdirs();
- copy("creating shared config.ini", getTestData("", "dataFile/sharedconfiguration/user-noshare-config.ini"), new File(userConfigurationFolder, "config.ini"));
-
- String launcherName = "foo";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(userConfigurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
-
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- assertEquals("false", manipulator.getConfigData().getProperty("config.shared"));
- assertEquals(null, manipulator.getConfigData().getProperty("from.parent"));
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java
deleted file mode 100644
index 56286d16b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorComingAndGoing.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class SimpleConfiguratorComingAndGoing extends FwkAdminAndSimpleConfiguratorTest {
- Manipulator m = null;
-
- public SimpleConfiguratorComingAndGoing(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- m = createMinimalConfiguration(SimpleConfiguratorComingAndGoing.class.getName());
- }
-
- public void testWithMutipleBundles() throws IOException, BundleException, URISyntaxException {
- BundleInfo bi = new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/bundle_1"))), 2, false);
- m.getConfigData().addBundle(bi);
- m.save(false);
-
- BundleInfo[] bis = m.getConfigData().getBundles();
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals("org.eclipse.equinox.simpleconfigurator"))
- m.getConfigData().removeBundle(bis[i]);
- }
- m.save(false);
-
- assertNothing(getBundleTxt());
- assertContent(getConfigIni(), "bundle_1");
- assertContent(getConfigIni(), "org.eclipse.osgi");
-
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator newManipulator = fwkAdmin.getManipulator();
-
- LauncherData launcherData = newManipulator.getLauncherData();
- launcherData.setFwConfigLocation(getConfigurationFolder());
- launcherData.setLauncher(new File(getInstallFolder(), getLauncherName()));
- try {
- newManipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- newManipulator.getConfigData().addBundle(new BundleInfo(URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true));
- newManipulator.save(false);
-
- assertContent(getBundleTxt(), "org.eclipse.osgi");
- assertContent(getBundleTxt(), "bundle_1");
- assertContent(getBundleTxt(), "org.eclipse.equinox.simpleconfigurator");
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java
deleted file mode 100644
index 7cc535eaa..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/SimpleConfiguratorTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.net.URI;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.BundleException;
-
-public class SimpleConfiguratorTest extends AbstractFwkAdminTest {
-
- public SimpleConfiguratorTest(String name) {
- super(name);
- }
-
- public void testConfigFiles() throws IllegalStateException, FrameworkAdminRuntimeException, IOException, BundleException, URISyntaxException {
- startSimpleConfiguratorManipulator();
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator manipulator = fwkAdmin.getManipulator();
-
- File installFolder = Activator.getContext().getDataFile(SimpleConfiguratorTest.class.getName());
- File configurationFolder = new File(installFolder, "configuration");
- String launcherName = "eclipse";
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(configurationFolder);
- launcherData.setLauncher(new File(installFolder, launcherName));
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //TODO We ignore the framework JAR location not set exception
- }
-
- BundleInfo osgiBi = new BundleInfo("org.eclipse.osgi", "3.3.1", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.osgi.jar"))), 0, true);
- BundleInfo configuratorBi = new BundleInfo("org.eclipse.equinox.simpleconfigurator", "1.0.0", URIUtil.toURI(FileLocator.resolve(Activator.getContext().getBundle().getEntry("dataFile/org.eclipse.equinox.simpleconfigurator.jar"))), 1, true);
-
- manipulator.getConfigData().addBundle(osgiBi);
- manipulator.getConfigData().addBundle(configuratorBi);
-
- manipulator.save(false);
-
- File bundleTXT = new File(configurationFolder, "org.eclipse.equinox.simpleconfigurator/bundles.info");
- File configINI = new File(configurationFolder, "config.ini");
- assertContent(bundleTXT, "org.eclipse.osgi");
- assertContent(configINI, "org.eclipse.osgi");
- assertContent(bundleTXT, "org.eclipse.equinox.simpleconfigurator");
- assertContent(configINI, "org.eclipse.equinox.simpleconfigurator");
- }
-
- public void testBundleInfoEquals() throws Exception {
- BundleInfo b1 = new BundleInfo("org.foo", "3.1.0", new URI("plugins/org.foo_3.1.0"), -1, false);
- BundleInfo b2 = new BundleInfo("org.foo", "3.1.0", null, -1, false);
- BundleInfo b3 = new BundleInfo("org.foo", "3.1.0", URIUtil.fromString("C:/sp ace/plugins/org.foo_3.1.0"), -1, false);
-
- assertEquals(b1, b2);
- assertFalse(b1.equals(b3));
-
- b1.setBaseLocation(URIUtil.fromString("C:/sp ace"));
- assertEquals(b1, b3);
-
- b3.setBaseLocation(URIUtil.fromString("C:/sp ace"));
- assertEquals(b1, b3);
-
- b3.setVersion(null);
- b1.setVersion("0.0.0");
- assertEquals(b1, b3);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestEclipseDataArea.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestEclipseDataArea.java
deleted file mode 100644
index 9a0babf45..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestEclipseDataArea.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-public class TestEclipseDataArea extends FwkAdminAndSimpleConfiguratorTest {
- Manipulator m = null;
-
- public TestEclipseDataArea(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- m = createMinimalConfiguration(TestEclipseDataArea.class.getName());
- }
-
- public void testp2DataArea() throws IOException {
- m.getConfigData().setProperty("eclipse.p2.data.area", "@config.dir/../p2");
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/../p2");
- m.load();
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/../p2");
-
- m.getConfigData().setProperty("eclipse.p2.data.area", new File(getConfigurationFolder(), "p2").getAbsoluteFile().toURI().toString());
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/p2");
- m.load();
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/p2");
-
- m.getConfigData().setProperty("eclipse.p2.data.area", new File(getConfigurationFolder(), "../p2").getAbsoluteFile().toURI().toString());
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/../p2");
- m.load();
- m.save(false);
- assertContent(getConfigIni(), "@config.dir/../p2");
-
- m.getConfigData().setProperty("eclipse.p2.data.area", "file:/d:/tmp/fo%20o/bar/p2");
- m.save(false);
- assertContent(getConfigIni(), "/tmp/fo o/bar/p2");
- assertNotContent(getConfigIni(), "@config.dir");
- m.load();
- m.save(false);
- assertContent(getConfigIni(), "/tmp/fo o/bar/p2");
- assertNotContent(getConfigIni(), "@config.dir");
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java
deleted file mode 100644
index e10e2c929..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestRunningInstance.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.osgi.framework.*;
-
-public class TestRunningInstance extends AbstractFwkAdminTest {
-
- public TestRunningInstance(String name) {
- super(name);
- }
-
- public void testRunningInstance() throws BundleException {
- //TODO Commented out due to NPE failure on Windows on test machines only
- if (Platform.OS_WIN32.equals(Platform.getOS()))
- return;
- FrameworkAdmin fwkAdmin = getEquinoxFrameworkAdmin();
- Manipulator m = fwkAdmin.getRunningManipulator();
- BundleInfo[] infos = m.getConfigData().getBundles();
-
- Bundle[] bundles = Activator.getContext().getBundles();
-
- assertEquals(bundles.length, infos.length);
- for (int i = 0; i < bundles.length; i++) {
- boolean found = false;
- for (int j = 0; j < infos.length && found == false; j++) {
- found = same(infos[j], bundles[i]);
- }
- if (found == false) {
- fail("Can't find: " + bundles[i]);
- }
- }
- }
-
- private boolean same(BundleInfo info, Bundle bundle) {
- if (info.getSymbolicName().equals(bundle.getSymbolicName())) {
- if (new Version((String) bundle.getHeaders().get(Constants.BUNDLE_VERSION)).equals(new Version(info.getVersion())))
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
deleted file mode 100644
index ae3aa39b7..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/TestVMArg.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-public class TestVMArg extends FwkAdminAndSimpleConfiguratorTest {
- private Manipulator m;
-
- public TestVMArg(String name) {
- super(name);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- m = createMinimalConfiguration(TestEclipseDataArea.class.getName());
- }
-
- public void testVMInsideInstall() throws FrameworkAdminRuntimeException, IOException {
- //Test VM path in the install folder
- File jreLocation = new File(m.getLauncherData().getLauncher().getParentFile(), "jre");
- m.getLauncherData().setJvm(jreLocation);
- m.save(false);
- assertNotContent(new File(getInstallFolder(), "eclipse.ini"), jreLocation.getAbsolutePath());
- assertContent(new File(getInstallFolder(), "eclipse.ini"), "jre");
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "jre");
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "file:");
- m.load();
- assertEquals(jreLocation, m.getLauncherData().getJvm());
-
- m.getLauncherData().setJvm(null);
- m.save(false);
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "jre");
- }
-
- public void testVMOutsideInstall() throws FrameworkAdminRuntimeException, IOException {
- //Test VM path in the install folder
- File jreLocation = new File(m.getLauncherData().getLauncher().getParentFile(), "../../jre").getCanonicalFile();
- m.getLauncherData().setJvm(jreLocation);
- m.save(false);
- assertContent(new File(getInstallFolder(), "eclipse.ini"), jreLocation.getAbsolutePath().replace('\\','/'));
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "jre");
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "file:");
- m.load();
- assertEquals(jreLocation, m.getLauncherData().getJvm());
- }
-
- public void test269502() throws FrameworkAdminRuntimeException, IOException {
- //Test VM path in the install folder
- String winPath = "c:/ibm5sr3/bin";
- String linuxPath = "/Users/Pascal/ibm5sr3/bin";
- String chosenPath = Platform.getOS().equals("win32") ? winPath : linuxPath;
- File jreLocation = new File(chosenPath);
- m.getLauncherData().setJvm(jreLocation);
- m.save(false);
- assertContent(new File(getInstallFolder(), "eclipse.ini"), chosenPath);
- assertContent(m.getLauncherData().getLauncherConfigLocation(), "-vm");
- assertContent(m.getLauncherData().getLauncherConfigLocation(), chosenPath);
- assertNotContent(m.getLauncherData().getLauncherConfigLocation(), "file:");
- m.load();
- assertEquals(jreLocation, m.getLauncherData().getJvm());
- }
- /**
- * But 282303:
- * Have -vm ../jre as program arguments.
- * See them vanish during the save operation of the manipulator
- *
- * @throws FrameworkAdminRuntimeException
- * @throws IOException
- */
- public void test282303() throws FrameworkAdminRuntimeException, IOException {
- assertNotContent(new File(getInstallFolder(), "eclipse.ini"), "-vm");
- assertNotContent(new File(getInstallFolder(), "eclipse.ini"), "../mylocation");
- assertNotContent(new File(getInstallFolder(), "eclipse.ini"), "-otherarg");
- m.getLauncherData().addProgramArg("-vm");
- m.getLauncherData().addProgramArg("../mylocation");
- m.getLauncherData().addProgramArg("-otherarg");
- m.getLauncherData().setJvm(new File("../mylocation"));
- m.save(false);
- m.load();
- String[] args = m.getLauncherData().getProgramArgs();
- boolean found = false;
- for(int i = 0; i < args.length; i++) {
- if("-vm".equals(args[i]) && i != args.length - 1) {
- if("../mylocation".equals(args[++i])) {
- found = true;
- break;
- }
- }
- }
- assertTrue("Can't find vm argument.", found);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java b/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java
deleted file mode 100644
index 0841eb48b..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin.test/src/org/eclipse/equinox/frameworkadmin/tests/UtilsTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin.tests;
-
-import java.io.File;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.osgi.service.environment.Constants;
-
-public class UtilsTest extends AbstractFwkAdminTest {
-
- /**
- * @param name
- */
- public UtilsTest(String name) {
- super(name);
- }
-
- public void test_getEclipseRealLocation() throws Exception {
- File installFolder = Activator.getContext().getDataFile("212361");
-
- File plugins = new File(installFolder, "plugins");
- File foo1 = new File(plugins, "org.foo_1.2.3.abc");
- File foo2 = new File(plugins, "org.foo_1.2.4.xyz");
- File foo_64 = new File(plugins, "org.foo.x86_64_1.2.3");
- File fooWithSpaces = new File(plugins, "alotof/s p a c e s/org.foo_1.2.3.abc");
- foo1.mkdirs();
- foo2.mkdirs();
- foo_64.mkdirs();
- fooWithSpaces.mkdirs();
-
- Manipulator manipulator = getFrameworkManipulator(new File(installFolder, "configuration"), new File(installFolder, "eclipse"));
-
-
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo"), foo2.toURI());
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo_1.2.3.abc"), foo1.toURI());
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo.x86_64"), foo_64.toURI());
-
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, plugins.toURI().toString() + "alotof/s%20p%20a%20c%20e%20s/org.foo_1.2.3.abc/"), fooWithSpaces.toURI());
-
- File other = new File(installFolder, "other/org.foo_1.2.4");
- other.mkdirs();
- manipulator.getConfigData().setProperty("osgi.syspath", other.getParentFile().getAbsolutePath());
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo"), other.toURI());
- }
-
- public void testMacRealLocation() throws Exception {
- File installFolder = Activator.getContext().getDataFile("280007");
-
- File plugins = new File(installFolder, "plugins");
- File foo = new File(plugins, "org.foo_1.2.3.abc");
- foo.mkdirs();
-
- Manipulator manipulator = getFrameworkManipulator(new File(installFolder, "configuration"), new File(installFolder, "Eclipse.app/Contents/MacOS/eclipse"));
- manipulator.getLauncherData().setOS(Constants.OS_MACOSX);
- assertEquals(FileUtils.getEclipseRealLocation(manipulator, "org.foo"), foo.toURI());
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/.classpath b/bundles/org.eclipse.equinox.frameworkadmin/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/CDC-1.1%Foundation-1.1"/>
- <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.frameworkadmin/.cvsignore b/bundles/org.eclipse.equinox.frameworkadmin/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/.project b/bundles/org.eclipse.equinox.frameworkadmin/.project
deleted file mode 100644
index 20c6cbd32..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.frameworkadmin</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b5ebf1caa..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,343 +0,0 @@
-#Thu Mar 04 10:20:10 EST 2010
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 283b95a98..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:26 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF
deleted file mode 100644
index c1bde7c05..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.frameworkadmin;singleton:=true
-Bundle-Version: 2.0.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Import-Package: org.eclipse.osgi.service.pluginconversion;version="1.0.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0"
-Export-Package: org.eclipse.equinox.frameworkadmin;version="2.0.0",
- org.eclipse.equinox.internal.frameworkadmin.utils;
- x-friends:="org.eclipse.equinox.frameworkadmin.equinox,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.simpleconfigurator.manipulator",
- org.eclipse.equinox.internal.provisional.configuratormanipulator;x-friends:="org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.simpleconfigurator.manipulator",
- org.eclipse.equinox.internal.provisional.frameworkadmin;
- x-friends:="org.eclipse.equinox.frameworkadmin.equinox,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.simpleconfigurator.manipulator,
- org.eclipse.pde.core,
- org.eclipse.pde.ui"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.4.0"
-Bundle-ActivationPolicy: lazy
-Bundle-Activator: org.eclipse.equinox.internal.frameworkadmin.utils.Activator
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/about.html b/bundles/org.eclipse.equinox.frameworkadmin/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/build.properties b/bundles/org.eclipse.equinox.frameworkadmin/build.properties
deleted file mode 100644
index b0b12db73..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/plugin.properties b/bundles/org.eclipse.equinox.frameworkadmin/plugin.properties
deleted file mode 100644
index 5ceaadc85..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-###############################################################################
-pluginName = Equinox Framework Admin
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/pom.xml b/bundles/org.eclipse.equinox.frameworkadmin/pom.xml
deleted file mode 100644
index 239c24f76..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.frameworkadmin</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java
deleted file mode 100644
index 702fd1811..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/frameworkadmin/BundleInfo.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.frameworkadmin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.URIUtil;
-import org.osgi.framework.Version;
-
-/**
- * This object represents information of a bundle.
- * @since 2.0
- */
-public class BundleInfo {
- public static final String EMPTY_VERSION = "0.0.0"; //$NON-NLS-1$
- public static final int NO_LEVEL = -1;
- public static final int NO_BUNDLEID = -1;
-
- private String symbolicName = null;
- private String version = EMPTY_VERSION;
- private URI baseLocation = null;
- private URI location = null;
- private long bundleId = NO_BUNDLEID;
-
- private boolean markedAsStarted = false;
- private int startLevel = NO_LEVEL;
- private boolean resolved = false;
-
- private String manifest = null;
- private String fragmentHost = null;
-
- /**
- * Create a new BundleInfo object
- */
- public BundleInfo() {
- }
-
- /**
- * Create a new BundleInfo object
- * @param location - the location of the bundle
- */
- public BundleInfo(URI location) {
- this.location = location;
- }
-
- /**
- * Create a new BundleInfo object
- * @param location - the location of the bundle
- * @param startLevel - the start to be used or {@link BundleInfo#NO_LEVEL}
- * @param started - whether or not the bundle should be started
- */
- public BundleInfo(URI location, int startLevel, boolean started) {
- this.location = location;
- this.startLevel = startLevel < 0 ? NO_LEVEL : startLevel;
- this.markedAsStarted = started;
- }
-
- /**
- * Create a new BundleInfo object
- * @param symbolic The Bundle-SymbolicName name for this bundle
- * @param version - The version for this bundle, this must be a valid {@link Version} string, if null is passed {@link #EMPTY_VERSION} will be used instead
- * @param location - the location of the bundle
- * @param startLevel - the start level of the bundle or {@link BundleInfo#NO_LEVEL}
- * @param started - whether or not the bundle should be started
- */
- public BundleInfo(String symbolic, String version, URI location, int startLevel, boolean started) {
- this.symbolicName = symbolic;
- this.version = version != null ? version : EMPTY_VERSION;
- this.location = location;
- this.markedAsStarted = started;
- this.startLevel = startLevel < 0 ? NO_LEVEL : startLevel;
- }
-
- /**
- * Get the bundle id
- * @return the bundle id or {@link #NO_BUNDLEID}
- */
- public long getBundleId() {
- return bundleId;
- }
-
- /**
- * The base location
- * An absolute URI which may be used to resolve relative {@link #getLocation()} URIs
- * @return absolute URI or null if not set
- */
- public URI getBaseLocation() {
- return baseLocation;
- }
-
- /**
- * The location of this bundle.
- * A location is required if this bundle will be persisted into a configuration file
- * @return URI location or null if not set
- */
- public URI getLocation() {
- return location;
- }
-
- /**
- * The manifest for this bundle
- * @return the manifest or null if not set
- */
- public String getManifest() {
- return manifest;
- }
-
- /**
- * The start level for this bundle
- * @return the start level or {@link #NO_LEVEL}
- */
- public int getStartLevel() {
- return startLevel;
- }
-
- /**
- * The Bundle-SymbolicName for this bundle.
- * A symbolic name is required if this bundle will be persisted into a configuration file
- * @return the symbolic name or null if not set
- */
- public String getSymbolicName() {
- return symbolicName;
- }
-
- /**
- * Return the version
- * @return an {@link Version} string, or "0.0.0" if not set
- */
- public String getVersion() {
- if (version == null)
- return EMPTY_VERSION;
- return version;
- }
-
- /**
- * Return the host if this bundle is a fragment
- * @return the host, or null if this is not a fragment
- */
- public String getFragmentHost() {
- return fragmentHost;
- }
-
- /**
- * Whether or not this bundle is marked to be started
- * Default is false
- * @return boolean
- */
- public boolean isMarkedAsStarted() {
- return markedAsStarted;
- }
-
- /**
- * Whether or not this bundle is resolved
- * Default is false
- * @return boolean
- */
- public boolean isResolved() {
- return resolved;
- }
-
- /**
- * Set the bundle id
- * @param bundleId
- */
- public void setBundleId(long bundleId) {
- this.bundleId = bundleId;
- }
-
- /**
- * Set a base location against which relative {@link #getLocation()} URIs may be resolved
- * @param baseLocation - an absolute URI
- */
- public void setBaseLocation(URI baseLocation) {
- this.baseLocation = baseLocation;
- }
-
- /**
- * Set the location for this bundle.
- * @param location
- */
- public void setLocation(URI location) {
- this.location = location;
- }
-
- /**
- * Set the manifest for this bundle
- * @param manifest
- */
- public void setManifest(String manifest) {
- this.manifest = manifest;
- }
-
- /**
- * Set whether or not this bundle should be started
- * @param markedAsStarted
- */
- public void setMarkedAsStarted(boolean markedAsStarted) {
- this.markedAsStarted = markedAsStarted;
- }
-
- /**
- * Set whether or not the bundle is resolved
- * @param resolved
- */
- public void setResolved(boolean resolved) {
- this.resolved = resolved;
- }
-
- /**
- * Set the start level.
- * @param level if a value < 0 is passed, the start level will be set to {@link #NO_LEVEL}
- */
- public void setStartLevel(int level) {
- this.startLevel = level < 0 ? NO_LEVEL : level;
- }
-
- /**
- * Set the Bundle-SymbolicName
- * @param symbolicName
- */
- public void setSymbolicName(String symbolicName) {
- this.symbolicName = symbolicName;
- }
-
- /**
- * Set the version, should be a valid {@link Version} string
- * @param value
- */
- public void setVersion(String value) {
- if (value == null)
- this.version = EMPTY_VERSION;
- else
- this.version = value;
- }
-
- /**
- * Set the host if this bundle is a fragment
- * @param fragmentHost
- */
- public void setFragmentHost(String fragmentHost) {
- this.fragmentHost = fragmentHost;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("BundleInfo("); //$NON-NLS-1$
- if (symbolicName != null)
- buffer.append(symbolicName);
- buffer.append(", "); //$NON-NLS-1$
- buffer.append(version);
-
- if (fragmentHost != null) {
- buffer.append(", fragmentHost="); //$NON-NLS-1$
- buffer.append(fragmentHost);
- }
-
- if (baseLocation != null) {
- buffer.append(", baseLocation="); //$NON-NLS-1$
- buffer.append(baseLocation);
- }
- buffer.append(", location="); //$NON-NLS-1$
- buffer.append(location);
- buffer.append(", startLevel="); //$NON-NLS-1$
- buffer.append(startLevel);
- buffer.append(", toBeStarted="); //$NON-NLS-1$
- buffer.append(markedAsStarted);
- buffer.append(", resolved="); //$NON-NLS-1$
- buffer.append(resolved);
- buffer.append(", id="); //$NON-NLS-1$
- buffer.append(this.bundleId);// buffer.append(',').append(manifest == null ? "no manifest" : "manifest available");
- buffer.append(',').append(manifest == null ? "no manifest" : "manifest available"); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append(')');
- return buffer.toString();
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode());
- result = prime * result + version.hashCode();
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null)
- return false;
-
- if (getClass() != obj.getClass())
- return false;
-
- BundleInfo other = (BundleInfo) obj;
- if (symbolicName == null) {
- if (other.symbolicName != null)
- return false;
- } else if (!symbolicName.equals(other.symbolicName))
- return false;
-
- if (!version.equals(other.getVersion()))
- return false;
-
- if (location == null || other.location == null)
- return true;
-
- //compare absolute location URIs
- URI absoluteLocation = null;
- if (location.isAbsolute() || baseLocation == null)
- absoluteLocation = location;
- else
- absoluteLocation = URIUtil.append(baseLocation, URIUtil.toUnencodedString(location));
-
- URI otherAbsoluteLocation = null;
- if (other.location.isAbsolute() || other.baseLocation == null)
- otherAbsoluteLocation = other.location;
- else
- otherAbsoluteLocation = URIUtil.append(other.baseLocation, URIUtil.toUnencodedString(other.location));
- return URIUtil.sameURI(absoluteLocation, otherAbsoluteLocation);
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Activator.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Activator.java
deleted file mode 100644
index 733bdcb5d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Activator.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.utils;
-
-import org.eclipse.osgi.service.pluginconversion.PluginConverter;
-import org.osgi.framework.*;
-
-/**
- * @since 1.0
- */
-public class Activator implements BundleActivator {
-
- private static BundleContext bundleContext;
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-
- /*
- * Acquire the plug-in conversion service or return <code>null</code> if it is not available.
- */
- public static PluginConverter acquirePluginConverter() {
- if (bundleContext == null)
- return null;
- ServiceReference reference = bundleContext.getServiceReference(PluginConverter.class.getName());
- if (reference == null)
- return null;
- PluginConverter result = (PluginConverter) bundleContext.getService(reference);
- bundleContext.ungetService(reference);
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
deleted file mode 100644
index 2d257a581..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/SimpleBundlesState.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.utils;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.osgi.framework.Constants;
-
-/**
- * This implementation of BundlesState doesn't support any of
- * - resolving bundles,
- * - retrieving fw persistent data.
- *
- * This implementation can be used for those cases.
- *
- */
-
-public class SimpleBundlesState implements BundlesState {
- public static final BundleInfo[] NULL_BUNDLEINFOS = new BundleInfo[0];
-
- /**
- * Check if the specified FrameworkAdmin is available.
- *
- * @param fwAdmin
- * @throws FrameworkAdminRuntimeException
- */
- public static void checkAvailability(FrameworkAdmin fwAdmin) throws FrameworkAdminRuntimeException {
- if (!fwAdmin.isActive())
- throw new FrameworkAdminRuntimeException("FrameworkAdmin creates this object is no more available.", FrameworkAdminRuntimeException.FRAMEWORKADMIN_UNAVAILABLE);
- }
-
- /**
- *
- * @param launcherData
- * @return File of fwJar to be used.
- * @throws IOException
- */
- static File getFwJar(LauncherData launcherData) {
- if (launcherData.getFwJar() != null)
- return launcherData.getFwJar();
- return null;
- }
-
- private final String systemBundleSymbolicName;
-
- private final String systemBundleName;
-
- private final String systemBundleVendor;
- List bundleInfosList = new LinkedList();
-
- FrameworkAdmin fwAdmin = null;
-
- Manipulator manipulator = null;
-
- /**
- * If the manifest of the target fw implementation has Constants.BUNDLE_SYMBOLICNAME header,
- * this constructor should be used.
- *
- * @param ManipulatorAdmin
- * @param Manipulator
- * @param systemBundleSymbolicName
- */
- public SimpleBundlesState(FrameworkAdmin ManipulatorAdmin, Manipulator Manipulator, String systemBundleSymbolicName) {
- super();
- this.fwAdmin = ManipulatorAdmin;
- // copy Manipulator object for avoiding modifying the parameters of the Manipulator.
- this.manipulator = ManipulatorAdmin.getManipulator();
- this.manipulator.setConfigData(Manipulator.getConfigData());
- this.manipulator.setLauncherData(Manipulator.getLauncherData());
- this.systemBundleSymbolicName = systemBundleSymbolicName;
- this.systemBundleName = null;
- this.systemBundleVendor = null;
- initialize();
- }
-
- /**
- * If the manifest of the target fw implementation has not Constants.BUNDLE_SYMBOLICNAME header
- * but , Constants.BUNDLE_NAME and BUNDLE_VERSION,
- * this constructor should be used.
- *
- * @param ManipulatorAdmin
- * @param Manipulator
- * @param systemBundleName
- * @param systemBundleVender
- */
- public SimpleBundlesState(FrameworkAdmin ManipulatorAdmin, Manipulator Manipulator, String systemBundleName, String systemBundleVender) {
- super();
- this.fwAdmin = ManipulatorAdmin;
- // copy Manipulator object for avoiding modifying the parameters of the Manipulator.
- this.manipulator = ManipulatorAdmin.getManipulator();
- this.manipulator.setConfigData(Manipulator.getConfigData());
- this.manipulator.setLauncherData(Manipulator.getLauncherData());
- this.systemBundleSymbolicName = null;
- this.systemBundleName = systemBundleName;
- this.systemBundleVendor = systemBundleVender;
- initialize();
- }
-
- public BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException {
- if (!fwAdmin.isActive())
- throw new FrameworkAdminRuntimeException("FrameworkAdmin creates this object is no more available.", FrameworkAdminRuntimeException.FRAMEWORKADMIN_UNAVAILABLE);
- return Utils.getBundleInfosFromList(this.bundleInfosList);
- }
-
- /*
- * Just return required bundles.
- *
- * @see org.eclipse.equinox.internal.provisional.frameworkadmin.BundlesState#getPrerequisteBundles(org.eclipse.equinox.internal.provisional.frameworkadmin.BundleInfo)
- */
- public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
- URI location = bInfo.getLocation();
- final String requiredBundles = Utils.getManifestMainAttributes(location, Constants.REQUIRE_BUNDLE);
- if (requiredBundles == null)
- return new BundleInfo[] {this.getSystemBundle()};
-
- String[] clauses = Utils.getClauses(requiredBundles);
- List list = new LinkedList();
- for (int i = 0; i < clauses.length; i++)
- list.add(Utils.getPathFromClause(clauses[i]));
-
- List ret = new LinkedList();
- ret.add(this.getSystemBundle());
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo currentBInfo = (BundleInfo) ite.next();
- URI currentLocation = currentBInfo.getLocation();
- String currentSymbolicName = Utils.getManifestMainAttributes(currentLocation, Constants.BUNDLE_SYMBOLICNAME);
- if (currentSymbolicName == null)
- continue;
- currentSymbolicName = Utils.getPathFromClause(currentSymbolicName);
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- String symbolicName = (String) ite2.next();
- if (symbolicName.equals(currentSymbolicName)) {
- ret.add(currentBInfo);
- break;
- }
- }
- }
- return Utils.getBundleInfosFromList(ret);
- }
-
- public BundleInfo getSystemBundle() {
- if (this.systemBundleSymbolicName == null) {
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite.next();
- // if (bInfo.getStartLevel() != 1)
- // return null;;
- URI location = bInfo.getLocation();
- String bundleName = Utils.getManifestMainAttributes(location, Constants.BUNDLE_NAME);
- if (systemBundleName.equals(bundleName)) {
- String bundleVendor = Utils.getManifestMainAttributes(location, Constants.BUNDLE_VENDOR);
- if (systemBundleVendor.equals(bundleVendor))
- return bInfo;
- }
- }
- return null;
- }
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite.next();
- URI location = bInfo.getLocation();
- String symbolicName = Utils.getManifestMainAttributes(location, Constants.BUNDLE_SYMBOLICNAME);
- symbolicName = Utils.getPathFromClause(symbolicName);
- if (this.systemBundleSymbolicName.equals(symbolicName))
- return bInfo;
- }
- return null;
- }
-
- public BundleInfo[] getSystemFragmentedBundles() {
- BundleInfo systemBInfo = this.getSystemBundle();
- if (systemBInfo == null)
- return NULL_BUNDLEINFOS;
-
- List list = new LinkedList();
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite.next();
- URI location = bInfo.getLocation();
- String manifestVersion = Utils.getManifestMainAttributes(location, Constants.BUNDLE_MANIFESTVERSION);
- if (manifestVersion == null)
- continue;
- if (manifestVersion.equals("1") || manifestVersion.equals("1.0")) //$NON-NLS-1$//$NON-NLS-2$
- continue;
-
- String fragmentHost = Utils.getManifestMainAttributes(location, Constants.FRAGMENT_HOST);
- if (fragmentHost == null)
- continue;
- int index = fragmentHost.indexOf(";"); //$NON-NLS-1$
- if (index == -1)
- continue;
- String symbolicName = fragmentHost.substring(0, index).trim();
- String parameter = fragmentHost.substring(index + 1).trim();
- // TODO What to do ,in case of alias name of system bundle is not used ?
- if (symbolicName.equals(Constants.SYSTEM_BUNDLE_SYMBOLICNAME))
- if (parameter.equals(Constants.EXTENSION_DIRECTIVE + ":=" + Constants.EXTENSION_FRAMEWORK)) { //$NON-NLS-1$
- list.add(location);
- break;
- }
- }
- return Utils.getBundleInfosFromList(list);
- }
-
- public String[] getUnsatisfiedConstraints(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- throw new FrameworkAdminRuntimeException("getUnsatisfiedConstraints(BundleInfo bInfo) is not supported in this implementation", FrameworkAdminRuntimeException.UNSUPPORTED_OPERATION);
- }
-
- private void initialize() {
- this.bundleInfosList.clear();
- LauncherData launcherData = manipulator.getLauncherData();
- ConfigData configData = manipulator.getConfigData();
- File fwJar = getFwJar(launcherData);;
-
- if (fwJar == null)
- throw new IllegalStateException("launcherData.getLauncherConfigFile() == null && fwJar is not set.");
- // No fw persistent data location is taken into consideration.
-
- BundleInfo[] bInfos = configData.getBundles();
- for (int j = 0; j < bInfos.length; j++)
- this.installBundle(bInfos[j]);
-
- if (getSystemBundle() == null) {
- BundleInfo sysBInfo = new BundleInfo(launcherData.getFwJar().toURI(), 0, true);
- sysBInfo.setBundleId(0);
- this.installBundle(sysBInfo);
- }
- }
-
- public void installBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
-
- URI newLocation = bInfo.getLocation();
- Dictionary newManifest = Utils.getOSGiManifest(newLocation);
- if (newManifest == null) {
- // TODO log something here
- return;
- }
- String newSymbolicName = (String) newManifest.get(Constants.BUNDLE_SYMBOLICNAME);
- String newVersion = (String) newManifest.get(Constants.BUNDLE_VERSION);
- //System.out.println("> currentInstalledBundles.length=" + currentInstalledBundles.length);
- boolean found = false;
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- BundleInfo currentBInfo = (BundleInfo) ite.next();
- URI location = currentBInfo.getLocation();
- if (newLocation.equals(location)) {
- found = true;
- break;
- }
- Dictionary manifest = Utils.getOSGiManifest(location);
- String symbolicName = (String) manifest.get(Constants.BUNDLE_SYMBOLICNAME);
- String version = (String) manifest.get(Constants.BUNDLE_VERSION);
- if (newSymbolicName != null && newVersion != null)
- if (newSymbolicName.equals(symbolicName) && newVersion.equals(version)) {
- found = true;
- break;
- }
- }
- if (!found) {
- this.bundleInfosList.add(bInfo);
- }
- }
-
- // public String toString() {
- // if (state == null)
- // return null;
- // StringBuffer sb = new StringBuffer();
- // BundleDescription[] bundleDescriptions = state.getBundles();
- // for (int i = 0; i < bundleDescriptions.length; i++) {
- // sb.append(bundleDescriptions[i].getBundleId() + ":");
- // sb.append(bundleDescriptions[i].toString() + "(");
- // sb.append(bundleDescriptions[i].isResolved() + ")");
- // String[] ees = bundleDescriptions[i].getExecutionEnvironments();
- // for (int j = 0; j < ees.length; j++)
- // sb.append(ees[j] + " ");
- // sb.append("\n");
- // }
- // sb.append("PlatformProperties:\n");
- // Dictionary[] dics = state.getPlatformProperties();
- // for (int i = 0; i < dics.length; i++) {
- // for (Enumeration enum = dics[i].keys(); enum.hasMoreElements();) {
- // String key = (String) enum.nextElement();
- // String value = (String) dics[i].get(key);
- // sb.append(" (" + key + "," + value + ")\n");
- // }
- // }
- // sb.append("\n");
- // return sb.toString();
- // }
-
- public boolean isFullySupported() {
- return false;
- }
-
- public boolean isResolved() throws FrameworkAdminRuntimeException {
- throw new FrameworkAdminRuntimeException("isResolved() is not supported in this implementation", FrameworkAdminRuntimeException.UNSUPPORTED_OPERATION);
- }
-
- public boolean isResolved(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- throw new FrameworkAdminRuntimeException("isResolved(BundleInfo bInfo) is not supported in this implementation", FrameworkAdminRuntimeException.UNSUPPORTED_OPERATION);
- }
-
- public void resolve(boolean increment) throws FrameworkAdminRuntimeException {
- throw new FrameworkAdminRuntimeException("resolve(boolean increment) is not supported in this implementation", FrameworkAdminRuntimeException.UNSUPPORTED_OPERATION);
- }
-
- public void uninstallBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException {
- URI targetLocation = bInfo.getLocation();
- int index = -1;
- for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
- index++;
- BundleInfo currentBInfo = (BundleInfo) ite.next();
- URI location = currentBInfo.getLocation();
- if (targetLocation.equals(location)) {
- break;
- }
- }
- if (index != -1)
- this.bundleInfosList.remove(index);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
deleted file mode 100644
index 375622c2c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/frameworkadmin/utils/Utils.java
+++ /dev/null
@@ -1,442 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.frameworkadmin.utils;
-
-import java.io.*;
-import java.net.*;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.jar.JarFile;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
-import org.eclipse.osgi.service.pluginconversion.PluginConverter;
-import org.eclipse.osgi.util.ManifestElement;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
-public class Utils {
- private static final String FEATURE_MANIFEST = "feature.xml"; //$NON-NLS-1$
- private static final String FILE_SCHEME = "file"; //$NON-NLS-1$
- private static final String FRAGMENT_MANIFEST = "fragment.xml"; //$NON-NLS-1$
- private static final String PATH_SEP = "/"; //$NON-NLS-1$
- private static final String PLUGIN_MANIFEST = "plugin.xml"; //$NON-NLS-1$
-
- /**
- * Overwrite all properties of from to the properties of to. Return the result of to.
- *
- * @param to Properties whose keys and values of other Properties will be appended to.
- * @param from Properties whose keys and values will be set to the other properties.
- * @return Properties as a result of this method.
- */
- public static Properties appendProperties(Properties to, Properties from) {
- if (from != null) {
- if (to == null)
- to = new Properties();
- // printoutProperties(System.out, "to", to);
- // printoutProperties(System.out, "from", from);
-
- for (Enumeration enumeration = from.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- to.setProperty(key, from.getProperty(key));
- }
- }
- // printoutProperties(System.out, "to", to);
- return to;
- }
-
- //Return a dictionary representing a manifest. The data may result from plugin.xml conversion
- private static Dictionary basicLoadManifest(File bundleLocation) {
- InputStream manifestStream = null;
- ZipFile jarFile = null;
- try {
- try {
- // Handle a JAR'd bundle
- if (bundleLocation.isFile()) {
- jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
- ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
- if (manifestEntry != null) {
- manifestStream = jarFile.getInputStream(manifestEntry);
- }
- } else {
- // we have a directory-based bundle
- File bundleManifestFile = new File(bundleLocation, JarFile.MANIFEST_NAME);
- if (bundleManifestFile.exists())
- manifestStream = new BufferedInputStream(new FileInputStream(new File(bundleLocation, JarFile.MANIFEST_NAME)));
- }
- } catch (IOException e) {
- //ignore
- }
- // we were unable to get an OSGi manifest file so try and convert an old-style manifest
- if (manifestStream == null)
- return convertPluginManifest(bundleLocation, true);
-
- try {
- Map manifest = ManifestElement.parseBundleManifest(manifestStream, null);
- // add this check to handle the case were we read a non-OSGi manifest
- if (manifest.get(Constants.BUNDLE_SYMBOLICNAME) == null)
- return convertPluginManifest(bundleLocation, true);
- return manifestToProperties(manifest);
- } catch (IOException ioe) {
- return null;
- } catch (BundleException e) {
- return null;
- }
- } finally {
- try {
- if (manifestStream != null)
- manifestStream.close();
- } catch (IOException e1) {
- //Ignore
- }
- try {
- if (jarFile != null)
- jarFile.close();
- } catch (IOException e2) {
- //Ignore
- }
- }
- }
-
- public static void checkAbsoluteDir(File file, String dirName) throws IllegalArgumentException {
- if (file == null)
- throw new IllegalArgumentException(dirName + " is null");
- if (!file.isAbsolute())
- throw new IllegalArgumentException(dirName + " is not absolute path. file=" + file.getAbsolutePath());
- if (!file.isDirectory())
- throw new IllegalArgumentException(dirName + " is not directory. file=" + file.getAbsolutePath());
- }
-
- public static void checkAbsoluteFile(File file, String dirName) {//throws ManipulatorException {
- if (file == null)
- throw new IllegalArgumentException(dirName + " is null");
- if (!file.isAbsolute())
- throw new IllegalArgumentException(dirName + " is not absolute path. file=" + file.getAbsolutePath());
- if (file.isDirectory())
- throw new IllegalArgumentException(dirName + " is not file but directory");
- }
-
- public static URL checkFullUrl(URL url, String urlName) throws IllegalArgumentException {//throws ManipulatorException {
- if (url == null)
- throw new IllegalArgumentException(urlName + " is null");
- if (!url.getProtocol().endsWith("file")) //$NON-NLS-1$
- return url;
- File file = new File(url.getFile());
- if (!file.isAbsolute())
- throw new IllegalArgumentException(urlName + "(" + url + ") does not have absolute path");
- if (file.getAbsolutePath().startsWith(PATH_SEP))
- return url;
- try {
- return getUrl("file", null, PATH_SEP + file.getAbsolutePath()); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- throw new IllegalArgumentException(urlName + "(" + "file:" + PATH_SEP + file.getAbsolutePath() + ") is not fully quallified");
- }
- }
-
- /*
- * Copied from BundleDescriptionFactory in the metadata generator.
- */
- private static Dictionary convertPluginManifest(File bundleLocation, boolean logConversionException) {
- PluginConverter converter;
- try {
- converter = org.eclipse.equinox.internal.frameworkadmin.utils.Activator.acquirePluginConverter();
- if (converter == null) {
- new RuntimeException("Unable to aquire PluginConverter service during generation for: " + bundleLocation).printStackTrace(); //$NON-NLS-1$
- return null;
- }
- return converter.convertManifest(bundleLocation, false, null, true, null);
- } catch (PluginConversionException convertException) {
- // only log the exception if we had a plugin.xml or fragment.xml and we failed conversion
- if (bundleLocation.getName().equals(FEATURE_MANIFEST))
- return null;
- if (!new File(bundleLocation, PLUGIN_MANIFEST).exists() && !new File(bundleLocation, FRAGMENT_MANIFEST).exists())
- return null;
- if (logConversionException) {
- IStatus status = new Status(IStatus.WARNING, "org.eclipse.equinox.frameworkadmin", 0, "Error converting bundle manifest.", convertException);
- System.out.println(status);
- //TODO Need to find a way to get a logging service to log
- }
- return null;
- }
- }
-
- public static boolean createParentDir(File file) {
- File parent = file.getParentFile();
- if (parent == null)
- return false;
- if (parent.exists())
- return true;
- return parent.mkdirs();
- }
-
- public static BundleInfo[] getBundleInfosFromList(List list) {
- if (list == null)
- return new BundleInfo[0];
- BundleInfo[] ret = new BundleInfo[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- public static String[] getClauses(String header) {
- StringTokenizer token = new StringTokenizer(header, ","); //$NON-NLS-1$
- List list = new LinkedList();
- while (token.hasMoreTokens()) {
- list.add(token.nextToken());
- }
- String[] ret = new String[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- public static String[] getClausesManifestMainAttributes(URI location, String name) {
- return getClauses(getManifestMainAttributes(location, name));
- }
-
- public static String getManifestMainAttributes(URI location, String name) {
- Dictionary manifest = Utils.getOSGiManifest(location);
- if (manifest == null)
- throw new RuntimeException("Unable to locate bundle manifest: " + location);
- return (String) manifest.get(name);
- }
-
- public static Dictionary getOSGiManifest(URI location) {
- if (location == null)
- return null;
- // if we have a file-based URL that doesn't end in ".jar" then...
- if (FILE_SCHEME.equals(location.getScheme()))
- return basicLoadManifest(URIUtil.toFile(location));
-
- try {
- URL url = new URL("jar:" + location.toString() + "!/"); //$NON-NLS-1$//$NON-NLS-2$
- JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
- ZipFile jar = jarConnection.getJarFile();
-
- try {
- ZipEntry entry = jar.getEntry(JarFile.MANIFEST_NAME);
- if (entry == null)
- return null;
-
- Map manifest = ManifestElement.parseBundleManifest(jar.getInputStream(entry), null);
- // if we have a JAR'd bundle that has a non-OSGi manifest file (like
- // the ones produced by Ant, then try and convert the plugin.xml
- if (manifest.get(Constants.BUNDLE_SYMBOLICNAME) == null) {
- String jarName = jar.getName();
- File file = jarName != null ? new File(jarName) : null;
- if (file != null && file.exists()) {
- return convertPluginManifest(file, true);
- }
- return null;
- }
- return manifestToProperties(manifest);
- } catch (BundleException e) {
- return null;
- } finally {
- jar.close();
- }
- } catch (IOException e) {
- if (System.getProperty("osgi.debug") != null) {
- System.err.println("location=" + location);
- e.printStackTrace();
- }
- }
- return null;
- }
-
- public static String getPathFromClause(String clause) {
- if (clause == null)
- return null;
- if (clause.indexOf(";") != -1)
- clause = clause.substring(0, clause.indexOf(";"));
- return clause.trim();
- }
-
- public static String getRelativePath(File target, File from) {
-
- String targetPath = Utils.replaceAll(target.getAbsolutePath(), File.separator, PATH_SEP);
- String fromPath = Utils.replaceAll(from.getAbsolutePath(), File.separator, PATH_SEP);
-
- String[] targetTokens = Utils.getTokens(targetPath, PATH_SEP);
- String[] fromTokens = Utils.getTokens(fromPath, PATH_SEP);
- int index = -1;
- for (int i = 0; i < fromTokens.length; i++)
- if (fromTokens[i].equals(targetTokens[i]))
- index = i;
- else
- break;
-
- StringBuffer sb = new StringBuffer();
- for (int i = index + 1; i < fromTokens.length; i++)
- sb.append(".." + PATH_SEP);
-
- for (int i = index + 1; i < targetTokens.length; i++)
- if (i != targetTokens.length - 1)
- sb.append(targetTokens[i] + PATH_SEP);
- else
- sb.append(targetTokens[i]);
- return sb.toString();
- }
-
- /**
- * This method will be called for create a backup file.
- *
- * @param file target file
- * @return File backup file whose filename consists of "hogehoge.yyyyMMddHHmmss.ext" or
- * "hogehoge.yyyyMMddHHmmss".
- */
- public static File getSimpleDataFormattedFile(File file) {
- SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); //$NON-NLS-1$
- String date = df.format(new Date());
- String filename = file.getName();
- int index = filename.lastIndexOf("."); //$NON-NLS-1$
- if (index != -1)
- filename = filename.substring(0, index) + "." + date + "." + filename.substring(index + 1); //$NON-NLS-1$ //$NON-NLS-2$
- else
- filename = filename + "." + date; //$NON-NLS-1$
- File dest = new File(file.getParentFile(), filename);
- return dest;
- }
-
- public static String[] getTokens(String msg, String delim) {
- return getTokens(msg, delim, false);
- }
-
- public static String[] getTokens(String msg, String delim, boolean returnDelims) {
- StringTokenizer targetST = new StringTokenizer(msg, delim, returnDelims);
- String[] tokens = new String[targetST.countTokens()];
- ArrayList list = new ArrayList(targetST.countTokens());
- while (targetST.hasMoreTokens()) {
- list.add(targetST.nextToken());
- }
- list.toArray(tokens);
- return tokens;
- }
-
- public static URL getUrl(String protocol, String host, String file) throws MalformedURLException {// throws ManipulatorException {
- file = Utils.replaceAll(file, File.separator, "/");
- return new URL(protocol, host, file);
- }
-
- public static URL getUrlInFull(String path, URL from) throws MalformedURLException {//throws ManipulatorException {
- Utils.checkFullUrl(from, "from");
- path = Utils.replaceAll(path, File.separator, "/"); //$NON-NLS-1$
- //System.out.println("from.toExternalForm()=" + from.toExternalForm());
- String fromSt = Utils.removeLastCh(from.toExternalForm(), '/');
- //System.out.println("fromSt=" + fromSt);
- if (path.startsWith("/")) { //$NON-NLS-1$
- String fileSt = from.getFile();
- return new URL(fromSt.substring(0, fromSt.lastIndexOf(fileSt) - 1) + path);
- }
- return new URL(fromSt + "/" + path); //$NON-NLS-1$
- }
-
- private static Properties manifestToProperties(Map d) {
- Iterator iter = d.keySet().iterator();
- Properties result = new Properties();
- while (iter.hasNext()) {
- String key = (String) iter.next();
- result.put(key, d.get(key));
- }
- return result;
- }
-
- /**
- * Just used for debug.
- *
- * @param ps printstream
- * @param name name of properties
- * @param props properties whose keys and values will be printed out.
- */
- public static void printoutProperties(PrintStream ps, String name, Properties props) {
- if (props == null || props.size() == 0) {
- ps.println("Props(" + name + ") is empty");
- return;
- }
- ps.println("Props(" + name + ")=");
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- ps.print("\tkey=" + key);
- ps.println("\tvalue=" + props.getProperty(key));
- }
- }
-
- public static String removeLastCh(String target, char ch) {
- while (target.charAt(target.length() - 1) == ch) {
- target = target.substring(0, target.length() - 1);
- }
- return target;
- }
-
- public static String replaceAll(String st, String oldSt, String newSt) {
- if (oldSt.equals(newSt))
- return st;
- int index = -1;
- while ((index = st.indexOf(oldSt)) != -1) {
- st = st.substring(0, index) + newSt + st.substring(index + oldSt.length());
- }
- return st;
- }
-
- /**
- * Sort by increasing order of startlevels.
- *
- * @param bInfos array of BundleInfos to be sorted.
- * @param initialBSL initial bundle start level to be used.
- * @return sorted array of BundleInfos
- */
- public static BundleInfo[] sortBundleInfos(BundleInfo[] bInfos, int initialBSL) {
- SortedMap bslToList = new TreeMap();
- for (int i = 0; i < bInfos.length; i++) {
- Integer sL = new Integer(bInfos[i].getStartLevel());
- if (sL.intValue() == BundleInfo.NO_LEVEL)
- sL = new Integer(initialBSL);
- List list = (List) bslToList.get(sL);
- if (list == null) {
- list = new LinkedList();
- bslToList.put(sL, list);
- }
- list.add(bInfos[i]);
- }
-
- // bslToList is sorted by the key (StartLevel).
- List bundleInfoList = new LinkedList();
- for (Iterator ite = bslToList.keySet().iterator(); ite.hasNext();) {
- Integer sL = (Integer) ite.next();
- List list = (List) bslToList.get(sL);
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- bundleInfoList.add(bInfo);
- }
- }
- return getBundleInfosFromList(bundleInfoList);
- }
-
- /**
- * get String representing the given properties.
- *
- * @param name name of properties
- * @param props properties whose keys and values will be printed out.
- */
- public static String toStringProperties(String name, Properties props) {
- if (props == null || props.size() == 0) {
- return "Props(" + name + ") is empty\n";
- }
- StringBuffer sb = new StringBuffer();
- sb.append("Props(" + name + ") is \n");
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- sb.append("\tkey=" + key + "\tvalue=" + props.getProperty(key) + "\n");
- }
- return sb.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java
deleted file mode 100644
index dfc6b43d8..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulator.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.configuratormanipulator;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-/**
- *
- * This interface provides methods that enable client bundles to
- * manipulate the corresponding ConfiguratorBundle.
- *
- * see org.eclipse.equinox.internal.provisional.configurator.Configurator
- */
-
-public interface ConfiguratorManipulator {
- String SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME = "org.eclipse.equinox.configurator.BundleSymbolicName"; //$NON-NLS-1$
-
- /**
- * Save configuration for the corresponding Configurator Bundle so that
- * Bundles kept by the specified {@link Manipulator} would be installed after completion of a launch.
- * The location of a configuration file is determined by the parameters set to the Manipulator object
- * and it depends on the corresponding ConfiguratorBundle implementation.
- *
- * While some parameters of the {@link Manipulator} object will be modified (for setting info about the
- * location the ConfiguratorBundle would be able to refer in a future launch),
- * the Bundles kept by the {@link Manipulator} object should not be modified.
- *
- * Instead, it will return BundleInfo[] to be managed not by the ConfiguratorBundle.
- * These values are supposed to be saved into fw config files.
- *
- * If backup flag is true, a file have existed already under the same name
- * will be renamed into another name as a backup.
- *
- * We assume that the implementation of {@link Manipulator#save(boolean)} will call this method.
- *
- * @return array of BundleInfo to be saved as installing bundles in fw config files.
- * @param manipulator {@link Manipulator} object which contains the bundles to be installed finally.
- * @param backup if files exists at the location to save, it will be copied as a backup.
- * @throws IOException - If fail to save configuration for the corresponding Configurator Bundle.
- */
- BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException;
-
- /**
- * Update bundles kept by the specified {@link Manipulator} object into installed bundles
- * if {@link FrameworkAdmin#launch(Manipulator, File)} with the specified
- * {@link Manipulator} is called taking the corresponding ConfiguratorBundle behaivior into account.
- *
- * If there is no corresponding ConfiguratorBundle in Manipulator.getConfigData().getBundles(),
- * just return.
- *
- * The BundleInfo[] of the specified Manipulator object will be modified.
- *
- * This method is assumed to be called from {@link Manipulator#load()}.
- *
- * @param manipulator {@link Manipulator} object to be used and updated.
- * @throws IOException - If fail to read configuration for the corresponding Configurator Bundle.
- */
- void updateBundles(Manipulator manipulator) throws IOException;
-
- void cleanup(Manipulator manipulator);
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java
deleted file mode 100644
index 7ff12534d..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/configuratormanipulator/ConfiguratorManipulatorFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.configuratormanipulator;
-
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-
-/**
- * Factory class for creating ConfiguratorManipulator object from Java programs.
- *
- * @see FrameworkAdmin
- */
-public abstract class ConfiguratorManipulatorFactory {
- public final static String SYSTEM_PROPERTY_KEY = "org.eclipse.equinox.configuratorManipulatorFactory"; //$NON-NLS-1$
-
- abstract protected ConfiguratorManipulator createConfiguratorManipulator();
-
- public static ConfiguratorManipulator getInstance(String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- ConfiguratorManipulatorFactory factory = (ConfiguratorManipulatorFactory) Class.forName(className).newInstance();
- return factory.createConfiguratorManipulator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java
deleted file mode 100644
index bbd261cc3..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/BundlesState.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-
-/**
- * This API is used for expecting bundles state virtually.
- *
- * This object is instantiated by {@link Manipulator#getBundlesState()}.
- * At its instantiation, state of the bundles will be created in this object
- * according to the parameters which the calling {@link Manipulator} object has.
- * For its creation, information in the fw persistent data will be taken into account.
- *
- * Modification of this object after its instantiation never affects the parameters
- * in the calling {@link Manipulator} object.
- *
- * XXX Implementation of Simple ConfiguratorManipulator needs the functions.
- *
- * @see Manipulator
- */
-public interface BundlesState {
-
- /** Return expected bundles state currently kept in this object.
- *
- * The implementation of this method will try to resolve the state
- * if resolving a state is supported.
- *
- * @return bundle array of BundleInfo currently composed in this object.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created the parent {@link Manipulator} is unregistered.
- */
- BundleInfo[] getExpectedState() throws FrameworkAdminRuntimeException;
-
- /**
- * Return required bundles to be resolve the specified bInfo
- * under the state currently composed.
- *
- * The implementation of this method will try to resolve the state
- * if resolving a state is supported.
- *
- * @param bInfo bundleinfo whose prerequisite bundles will be searched.
- * @return bundle array of BundleInfos required for the specified bInfo to be resolved.
- */
- BundleInfo[] getPrerequisteBundles(BundleInfo bInfo);
-
- /**
- * Return a bundle to be used as a framework under the state currently composed.
- * @return a bundle to be used as a framework under the state currently composed.
- */
- public BundleInfo getSystemBundle();
-
- /**
- * Return bundles which are fragment bundles of the framework under the state currently composed.
- * @return array of BundleInfos which are fragment bundles of the framework.
- */
- public BundleInfo[] getSystemFragmentedBundles();
-
- /**
- * Return array of Strings which tells the unsatisfied constaints
- * to resolve the specified bInfo under the state currently composed.
- *
- * If this implementation doesn't support resolving state,
- * FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
- * will be thrown.
- *
- * XXX this method is prepared mainly for debugging.
- *
- * @param bInfo
- * @return array of Strings which tells the unsatisfied constaints.
- * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION} will be thrown.
- */
- public String[] getUnsatisfiedConstraints(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
-
- /**
- * Install the specified bInfo as a installed bundle to the current state virtually.
- * Note that resolve this bundle is not done in this implementation.
- *
- * @param bInfo BundleInfo to be installed
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created the parent {@link Manipulator} is unregistered.
- */
- void installBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
-
- /**
- * Return true if this implementation supports full functions,
- * such as resolving bundles and .
- * Otherwise false will be returend.
- * @return true if this implementation supports resolving state. Otherwise false.
- */
- boolean isFullySupported();
-
- /**
- * Return true if the state currently composed is resolved after the last change of the state.
- * Otherwise false.
- *
- * If this implementation doesn't support resolving state,
- * FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
- * will be thrown.
- *
- * @return true if the state currently composed is resolved after the last change of the state. Otherwise false.
- * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION} will be thrown.
- */
- public boolean isResolved() throws FrameworkAdminRuntimeException;
-
- /**
- * Return true if the specified bundle is resolved.
- * Otherwise false.
- *
- * If this implementation doesn't support resolving state,
- * FwLauncherException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
- * will be thrown.
- *
- * @return true if the specified bundle is resolved. Otherwise false.
- * @throws FrameworkAdminRuntimeException if this implementation doesn't support resolving state, FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION} will be thrown.
- */
- public boolean isResolved(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
-
- /**
- * Resolves the constraints contained in this state.
- *
- * If this implementation doesn't support resolving state,
- * FrameworkAdminRuntimeException with a cause of {@link FrameworkAdminRuntimeException#UNSUPPORTED_OPERATION}
- * will be thrown.
- *
- * @param incremental a flag controlling whether resolution should be incremental
- * @throws FrameworkAdminRuntimeException
- */
- void resolve(boolean increment) throws FrameworkAdminRuntimeException;
-
- /**
- * Uninstall the specified bInfo from the current state virtually.
- *
- * @param bInfo BundleInfo to be uninstalled
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created the parent {@link Manipulator} is unregistered.
- */
- void uninstallBundle(BundleInfo bInfo) throws FrameworkAdminRuntimeException;
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
deleted file mode 100644
index 33a80f472..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/ConfigData.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-
-/**
- * This object is instantiated by {@link Manipulator#getConfigData()};
- * The class that keeps some parameters of the {@link Manipulator}
- * created this object. The manipulating of the parameters will affect
- * the {@link Manipulator}.
- *
- * @see Manipulator
- */
-public class ConfigData {
- final private String fwName;
- final private String fwVersion;
- final private String launcherName;
- final private String launcherVersion;
- private int beginningFwStartLevel = BundleInfo.NO_LEVEL;
- private int initialBundleStartLevel = BundleInfo.NO_LEVEL;
- // List of BundleInfo
- private LinkedHashSet bundlesList = new LinkedHashSet();
-
- private Properties properties = new Properties();
-
- public ConfigData(String fwName, String fwVersion, String launcherName, String launcherVersion) {
- this.fwName = fwName;
- this.fwVersion = fwVersion;
- this.launcherName = launcherName;
- this.launcherVersion = launcherVersion;
- this.initialize();
- }
-
- public void addBundle(BundleInfo bundleInfo) {
- bundlesList.add(bundleInfo);
- }
-
- public int getBeginingFwStartLevel() {
- return beginningFwStartLevel;
- }
-
- public BundleInfo[] getBundles() {
- if (bundlesList.size() == 0)
- return new BundleInfo[0];
- BundleInfo[] ret = new BundleInfo[bundlesList.size()];
- bundlesList.toArray(ret);
- return ret;
- }
-
- public String getProperty(String key) {
- return properties.getProperty(key);
- }
-
- public Properties getProperties() {
- Properties ret = new Properties();
- ret.putAll(properties);
- return ret;
- }
-
- public String getFwName() {
- return fwName;
- }
-
- public String getFwVersion() {
- return fwVersion;
- }
-
- public int getInitialBundleStartLevel() {
- return initialBundleStartLevel;
- }
-
- public String getLauncherName() {
- return launcherName;
- }
-
- public String getLauncherVersion() {
- return launcherVersion;
- }
-
- public void initialize() {
- beginningFwStartLevel = BundleInfo.NO_LEVEL;
- initialBundleStartLevel = BundleInfo.NO_LEVEL;
- bundlesList.clear();
- properties.clear();
- properties.clear();
- }
-
- public boolean removeBundle(BundleInfo bundleInfo) {
- if (bundleInfo == null)
- throw new IllegalArgumentException("Bundle info can't be null:" + bundleInfo); //$NON-NLS-1$
- return bundlesList.remove(bundleInfo);
- }
-
- public void setBeginningFwStartLevel(int startLevel) {
- beginningFwStartLevel = startLevel;
- }
-
- public void setBundles(BundleInfo[] bundleInfos) {
- bundlesList.clear();
- if (bundleInfos != null)
- for (int i = 0; i < bundleInfos.length; i++)
- bundlesList.add(bundleInfos[i]);
- }
-
- public void setProperty(String key, String value) {
- if (value == null)
- properties.remove(key);
- else
- properties.setProperty(key, value);
- }
-
- public void appendProperties(Properties props) {
- properties.putAll(props);
- }
-
- public void setProperties(Properties props) {
- properties.clear();
- properties.putAll(props);
- }
-
- public void setInitialBundleStartLevel(int startLevel) {
- initialBundleStartLevel = startLevel;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("Class:" + getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("============Independent===============\n"); //$NON-NLS-1$
- sb.append("fwName=" + fwName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwVersion=" + fwVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherName=" + launcherName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherVersion=" + launcherVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("beginningFwStartLevel=" + beginningFwStartLevel + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("initialBundleStartLevel=" + initialBundleStartLevel + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- if (this.bundlesList.size() == 0)
- sb.append("bundlesList=null\n"); //$NON-NLS-1$
- else {
- sb.append("bundlesList=\n"); //$NON-NLS-1$
- int i = 0;
- for (Iterator iter = bundlesList.iterator(); iter.hasNext();) {
- sb.append("\tbundlesList[" + i + "]=" + iter.next().toString() + "\n"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- i++;
- }
- }
-
- sb.append("============ Properties ===============\n"); //$NON-NLS-1$
- sb.append("fwIndependentProps="); //$NON-NLS-1$
- setPropsStrings(sb, properties);
- return sb.toString();
- }
-
- private static void setPropsStrings(StringBuffer sb, Properties props) {
- if (props.size() > 0) {
- sb.append("\n"); //$NON-NLS-1$
- for (Enumeration enumeration = props.keys(); enumeration.hasMoreElements();) {
- String key = (String) enumeration.nextElement();
- String value = props.getProperty(key);
- if (value == null || value.equals("")) //$NON-NLS-1$
- continue;
- sb.append("\t{" + key + " ,\t" + value + "}\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- } else
- sb.append("empty\n"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java
deleted file mode 100644
index fdadaf308..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdmin.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * The implementation of this API will be registered to the service
- * registry as an OSGi service.
- *
- * *****************************************************************
- * 1. For developers who implement bundles that register this service.
- *
- * Upon registration, the following service properties must be set to allow clients to
- * search the FrameworkAdmin object, which will create BundlesState / ConfigData / LauncherData objects.
- *
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_FW_NAME}: String; name of the framework
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_FW_VERSION}: String; version of the framework
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_LAUNCHER_NAME}: String; name of the launcher
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_LAUNCHER_VERSION}: String; version of the launcher
- *
- * Bundles that register this service will check if the currently running system can be manipulated by
- * this FrameworkAdmin. If yes and this implementation can create an initialized Manipulator object
- * according to the running framework and launcher, add the service property keyed by
- *
- * {@link FrameworkAdmin#SERVICE_PROP_KEY_RUNNING_SYSTEM_FLAG}: String; if "true",
- * the service that will be returned by getRunningManipulator() is fully initialized to
- * represent the state of the running system.
- *
- * It is recommended to implement Manipulator objects created by calling methods of this interface
- * so that they cannot be used after this service is unregistered.
- *
- * *****************************************************************
- * 2. For developers who implement client bundles that use this service.
- *
- * A client of this service can obtain a Manipulator object by calling the {@link #getManipulator()} method.
- *
- * A client can search among services registered in a service registry to find the
- * desired FrameworkAdmin implementation that matches the desired framework
- * type, framework version, launcher type, and launcher version.
- *
- * In order for a client bundle to manipulate the {@link Manipulator} object
- * of the running framework and launcher, the service filter (FrameworkAdmin#SERVICE_PROP_KEY_RUNNING_FW_FLAG=true)
- * should be used.
- *
- * As with all OSGi services, the client bundle should track this service state.
- * If the service is unregistered, it should stop using any of the objects obtained from this service and
- * release them. If it continues to use them, {@link FrameworkAdminRuntimeException} might
- * be thrown.
- *
- * *****************************************************************
- * In addition, FrameworkAdminFactory will create this object. This is used by Java programs.
- *
- * @see FrameworkAdminFactory
- *
- */
-public interface FrameworkAdmin {
-
- String SERVICE_PROP_KEY_FW_NAME = "org.eclipse.equinox.frameworkhandler.framework.name"; //$NON-NLS-1$
- String SERVICE_PROP_KEY_FW_VERSION = "org.eclipse.equinox.frameworkhandler.framework.version"; //$NON-NLS-1$
-
- String SERVICE_PROP_KEY_LAUNCHER_NAME = "org.eclipse.equinox.frameworkhandler.launcher.name"; //$NON-NLS-1$
- String SERVICE_PROP_KEY_LAUNCHER_VERSION = "org.eclipse.equinox.frameworkhandler.launcher.version"; //$NON-NLS-1$
- String SERVICE_PROP_KEY_RUNNING_SYSTEM_FLAG = "org.eclipse.equinox.frameworkhandler.runningfwflag"; //$NON-NLS-1$
-
- /**
- * Create new instance of {@link Manipulator} and return it.
- *
- * @return new instance of Manipulator.
- */
- public Manipulator getManipulator();
-
- /**
- * Create new instance of {@link Manipulator} for running system
- * and return it. The instance must be initialized fully according to the
- * running environment. If this implementation cannot provide it, return null.
- *
- * @return new instance of Manipulator.
- */
- public Manipulator getRunningManipulator();
-
- /**
- * Launch a framework instance under the specified current working directory.
- *
- * @param manipulator {@link Manipulator} object to be launched.
- * @param cwd current working directory to be used for launching.
- * @return process
- * @throws IllegalArgumentException if specified arguments are null.
- * @throws IOException if any error relate with IO occurs
- * @throws FrameworkAdminRuntimeException if the FrameworkAdmin service object
- * that created the specified Manipulator object is unregistered.
- */
- public Process launch(Manipulator manipulator, File cwd) throws IllegalArgumentException, IOException, FrameworkAdminRuntimeException;
-
- /**
- *
- * @return true if this object is active. false otherwise.
- */
- public boolean isActive();
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminFactory.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminFactory.java
deleted file mode 100644
index 07fcec83c..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-/**
- * Factory class for creating FrameworkAdmin object from Java programs.
- *
- * @see FrameworkAdmin
- */
-public abstract class FrameworkAdminFactory {
- abstract protected FrameworkAdmin createFrameworkAdmin() throws InstantiationException, IllegalAccessException, ClassNotFoundException;
-
- // proposed method: only for ConfiguratorManipulatorFactory, magic system property is used.
- public static FrameworkAdmin getInstance(String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- FrameworkAdminFactory factory = (FrameworkAdminFactory) Class.forName(className).newInstance();
- return factory.createFrameworkAdmin();
- }
-
- // // method 3: two magic system properties are used.
- // public static FrameworkAdmin getInstance() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- // String className = System.getProperty("org.eclipse.equinox.internal.provisional.frameworkadmin.frameworkAdminFactory");
- // if (className == null)
- // throw new ClassNotFoundException("System property keyed by \"org.eclipse.equinox.internal.provisional.frameworkadmin.frameworkAdminFactory\" is not set.");
- // FrameworkAdminFactory factory = (FrameworkAdminFactory) Class.forName(className).newInstance();
- // return (FrameworkAdmin) factory.createFrameworkAdmin();
- // }
-
- // // method 1: no magic system properties are used.
- //
- // public static FrameworkAdmin getInstance(String className, String configuratorManipulatorFactoryName) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
- // ExtendedFrameworkAdminFactory factory = (ExtendedFrameworkAdminFactory) Class.forName(className).newInstance();
- // return (FrameworkAdmin) factory.createFrameworkAdmin(configuratorManipulatorFactoryName);
- // }
-
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java
deleted file mode 100644
index 0e9960529..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/FrameworkAdminRuntimeException.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-public class FrameworkAdminRuntimeException extends RuntimeException {
-
- private static final long serialVersionUID = -2292498677000772317L;
- public static final String FRAMEWORKADMIN_UNAVAILABLE = "FrameworkAdmin service created this object is not available any more";
- public static final String UNSUPPORTED_OPERATION = "This implementation doesn't support this method.";
-
- private final String reason;
- private Throwable cause;
-
- /**
- * @param message
- */
- public FrameworkAdminRuntimeException(String message, String reason) {
- super(message);
- this.reason = reason;
- this.cause = null;
- }
-
- /**
- * @param message
- * @param cause
- */
- public FrameworkAdminRuntimeException(String message, Throwable cause, String reason) {
- super(message);
- this.reason = reason;
- this.cause = cause;
- }
-
- /**
- * @param cause
- */
- public FrameworkAdminRuntimeException(Throwable cause, String reason) {
- super(cause.getLocalizedMessage());
- this.reason = reason;
- this.cause = cause;
- }
-
- public String getReason() {
- return reason;
- }
-
- public Throwable getCause() {
- return cause;
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
deleted file mode 100644
index 09d03cb87..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/LauncherData.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import java.io.File;
-import java.util.*;
-
-/**
- * This object is instantiated by {@link Manipulator#getLauncherData()};
- * The class that keeps some parameters of the {@link Manipulator}
- * created this object. The manipulating of the parameters will affect
- * the {@link Manipulator}.
- *
- *
- * @see Manipulator
- */
-public class LauncherData {
- private File fwPersistentDataLocation = null;
- private File jvm = null;
- private List jvmArgs = new LinkedList();
- private List programArgs = new LinkedList();
-
- private boolean clean;
- private File fwConfigLocation;
- private File home = null;
- private File fwJar = null;
-
- private File launcher = null;
- private File launcherConfigLocation = null;
-
- private String fwName;
- private String fwVersion;
- private String launcherName;
- private String launcherVersion;
- private String os;
-
- public LauncherData(String fwName, String fwVersion, String launcherName, String launcherVersion) {
- this.fwName = fwName;
- this.fwVersion = fwVersion;
- this.launcherName = launcherName;
- this.launcherVersion = launcherVersion;
- this.initialize();
- }
-
- public void addJvmArg(String arg) {
- if (arg == null)
- return;
- jvmArgs.add(arg);
- }
-
- public void addProgramArg(String arg) {
- if (arg == null)
- return;
- programArgs.add(arg);
- }
-
- public File getFwConfigLocation() {
- return fwConfigLocation;
- }
-
- public File getFwJar() {
- return fwJar;
- }
-
- public String getFwName() {
- return fwName;
- }
-
- public File getFwPersistentDataLocation() {
- return fwPersistentDataLocation;
- }
-
- public String getFwVersion() {
- return fwVersion;
- }
-
- public File getHome() {
- return home;
- }
-
- public File getJvm() {
- return jvm;
- }
-
- public String[] getJvmArgs() {
- String[] args = new String[jvmArgs.size()];
- jvmArgs.toArray(args);
- return args;
- }
-
- public File getLauncher() {
- return launcher;
- }
-
- public File getLauncherConfigLocation() {
- return launcherConfigLocation;
- }
-
- public String getLauncherName() {
- return launcherName;
- }
-
- public String getLauncherVersion() {
- return launcherVersion;
- }
-
- public String[] getProgramArgs() {
- String[] args = new String[programArgs.size()];
- programArgs.toArray(args);
- return args;
- }
-
- public void initialize() {
- fwPersistentDataLocation = null;
- jvm = null;
- jvmArgs.clear();
- programArgs.clear();
- clean = false;
- fwConfigLocation = null;
- fwJar = null;
- launcher = null;
- }
-
- public boolean isClean() {
- return clean;
- }
-
- public void removeJvmArg(String arg) {
- jvmArgs.remove(arg);
- }
-
- public void removeProgramArg(String arg) {
- // We want to handle program args as key/value pairs subsequently
- // a key MUST start with a "-", all other args are ignored. For
- // backwards compatibility we remove all program args until the
- // next program arg key
- // (see bug 253862)
- if (!arg.startsWith("-")) //$NON-NLS-1$
- return;
-
- int index = programArgs.indexOf(arg);
- if (index == -1)
- return;
-
- programArgs.remove(index);
- while (index < programArgs.size()) {
- String next = (String) programArgs.get(index);
- if (next.charAt(0) == '-')
- return;
- programArgs.remove(index);
- }
- }
-
- public void setFwConfigLocation(File fwConfigLocation) {
- this.fwConfigLocation = fwConfigLocation;
- }
-
- public void setFwJar(File fwJar) {
- this.fwJar = fwJar;
- }
-
- public void setFwPersistentDataLocation(File fwPersistentDataLocation, boolean clean) {
- this.fwPersistentDataLocation = fwPersistentDataLocation;
- this.clean = clean;
- }
-
- public void setHome(File home) {
- this.home = home;
- }
-
- public void setJvm(File file) {
- this.jvm = file;
- if (file == null)
- removeProgramArg("-vm"); //$NON-NLS-1$
- }
-
- public void setJvmArgs(String[] args) {
- if (args == null || args.length == 0) {
- jvmArgs.clear();
- return;
- }
- for (int i = 0; i < args.length; i++)
- this.addJvmArg(args[i]);
- }
-
- public void setLauncher(File launcherFile) {
- launcher = launcherFile;
- }
-
- public void setLauncherConfigLocation(File launcherConfigLocation) {
- this.launcherConfigLocation = launcherConfigLocation;
- }
-
- public void setOS(String os) {
- this.os = os;
- }
-
- public String getOS() {
- return os;
- }
-
- public void setProgramArgs(String[] args) {
- if (args == null || args.length == 0) {
- programArgs.clear();
- return;
- }
- for (int i = 0; i < args.length; i++)
- this.addProgramArg(args[i]);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("Class:" + this.getClass().getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwName=" + this.fwName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwVersion=" + this.fwVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherName=" + this.launcherName + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherVersion=" + this.launcherVersion + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- sb.append("jvm=" + this.jvm + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- if (this.jvmArgs.size() == 0)
- sb.append("jvmArgs = null\n"); //$NON-NLS-1$
- else {
- sb.append("jvmArgs=\n"); //$NON-NLS-1$
- int i = 0;
- for (Iterator iterator = jvmArgs.iterator(); iterator.hasNext(); iterator.next())
- sb.append("\tjvmArgs[" + i++ + "]=" + iterator + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- }
- if (this.programArgs.size() == 0)
- sb.append("programArgs = null\n"); //$NON-NLS-1$
- else {
- sb.append("programArgs=\n"); //$NON-NLS-1$
- int i = 0;
- for (Iterator iterator = programArgs.iterator(); iterator.hasNext(); iterator.next())
- sb.append("\tprogramArgs[" + i++ + "]=" + iterator + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- sb.append("fwConfigLocation=" + this.fwConfigLocation + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwJar=" + this.fwJar + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("fwPersistentDataLocation=" + this.fwPersistentDataLocation + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("home=" + this.home + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcher=" + this.launcher + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("launcherConfigLocation=" + this.launcherConfigLocation + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- sb.append("clean=" + this.isClean() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return sb.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java b/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java
deleted file mode 100644
index 463b35296..000000000
--- a/bundles/org.eclipse.equinox.frameworkadmin/src/org/eclipse/equinox/internal/provisional/frameworkadmin/Manipulator.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.frameworkadmin;
-
-import java.io.File;
-import java.io.IOException;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-
-/**
- * A manipulator is used to query and modify the state of a framework instance.
- * A manipulator instance is obtained by calling {@link FrameworkAdmin#getManipulator()}.
- *
- * The typical use-cases of this interface:
- *
- * Usecase 1: set parameters, check the expected state, save them into configuration files, and launch.
- * A. create a {@link Manipulator} object from a {@link FrameworkAdmin}.
- * B. set parameters to the {@link Manipulator} object.
- * C. getExpectedState() and check what bundle state will be realized.
- * If it is not same as you desire, repeat B and C until it becomes as you desire.
- * D. save parameters into configuration files by {@link Manipulator#save(boolean)}.
- * E. launch the framework by {@link FrameworkAdmin#launch(Manipulator, File)}.
- *
- * Usecase 2: set parameters required for loading, load parameters from configuration files,
- * check the expected state, and launch.
- * A. create a {@link Manipulator} object from a {@link FrameworkAdmin}.
- * B. set parameters about launcher or framework configuration file to the {@link Manipulator} object.
- * C. load parameters from configuration files by {@link Manipulator#load()};
- * D. getExpectedState() and check what bundle state will be realized.
- * E. launch the framework by {@link FrameworkAdmin#launch(Manipulator, File)}.
- * @see FrameworkAdmin
- * @see ConfigData
- * @see LauncherData
- */
-public interface Manipulator {
-
- /**
- * Return the newly created BundldsState object,
- * according to the parameters set to this object "in memory".
- *
- * None of launcher config file, framework config file and configurator config file
- * will be read by this method. However, the framework persistent data location should be
- * taken into consideration. In other words, this method will return
- * the expected {@link BundlesState} object assuming that the current parameters were saved and
- * {@link FrameworkAdmin#launch(Manipulator, File)} with an argument of this object
- * were called. (It would read the framework persistent data location if required).
- *
- * This method should not modify the parameters in this {@link Manipulator} object.
- *
- * @return framework bundle state object created according to he current parameters set.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- */
- BundlesState getBundlesState() throws FrameworkAdminRuntimeException;
-
- /**
- * The reference of {@link ConfigData} object representing configuration information related with framework settings will be returned.
- * Remind that manipulating returned object will affect this Manipulator behavior.
- *
- * @return ConfigData object representing configuration information related with framework setting
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- * @see ConfigData
- */
- ConfigData getConfigData() throws FrameworkAdminRuntimeException;
-
- /**
- * Return the expected BundleInfo array representing state of bundles,
- * according to the parameters set to this object "in memory".
- *
- * None of launcher config file, framework config file and configurator config file
- * will be read by this method. However, the framework persistent data location should be
- * taken into consideration. In other words, this method will return
- * the expected bundles state assuming that the current parameters were saved and
- * {@link FrameworkAdmin#launch(Manipulator, File)} with an argument of this object
- * were called. (It would read the framework persistent data location if required).
- *
- * Returned BundleInfos must have resolved flag set.
- * This method should not modify the parameters in this {@link Manipulator} object.
- *
- * cf. getConfigData().getBundles() will return array of BundleInfo too.
- * However the resolved flag of returned BundleInfos might not be reliable.
- *
- * This method is equivalent to calling getBundlesState().getExpectedState().
- *
- * @return array of BundleInfo representing expected state of all bundles installed.
- * @throws IllegalArgumentException - If either of fwJar or cwd doesn't exist.
- * @throws IOException - If reading fw configuration file or reading persistently recorded information
- * of fw fails.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- */
- BundleInfo[] getExpectedState() throws IllegalStateException, IOException, FrameworkAdminRuntimeException;
-
- /**
- * The reference of {@link LauncherData} object representing configuration information
- * related with launcher settings will be returned.
- * Remember that manipulating returned object will affect this Manipulator object behavior.
- *
- * @return LauncherData object representing configuration information related with launcher setting
- * @throws FrameworkAdminRuntimeException - If the ManipulatorAdmin service created this object is unregistered or this implementation doesn't support this method.
- * @see LauncherData
- */
- LauncherData getLauncherData() throws FrameworkAdminRuntimeException;
-
- /**
- * Return timestamp of configurations which will be loaded by load() method
- * according to the parameters set to this manipulator in long value.
- *
- * This method will check last modified time of all launcher configuration file, framework configuration file,
- * and framework persistent storage according to the parameters set.
- * @return long
- */
- long getTimeStamp();
-
- /**
- * Initialize all information that this object keeps at that time.
- */
- void initialize();
-
- /**
- * load configs from appropriate config files,
- * including launcher config file, fw config file, and configurator config files,
- * whose locations are determined by the current setting. In addition,
- * the fw persistent data location should be taken into consideration.
- *
- * The following procedure contains the matters of implementation detail.
- * However, it is an example how it works.
- *
- * 1. if launcher object is set, corresponding launcher config file will be read.
- * According to the information retrieved, setting of this object will be updated.
- * including fw config file.
- *
- * 2. If fw config file is not specified, IllegalStateException will be thrown.
- * Otherwise, the information will be retrieved from the fw config file.
- *
- * 3. If any ConfiguratorBundle is included in the bundle list,
- * read appropriate configurator config file by
- * {@link ConfiguratorManipulator#updateBundles(Manipulator)},
- * which will update the parameter about installed bundles in its
- * {@link Manipulator#getConfigData()} object.
- *
- * Most old parameters will be updated by this method call.
- *
- * @throws IOException - If reading info from configuration files fails.
- * @throws IllegalStateException - If config files cannot be determined.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- */
- void load() throws IllegalStateException, IOException, FrameworkAdminRuntimeException;
-
- /**
- * Save parameters that this object keeps at that time into appropriate configuration files,
- * which include launcher configuration file, framework configuration file, and configurator configuration files
- * (if required and implementation of this object supports), according to the current setting and situation.
- *
- * The following procedure contains the matters of implementation detail.
- * However, it is an example how it works.
- *
- * 1. if a launcher file is set,
- * the parameters to be saved into a LauncherConfigFile will be saved into the default LauncherConfigFile
- * that is determined by the location of the launcher file.
- *
- *
- * 2. if there are any {@link ConfiguratorManipulator} objects available whose corresponding ConfiguratorBundle
- * is set to be started, choose the ConfiguratorBudnle that starts the first among them and go to next step.
- * Otherwise, save the BundleInfo[] set to this object into a FwConfigFile that is determined
- * by the parameters set.
- *
- * 3. call {@link ConfiguratorManipulator#save(Manipulator, boolean)} of
- * the ConfiguratorManipulator that can manipulate the chosen ConfiguratorBudnle.
- * This method will save configurations for ConfiguratorBundle to read appropriately
- * and return BundleInfo[] to be saved in the FwConfigFile, which is determined by the parameters set.
- *
- * 4. Save the returned BundleInfo[] in the FwConfigFile, which is determined by the parameters set.
- *
- * @param backup - if true, keep old file by renaming if exists.
- * @throws IOException - If writing info into configuration files fails.
- * @throws FrameworkAdminRuntimeException - If the {@link FrameworkAdmin} service created this object is unregistered or this implementation doesn't support this method.
- */
- void save(boolean backup) throws IOException, FrameworkAdminRuntimeException;
-
- /**
- * Copy all information the specified {@link ConfigData} contains into this object.
- * All of old settings will be initialized and replaced.
- *
- * @param configData fw config data to be set to this object.
- */
- void setConfigData(ConfigData configData);
-
- /**
- * Copy all information the specified {@link LauncherData} contains into this object.
- * All of old settings will be initialized and replaced.
- *
- * @param launcherData launcher config data to be set to this object.
- */
- void setLauncherData(LauncherData launcherData);
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.classpath b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.artifact.optimizers/.cvsignore b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.project b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.project
deleted file mode 100644
index 28e367d4c..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.artifact.optimizers</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index c9dc95db0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Nov 14 12:49:29 EST 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f8cf8a7e7..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,341 +0,0 @@
-#Wed Dec 30 08:04:56 CET 2009
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 900e4e143..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,60 +0,0 @@
-#Mon Nov 05 16:53:31 EST 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF
deleted file mode 100644
index e14032c74..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.artifact.optimizers;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.optimizers.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.artifact.optimizers;x-friends:="org.eclipse.equinox.p2.artifact.processors",
- org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.artifact.repository
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: ie.wombat.jbdiff,
- org.eclipse.equinox.app;version="1.0.0",
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.sar,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.internal.provisional.equinox.p2.jarprocessor,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html b/bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties b/bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties
deleted file mode 100644
index d72e993c0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/optimizer.launch b/bundles/org.eclipse.equinox.p2.artifact.optimizers/optimizer.launch
deleted file mode 100644
index 65bf9330b..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/optimizer.launch
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/optimizer"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.6.0"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.artifact.optimizers.pack200optimizer&#13;&#10;-artifactRepository file:d:/prov/repo&#13;&#10;-console"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:default,org.eclipse.core.runtime.compatibility.registry@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:true,org.eclipse.equinox.common@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@:,org.eclipse.osgi.services@default:default,org.eclipse.update.configurator@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="ie.wombat.jbdiff@default:default,org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.eclipse.equinox.p2.artifact.optimizers@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.download@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.sar@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.properties b/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.properties
deleted file mode 100644
index fe0fea6e8..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox p2 Artifact Optimizers
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.xml b/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.xml
deleted file mode 100644
index fb0e4f618..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/plugin.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension id="jardeltaoptimizer" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta.Application"/>
- </application>
- </extension>
-
- <extension id="pack200optimizer" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.artifact.optimizers.pack200.Application"/>
- </application>
- </extension>
-
- <extension id="jbdiffoptimizer" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.Application"/>
- </application>
- </extension>
-
- <extension id="Pack200Optimizer" point="org.eclipse.equinox.p2.artifact.repository.processingSteps">
- <step class="org.eclipse.equinox.internal.p2.artifact.optimizers.pack200.Pack200OptimizerStep"/>
- </extension>
-
- <extension id="JarDeltaOptimizer" point="org.eclipse.equinox.p2.artifact.repository.processingSteps">
- <step class="org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta.JarDeltaOptimizerStep"/>
- </extension>
-
- <extension id="JBDiffStep" point="org.eclipse.equinox.p2.artifact.repository.processingSteps">
- <step class="org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.JBDiffStep"/>
- </extension>
-
- <extension id="JBDiffZipStep" point="org.eclipse.equinox.p2.artifact.repository.processingSteps">
- <step class="org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.JBDiffZipStep"/>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml b/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml
deleted file mode 100644
index 0b2199eb5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.artifact.optimizers</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java
deleted file mode 100644
index 871ce263f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/AbstractDeltaStep.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers;
-
-import java.io.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.processing.AbstractBufferingStep;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * The <code>AbstractDeltaDiffStep</code> is an abstract processing step that
- * retrieves a local artifact repository containing the serialized/encoded
- * artifact key. It assumes that the artifact key is stored within the data property
- * of the processing step descriptor and that is encoded with the <code>ArtifactKeySerializer</code>.
- */
-public abstract class AbstractDeltaStep extends AbstractBufferingStep {
-
- protected IArtifactKey key;
- protected IArtifactRepository repository;
-
- public AbstractDeltaStep() {
- this(null);
- }
-
- protected AbstractDeltaStep(IArtifactRepository repository) {
- super();
- this.repository = repository;
- }
-
- public void initialize(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(agent, descriptor, context);
- readArtifactKey(descriptor);
- }
-
- protected void readArtifactKey(IProcessingStepDescriptor descriptor) {
- try {
- key = ArtifactKey.parse(descriptor.getData());
- } catch (IllegalArgumentException e) {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Predecessor artifact key for delta could not be deserialized. Serialized key is " + descriptor.getData(), e));
- }
- }
-
- protected File fetchPredecessor(ArtifactDescriptor descriptor) {
- if (repository instanceof IFileArtifactRepository)
- return ((IFileArtifactRepository) repository).getArtifactFile(descriptor);
- File result = null;
- OutputStream resultStream = null;
- try {
- try {
- result = File.createTempFile(PREDECESSOR_ROOT, JAR_SUFFIX);
- resultStream = new BufferedOutputStream(new FileOutputStream(result));
- setStatus(repository.getArtifact(descriptor, resultStream, getProgressMonitor()));
- return result;
- } finally {
- if (resultStream != null)
- resultStream.close();
- }
- } catch (IOException e) {
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/Activator.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/Activator.java
deleted file mode 100644
index 4d0ea17fd..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/Activator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.artifact.optimizers;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.artifact.optimizers"; //$NON-NLS-1$
- private static BundleContext context = null;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext context) throws Exception {
- Activator.context = context;
- }
-
- public void stop(BundleContext context) throws Exception {
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/OptimizerApplication.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/OptimizerApplication.java
deleted file mode 100644
index 26f3366b8..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/OptimizerApplication.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.equinox.internal.p2.artifact.optimizers;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-
-public abstract class OptimizerApplication implements IApplication {
-
- public static IProvisioningAgent getAgent() {
- return (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager() {
- return (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- public void stop() {
- // Nothing to do
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java
deleted file mode 100644
index d6d7d0213..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/VersionlessArtifactKey.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-
-public class VersionlessArtifactKey extends ArtifactKey {
-
- public VersionlessArtifactKey(String classifier, String id) {
- super(classifier, id, Version.emptyVersion);
- }
-
- public VersionlessArtifactKey(IArtifactKey base) {
- super(base.getClassifier(), base.getId(), Version.emptyVersion);
- }
-
- public int hashCode() {
- int hash = getId().hashCode();
- hash = 17 * hash + getClassifier().hashCode();
- return hash;
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof IArtifactKey))
- return false;
- IArtifactKey ak = (IArtifactKey) obj;
- return ak.getId().equals(getId()) && ak.getClassifier().equals(getClassifier());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java
deleted file mode 100644
index 30d6c0b74..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Application.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.OptimizerApplication;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-
-/**
- * The optimizer <code>Application</code> for JBDiff based optimizations.
- */
-public class Application extends OptimizerApplication {
-
- private URI artifactRepositoryLocation;
- private int width = 1;
- private int depth = 1;
-
- public Object start(IApplicationContext context) throws Exception {
- Map<?, ?> args = context.getArguments();
- initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
- IArtifactRepository repository = setupRepository(artifactRepositoryLocation);
- new Optimizer(repository, width, depth).run();
- return null;
- }
-
- private IArtifactRepository setupRepository(URI location) throws ProvisionException {
- IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- if (manager == null)
- // TODO log here
- return null;
- return manager.loadRepository(location, null);
- }
-
- public void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
- // if (args[i].equals("-pack"))
- // pack = true;
-
- // check for args with parameters. If we are at the last argument or
- // if the next one has a '-' as the first character, then we can't have
- // an arg with a param so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
-
- if (args[i - 1].equalsIgnoreCase("-artifactRepository") || args[i - 1].equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
- artifactRepositoryLocation = new URI(arg);
-
- if (args[i - 1].equalsIgnoreCase("-depth")) //$NON-NLS-1$
- depth = Integer.parseInt(arg);
-
- if (args[i - 1].equalsIgnoreCase("-width")) //$NON-NLS-1$
- width = Integer.parseInt(arg);
-
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/DeltaComputer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/DeltaComputer.java
deleted file mode 100644
index 62955636f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/DeltaComputer.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;
-
-import java.io.*;
-import java.util.*;
-import java.util.zip.*;
-
-public class DeltaComputer {
- private File target;
- private File base;
- private File destination;
- private ZipFile baseJar;
- private ZipFile targetJar;
- private Set<String> baseEntries;
- private ArrayList<ZipEntry> additions;
- private ArrayList<ZipEntry> changes;
- private ZipFile manifestJar = null;
-
- public DeltaComputer(File base, File target, File destination) {
- this.base = base;
- this.target = target;
- this.destination = destination;
- }
-
- public void run() throws IOException {
- try {
- if (!openJars())
- return;
- computeDelta();
- writeDelta();
- } finally {
- closeJars();
- }
- }
-
- private void writeDelta() {
- ZipOutputStream result = null;
- try {
- try {
- result = new ZipOutputStream(new FileOutputStream(destination));
- // if the delta includes the manifest, be sure to write it first
- if (manifestJar != null)
- writeEntry(result, manifestJar.getEntry("META-INF/MANIFEST.MF"), manifestJar, true);
- // write out the removals. These are all the entries left in the baseEntries
- // since they were not seen in the targetJar. Here just write out an empty
- // entry with a name that signals the delta processor to delete.
- for (String baseEntry : baseEntries)
- writeEntry(result, new ZipEntry(baseEntry + ".delete"), null, false);
- // write out the additions.
- for (ZipEntry entry : additions)
- writeEntry(result, entry, targetJar, false);
- // write out the changes.
- for (ZipEntry entry : changes)
- writeEntry(result, entry, targetJar, false);
- } finally {
- if (result != null)
- result.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- return;
- }
- }
-
- private void writeEntry(ZipOutputStream result, ZipEntry entry, ZipFile sourceJar, boolean manifest) throws IOException {
- if (!manifest && entry.getName().equalsIgnoreCase("META-INF/MANIFEST.MF"))
- return;
- // add the entry
- result.putNextEntry(entry);
- try {
- // if there is a sourceJar copy over the content for the entry into the result
- if (sourceJar != null) {
- InputStream contents = sourceJar.getInputStream(entry);
- try {
- transferStreams(contents, result);
- } finally {
- contents.close();
- }
- }
- } finally {
- result.closeEntry();
- }
- }
-
- /**
- * Transfers all available bytes from the given input stream to the given
- * output stream. Does not close either stream.
- *
- * @param source
- * @param destination
- * @throws IOException
- */
- public static void transferStreams(InputStream source, OutputStream destination) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- destination.flush();
- }
- }
-
- private void computeDelta() throws IOException {
- changes = new ArrayList<ZipEntry>();
- additions = new ArrayList<ZipEntry>();
- // start out assuming that all the base entries are being removed
- baseEntries = getEntries(baseJar);
- for (Enumeration<? extends ZipEntry> e = targetJar.entries(); e.hasMoreElements();)
- check(e.nextElement(), targetJar);
- }
-
- private boolean openJars() {
- try {
- baseJar = new ZipFile(base);
- targetJar = new ZipFile(target);
- } catch (IOException e) {
- return false;
- }
- return true;
- }
-
- private void closeJars() {
- if (baseJar != null)
- try {
- baseJar.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- if (targetJar != null)
- try {
- targetJar.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- /**
- * Compare the given entry against the base JAR to see if/how it differs. Update the appropriate set
- * based on the discovered difference.
- * @param entry the entry to test
- * @throws IOException
- */
- private void check(ZipEntry entry, ZipFile file) throws IOException {
- ZipEntry baseEntry = baseJar.getEntry(entry.getName());
-
- // remember the manifest if we see it
- checkForManifest(entry, file);
- // if there is no entry then this is an addition. remember the addition and return;
- if (baseEntry == null) {
- additions.add(entry);
- return;
- }
- // now we know each JAR has an entry for the name, compare and see how/if they differ
- boolean changed = !equals(entry, baseEntry);
- if (changed)
- changes.add(entry);
- baseEntries.remove(baseEntry.getName());
- }
-
- // compare the two entries. We already know that they have the same name.
- private boolean equals(ZipEntry entry, ZipEntry baseEntry) {
- if (entry.getSize() != baseEntry.getSize())
- return false;
- // make sure the entries are of the same type
- if (entry.isDirectory() != baseEntry.isDirectory())
- return false;
- // if the entries are files then compare the times.
- if (!entry.isDirectory())
- if (entry.getTime() != baseEntry.getTime())
- return false;
- return true;
- }
-
- private Set<String> getEntries(ZipFile jar) {
- HashSet<String> result = new HashSet<String>(jar.size());
- for (Enumeration<? extends ZipEntry> e = jar.entries(); e.hasMoreElements();) {
- ZipEntry entry = e.nextElement();
- checkForManifest(entry, jar);
- result.add(entry.getName());
- }
- return result;
- }
-
- /**
- * Check to see if the given entry is the manifest. If so, remember it for use when writing
- * the resultant JAR.
- * @param entry
- * @param jar
- */
- private void checkForManifest(ZipEntry entry, ZipFile jar) {
- if (entry.getName().equalsIgnoreCase("META-INF/MANIFEST.MF"))
- manifestJar = jar;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/JarDeltaOptimizerStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/JarDeltaOptimizerStep.java
deleted file mode 100644
index b238be76b..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/JarDeltaOptimizerStep.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
-*******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;
-
-import java.io.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.AbstractDeltaStep;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * The JAR delta expects an input containing normal ".jar" data.
- */
-public class JarDeltaOptimizerStep extends AbstractDeltaStep {
-
- private File incoming;
-
- protected JarDeltaOptimizerStep(IArtifactRepository repository) {
- super(repository);
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- incoming = File.createTempFile(INCOMING_ROOT, JAR_SUFFIX);
- return new BufferedOutputStream(new FileOutputStream(incoming));
- }
-
- protected void cleanupTempFiles() {
- super.cleanupTempFiles();
- if (incoming != null)
- incoming.delete();
- }
-
- protected void performProcessing() throws IOException {
- File resultFile = null;
- try {
- resultFile = optimize();
- // now write the optimized content to the destination
- if (resultFile.length() > 0) {
- InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile));
- FileUtils.copyStream(resultStream, true, getDestination(), false);
- } else {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Empty optimized file: " + resultFile)); //$NON-NLS-1$
- }
- } finally {
- if (resultFile != null)
- resultFile.delete();
- }
- }
-
- protected File optimize() throws IOException {
- File predecessor = null;
- try {
- File resultFile = File.createTempFile(RESULT_ROOT, JAR_SUFFIX);
- // get the predecessor and perform the optimization into a temp file
- predecessor = fetchPredecessor(new ArtifactDescriptor(key));
- new DeltaComputer(predecessor, incoming, resultFile).run();
- return resultFile;
- } finally {
- // if we have a predecessor and it is our temp file then clean up the file
- if (predecessor != null && predecessor.getAbsolutePath().indexOf(PREDECESSOR_ROOT) > -1)
- predecessor.delete();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java
deleted file mode 100644
index e3b580932..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jardelta/Optimizer.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - adaptation to JAR deltas and on-going development
-*******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-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;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-
-public class Optimizer {
-
- private IArtifactRepository repository;
- private int width;
- private int depth;
-
- private static final String JAR_DELTA_FORMAT = "jarDelta"; //$NON-NLS-1$
- private static final String JAR_DELTA_PATCH_STEP = "org.eclipse.equinox.p2.processing.JarDeltaPatchStep"; //$NON-NLS-1$
-
- private static final Comparator<IArtifactDescriptor> ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR = new ArtifactDescriptorVersionComparator();
- private static final Comparator<IArtifactKey> ARTIFACT_KEY_VERSION_COMPARATOR = new ArtifactKeyVersionComparator();
-
- /**
- * This optimizer performs delta generation based on (currently) jbdiff.
- * The optimization can be controlled with the ´width´ and the ´depth´ parameter.
- * ´width´ defines for how many ´related´ artifact keys a delta should be generated,
- * starting from the most up-to-date.
- * ´depth´ defines to how many predecessor a delta should be generated.
- *
- * With AK(c-v) : AK - artifact key, c - artifact id, v - artifact version
- * the ´repository content´ can be viewed a two dimensional array, where the
- * artifact keys for the same component are in order of their version:
- * <pre><code>
- * w=1 w=2
- * | |
- * | +------.------------+ d=2
- * | | +----.---+ d=1 |
- * | | | | | v
- * [ v | | v v v
- * [ AK(x,2.0) AK(x,1.5) AK(x,1.1) ]
- * [ AK(y,2.0) AK(y,1.9) ]
- * [ AK(z,2.0) AK(z,1.5) AK(z,1.3) AK(z,1.0) ]
- * ]
- * </code></pre>
- * E.g: with a ´width´ of one and a ´depth´ of two the optimizer would
- * create two deltas for component ´x´ from 1.5 to 2.0 and from 1.1 to 2.0.
- *
- * @param repository
- * @param width
- * @param depth
- */
- public Optimizer(IArtifactRepository repository, int width, int depth) {
- this.repository = repository;
- this.width = width;
- this.depth = depth;
- }
-
- public void run() {
- System.out.println("Starting delta (jardelta) optimizations (width=" + width + ", depth=" + depth + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- IQueryResult<IArtifactKey> queryResult = repository.query(ArtifactKeyQuery.ALL_KEYS, null);
- IArtifactKey[][] keys = getSortedRelatedArtifactKeys(queryResult);
- for (int i = 0; i < keys.length; i++) {
- if (keys[i].length < 2)
- // Nothing to diff here!
- continue;
- int minWidth = Math.min(width, keys[i].length);
- for (int j = 0; j < minWidth; j++) {
- IArtifactKey key = keys[i][j];
- boolean isArchive = key.getClassifier().equals("plugin"); //$NON-NLS-1$
- optimize(keys[i], key);
- }
- }
- System.out.println("Done."); //$NON-NLS-1$
-
- }
-
- private void optimize(IArtifactKey[] keys, IArtifactKey key) {
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
- IArtifactDescriptor canonical = null;
- for (int k = 0; k < descriptors.length; k++) {
- IArtifactDescriptor descriptor = descriptors[k];
- boolean optimized = false;
- if (isCanonical(descriptor))
- canonical = descriptor;
- else
- optimized |= isOptimized(descriptor);
- if (!optimized)
- optimize(canonical, keys);
- }
- }
-
- private IArtifactKey getVersionlessKey(IArtifactKey key) {
- return new ArtifactKey(key.getClassifier(), key.getId(), Version.emptyVersion);
- }
-
- /**
- * This method retrieves a list of list of IArtifactKeys. The artifact keys in the
- * list of artifact keys are all ´strongly related´ to each other such that are
- * equal but not considering the versions. This list is sorted such that the
- * newer versions are first in the list.<p>
- * With AK(c-v) : AK - artifact key, c - artifact id, v - artifact version
- * the result is than, e.g.
- * <pre><code>
- * [
- * [ AK(x,2.0) AK(x,1.5) AK(x,1.1) ]
- * [ AK(y,2.0) AK(y,1.9) ]
- * [ AK(z,2.0) AK(z,1.5) AK(z,1.3) AK(z,1.0) ]
- * ]
- * </code></pre>
- * @param artifactKeys
- * @return the sorted artifact keys
- */
- private IArtifactKey[][] getSortedRelatedArtifactKeys(IQueryResult<IArtifactKey> artifactKeys) {
- Map<IArtifactKey, List<IArtifactKey>> map = new HashMap<IArtifactKey, List<IArtifactKey>>();
- for (Iterator<IArtifactKey> iter = artifactKeys.iterator(); iter.hasNext();) {
- IArtifactKey nxt = iter.next();
- IArtifactKey freeKey = getVersionlessKey(nxt);
- List<IArtifactKey> values = map.get(freeKey);
- if (values == null) {
- values = new ArrayList<IArtifactKey>();
- map.put(freeKey, values);
- }
- values.add(nxt);
- }
- IArtifactKey[][] lists = new IArtifactKey[map.size()][];
- int i = 0;
- for (List<IArtifactKey> artifactKeyList : map.values()) {
- IArtifactKey[] relatedArtifactKeys = artifactKeyList.toArray(new IArtifactKey[artifactKeyList.size()]);
- Arrays.sort(relatedArtifactKeys, ARTIFACT_KEY_VERSION_COMPARATOR);
- lists[i++] = relatedArtifactKeys;
- }
- int candidates = 0;
- for (int ii = 0; ii < lists.length; ii++) {
- for (int jj = 0; jj < lists[ii].length; jj++) {
- System.out.println(lists[ii][jj] + ", "); //$NON-NLS-1$
- }
- System.out.println(""); //$NON-NLS-1$
- if (lists[ii].length > 1)
- candidates++;
- }
- System.out.println("Candidates found: " + candidates); //$NON-NLS-1$
- return lists;
- }
-
- private void optimize(IArtifactDescriptor canonical, IArtifactKey[] relatedArtifactKeys) {
- System.out.println("Optimizing " + canonical); //$NON-NLS-1$
-
- IArtifactDescriptor[] descriptors = getSortedCompletePredecessors(canonical.getArtifactKey(), relatedArtifactKeys);
-
- int minDepth = Math.min(depth, descriptors.length);
- for (int i = 0; i < minDepth; i++) {
- System.out.println("\t with jar delta against " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- String predecessorData = descriptors[i].getArtifactKey().toExternalForm();
- ArtifactDescriptor newDescriptor = new ArtifactDescriptor(canonical);
- IProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(JAR_DELTA_PATCH_STEP, predecessorData, true);
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {patchStep};
- newDescriptor.setProcessingSteps(steps);
- newDescriptor.setProperty(IArtifactDescriptor.FORMAT, JAR_DELTA_FORMAT);
- OutputStream repositoryStream = null;
- try {
- repositoryStream = repository.getOutputStream(newDescriptor);
-
- // Add in all the processing steps needed to optimize (e.g., pack200, ...)
- ProcessingStep optimizerStep = new JarDeltaOptimizerStep(repository);
- optimizerStep.initialize(repository.getProvisioningAgent(), patchStep, newDescriptor);
- ProcessingStepHandler handler = new ProcessingStepHandler();
- OutputStream destination = handler.link(new ProcessingStep[] {optimizerStep}, repositoryStream, null);
-
- // Do the actual work by asking the repo to get the artifact and put it in the destination.
- IStatus status = repository.getArtifact(canonical, destination, new NullProgressMonitor());
- if (!status.isOK()) {
- System.out.println("Getting the artifact is not ok."); //$NON-NLS-1$
- System.out.println(status);
- }
- } catch (ProvisionException e) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(e.getMessage());
- e.printStackTrace();
- } finally {
- if (repositoryStream != null)
- try {
- repositoryStream.close();
- IStatus status = ProcessingStepHandler.checkStatus(repositoryStream);
- if (!status.isOK()) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(status.toString());
- }
- } catch (IOException e) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(e.getMessage());
- e.printStackTrace();
- }
- }
- }
- }
-
- private IArtifactDescriptor[] getSortedCompletePredecessors(IArtifactKey artifactKey, IArtifactKey[] relatedArtifactKeys) {
- // get all artifact keys
- List<IArtifactDescriptor> completeDescriptors = new ArrayList<IArtifactDescriptor>(relatedArtifactKeys.length);
- for (int i = 0; i < relatedArtifactKeys.length; i++) {
- // if we find ´our self´ skip
- if (relatedArtifactKeys[i].equals(artifactKey))
- continue;
- // look for a complete artifact descriptor of the current key
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(relatedArtifactKeys[i]);
- for (int j = 0; j < descriptors.length; j++) {
- if (isCanonical(descriptors[j])) {
- completeDescriptors.add(descriptors[j]);
- break;
- }
- }
- }
-
- IArtifactDescriptor[] completeSortedDescriptors = completeDescriptors.toArray(new IArtifactDescriptor[completeDescriptors.size()]);
- // Sort, so to allow a depth lookup!
- Arrays.sort(completeSortedDescriptors, ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR);
- return completeSortedDescriptors;
- }
-
- private boolean isOptimized(IArtifactDescriptor descriptor) {
- if (descriptor.getProcessingSteps().length != 1)
- return false;
- return JAR_DELTA_FORMAT.equals(descriptor.getProperty(IArtifactDescriptor.FORMAT));
- }
-
- private boolean isCanonical(IArtifactDescriptor descriptor) {
- // TODO length != 0 is not necessarily an indicator for not being canonical!
- return descriptor.getProcessingSteps().length == 0;
- }
-
- static final class ArtifactDescriptorVersionComparator implements Comparator<IArtifactDescriptor> {
- public int compare(IArtifactDescriptor artifactDescriptor0, IArtifactDescriptor artifactDescriptor1) {
- return -1 * artifactDescriptor0.getArtifactKey().getVersion().compareTo(artifactDescriptor1.getArtifactKey().getVersion());
- }
- }
-
- static final class ArtifactKeyVersionComparator implements Comparator<IArtifactKey> {
- public int compare(IArtifactKey artifactKey0, IArtifactKey artifactKey1) {
- return -1 * artifactKey0.getVersion().compareTo(artifactKey1.getVersion());
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java
deleted file mode 100644
index 67eafc721..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Application.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.OptimizerApplication;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-
-/**
- * The optimizer <code>Application</code> for JBDiff based optimizations.
- */
-public class Application extends OptimizerApplication {
-
- private URI artifactRepositoryLocation;
- private int width = 1;
- private int depth = 1;
- private boolean nosar;
-
- public Object start(IApplicationContext context) throws Exception {
- Map<?, ?> args = context.getArguments();
- initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
- IArtifactRepository repository = setupRepository(artifactRepositoryLocation);
- new Optimizer(repository, width, depth, nosar).run();
- return null;
- }
-
- private IArtifactRepository setupRepository(URI location) throws ProvisionException {
- IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- if (manager == null)
- // TODO log here
- return null;
- return manager.loadRepository(location, null);
- }
-
- public void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
- // if (args[i].equals("-pack"))
- // pack = true;
-
- if (args[i].equals("-nosar")) //$NON-NLS-1$
- nosar = true;
-
- // check for args with parameters. If we are at the last argument or
- // if the next one has a '-' as the first character, then we can't have
- // an arg with a param so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
-
- if (args[i - 1].equalsIgnoreCase("-artifactRepository") || args[i - 1].equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
- artifactRepositoryLocation = new URI(arg);
-
- if (args[i - 1].equalsIgnoreCase("-depth")) //$NON-NLS-1$
- depth = Integer.parseInt(arg);
-
- if (args[i - 1].equalsIgnoreCase("-width")) //$NON-NLS-1$
- width = Integer.parseInt(arg);
-
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffStep.java
deleted file mode 100644
index d8c726cf0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffStep.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;
-
-import ie.wombat.jbdiff.JBDiff;
-import java.io.*;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.AbstractDeltaStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- *
- */
-public class JBDiffStep extends AbstractDeltaStep {
-
- public JBDiffStep() {
- super();
- }
-
- // TODO We need a different way of injecting the base artifacts. This approach forces
- // the target and base to live in the same repo. Typical but not really required.
- protected JBDiffStep(IArtifactRepository repository) {
- super(repository);
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- return new DirectByteArrayOutputStream();
- }
-
- protected void performProcessing() throws IOException {
- DirectByteArrayOutputStream predecessor = fetchPredecessorBytes(new ArtifactDescriptor(key));
- DirectByteArrayOutputStream current = (DirectByteArrayOutputStream) incomingStream;
- byte[] diff = JBDiff.bsdiff(predecessor.getBuffer(), predecessor.getBufferLength(), current.getBuffer(), current.getBufferLength());
- // free up the memory as soon as possible.
- predecessor = null;
- current = null;
- incomingStream = null;
-
- // copy the result of the optimization to the destination.
- FileUtils.copyStream(new ByteArrayInputStream(diff), true, getDestination(), false);
- }
-
- private DirectByteArrayOutputStream fetchPredecessorBytes(ArtifactDescriptor artifactDescriptor) throws IOException {
- DirectByteArrayOutputStream result = new DirectByteArrayOutputStream();
- setStatus(repository.getArtifact(artifactDescriptor, result, getProgressMonitor()));
- if (!getStatus().isOK())
- throw (IOException) new IOException(getStatus().getMessage()).initCause(getStatus().getException());
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffZipStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffZipStep.java
deleted file mode 100644
index 2b926fdc5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/JBDiffZipStep.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;
-
-import ie.wombat.jbdiff.JBDiff;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-import org.eclipse.equinox.internal.p2.sar.SarUtil;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-public class JBDiffZipStep extends JBDiffStep {
-
- public JBDiffZipStep() {
- super();
- }
-
- // TODO We need a different way of injecting the base artifacts. This approach forces
- // the target and base to live in the same repo. Typical but not really required.
- protected JBDiffZipStep(IArtifactRepository repository) {
- super(repository);
- }
-
- protected void performProcessing() throws IOException {
- DirectByteArrayOutputStream sarredCurrent = new DirectByteArrayOutputStream();
- SarUtil.zipToSar(((DirectByteArrayOutputStream) incomingStream).getInputStream(), sarredCurrent);
- incomingStream = null;
- DirectByteArrayOutputStream predecessor = fetchPredecessorBytes(new ArtifactDescriptor(key));
- byte[] diff = JBDiff.bsdiff(predecessor.getBuffer(), predecessor.getBufferLength(), sarredCurrent.getBuffer(), sarredCurrent.getBufferLength());
- // free up the memory as soon as possible.
- predecessor = null;
- incomingStream = null;
- sarredCurrent = null;
-
- // copy the result of the optimization to the destination.
- FileUtils.copyStream(new ByteArrayInputStream(diff), true, getDestination(), false);
- }
-
- private DirectByteArrayOutputStream fetchPredecessorBytes(ArtifactDescriptor artifactDescriptor) throws IOException {
- DirectByteArrayOutputStream zippedPredecessor = new DirectByteArrayOutputStream();
-
- setStatus(repository.getArtifact(artifactDescriptor, zippedPredecessor, getProgressMonitor()));
- if (!getStatus().isOK())
- throw (IOException) new IOException(getStatus().getMessage()).initCause(getStatus().getException());
-
- DirectByteArrayOutputStream result = new DirectByteArrayOutputStream();
- SarUtil.zipToSar(zippedPredecessor.getInputStream(), result);
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java
deleted file mode 100644
index e54f41f27..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/jbdiff/Optimizer.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.VersionlessArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-
-public class Optimizer {
-
- private IArtifactRepository repository;
- private int width;
- private int depth;
- private boolean nosar;
-
- private static final String JBPATCH_STEP_ID = "org.eclipse.equinox.p2.repository.JBPatchStep"; //$NON-NLS-1$
- private static final String JBPATCH_STEP_ZIP_ID = "org.eclipse.equinox.p2.repository.JBPatchZipStep"; //$NON-NLS-1$
-
- private static final Comparator<IArtifactDescriptor> ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR = new ArtifactDescriptorVersionComparator();
- private static final Comparator<IArtifactKey> ARTIFACT_KEY_VERSION_COMPARATOR = new ArtifactKeyVersionComparator();
-
- /**
- * This optimizer performs delta generation based on (currently) jbdiff.
- * The optimization can be controlled with the ´width´ and the ´depth´ parameter.
- * ´width´ defines for how many ´related´ artifact keys a delta should be generated,
- * starting from the most up-to-date.
- * ´depth´ defines to how many predecessor a delta should be generated.
- *
- * With AK(c-v) : AK - artifact key, c - artifact id, v - artifact version
- * the ´repository content´ can be viewed a two dimensional array, where the
- * artifact keys for the same component are in order of their version:
- * <pre><code>
- * w=1 w=2
- * | |
- * | +------.------------+ d=2
- * | | +----.---+ d=1 |
- * | | | | | v
- * [ v | | v v v
- * [ AK(x,2.0) AK(x,1.5) AK(x,1.1) ]
- * [ AK(y,2.0) AK(y,1.9) ]
- * [ AK(z,2.0) AK(z,1.5) AK(z,1.3) AK(z,1.0) ]
- * ]
- * </code></pre>
- * E.g: with a ´width´ of one and a ´depth´ of two the optimizer would
- * create two deltas for component ´x´ from 1.5 to 2.0 and from 1.1 to 2.0.
- *
- * @param repository
- * @param width
- * @param depth
- * @param nosar
- */
- public Optimizer(IArtifactRepository repository, int width, int depth, boolean nosar) {
- this.repository = repository;
- this.width = width;
- this.depth = depth;
- this.nosar = nosar;
- }
-
- public void run() {
- System.out.println("Starting delta (jbdiff) optimizations (width=" + width + ", depth=" + depth + ", nosar=" + nosar + ")");
- IQueryResult<IArtifactKey> queryResult = repository.query(ArtifactKeyQuery.ALL_KEYS, null);
- IArtifactKey[][] keys = getSortedRelatedArtifactKeys(queryResult);
- for (int i = 0; i < keys.length; i++) {
- if (keys[i].length < 2)
- // Nothing to diff here!
- continue;
- int minWidth = Math.min(width, keys[i].length);
- for (int j = 0; j < minWidth; j++) {
- IArtifactKey key = keys[i][j];
- boolean isArchive = key.getClassifier().equals("plugin"); //$NON-NLS-1$
- String proposedStrategy = isArchive && !nosar ? JBPATCH_STEP_ZIP_ID : JBPATCH_STEP_ID;
- optimize(keys[i], key, proposedStrategy);
- }
- }
- System.out.println("Done.");
-
- }
-
- private void optimize(IArtifactKey[] keys, IArtifactKey key, String proposedStrategy) throws OutOfMemoryError {
- boolean retry;
- do {
- retry = false;
- try {
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
- IArtifactDescriptor complete = null;
- for (int k = 0; k < descriptors.length; k++) {
- IArtifactDescriptor descriptor = descriptors[k];
- if (isCanonical(descriptor))
- complete = descriptor;
- else if (isOptimized(descriptor, proposedStrategy)) {
- proposedStrategy = null;
- break;
- }
- }
- if (proposedStrategy != null && complete != null)
- optimize(complete, proposedStrategy, keys);
- } catch (OutOfMemoryError e) {
- if (JBPATCH_STEP_ID.equals(proposedStrategy))
- throw e;
- proposedStrategy = JBPATCH_STEP_ID;
- System.out.println("Retry with " + proposedStrategy);
- retry = true;
- }
- } while (retry);
- }
-
- /**
- * This method retrieves a list of list of IArtifactKeys. The artifact keys in the
- * list of artifact keys are all ´strongly related´ to each other such that are
- * equal but not considering the versions. This list is sorted such that the
- * newer versions are first in the list.<p>
- * With AK(c-v) : AK - artifact key, c - artifact id, v - artifact version
- * the result is than, e.g.
- * <pre><code>
- * [
- * [ AK(x,2.0) AK(x,1.5) AK(x,1.1) ]
- * [ AK(y,2.0) AK(y,1.9) ]
- * [ AK(z,2.0) AK(z,1.5) AK(z,1.3) AK(z,1.0) ]
- * ]
- * </code></pre>
- * @param artifactKeys
- * @return the sorted artifact keys
- */
- private IArtifactKey[][] getSortedRelatedArtifactKeys(IQueryResult<IArtifactKey> artifactKeys) {
- Map<IArtifactKey, List<IArtifactKey>> map = new HashMap<IArtifactKey, List<IArtifactKey>>();
- for (Iterator<IArtifactKey> iter = artifactKeys.iterator(); iter.hasNext();) {
- IArtifactKey nxt = iter.next();
- IArtifactKey freeKey = new VersionlessArtifactKey(nxt);
- List<IArtifactKey> values = map.get(freeKey);
- if (values == null) {
- values = new ArrayList<IArtifactKey>();
- map.put(freeKey, values);
- }
- values.add(nxt);
- }
- IArtifactKey[][] lists = new IArtifactKey[map.size()][];
- int i = 0;
- for (List<IArtifactKey> artifactKeyList : map.values()) {
- IArtifactKey[] relatedArtifactKeys = artifactKeyList.toArray(new IArtifactKey[artifactKeyList.size()]);
- Arrays.sort(relatedArtifactKeys, ARTIFACT_KEY_VERSION_COMPARATOR);
- lists[i++] = relatedArtifactKeys;
- }
- int candidates = 0;
- for (int ii = 0; ii < lists.length; ii++) {
- for (int jj = 0; jj < lists[ii].length; jj++) {
- System.out.println(lists[ii][jj] + ", ");
- }
- System.out.println("");
- if (lists[ii].length > 1)
- candidates++;
- }
- System.out.println("Candidates found: " + candidates);
- return lists;
- }
-
- private void optimize(IArtifactDescriptor complete, String strategy, IArtifactKey[] relatedArtifactKeys) {
- System.out.println("Optimizing " + complete);
-
- IArtifactDescriptor[] descriptors = getSortedCompletePredecessors(complete.getArtifactKey(), relatedArtifactKeys);
-
- int minDepth = Math.min(depth, descriptors.length);
- for (int i = 0; i < minDepth; i++) {
-
- System.out.println("\t with " + strategy + " against " + descriptors[i].getArtifactKey());
- String predecessorData = descriptors[i].getArtifactKey().toExternalForm();
- ArtifactDescriptor newDescriptor = new ArtifactDescriptor(complete);
- IProcessingStepDescriptor patchStep = new ProcessingStepDescriptor(strategy, predecessorData, true);
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {patchStep};
- newDescriptor.setProcessingSteps(steps);
- newDescriptor.setProperty(IArtifactDescriptor.FORMAT, strategy);
- OutputStream repositoryStream = null;
- try {
- repositoryStream = repository.getOutputStream(newDescriptor);
-
- // Add in all the processing steps needed to optimize (e.g., pack200, ...)
- ProcessingStep diffStep = getProcessingStep(strategy);
- diffStep.initialize(repository.getProvisioningAgent(), patchStep, newDescriptor);
- ProcessingStepHandler handler = new ProcessingStepHandler();
- OutputStream destination = handler.link(new ProcessingStep[] {diffStep}, repositoryStream, null);
-
- // Do the actual work by asking the repo to get the artifact and put it in the destination.
- IStatus status = repository.getArtifact(complete, destination, new NullProgressMonitor());
- if (!status.isOK()) {
- System.out.println("Getting the artifact is not ok."); //$NON-NLS-1$
- System.out.println(status);
- }
- } catch (ProvisionException e) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(e.getMessage());
- e.printStackTrace();
- } finally {
- if (repositoryStream != null)
- try {
- repositoryStream.close();
- IStatus status = ProcessingStepHandler.checkStatus(repositoryStream);
- if (!status.isOK()) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(status.toString());
- }
- } catch (IOException e) {
- System.out.println("Skipping optimization of: " + descriptors[i].getArtifactKey()); //$NON-NLS-1$
- System.out.println(e.getMessage());
- e.printStackTrace();
- }
- }
- }
- }
-
- private ProcessingStep getProcessingStep(String strategy) {
- if (strategy.equals(JBPATCH_STEP_ID))
- return new JBDiffStep(repository);
- return new JBDiffZipStep(repository);
- }
-
- private IArtifactDescriptor[] getSortedCompletePredecessors(IArtifactKey artifactKey, IArtifactKey[] relatedArtifactKeys) {
- // get all artifact keys
- List<IArtifactDescriptor> completeDescriptors = new ArrayList<IArtifactDescriptor>(relatedArtifactKeys.length);
- for (int i = 0; i < relatedArtifactKeys.length; i++) {
- // if we find ´our self´ skip
- if (relatedArtifactKeys[i].equals(artifactKey))
- continue;
- // look for a complete artifact descriptor of the current key
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(relatedArtifactKeys[i]);
- for (int j = 0; j < descriptors.length; j++) {
- if (isCanonical(descriptors[j])) {
- completeDescriptors.add(descriptors[j]);
- break;
- }
- }
- }
-
- IArtifactDescriptor[] completeSortedDescriptors = completeDescriptors.toArray(new IArtifactDescriptor[completeDescriptors.size()]);
- // Sort, so to allow a depth lookup!
- Arrays.sort(completeSortedDescriptors, ARTIFACT_DESCRIPTOR_VERSION_COMPARATOR);
- return completeSortedDescriptors;
- }
-
- private boolean isOptimized(IArtifactDescriptor descriptor, String stepId) {
- if (descriptor.getProcessingSteps().length != 1)
- return false;
- return stepId.equals(descriptor.getProcessingSteps()[0].getProcessorId());
- }
-
- private boolean isCanonical(IArtifactDescriptor descriptor) {
- // TODO length != 0 is not necessarily an indicator for not being complete!
- return descriptor.getProcessingSteps().length == 0;
- }
-
- static final class ArtifactDescriptorVersionComparator implements Comparator<IArtifactDescriptor> {
- public int compare(IArtifactDescriptor artifactDescriptor0, IArtifactDescriptor artifactDescriptor1) {
- return -1 * artifactDescriptor0.getArtifactKey().getVersion().compareTo(artifactDescriptor1.getArtifactKey().getVersion());
- }
- }
-
- static final class ArtifactKeyVersionComparator implements Comparator<IArtifactKey> {
- public int compare(IArtifactKey artifactKey0, IArtifactKey artifactKey1) {
- return -1 * artifactKey0.getVersion().compareTo(artifactKey1.getVersion());
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java
deleted file mode 100644
index 2e0efec37..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Application.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.OptimizerApplication;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-
-public class Application extends OptimizerApplication {
- //Application return code
- private static final Integer NON_WRITTABLE_REPOSITORY = new Integer(-1);
-
- //Application arguments
- private static final String ARTIFACT_REPOSITORY_ARG = "-artifactRepository"; //$NON-NLS-1$
- private static final String ARTIFACT_REPOSITORY_SHORT_ARG = "-ar"; //$NON-NLS-1$
-
- private URI artifactRepositoryLocation;
-
- public Object start(IApplicationContext context) throws Exception {
- Map<?, ?> args = context.getArguments();
- initializeFromArguments((String[]) args.get("application.args")); //$NON-NLS-1$
- IArtifactRepository repository = setupRepository(artifactRepositoryLocation);
- if (!repository.isModifiable())
- return NON_WRITTABLE_REPOSITORY;
- new Optimizer(repository).run();
- return null;
- }
-
- private IArtifactRepository setupRepository(URI location) throws ProvisionException {
- IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- if (manager == null)
- // TODO log here
- return null;
- return manager.loadRepository(location, null);
- }
-
- public void initializeFromArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args with parameters. If we are at the last argument or
- // if the next one has a '-' as the first character, then we can't have
- // an arg with a param so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
-
- if (args[i - 1].equalsIgnoreCase(ARTIFACT_REPOSITORY_ARG) || args[i - 1].equalsIgnoreCase(ARTIFACT_REPOSITORY_SHORT_ARG))
- artifactRepositoryLocation = new URI(arg);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Messages.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Messages.java
deleted file mode 100644
index 85dc7fa0f..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Messages.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.artifact.optimizers.pack200.messages"; //$NON-NLS-1$
- public static String failed_getting_artifact;
- public static String skip_optimization;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java
deleted file mode 100644
index 9f91321b5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Optimizer.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Iterator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStepHandler;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.osgi.util.NLS;
-
-public class Optimizer {
- private IArtifactRepository repository;
-
- public Optimizer(IArtifactRepository repository) {
- this.repository = repository;
- }
-
- public void run() {
- IQueryResult<IArtifactKey> keys = repository.query(ArtifactKeyQuery.ALL_KEYS, null);
- for (Iterator<IArtifactKey> iterator = keys.iterator(); iterator.hasNext();) {
- IArtifactKey key = iterator.next();
- if (!key.getClassifier().equals("plugin")) //$NON-NLS-1$
- continue;
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
- IArtifactDescriptor canonical = null;
- boolean optimized = false;
- for (int j = 0; j < descriptors.length; j++) {
- IArtifactDescriptor descriptor = descriptors[j];
- if (isCanonical(descriptor))
- canonical = descriptor;
- optimized |= isOptimized(descriptor);
- }
- if (!optimized)
- optimize(canonical);
- }
- }
-
- private boolean isCanonical(IArtifactDescriptor descriptor) {
- // TODO length != 0 is not necessarily an indicator for not being complete!
- String format = descriptor.getProperty(IArtifactDescriptor.FORMAT);
- if (format == null)
- return true;
- return false;
- }
-
- private void optimize(IArtifactDescriptor descriptor) {
- ArtifactDescriptor newDescriptor = new ArtifactDescriptor(descriptor);
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- newDescriptor.setProcessingSteps(steps);
- newDescriptor.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
- OutputStream repositoryStream = null;
- try {
- repositoryStream = repository.getOutputStream(newDescriptor);
-
- // Add in all the processing steps needed to optimize (e.g., pack200, ...)
- ProcessingStepHandler handler = new ProcessingStepHandler();
- OutputStream destination = handler.link(new ProcessingStep[] {new Pack200OptimizerStep()}, repositoryStream, null);
-
- // Do the actual work by asking the repo to get the artifact and put it in the destination.
- IStatus status = repository.getArtifact(descriptor, destination, new NullProgressMonitor());
- if (!status.isOK()) {
- System.out.println(NLS.bind(Messages.failed_getting_artifact, descriptor.getArtifactKey()));
- System.out.println(status);
- }
- } catch (ProvisionException e) {
- System.out.println(NLS.bind(Messages.skip_optimization, descriptor.getArtifactKey()));
- System.out.println(e.getMessage());
- e.printStackTrace();
- } finally {
- if (repositoryStream != null)
- try {
- repositoryStream.close();
- IStatus status = ProcessingStepHandler.checkStatus(repositoryStream);
- if (!status.isOK()) {
- System.out.println(NLS.bind(Messages.skip_optimization, descriptor.getArtifactKey()));
- System.out.println(status.toString());
- }
- } catch (IOException e) {
- System.out.println(NLS.bind(Messages.skip_optimization, descriptor.getArtifactKey()));
- System.out.println(e.getMessage());
- e.printStackTrace();
- }
- }
- }
-
- private boolean isOptimized(IArtifactDescriptor descriptor) {
- return IArtifactDescriptor.FORMAT_PACKED.equals(descriptor.getProperty(IArtifactDescriptor.FORMAT));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Pack200OptimizerStep.java b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Pack200OptimizerStep.java
deleted file mode 100644
index f950b5da0..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/Pack200OptimizerStep.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.optimizers.pack200;
-
-import java.io.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.Activator;
-import org.eclipse.equinox.internal.p2.artifact.processing.AbstractBufferingStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.Options;
-
-/**
- * The Pack200Packer expects an input containing normal ".jar" data.
- */
-public class Pack200OptimizerStep extends AbstractBufferingStep {
- private static final String PACKED_SUFFIX = ".pack.gz"; //$NON-NLS-1$
- private File incoming;
- private static boolean pack200Available;
-
- static {
- try {
- // TODO This is not very elegant. But there is currently no other way to
- // find it out. PackStep.canPack() is not visible due to restrictions.
- JarProcessor.getPackProcessor(null);
- pack200Available = true;
- } catch (UnsupportedOperationException e) {
- pack200Available = false;
- }
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- incoming = File.createTempFile(INCOMING_ROOT, JAR_SUFFIX);
- return new BufferedOutputStream(new FileOutputStream(incoming));
- }
-
- protected void cleanupTempFiles() {
- super.cleanupTempFiles();
- if (incoming != null)
- incoming.delete();
- }
-
- protected void performProcessing() throws IOException {
- File resultFile = null;
- try {
- resultFile = process();
- // now write the optimized content to the destination
- if (resultFile.length() > 0) {
- InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile));
- FileUtils.copyStream(resultStream, true, getDestination(), false);
- } else {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Empty intermediate file: " + resultFile)); //$NON-NLS-1$
- }
- } finally {
- if (resultFile != null)
- resultFile.delete();
- }
- }
-
- protected File process() throws IOException {
- if (!pack200Available)
- // TODO Slightly abused API!!
- throw new FileNotFoundException("Could not find pack200 command.");
- // unpack
- Options options = new Options();
- options.pack = true;
- // TODO use false here assuming that all content is conditioned. Need to revise this
- options.processAll = false;
- options.input = incoming;
- options.outputDir = getWorkDir().getPath();
- options.verbose = true;
- new JarProcessorExecutor().runJarProcessor(options);
- return new File(getWorkDir(), incoming.getName() + PACKED_SUFFIX);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/messages.properties b/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/messages.properties
deleted file mode 100644
index 4970a32d6..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.optimizers/src/org/eclipse/equinox/internal/p2/artifact/optimizers/pack200/messages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-failed_getting_artifact=Failed getting the artifact {0}.
-skip_optimization=Skipping optimization of {0}.
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.classpath b/bundles/org.eclipse.equinox.p2.artifact.processors/.classpath
deleted file mode 100644
index 7cdeb7319..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.cvsignore b/bundles/org.eclipse.equinox.p2.artifact.processors/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.project b/bundles/org.eclipse.equinox.p2.artifact.processors/.project
deleted file mode 100644
index 88c78e726..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.artifact.processors</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index c973c1373..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Nov 14 12:49:38 EST 2007
-eclipse.preferences.version=1
-encoding/<project>=ISO-8859-1
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index b503d85c9..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,342 +0,0 @@
-#Tue Nov 06 20:46:54 EST 2007
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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.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.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 57ebea5c9..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Mon Nov 05 21:23:42 EST 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.artifact.processors/META-INF/MANIFEST.MF
deleted file mode 100644
index bfacdcbc1..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,26 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.artifact.processors;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.artifact.processors.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.artifact.processors;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.processors.jardelta;x-internal:=true,
- org.eclipse.equinox.internal.p2.artifact.processors.jbdiff;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.artifact.repository
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Bundle-ActivationPolicy: lazy
-Import-Package: ie.wombat.jbdiff,
- org.eclipse.equinox.internal.p2.artifact.optimizers,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.sar,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="2.0.0",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.osgi.framework;version="1.4.0"
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/about.html b/bundles/org.eclipse.equinox.p2.artifact.processors/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/build.properties b/bundles/org.eclipse.equinox.p2.artifact.processors/build.properties
deleted file mode 100644
index ad40ab407..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.properties b/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.properties
deleted file mode 100644
index 9bb3b4448..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox p2 Artifact Processing Support
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.xml b/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.xml
deleted file mode 100644
index 2b083618c..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/plugin.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
- id="org.eclipse.equinox.p2.processing.JarDeltaPatchStep">
- <step class="org.eclipse.equinox.internal.p2.artifact.processors.jardelta.JarDeltaProcessorStep"/>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
- id="org.eclipse.equinox.p2.processing.JBPatchStep">
- <step class="org.eclipse.equinox.internal.p2.artifact.processors.jbdiff.JBPatchStep"/>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.artifact.repository.processingSteps"
- id="org.eclipse.equinox.p2.processing.JBPatchZipStep">
- <step class="org.eclipse.equinox.internal.p2.artifact.processors.jbdiff.JBPatchZipStep"/>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml b/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml
deleted file mode 100644
index 9fe5da1de..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.artifact.processors</artifactId>
- <version>1.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java
deleted file mode 100644
index 8b60e4ff5..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.AbstractDeltaStep;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.*;
-
-/**
- * The <code>AbstractDeltaPatchStep</code> is an abstract processing step that
- * retrieves a local artifact repository containing the serialized/encoded
- * artifact key. It assumes that the artifact key is stored within the data property
- * of the processing step descriptor encoding the artifact key of the base artifact.
- */
-public abstract class AbstractDeltaProcessorStep extends AbstractDeltaStep {
-
- public void initialize(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
- super.initialize(agent, descriptor, context);
- if (!getStatus().isOK())
- return;
- fetchLocalArtifactRepository(agent);
- }
-
- /**
- * Fetch a local artifact repository containing the fetched artifact key.
- */
- private void fetchLocalArtifactRepository(IProvisioningAgent agent) {
- if (repository != null)
- return;
- IArtifactRepositoryManager repoMgr = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (repoMgr == null) {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Could not get artifact repository manager."));
- return;
- }
-
- URI[] repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_LOCAL);
- for (int i = 0; i < repositories.length; i++) {
- try {
- IArtifactRepository currentRepo = repoMgr.loadRepository(repositories[i], null);
- if (currentRepo.contains(key)) {
- repository = currentRepo;
- return;
- }
- } catch (ProvisionException e) {
- //just skip unreadable repositories
- }
- }
- setStatus(new Status(IStatus.ERROR, Activator.ID, "No repository available containing key " + key));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/Activator.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/Activator.java
deleted file mode 100644
index f11af994d..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/Activator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.artifact.processors;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- public static final String ID = "org.eclipse.equinox.p2.artifact.processors"; //$NON-NLS-1$
- private static BundleContext context = null;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext context) throws Exception {
- Activator.context = context;
- }
-
- public void stop(BundleContext context) throws Exception {
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/DeltaApplier.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/DeltaApplier.java
deleted file mode 100644
index d5f4d16f2..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/DeltaApplier.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.jardelta;
-
-import java.io.*;
-import java.util.*;
-import java.util.zip.*;
-
-public class DeltaApplier {
- private static final String DELETE_SUFFIX = ".delete"; //$NON-NLS-1$
- private static final String MANIFEST_ENTRY_NAME = "META-INF/MANIFEST.MF"; //$NON-NLS-1$
- private File delta;
- private File base;
- private File destination;
- private ZipFile baseJar;
- private ZipFile deltaJar;
- private Set baseEntries;
- private ZipFile manifestJar;
-
- public DeltaApplier(File base, File delta, File destination) {
- this.base = base;
- this.delta = delta;
- this.destination = destination;
- }
-
- public void run() {
- try {
- if (!openJars())
- return;
- applyDelta();
- writeResult();
- } finally {
- closeJars();
- }
- }
-
- private void applyDelta() {
- // start out assuming that all the base entries will be moved over.
- baseEntries = getEntries(baseJar);
- // remove from the base all the entries that appear in the delta
- for (Enumeration e = deltaJar.entries(); e.hasMoreElements();) {
- ZipEntry entry = ((ZipEntry) e.nextElement());
- checkForManifest(entry, deltaJar);
- String name = entry.getName();
- if (name.endsWith(DELETE_SUFFIX)) {
- name = name.substring(0, name.length() - DELETE_SUFFIX.length());
- // if the manifest is being deleted, forget anyone who might have a manifest
- if (name.equalsIgnoreCase(MANIFEST_ENTRY_NAME))
- manifestJar = null;
- }
- baseEntries.remove(name);
- }
- }
-
- private void writeResult() {
- ZipOutputStream result = null;
- try {
- try {
- result = new ZipOutputStream(new FileOutputStream(destination));
- // if the delta includes the manifest, be sure to write it first
- if (manifestJar != null)
- writeEntry(result, manifestJar.getEntry(MANIFEST_ENTRY_NAME), manifestJar, true);
- // write out the things we know are staying from the base JAR
- for (Iterator i = baseEntries.iterator(); i.hasNext();) {
- ZipEntry entry = baseJar.getEntry((String) i.next());
- writeEntry(result, entry, baseJar, false);
- }
- // write out the changes/additions from the delta.
- for (Enumeration e = deltaJar.entries(); e.hasMoreElements();) {
- ZipEntry entry = (ZipEntry) e.nextElement();
- if (!entry.getName().endsWith(DELETE_SUFFIX))
- writeEntry(result, entry, deltaJar, false);
- }
- } finally {
- if (result != null)
- result.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- return;
- }
- }
-
- private void writeEntry(ZipOutputStream result, ZipEntry entry, ZipFile sourceJar, boolean manifest) throws IOException {
- if (!manifest && entry.getName().equalsIgnoreCase(MANIFEST_ENTRY_NAME))
- return;
- // add the entry
- result.putNextEntry(entry);
- try {
- // if there is a sourceJar copy over the content for the entry into the result
- if (sourceJar != null) {
- InputStream contents = sourceJar.getInputStream(entry);
- try {
- transferStreams(contents, result);
- } finally {
- contents.close();
- }
- }
- } finally {
- result.closeEntry();
- }
- }
-
- /**
- * Transfers all available bytes from the given input stream to the given
- * output stream. Does not close either stream.
- *
- * @param source
- * @param destination
- * @throws IOException
- */
- public static void transferStreams(InputStream source, OutputStream destination) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- destination.flush();
- }
- }
-
- private boolean openJars() {
- try {
- baseJar = new ZipFile(base);
- deltaJar = new ZipFile(delta);
- } catch (IOException e) {
- return false;
- }
- return true;
- }
-
- private void closeJars() {
- if (baseJar != null)
- try {
- baseJar.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- if (deltaJar != null)
- try {
- deltaJar.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- private Set getEntries(ZipFile jar) {
- HashSet result = new HashSet(jar.size());
- for (Enumeration e = jar.entries(); e.hasMoreElements();) {
- ZipEntry entry = (ZipEntry) e.nextElement();
- checkForManifest(entry, jar);
- result.add(entry.getName());
- }
- return result;
- }
-
- /**
- * Check to see if the given entry is the manifest. If so, remember it for use when writing
- * the resultant JAR.
- * @param entry
- * @param jar
- */
- private void checkForManifest(ZipEntry entry, ZipFile jar) {
- if (entry.getName().equalsIgnoreCase(MANIFEST_ENTRY_NAME))
- manifestJar = jar;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/JarDeltaProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/JarDeltaProcessorStep.java
deleted file mode 100644
index 8c07924ff..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jardelta/JarDeltaProcessorStep.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.jardelta;
-
-import java.io.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.artifact.processors.AbstractDeltaProcessorStep;
-import org.eclipse.equinox.internal.p2.artifact.processors.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * Processor that takes a JAR delta and applies it.
- */
-public class JarDeltaProcessorStep extends AbstractDeltaProcessorStep {
-
- private File incoming;
-
- public JarDeltaProcessorStep() {
- super();
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- incoming = File.createTempFile(INCOMING_ROOT, JAR_SUFFIX);
- return new BufferedOutputStream(new FileOutputStream(incoming));
- }
-
- protected void cleanupTempFiles() {
- super.cleanupTempFiles();
- if (incoming != null)
- incoming.delete();
- }
-
- protected void performProcessing() throws IOException {
- File resultFile = null;
- try {
- resultFile = process();
- // now write the optimized content to the destination
- if (resultFile.length() > 0) {
- InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile));
- FileUtils.copyStream(resultStream, true, getDestination(), false);
- } else {
- setStatus(new Status(IStatus.ERROR, Activator.ID, "Empty optimized file: " + resultFile)); //$NON-NLS-1$
- }
- } finally {
- if (resultFile != null)
- resultFile.delete();
- }
- }
-
- protected File process() throws IOException {
- File predecessor = null;
- try {
- File resultFile = File.createTempFile(RESULT_ROOT, JAR_SUFFIX);
- // get the predecessor and perform the optimization into a temp file
- predecessor = fetchPredecessor(new ArtifactDescriptor(key));
- new DeltaApplier(predecessor, incoming, resultFile).run();
- return resultFile;
- } finally {
- // if we have a predecessor and it is our temp file then clean up the file
- if (predecessor != null && predecessor.getAbsolutePath().indexOf(PREDECESSOR_ROOT) > -1)
- predecessor.delete();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchStep.java
deleted file mode 100644
index c31b42309..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchStep.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.jbdiff;
-
-import ie.wombat.jbdiff.JBPatch;
-import java.io.*;
-import org.eclipse.equinox.internal.p2.artifact.processors.AbstractDeltaProcessorStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * The JBPatchStep patches a JBDiff based data.
- */
-public class JBPatchStep extends AbstractDeltaProcessorStep {
-
- public JBPatchStep() {
- super();
- }
-
- protected OutputStream createIncomingStream() throws IOException {
- return new DirectByteArrayOutputStream();
- }
-
- protected void performProcessing() throws IOException {
- DirectByteArrayOutputStream predecessor = fetchPredecessorBytes(new ArtifactDescriptor(key));
- DirectByteArrayOutputStream current = (DirectByteArrayOutputStream) incomingStream;
- byte[] result = JBPatch.bspatch(predecessor.getBuffer(), predecessor.getBufferLength(), current.getBuffer(), current.getBufferLength());
- // free up the memory as soon as possible.
- predecessor = null;
- current = null;
- incomingStream = null;
-
- // copy the result of the optimization to the destination.
- FileUtils.copyStream(new ByteArrayInputStream(result), true, getDestination(), false);
- }
-
- private DirectByteArrayOutputStream fetchPredecessorBytes(ArtifactDescriptor artifactDescriptor) throws IOException {
- DirectByteArrayOutputStream result = new DirectByteArrayOutputStream();
- setStatus(repository.getArtifact(artifactDescriptor, result, getProgressMonitor()));
- if (!getStatus().isOK())
- throw (IOException) new IOException(getStatus().getMessage()).initCause(getStatus().getException());
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchZipStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchZipStep.java
deleted file mode 100644
index de4ff46ff..000000000
--- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/jbdiff/JBPatchZipStep.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.artifact.processors.jbdiff;
-
-import ie.wombat.jbdiff.JBPatch;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-import org.eclipse.equinox.internal.p2.sar.SarUtil;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-/**
- * The <code>JBPatchZipStep</code> patches a JBDiff based diff of zips/jars.
- */
-public class JBPatchZipStep extends JBPatchStep {
-
- public JBPatchZipStep() {
- super();
- }
-
- protected void performProcessing() throws IOException {
- DirectByteArrayOutputStream predecessor = fetchPredecessorBytes(new ArtifactDescriptor(key));
- DirectByteArrayOutputStream current = (DirectByteArrayOutputStream) incomingStream;
- byte[] result = JBPatch.bspatch(predecessor.getBuffer(), predecessor.getBufferLength(), current.getBuffer(), current.getBufferLength());
- // free up the memory as soon as possible.
- predecessor = null;
- current = null;
- incomingStream = null;
-
- // copy the result of the optimization to the destination.
- SarUtil.sarToZip(new ByteArrayInputStream(result), true, getDestination(), false);
- }
-
- private DirectByteArrayOutputStream fetchPredecessorBytes(ArtifactDescriptor artifactDescriptor) throws IOException {
- DirectByteArrayOutputStream zippedPredecessor = new DirectByteArrayOutputStream();
- setStatus(repository.getArtifact(artifactDescriptor, zippedPredecessor, getProgressMonitor()));
- if (!getStatus().isOK())
- throw (IOException) new IOException(getStatus().getMessage()).initCause(getStatus().getException());
-
- DirectByteArrayOutputStream result = new DirectByteArrayOutputStream();
- SarUtil.zipToSar(zippedPredecessor.getInputStream(), result);
- return result;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.common/.project b/bundles/org.eclipse.equinox.p2.common/.project
deleted file mode 100644
index b2faed800..000000000
--- a/bundles/org.eclipse.equinox.p2.common/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.common</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.common/README.TXT b/bundles/org.eclipse.equinox.p2.common/README.TXT
deleted file mode 100644
index abb2b2faa..000000000
--- a/bundles/org.eclipse.equinox.p2.common/README.TXT
+++ /dev/null
@@ -1,2 +0,0 @@
-This bundle is obsolete. It was briefly introduced during p2 API development but was never
-released into HEAD stream. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.console/.classpath b/bundles/org.eclipse.equinox.p2.console/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.console/.cvsignore b/bundles/org.eclipse.equinox.p2.console/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.console/.project b/bundles/org.eclipse.equinox.p2.console/.project
deleted file mode 100644
index 8278235b6..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.console</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1e2234943..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,351 +0,0 @@
-#Thu Aug 05 08:37:53 CDT 2010
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs b/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index d5facb7c0..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jan 22 13:26:41 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index b61b6ad25..000000000
--- a/bundles/org.eclipse.equinox.p2.console/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:44 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
deleted file mode 100644
index b5ef0d9db..000000000
--- a/bundles/org.eclipse.equinox.p2.console/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.console;singleton:=true
-Bundle-Version: 1.0.300.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.console.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.console;x-friends:="org.eclipse.equinox.p2.director.app"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.framework.console;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.environment;version="1.0.0",
- org.osgi.framework;version="1.6.0",
- org.osgi.util.tracker;version="1.4.0"
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.console/Provisioning console.launch b/bundles/org.eclipse.equinox.p2.console/Provisioning console.launch
deleted file mode 100644
index b8541dcab..000000000
--- a/bundles/org.eclipse.equinox.p2.console/Provisioning console.launch
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Provisioning console"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.6.0-openjdk-1.6.0.0.x86_64"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -noexit"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.osgi.services@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.common@2:true,org.eclipse.core.net@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.contenttype@default:default,org.apache.commons.codec@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.equinox.app@default:default,org.eclipse.ecf@default:default,javax.servlet@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.apache.commons.logging@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.util@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.preferences@default:default,org.apache.commons.httpclient@default:default,org.eclipse.core.jobs@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.registry@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.core.variables@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.touchpoint.osgi@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.exemplarysetup@default:true,org.eclipse.equinox.p2.operations@default:default,org.eclipse.equinox.p2.artifact.optimizers@default:default,ie.wombat.jbdiff@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.sar@default:default,org.eclipse.equinox.p2.artifact.processors@default:default,org.eclipse.equinox.p2.console@default:true,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.sat4j.core@default:default,org.eclipse.equinox.simpleconfigurator@1:true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.console/about.html b/bundles/org.eclipse.equinox.p2.console/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.console/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.console/build.properties b/bundles/org.eclipse.equinox.p2.console/build.properties
deleted file mode 100644
index 246ea6cb7..000000000
--- a/bundles/org.eclipse.equinox.p2.console/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.console/plugin.properties b/bundles/org.eclipse.equinox.p2.console/plugin.properties
deleted file mode 100644
index e06d37680..000000000
--- a/bundles/org.eclipse.equinox.p2.console/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Console
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.console/pom.xml b/bundles/org.eclipse.equinox.p2.console/pom.xml
deleted file mode 100644
index f1d09e28e..000000000
--- a/bundles/org.eclipse.equinox.p2.console/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.console</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java
deleted file mode 100644
index 54bc79f44..000000000
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/Activator.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others. All rights reserved. This
- * 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
- * Composent, Inc. - additions
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.console;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-public class Activator implements BundleActivator, ServiceTrackerCustomizer<IProvisioningAgent, IProvisioningAgent> {
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.console"; //$NON-NLS-1$
- private static final String PROVIDER_NAME = "org.eclipse.osgi.framework.console.CommandProvider"; //$NON-NLS-1$
- private static BundleContext context;
-
- private ServiceTracker<IProvisioningAgent, IProvisioningAgent> agentTracker;
- private ProvCommandProvider provider;
- private ServiceRegistration<?> providerRegistration = null;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public Activator() {
- super();
- }
-
- public void start(BundleContext ctxt) throws Exception {
- Activator.context = ctxt;
- boolean registerCommands = true;
- try {
- Class.forName(PROVIDER_NAME);
- } catch (ClassNotFoundException e) {
- registerCommands = false;
- }
-
- if (registerCommands) {
- agentTracker = new ServiceTracker<IProvisioningAgent, IProvisioningAgent>(context, IProvisioningAgent.class, this);
- agentTracker.open();
- }
- }
-
- public void stop(BundleContext ctxt) throws Exception {
- agentTracker.close();
- if (providerRegistration != null)
- providerRegistration.unregister();
- providerRegistration = null;
- Activator.context = null;
- }
-
- public IProvisioningAgent addingService(ServiceReference<IProvisioningAgent> reference) {
- BundleContext ctxt = Activator.getContext();
- IProvisioningAgent agent = ctxt.getService(reference);
- provider = new ProvCommandProvider(ctxt.getProperty("eclipse.p2.profile"), agent); //$NON-NLS-1$
- providerRegistration = ctxt.registerService(PROVIDER_NAME, provider, null);
- return agent;
- }
-
- public void modifiedService(ServiceReference<IProvisioningAgent> reference, IProvisioningAgent service) {
- // nothing
- }
-
- public void removedService(ServiceReference<IProvisioningAgent> reference, IProvisioningAgent service) {
- if (providerRegistration != null)
- providerRegistration.unregister();
- providerRegistration = null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
deleted file mode 100644
index f1cb4e73c..000000000
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
+++ /dev/null
@@ -1,745 +0,0 @@
-/*******************************************************************************
- * 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
- * Band XI - add more commands
- * Composent, Inc. - command additions
- * SAP - bug fixes
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.console;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.eclipse.osgi.framework.console.CommandProvider;
-
-/**
- * An OSGi console command provider that adds various commands for interacting
- * with the provisioning system.
- */
-public class ProvCommandProvider implements CommandProvider {
- private static final String WILDCARD_ANY = "*"; //$NON-NLS-1$
- public static final String NEW_LINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private final IProvisioningAgent agent;
-
- // private Profile profile;
-
- public ProvCommandProvider(String profileId, IProvisioningAgent agent) {
- this.agent = agent;
- // look up the profile we are currently running and use it as the
- // default.
- // TODO define a way to spec the default profile to manage
- // if (profileId != null) {
- // profile = registry.getProfile(profileId);
- // if (profile != null)
- // return;
- // }
- // // A default was not defined so manage the first profile we can find
- // Profile[] profiles = registry.getProfiles();
- // if (profiles.length > 0)
- // profile = profiles[0];
- }
-
- /**
- * Adds both a metadata repository and artifact repository
- */
- public void _provaddrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- // add metadata repo
- if (ProvisioningHelper.addMetadataRepository(agent, repoURI) == null) {
- interpreter.println("Unable to add metadata repository: " + repoURI);
- } else // add artifact repo at same URL
- if (ProvisioningHelper.addArtifactRepository(agent, repoURI) == null) {
- interpreter.println("Unable to add artifact repository: " + repoURI);
- }
- }
-
- public void _provdelrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- ProvisioningHelper.removeMetadataRepository(agent, repoURI);
- ProvisioningHelper.removeArtifactRepository(agent, repoURI);
- }
-
- /**
- * Adds a metadata repository.
- */
- public void _provaddmetadatarepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- if (ProvisioningHelper.addMetadataRepository(agent, repoURI) == null)
- interpreter.println("Unable to add repository: " + repoURI);
- }
-
- public void _provdelmetadatarepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- ProvisioningHelper.removeMetadataRepository(agent, repoURI);
- }
-
- public void _provaddartifactrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- if (ProvisioningHelper.addArtifactRepository(agent, repoURI) == null)
- interpreter.println("Unable to add repository " + repoURI);
- }
-
- public void _provdelartifactrepo(CommandInterpreter interpreter) {
- String urlString = interpreter.nextArgument();
- if (urlString == null) {
- interpreter.println("Repository location must be provided");
- return;
- }
- URI repoURI = toURI(interpreter, urlString);
- if (repoURI == null)
- return;
- ProvisioningHelper.removeArtifactRepository(agent, repoURI);
- }
-
- /**
- * Install a given IU to a given profile location.
- */
- public void _provinstall(CommandInterpreter interpreter) {
- String iu = interpreter.nextArgument();
- String version = interpreter.nextArgument();
- String profileId = interpreter.nextArgument();
- if (profileId == null || profileId.equals("this")) //$NON-NLS-1$
- profileId = IProfileRegistry.SELF;
- if (iu == null || version == null || profileId == null) {
- interpreter.println("Installable unit id, version, and profileid must be provided");
- return;
- }
- IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
- if (profile == null) {
- if (profileId.equals(IProfileRegistry.SELF)) {
- interpreter.println("No profile found");
- } else {
- interpreter.println("Profile " + profileId + " not found");
- }
- return;
- }
- IStatus s = null;
- try {
- s = ProvisioningHelper.install(agent, iu, version, profile, new NullProgressMonitor());
- } catch (ProvisionException e) {
- interpreter.println("Installation failed with ProvisionException for " + iu + " " + version);
- interpreter.printStackTrace(e);
- return;
- }
- if (s.isOK())
- interpreter.println("Installation complete for " + iu + " " + version);
- else {
- interpreter.println("Installation failed for " + iu + " " + version);
- interpreter.println(flattenStatus(s.getChildren(), " "));
- }
- }
-
- private String flattenStatus(IStatus[] childs, String indent) {
- StringBuffer sb = new StringBuffer();
-
- for (int i = 0; (childs != null) && (i < childs.length); i++) {
- sb.append(indent).append(childs[i].getMessage()).append(NEW_LINE);
- sb.append(flattenStatus(childs[i].getChildren(), indent + " "));
- }
- return sb.toString();
- }
-
- /**
- * Creates a profile given an id, location, and flavor
- */
- public void _provaddprofile(CommandInterpreter interpreter) {
- String profileId = interpreter.nextArgument();
- String location = interpreter.nextArgument();
- String flavor = interpreter.nextArgument();
- if (profileId == null || location == null || flavor == null) {
- interpreter.println("Id, location, and flavor must be provided");
- return;
- }
- String environments = interpreter.nextArgument();
- Map<String, String> props = new HashMap<String, String>();
- props.put(IProfile.PROP_INSTALL_FOLDER, location);
- if (environments != null)
- props.put(IProfile.PROP_ENVIRONMENTS, environments);
-
- try {
- ProvisioningHelper.addProfile(agent, profileId, props);
- } catch (ProvisionException e) {
- interpreter.println("Add profile failed. " + e.getMessage());
- interpreter.printStackTrace(e);
- }
- }
-
- /**
- * Deletes a profile given an id, location, and flavor
- */
- public void _provdelprofile(CommandInterpreter interpreter) {
- String profileId = interpreter.nextArgument();
- if (profileId == null) {
- interpreter.println("profileid must be provided");
- return;
- }
- ProvisioningHelper.removeProfile(agent, profileId);
- }
-
- /**
- * Lists the installable units that match the given URL, id, and/or version.
- *
- * @param interpreter
- */
- public void _provliu(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- String id = processArgument(interpreter.nextArgument());
- String version = processArgument(interpreter.nextArgument());
- URI repoURL = null;
- if (urlString != null && !urlString.equals(WILDCARD_ANY))
- repoURL = toURI(interpreter, urlString);
- IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(agent, repoURL, QueryUtil.createIUQuery(id, new VersionRange(version)), null));
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
-
- /**
- * Lists the installable units that match the given URL and query. A third
- * boolean argument can be provided where <code>true</code> means &quot;full query&quot;
- * and <code>false</code> means &quote;match query&quote;. The default is <code>false</code>.
- *
- * @param interpreter
- */
- public void _provlquery(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- String expression = processArgument(interpreter.nextArgument());
- if (expression == null) {
- interpreter.println("Please enter a query");
- return;
- }
- boolean useFull = Boolean.valueOf(processArgument(interpreter.nextArgument())).booleanValue();
- URI repoURL = null;
- if (urlString != null && !urlString.equals(WILDCARD_ANY))
- repoURL = toURI(interpreter, urlString);
-
- IQuery<IInstallableUnit> query = useFull ? QueryUtil.createQuery(expression) : QueryUtil.createMatchQuery(expression);
- IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(agent, repoURL, query, null));
- // Now print out results
- if (units.length == 0)
- interpreter.println("No units found");
- else {
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
- }
-
- /**
- * Lists the known metadata repositories, or the contents of a given
- * metadata repository.
- *
- * @param interpreter
- */
- public void _provlr(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- String id = processArgument(interpreter.nextArgument());
- String version = processArgument(interpreter.nextArgument());
- if (urlString == null) {
- URI[] repositories = ProvisioningHelper.getMetadataRepositories(agent);
- if (repositories != null)
- for (int i = 0; i < repositories.length; i++)
- interpreter.println(repositories[i]);
- return;
- }
- URI repoLocation = toURI(interpreter, urlString);
- if (repoLocation == null)
- return;
- IInstallableUnit[] units = sort(ProvisioningHelper.getInstallableUnits(agent, repoLocation, QueryUtil.createIUQuery(id, new VersionRange(version)), null));
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
-
- /**
- * Lists the group IUs in all known metadata repositories, or in the given
- * metadata repository.
- *
- * @param interpreter
- */
- public void _provlg(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- IQueryable<IInstallableUnit> queryable = null;
- if (urlString == null) {
- queryable = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (queryable == null)
- return;
- } else {
- URI repoURL = toURI(interpreter, urlString);
- if (repoURL == null)
- return;
- queryable = ProvisioningHelper.getMetadataRepository(agent, repoURL);
- if (queryable == null)
- return;
- }
- IInstallableUnit[] units = sort(queryable.query(QueryUtil.createIUGroupQuery(), null));
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
-
- /**
- * Lists the known artifact repositories, or the contents of a given
- * artifact repository.
- *
- * @param interpreter
- */
- public void _provlar(CommandInterpreter interpreter) {
- String urlString = processArgument(interpreter.nextArgument());
- if (urlString == null) {
- URI[] repositories = ProvisioningHelper.getArtifactRepositories(agent);
- if (repositories == null)
- return;
- for (int i = 0; i < repositories.length; i++)
- interpreter.println(repositories[i]);
- return;
- }
- URI repoURL = toURI(interpreter, urlString);
- if (repoURL == null)
- return;
- IArtifactRepository repo = ProvisioningHelper.getArtifactRepository(agent, repoURL);
- IQueryResult<IArtifactKey> keys = null;
- try {
- keys = (repo != null) ? repo.query(ArtifactKeyQuery.ALL_KEYS, null) : null;
- } catch (UnsupportedOperationException e) {
- interpreter.println("Repository does not support queries.");
- return;
- }
- if (keys == null || keys.isEmpty()) {
- interpreter.println("Repository has no artifacts");
- return;
- }
- IFileArtifactRepository fileRepo = (IFileArtifactRepository) repo.getAdapter(IFileArtifactRepository.class);
- for (Iterator<IArtifactKey> iterator = keys.iterator(); iterator.hasNext();) {
- IArtifactKey key = iterator.next();
- IArtifactDescriptor[] descriptors = repo.getArtifactDescriptors(key);
- for (int j = 0; j < descriptors.length; j++) {
- IArtifactDescriptor descriptor = descriptors[j];
- File location = null;
- if (fileRepo != null)
- location = fileRepo.getArtifactFile(descriptor);
- println(interpreter, key, location);
- }
-
- }
- }
-
- /**
- * Returns the given string as an URL, or <code>null</code> if the string
- * could not be interpreted as an URL.
- */
- private URI toURI(CommandInterpreter interpreter, String urlString) {
- try {
- return new URI(urlString);
- } catch (URISyntaxException e) {
- interpreter.print(e.getMessage());
- interpreter.println();
- return null;
- }
- }
-
- private String processArgument(String arg) {
- if (arg == null || arg.equals(WILDCARD_ANY))
- return null;
- return arg;
- }
-
- /**
- * Lists the known profiles, or the contents of a given profile.
- *
- * @param interpreter
- */
- public void _provlp(CommandInterpreter interpreter) {
- String profileId = processArgument(interpreter.nextArgument());
- String id = processArgument(interpreter.nextArgument());
- String range = processArgument(interpreter.nextArgument());
- if (profileId == null) {
- IProfile[] profiles = ProvisioningHelper.getProfiles(agent);
- if (profiles == null) {
- interpreter.println("No profile found");
- return;
- }
- for (int i = 0; i < profiles.length; i++)
- interpreter.println(profiles[i].getProfileId());
- return;
- }
- // determine which profile is to be listed
- IProfile target = null;
- if (profileId.equals("this")) //$NON-NLS-1$
- profileId = IProfileRegistry.SELF;
- target = ProvisioningHelper.getProfile(agent, profileId);
- if (target == null) {
- if (profileId.equals(IProfileRegistry.SELF)) {
- interpreter.println("No profile found");
- } else {
- interpreter.println("Profile " + profileId + " not found");
- }
- return;
- }
-
- // list the profile contents
- IInstallableUnit[] result = sort(target.query(QueryUtil.createIUQuery(id, new VersionRange(range)), null));
- for (int i = 0; i < result.length; i++)
- interpreter.println(result[i]);
- }
-
- /**
- * Lists the profile timestamps for a given profile id, if no profile id, the default profile
- * is used.
- *
- * @param interpreter
- */
- public void _provlpts(CommandInterpreter interpreter) {
- String profileId = processArgument(interpreter.nextArgument());
- if (profileId == null || profileId.equals("this")) { //$NON-NLS-1$
- profileId = IProfileRegistry.SELF;
- }
- long[] profileTimestamps = ProvisioningHelper.getProfileTimestamps(agent, profileId);
- // if no profile timestamps for given id, print that out and done
- if (profileTimestamps == null || profileTimestamps.length == 0) {
- if (profileId.equals(IProfileRegistry.SELF)) {
- interpreter.println("No profile found");
- } else {
- interpreter.print("No timestamps found for profile ");
- interpreter.println(profileId);
- }
- return;
- }
- // else if there are some timestamps then print them out on separate line
- interpreter.print("Timestamps for profile ");
- interpreter.println(profileId);
- for (int i = 0; i < profileTimestamps.length; i++) {
- interpreter.print("\t"); //$NON-NLS-1$
- interpreter.println(new Long(profileTimestamps[i]));
- }
- }
-
- /**
- * Revert a profile to a given timestamp
- */
- public void _provrevert(CommandInterpreter interpreter) {
- String timestamp = interpreter.nextArgument();
- if (timestamp == null) {
- interpreter.println("Valid timestamp must be provided. Timestamps can be retrieved via 'provlpts' command.");
- return;
- }
- Long ts = null;
- try {
- ts = new Long(timestamp);
- } catch (NumberFormatException e) {
- interpreter.println("Timestamp " + timestamp + " not valid. Timestamps can be retrieved via 'provlpts' command.");
- return;
- }
- String profileId = interpreter.nextArgument();
- if (profileId == null || profileId.equals("this"))
- profileId = IProfileRegistry.SELF;
-
- IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
- if (profile == null) {
- if (profileId.equals(IProfileRegistry.SELF)) {
- interpreter.println("No profile found");
- } else {
- interpreter.println("Profile " + profileId + " not found");
- }
- return;
- }
- IStatus s = null;
- try {
- s = ProvisioningHelper.revertToPreviousState(agent, profile, ts.longValue());
- } catch (ProvisionException e) {
- interpreter.println("revert failed ");
- interpreter.printStackTrace(e);
- return;
- }
- if (s.isOK())
- interpreter.println("revert completed");
- else {
- interpreter.println("revert failed ");
- printErrorStatus(interpreter, s);
- }
- }
-
- private IInstallableUnit[] sort(IQueryResult<IInstallableUnit> queryResult) {
- IInstallableUnit[] units = queryResult.toArray(IInstallableUnit.class);
- Arrays.sort(units, new Comparator<IInstallableUnit>() {
- public int compare(IInstallableUnit arg0, IInstallableUnit arg1) {
- return arg0.toString().compareTo(arg1.toString());
- }
- });
- return units;
- }
-
- public void _provlgp(CommandInterpreter interpreter) {
- String profileId = processArgument(interpreter.nextArgument());
- if (profileId == null || profileId.equals("this")) {
- profileId = IProfileRegistry.SELF;
- }
- IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
- if (profile == null) {
- if (profileId.equals(IProfileRegistry.SELF)) {
- interpreter.println("No profile found");
- } else {
- interpreter.println("Profile " + profileId + " not found");
- }
- return;
- }
- IInstallableUnit[] units = sort(profile.query(QueryUtil.createIUGroupQuery(), new NullProgressMonitor()));
- // Now print out results
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
-
- /**
- * Lists the installable units that match the given profile id and query. The id can be
- * &quot;this&quot; to denote the self profile. A third boolean argument can be provided
- * where <code>true</code> means &quot;full query&quot; and <code>false</code> means
- * &quote;match query&quote;. The default is <code>false</code>.
- *
- * @param interpreter
- */
- public void _provlpquery(CommandInterpreter interpreter) {
- String profileId = processArgument(interpreter.nextArgument());
- if (profileId == null || profileId.equals("this")) {
- profileId = IProfileRegistry.SELF;
- }
-
- String expression = processArgument(interpreter.nextArgument());
- if (expression == null) {
- interpreter.println("Please enter a query");
- return;
- }
-
- boolean useFull = Boolean.valueOf(processArgument(interpreter.nextArgument())).booleanValue();
- IQuery<IInstallableUnit> query = useFull ? QueryUtil.createQuery(expression) : QueryUtil.createMatchQuery(expression);
-
- IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
- if (profile == null) {
- if (profileId.equals(IProfileRegistry.SELF)) {
- interpreter.println("No profile found");
- } else {
- interpreter.println("Profile " + profileId + " not found");
- }
- return;
- }
- IInstallableUnit[] units = sort(profile.query(query, new NullProgressMonitor()));
- // Now print out results
- if (units.length == 0)
- interpreter.println("No units found");
- else {
- for (int i = 0; i < units.length; i++)
- println(interpreter, units[i]);
- }
- }
-
- public void _provremove(CommandInterpreter interpreter) {
- String iu = interpreter.nextArgument();
- String version = interpreter.nextArgument();
- String profileId = interpreter.nextArgument();
- if (profileId == null || profileId.equals("this"))
- profileId = IProfileRegistry.SELF;
- if (version == null) {
- version = Version.emptyVersion.toString();
- }
- if (iu == null) {
- interpreter.println("Installable unit id must be provided");
- return;
- }
- IProfile profile = ProvisioningHelper.getProfile(agent, profileId);
- if (profile == null) {
- if (profileId.equals(IProfileRegistry.SELF)) {
- interpreter.println("No profile found");
- } else {
- interpreter.println("Profile " + profileId + " not found");
- }
- return;
- }
- IStatus s = null;
- try {
- s = ProvisioningHelper.uninstall(agent, iu, version, profile, new NullProgressMonitor());
- } catch (ProvisionException e) {
- interpreter.println("Remove failed with ProvisionException for " + iu + " " + version);
- interpreter.printStackTrace(e);
- return;
- }
- if (s.isOK())
- interpreter.println("Remove complete for " + iu + " " + version);
- else {
- interpreter.println("Remove failed for " + iu + " " + version);
- printErrorStatus(interpreter, s);
- }
- }
-
- private void printErrorStatus(CommandInterpreter interpreter, IStatus status) {
- interpreter.print("--Error status ");
- interpreter.print("message=" + status.getMessage());
- interpreter.print(",code=" + status.getCode());
- String severityString = null;
- switch (status.getSeverity()) {
- case IStatus.INFO :
- severityString = "INFO";
- break;
- case IStatus.CANCEL :
- severityString = "CANCEL";
- break;
- case IStatus.WARNING :
- severityString = "WARNING";
- break;
- case IStatus.ERROR :
- severityString = "ERROR";
- break;
- }
- interpreter.print(",severity=" + severityString);
- interpreter.print(",bundle=" + status.getPlugin());
- interpreter.println("--");
- Throwable t = status.getException();
- if (t != null)
- interpreter.printStackTrace(t);
- IStatus[] children = status.getChildren();
- if (children != null && children.length > 0) {
- interpreter.println("Error status children:");
- for (int i = 0; i < children.length; i++) {
- printErrorStatus(interpreter, children[i]);
- }
- }
- interpreter.println("--End Error Status--");
- }
-
- public String getHelp() {
- StringBuffer help = new StringBuffer();
- help.append(NEW_LINE);
- help.append("---");
- help.append("P2 Provisioning Commands");
- help.append("---");
- help.append(NEW_LINE);
-
- help.append("---");
- help.append("Repository Commands");
- help.append("---");
- help.append(NEW_LINE);
- help.append("\tprovaddrepo <repository URI> - Adds a both a metadata and artifact repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovdelrepo <repository URI> - Deletes a metadata and artifact repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovaddmetadatarepo <repository URI> - Adds a metadata repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovdelmetadatarepo <repository URI> - Deletes a metadata repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovaddartifactrepo <repository URI> - Adds an artifact repository at URI");
- help.append(NEW_LINE);
- help.append("\tprovdelartifactrepo <repository URI> - Deletes an artifact repository URI");
- help.append(NEW_LINE);
- help.append("\tprovlg [<repository URI> <iu id | *> <version range | *>] - Lists all IUs with group capabilities in the given repo or in all repos if URI is omitted");
- help.append(NEW_LINE);
- help.append("\tprovlr [<repository URI> <iu id | *> <version range | *>] - Lists all metadata repositories, or the contents of a given metadata repository");
- help.append(NEW_LINE);
- help.append("\tprovlar [<repository URI>] - Lists all artifact repositories, or the contents of a given artifact repository");
- help.append(NEW_LINE);
- help.append("\tprovliu [<repository URI | *> <iu id | *> <version range | *>] - Lists the IUs that match the pattern in the given repo. * matches all");
- help.append(NEW_LINE);
- help.append("\tprovlquery <repository URI | *> <expression> [ true | false ] - Lists the IUs that match the query expression in the given repo. * matches all. The expression is expected to be a boolean match expression unless the third argument is true, in which case the expression is a full query");
- help.append(NEW_LINE);
-
- help.append("---");
- help.append("Profile Registry Commands");
- help.append("---");
- help.append(NEW_LINE);
-
- help.append("\tprovaddprofile <profileid> <location> <flavor> - Adds a profile with the given profileid, location and flavor");
- help.append(NEW_LINE);
- help.append("\tprovdelprofile <profileid> - Deletes a profile with the given profileid");
- help.append(NEW_LINE);
- help.append("\tprovlp [<profileid | *>] - Lists all profiles, or the contents of the profile at the given profile");
- help.append(NEW_LINE);
- help.append("\tprovlgp [<profileid>] - Lists all IUs with group capabilities in the given profile, or current profile if profileid is omitted");
- help.append(NEW_LINE);
- help.append("\tprovlpts [<profileid>] - Lists timestamps for given profile, or if no profileid given then the default profile timestamps are reported");
- help.append(NEW_LINE);
- help.append("\tprovlpquery <profileid | this> <expression> [ true | false ] - Lists the IUs that match the query expression in the given profile. The expression is expected to be a boolean match expression unless the third argument is true, in which case the expression is a full query");
- help.append(NEW_LINE);
-
- help.append("---");
- help.append("Install Commands");
- help.append("---");
- help.append(NEW_LINE);
-
- help.append("\tprovinstall <InstallableUnit> <version> <profileid> - installs an IU to the profileid. If no profileid is given, installs into default profile.");
- help.append(NEW_LINE);
- help.append("\tprovremove <InstallableUnit> <version> <profileid> - Removes an IU from the profileid. If no profileid is given, installs into default profile.");
- help.append(NEW_LINE);
- help.append("\tprovrevert <profileTimestamp> <profileid>] - Reverts to a given profileTimestamp for an optional profileId");
- help.append(NEW_LINE);
-
- return help.toString();
- }
-
- /**
- * Prints a string representation of an {@link IInstallableUnit} to the
- * iterpreter's output stream.
- */
- public void print(CommandInterpreter interpreter, IInstallableUnit unit) {
- interpreter.print(unit.getId() + ' ' + unit.getVersion());
- }
-
- /**
- * Prints a string representation of an {@link IInstallableUnit} to the
- * iterpreter's output stream, following by a line terminator
- */
- public void println(CommandInterpreter interpreter, IInstallableUnit unit) {
- print(interpreter, unit);
- interpreter.println();
- }
-
- private void println(CommandInterpreter interpreter, IArtifactKey artifactKey, File location) {
- interpreter.print(artifactKey.toString() + ' ' + location);
- interpreter.println();
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 46fe0e617..000000000
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvisioningHelper.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.console;
-
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper;
-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.Version;
-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.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-
-public class ProvisioningHelper {
-
- static IMetadataRepository addMetadataRepository(IProvisioningAgent agent, URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found");
- try {
- return manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
-
- // for convenience create and add a repository here
- String repositoryName = location + " - metadata";
- try {
- return manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- static IMetadataRepository getMetadataRepository(IProvisioningAgent agent, URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found");
- try {
- return manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- static void removeMetadataRepository(IProvisioningAgent agent, URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found");
- manager.removeRepository(location);
- }
-
- static IArtifactRepository addArtifactRepository(IProvisioningAgent agent, URI location) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager == null)
- // TODO log here
- return null;
- try {
- return manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
- // could not load a repo at that location so create one as a convenience
- String repositoryName = location + " - artifacts";
- try {
- return manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- static void removeArtifactRepository(IProvisioningAgent agent, URI location) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager == null)
- // TODO log here
- return;
- manager.removeRepository(location);
- }
-
- static IProfile addProfile(IProvisioningAgent agent, String profileId, Map<String, String> properties) throws ProvisionException {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- IProfile profile = profileRegistry.getProfile(profileId);
- if (profile != null)
- return profile;
-
- Map<String, String> profileProperties = new HashMap<String, String>(properties);
- if (profileProperties.get(IProfile.PROP_ENVIRONMENTS) == null) {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (info != null)
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, "osgi.os=" + info.getOS() + ",osgi.ws=" + info.getWS() + ",osgi.arch=" + info.getOSArch()); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- else
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, "");
- }
-
- return profileRegistry.addProfile(profileId, profileProperties);
- }
-
- static void removeProfile(IProvisioningAgent agent, String profileId) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return;
- profileRegistry.removeProfile(profileId);
- }
-
- static IProfile[] getProfiles(IProvisioningAgent agent) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return new IProfile[0];
- return profileRegistry.getProfiles();
- }
-
- static IProfile getProfile(IProvisioningAgent agent, String id) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- return profileRegistry.getProfile(id);
- }
-
- /**
- * Returns the installable units that match the given query
- * in the given metadata repository.
- *
- * @param location The location of the metadata repo to search. <code>null</code> indicates
- * search all known repos.
- * @param query The query to perform
- * @param monitor A progress monitor, or <code>null</code>
- * @return The IUs that match the query
- */
- static IQueryResult<IInstallableUnit> getInstallableUnits(IProvisioningAgent agent, URI location, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- IQueryable<IInstallableUnit> queryable = null;
- if (location == null) {
- queryable = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- } else {
- queryable = getMetadataRepository(agent, location);
- }
- if (queryable != null)
- return queryable.query(query, monitor);
- return Collector.emptyCollector();
- }
-
- static URI[] getMetadataRepositories(IProvisioningAgent agent) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- // TODO log here
- return null;
- URI[] repos = manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- if (repos.length > 0)
- return repos;
- return null;
- }
-
- /**
- * Install the described IU
- */
- static IStatus install(IProvisioningAgent agent, String unitId, String version, IProfile profile, IProgressMonitor progress) throws ProvisionException {
- if (profile == null)
- return null;
- IQueryResult<IInstallableUnit> units = getInstallableUnits(agent, (URI) null, QueryUtil.createIUQuery(unitId, Version.create(version)), progress);
- if (units.isEmpty()) {
- StringBuffer error = new StringBuffer();
- error.append("Installable unit not found: " + unitId + ' ' + version + '\n');
- error.append("Repositories searched:\n");
- URI[] repos = getMetadataRepositories(agent);
- if (repos != null) {
- for (int i = 0; i < repos.length; i++)
- error.append(repos[i] + "\n");
- }
- throw new ProvisionException(error.toString());
- }
-
- IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new ProvisionException("No planner service found.");
-
- IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException("No director service found.");
- ProvisioningContext context = new ProvisioningContext(agent);
- IProfileChangeRequest request = planner.createChangeRequest(profile);
- request.addAll(units.toUnmodifiableSet());
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
- return PlanExecutionHelper.executePlan(result, engine, context, progress);
- }
-
- static URI[] getArtifactRepositories(IProvisioningAgent agent) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (manager == null)
- // TODO log here
- return null;
- URI[] repos = manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- if (repos.length > 0)
- return repos;
- return null;
- }
-
- static IArtifactRepository getArtifactRepository(IProvisioningAgent agent, URI repoURL) {
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- try {
- if (manager != null)
- return manager.loadRepository(repoURL, null);
- } catch (ProvisionException e) {
- //for console, just ignore repositories that can't be read
- }
- return null;
- }
-
- static long[] getProfileTimestamps(IProvisioningAgent agent, String profileId) {
- if (profileId == null) {
- profileId = IProfileRegistry.SELF;
- }
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- return profileRegistry.listProfileTimestamps(profileId);
- }
-
- static IStatus revertToPreviousState(IProvisioningAgent agent, IProfile profile, long revertToPreviousState) throws ProvisionException {
- IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException("No p2 engine found.");
- IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new ProvisionException("No planner found.");
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- throw new ProvisionException("profile registry cannot be null");
- // If given profile is null, then get/use the self profile
- if (profile == null) {
- profile = getProfile(agent, IProfileRegistry.SELF);
- }
- IProfile targetProfile = null;
- if (revertToPreviousState == 0) {
- long[] profiles = profileRegistry.listProfileTimestamps(profile.getProfileId());
- if (profiles.length == 0)
- // Nothing to do, as the profile does not have any previous timestamps
- return Status.OK_STATUS;
- targetProfile = profileRegistry.getProfile(profile.getProfileId(), profiles[profiles.length - 1]);
- } else {
- targetProfile = profileRegistry.getProfile(profile.getProfileId(), revertToPreviousState);
- }
- if (targetProfile == null)
- throw new ProvisionException("target profile with timestamp=" + revertToPreviousState + " not found");
- URI[] artifactRepos = getArtifactRepositories(agent);
- URI[] metadataRepos = getMetadataRepositories(agent);
- IProvisioningPlan plan = planner.getDiffPlan(profile, targetProfile, new NullProgressMonitor());
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(metadataRepos);
- context.setArtifactRepositories(artifactRepos);
- return PlanExecutionHelper.executePlan(plan, engine, context, new NullProgressMonitor());
- }
-
- /**
- * Install the described IU
- */
- static IStatus uninstall(IProvisioningAgent agent, String unitId, String version, IProfile profile, IProgressMonitor progress) throws ProvisionException {
- if (profile == null)
- return null;
- IQueryResult<IInstallableUnit> units = profile.query(QueryUtil.createIUQuery(unitId, Version.create(version)), progress);
- if (units.isEmpty()) {
- StringBuffer error = new StringBuffer();
- error.append("Installable unit not found: " + unitId + ' ' + version + '\n');
- error.append("Repositories searched:\n");
- URI[] repos = getMetadataRepositories(agent);
- if (repos != null) {
- for (int i = 0; i < repos.length; i++)
- error.append(repos[i] + "\n"); //$NON-NLS-1$
- }
- throw new ProvisionException(error.toString());
- }
-
- IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new ProvisionException("No planner service found.");
-
- IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException("No engine service found.");
- ProvisioningContext context = new ProvisioningContext(agent);
- IProfileChangeRequest request = planner.createChangeRequest(profile);
- request.removeAll(units.toUnmodifiableSet());
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, progress);
- return PlanExecutionHelper.executePlan(result, engine, context, progress);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/.classpath b/bundles/org.eclipse.equinox.p2.core/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.core/.cvsignore b/bundles/org.eclipse.equinox.p2.core/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.core/.options b/bundles/org.eclipse.equinox.p2.core/.options
deleted file mode 100644
index a4d705ba4..000000000
--- a/bundles/org.eclipse.equinox.p2.core/.options
+++ /dev/null
@@ -1,41 +0,0 @@
-#Turn on debugging for p2
-org.eclipse.equinox.p2.core/debug=false
-
-#Detailed debugging information while parsing p2 data files
-org.eclipse.equinox.p2.core/core/parseproblems=false
-
-#Detailed debugging information when a repository is removed from a repository manager
-org.eclipse.equinox.p2.core/core/removeRepo=false
-
-#Detailed debugging information while parsing site.xml and feature.xml files in the generator
-org.eclipse.equinox.p2.core/generator/parsing=false
-
-#Detailed debugging information while saving/restoring the engine's install registry
-org.eclipse.equinox.p2.core/engine/installregistry=false
-
-#Detailed debugging information while saving/restoring profile preferences
-org.eclipse.equinox.p2.core/engine/profilepreferences=false
-
-#Detailed debugging information while saving/restoring metadata repositories
-org.eclipse.equinox.p2.core/metadata/parsing=false
-
-#Detailed debugging information about mirror selection
-org.eclipse.equinox.p2.core/artifacts/mirrors=false
-
-#Detailed debugging information about automatic update checking
-org.eclipse.equinox.p2.core/updatechecker=false
-
-#Detailed debugging information about the operands being generated
-org.eclipse.equinox.p2.core/planner/operands=false
-
-#Detailed debugging information about the projector
-org.eclipse.equinox.p2.core/planner/projector=false
-
-#Detailed debugging information about the reconciler
-org.eclipse.equinox.p2.core/reconciler=false
-
-#Detailed debugging information about the publisher
-org.eclipse.equinox.p2.core/publisher=false
-
-#Detailed debugging information about event clients
-org.eclipse.equinox.p2.core/events/client = false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.core/.project b/bundles/org.eclipse.equinox.p2.core/.project
deleted file mode 100644
index b15e13e09..000000000
--- a/bundles/org.eclipse.equinox.p2.core/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 545312e30..000000000
--- a/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,346 +0,0 @@
-#Tue Dec 22 00:34:34 CET 2009
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-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=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
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index c4540955a..000000000
--- a/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:48 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.api.tools.prefs b/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644
index 7b4e4a2c4..000000000
--- a/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.api.tools.prefs
+++ /dev/null
@@ -1,88 +0,0 @@
-#Wed Dec 03 12:05:24 EST 2008
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
diff --git a/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.core/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 228bbfcc5..000000000
--- a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,75 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.core;singleton:=true
-Bundle-Version: 2.0.100.qualifier
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.equinox.internal.p2.core.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.repository",
- org.eclipse.equinox.internal.p2.core.helpers;
- x-friends:="org.eclipse.equinox.frameworkadmin.test,
- org.eclipse.equinox.p2.artifact.optimizers,
- org.eclipse.equinox.p2.artifact.processors,
- org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.console,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.director.app,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.download,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.garbagecollector,
- org.eclipse.equinox.p2.installer,
- org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.ql,
- org.eclipse.equinox.p2.reconciler.dropins,
- org.eclipse.equinox.p2.repository,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.equinox.p2.repositoryoptimizer,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.touchpoint.natives,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.ui.admin,
- org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.ui.sdk.scheduler,
- org.eclipse.equinox.p2.updatechecker,
- org.eclipse.equinox.p2.updatechecker.app,
- org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.provisional.p2.core.eventbus;
- x-friends:="org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.garbagecollector,
- org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.repository,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.touchpoint.natives,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.ui.sdk.scheduler,
- org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.p2.core;version="2.0.0",
- org.eclipse.equinox.p2.core.spi;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Service-Component: OSGI-INF/eventBus.xml, OSGI-INF/agentProvider.xml
-Import-Package: org.eclipse.osgi.framework.eventmgr;version="1.2.0",
- org.eclipse.osgi.framework.log;version="1.0.0",
- org.eclipse.osgi.service.debug;version="1.0.0",
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.6.0",
- org.osgi.util.tracker;version="1.5.0"
diff --git a/bundles/org.eclipse.equinox.p2.core/OSGI-INF/agentProvider.xml b/bundles/org.eclipse.equinox.p2.core/OSGI-INF/agentProvider.xml
deleted file mode 100644
index adf24cc83..000000000
--- a/bundles/org.eclipse.equinox.p2.core/OSGI-INF/agentProvider.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.di.agentProvider">
- <implementation class="org.eclipse.equinox.internal.p2.core.DefaultAgentProvider"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.IProvisioningAgentProvider"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.core/OSGI-INF/eventBus.xml b/bundles/org.eclipse.equinox.p2.core/OSGI-INF/eventBus.xml
deleted file mode 100644
index cae6c4355..000000000
--- a/bundles/org.eclipse.equinox.p2.core/OSGI-INF/eventBus.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.core.eventbus">
- <implementation class="org.eclipse.equinox.internal.p2.core.EventBusComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus"/>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.core/about.html b/bundles/org.eclipse.equinox.p2.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.core/build.properties b/bundles/org.eclipse.equinox.p2.core/build.properties
deleted file mode 100644
index 98b717479..000000000
--- a/bundles/org.eclipse.equinox.p2.core/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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
-###############################################################################
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- OSGI-INF/
-src.includes = about.html
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.core/plugin.properties b/bundles/org.eclipse.equinox.p2.core/plugin.properties
deleted file mode 100644
index 228ee340f..000000000
--- a/bundles/org.eclipse.equinox.p2.core/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Core
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.core/pom.xml b/bundles/org.eclipse.equinox.p2.core/pom.xml
deleted file mode 100644
index 037ea71af..000000000
--- a/bundles/org.eclipse.equinox.p2.core/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.core</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
deleted file mode 100644
index bfa77c33d..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core;
-
-import java.io.File;
-import java.net.*;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class Activator implements BundleActivator {
- public static IAgentLocation agentDataLocation = null;
-
- public static BundleContext context;
- private static final String DEFAULT_AGENT_LOCATION = "../p2"; //$NON-NLS-1$
- public static final String ID = "org.eclipse.equinox.p2.core"; //$NON-NLS-1$
-
- private static Activator instance;
- // Data mode constants for user, configuration and data locations.
- private static final String NO_DEFAULT = "@noDefault"; //$NON-NLS-1$
- private static final String NONE = "@none"; //$NON-NLS-1$
-
- private static final String PROP_AGENT_DATA_AREA = "eclipse.p2.data.area"; //$NON-NLS-1$
- private static final String PROP_CONFIG_DIR = "osgi.configuration.area"; //$NON-NLS-1$
- private static final String PROP_USER_DIR = "user.dir"; //$NON-NLS-1$
- private static final String PROP_USER_HOME = "user.home"; //$NON-NLS-1$
-
- public static final String READ_ONLY_AREA_SUFFIX = ".readOnly"; //$NON-NLS-1$
-
- private static final String VAR_CONFIG_DIR = "@config.dir"; //$NON-NLS-1$
- private static final String VAR_USER_DIR = "@user.dir"; //$NON-NLS-1$
- private static final String VAR_USER_HOME = "@user.home"; //$NON-NLS-1$
-
- private IProvisioningAgent agent;
- private ServiceRegistration<IAgentLocation> agentLocationRegistration = null;
-
- ServiceTracker<FrameworkLog, FrameworkLog> logTracker;
-
- /**
- * NOTE: This method is copied from LocationHelper in org.eclipse.osgi
- * due to access restrictions.
- */
- private static URI adjustTrailingSlash(URI url, boolean trailingSlash) throws URISyntaxException {
- String file = url.toString();
- if (trailingSlash == (file.endsWith("/"))) //$NON-NLS-1$
- return url;
- file = trailingSlash ? file + "/" : file.substring(0, file.length() - 1); //$NON-NLS-1$
- return new URI(file);
- }
-
- /**
- * Builds a URL with the given specification
- * NOTE: This method is copied from LocationHelper in org.eclipse.osgi
- * due to access restrictions.
- *
- * @param spec the URL specification
- * @param trailingSlash flag to indicate a trailing slash on the spec
- * @return a URL
- */
- private static URI buildURL(String spec, boolean trailingSlash) {
- if (spec == null)
- return null;
- boolean isFile = spec.startsWith("file:"); //$NON-NLS-1$
- try {
- if (isFile)
- return adjustTrailingSlash(new File(spec.substring(5)).toURI(), trailingSlash);
- //for compatibility only allow non-file URI if it is also a legal URL
- //when given "c:/foo" we want to treat it as a file rather than a URI with protocol "c"
- new URL(spec);
- return new URI(spec);
- } catch (Exception e) {
- // if we failed and it is a file spec, there is nothing more we can do
- // otherwise, try to make the spec into a file URL.
- if (isFile)
- return null;
- try {
- return adjustTrailingSlash(new File(spec).toURI(), trailingSlash);
- } catch (URISyntaxException e1) {
- return null;
- }
- }
- }
-
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the framework log, or null if not available
- */
- public static FrameworkLog getFrameworkLog() {
- //protect against concurrent shutdown
- Activator a = instance;
- if (a == null)
- return null;
- ServiceTracker<FrameworkLog, FrameworkLog> tracker = a.getLogTracker();
- if (tracker == null)
- return null;
- return tracker.getService();
- }
-
- private static String substituteVar(String source, String var, String prop) {
- String value = Activator.context.getProperty(prop);
- if (value == null)
- value = ""; //$NON-NLS-1$
- return value + source.substring(var.length());
- }
-
- private IAgentLocation buildLocation(String property, URI defaultLocation, boolean readOnlyDefault, boolean addTrailingSlash) {
- String location = Activator.context.getProperty(property);
- // if the instance location is not set, predict where the workspace will be and
- // put the instance area inside the workspace meta area.
- if (location == null)
- return new AgentLocation(defaultLocation);
- if (location.equalsIgnoreCase(NONE))
- return null;
- if (location.equalsIgnoreCase(NO_DEFAULT))
- return new AgentLocation(null);
- if (location.startsWith(VAR_USER_HOME)) {
- String base = substituteVar(location, VAR_USER_HOME, PROP_USER_HOME);
- location = new Path(base).toFile().getAbsolutePath();
- } else if (location.startsWith(VAR_USER_DIR)) {
- String base = substituteVar(location, VAR_USER_DIR, PROP_USER_DIR);
- location = new Path(base).toFile().getAbsolutePath();
- } else if (location.startsWith(VAR_CONFIG_DIR)) {
- //note the config dir system property is already a URL
- location = substituteVar(location, VAR_CONFIG_DIR, PROP_CONFIG_DIR);
- }
- URI url = buildURL(location, addTrailingSlash);
- AgentLocation result = null;
- if (url != null) {
- result = new AgentLocation(url);
- }
- return result;
- }
-
- private ServiceTracker<FrameworkLog, FrameworkLog> getLogTracker() {
- if (logTracker != null)
- return logTracker;
- //lazy init if the bundle has been started
- if (context == null)
- return null;
- logTracker = new ServiceTracker<FrameworkLog, FrameworkLog>(context, FrameworkLog.class, null);
- logTracker.open();
- return logTracker;
- }
-
- /**
- * Register the agent instance representing the currently running system.
- * This will be the "default" agent for anyone not specifically trying to manipulate
- * a different p2 agent location
- */
- private void registerAgent() {
- //no need to register an agent if there is no agent location
- if (agentDataLocation == null)
- return;
- ServiceReference<IProvisioningAgentProvider> agentProviderRef = context.getServiceReference(IProvisioningAgentProvider.class);
- IProvisioningAgentProvider provider = null;
- if (agentProviderRef != null)
- provider = context.getService(agentProviderRef);
-
- if (provider == null) {
- // If we don't have a provider, which could happen if the p2.core bundle is
- // eagerly started, we should create one.
- provider = new DefaultAgentProvider();
- ((DefaultAgentProvider) provider).activate(context);
- }
-
- try {
- agent = provider.createAgent(null);
- } catch (Exception e) {
- final String msg = "Unable to instantiate p2 agent at location " + agentDataLocation.getRootLocation(); //$NON-NLS-1$
- LogHelper.log(new Status(IStatus.ERROR, ID, msg, e));
- }
- }
-
- public void start(BundleContext aContext) throws Exception {
- instance = this;
- Activator.context = aContext;
- URI defaultLocation = URIUtil.fromString(aContext.getProperty(PROP_CONFIG_DIR) + DEFAULT_AGENT_LOCATION + '/');
- agentDataLocation = buildLocation(PROP_AGENT_DATA_AREA, defaultLocation, false, true);
- Dictionary<String, Object> locationProperties = new Hashtable<String, Object>();
- if (agentDataLocation != null) {
- locationProperties.put("type", PROP_AGENT_DATA_AREA); //$NON-NLS-1$
- agentLocationRegistration = aContext.registerService(IAgentLocation.class, agentDataLocation, locationProperties);
- }
- registerAgent();
- }
-
- public void stop(BundleContext aContext) throws Exception {
- unregisterAgent();
- instance = null;
- agentDataLocation = null;
- if (agentLocationRegistration != null)
- agentLocationRegistration.unregister();
- if (logTracker != null) {
- logTracker.close();
- logTracker = null;
- }
- Activator.context = null;
- }
-
- private void unregisterAgent() {
- if (agent != null) {
- agent.stop();
- agent = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/AgentLocation.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/AgentLocation.java
deleted file mode 100644
index 75849e02f..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/AgentLocation.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core;
-
-import java.net.URI;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-
-/**
- * Internal class.
- */
-public class AgentLocation implements IAgentLocation {
-
- private URI location = null;
-
- public AgentLocation(URI location) {
- this.location = location;
- }
-
- public synchronized URI getRootLocation() {
- return location;
- }
-
- public URI getDataArea(String touchpointId) {
- return URIUtil.append(getRootLocation(), touchpointId + '/');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
deleted file mode 100644
index 3d0f4bc60..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/DefaultAgentProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core;
-
-import java.net.URI;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.equinox.p2.core.*;
-import org.osgi.framework.*;
-
-/**
- * Default implementation of {@link IProvisioningAgentProvider}.
- */
-public class DefaultAgentProvider implements IProvisioningAgentProvider {
- private BundleContext context;
-
- public void activate(BundleContext aContext) {
- this.context = aContext;
- }
-
- public IProvisioningAgent createAgent(URI location) {
- ProvisioningAgent result = new ProvisioningAgent();
- result.setBundleContext(context);
- result.setLocation(location);
- IAgentLocation agentLocation = (IAgentLocation) result.getService(IAgentLocation.SERVICE_NAME);
- Dictionary<String, Object> properties = new Hashtable<String, Object>(5);
- if (agentLocation != null)
- properties.put("locationURI", String.valueOf(agentLocation.getRootLocation())); //$NON-NLS-1$
- //make the currently running system have a higher service ranking
- if (location == null) {
- properties.put(Constants.SERVICE_RANKING, new Integer(100));
- properties.put(IProvisioningAgent.SERVICE_CURRENT, Boolean.TRUE.toString());
- }
- ServiceRegistration<IProvisioningAgent> reg = context.registerService(IProvisioningAgent.class, result, properties);
- result.setServiceRegistration(reg);
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/EventBusComponent.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/EventBusComponent.java
deleted file mode 100644
index 095efdee3..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/EventBusComponent.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core;
-
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-
-/**
- * Factory for creating {@link IProvisioningEventBus} instances.
- */
-public class EventBusComponent implements IAgentServiceFactory {
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentServiceFactory#createService(org.eclipse.equinox.p2.core.IProvisioningAgent)
- */
- public Object createService(IProvisioningAgent agent) {
- return new ProvisioningEventBus();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java
deleted file mode 100644
index 32a6a30ef..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningAgent.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentService;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-/**
- * Represents a p2 agent instance.
- */
-public class ProvisioningAgent implements IProvisioningAgent, ServiceTrackerCustomizer<IAgentServiceFactory, Object> {
-
- private final Map<String, Object> agentServices = Collections.synchronizedMap(new HashMap<String, Object>());
- private BundleContext context;
- private volatile boolean stopped = false;
- private ServiceRegistration<IProvisioningAgent> reg;
- private final Map<ServiceReference<IAgentServiceFactory>, ServiceTracker<IAgentServiceFactory, Object>> trackers = Collections.synchronizedMap(new HashMap<ServiceReference<IAgentServiceFactory>, ServiceTracker<IAgentServiceFactory, Object>>());
-
- /**
- * Instantiates a provisioning agent.
- */
- public ProvisioningAgent() {
- super();
- registerService(IProvisioningAgent.INSTALLER_AGENT, this);
- registerService(IProvisioningAgent.INSTALLER_PROFILEID, "_SELF_"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.core.IProvisioningAgent#getService(java.lang.String)
- */
- public Object getService(String serviceName) {
- //synchronize so concurrent gets always obtain the same service
- synchronized (agentServices) {
- checkRunning();
- Object service = agentServices.get(serviceName);
- if (service != null)
- return service;
- //attempt to get factory service from service registry
- Collection<ServiceReference<IAgentServiceFactory>> refs;
- try {
- refs = context.getServiceReferences(IAgentServiceFactory.class, "(" + IAgentServiceFactory.PROP_CREATED_SERVICE_NAME + '=' + serviceName + ')'); //$NON-NLS-1$
- } catch (InvalidSyntaxException e) {
- e.printStackTrace();
- return null;
- }
- if (refs == null || refs.isEmpty())
- return null;
- ServiceReference<IAgentServiceFactory> firstRef = refs.iterator().next();
- //track the factory so that we can automatically remove the service when the factory goes away
- ServiceTracker<IAgentServiceFactory, Object> tracker = new ServiceTracker<IAgentServiceFactory, Object>(context, firstRef, this);
- tracker.open();
- IAgentServiceFactory factory = (IAgentServiceFactory) tracker.getService();
- if (factory == null) {
- tracker.close();
- return null;
- }
- service = factory.createService(this);
- if (service == null) {
- tracker.close();
- return null;
- }
- registerService(serviceName, service);
- trackers.put(firstRef, tracker);
- return service;
- }
- }
-
- private void checkRunning() {
- if (stopped)
- throw new IllegalStateException("Attempt to access stopped agent: " + this); //$NON-NLS-1$
- }
-
- public void registerService(String serviceName, Object service) {
- checkRunning();
- agentServices.put(serviceName, service);
- if (service instanceof IAgentService)
- ((IAgentService) service).start();
- }
-
- public void setBundleContext(BundleContext context) {
- this.context = context;
- }
-
- public void setLocation(URI location) {
- //treat a null location as using the currently running platform
- IAgentLocation agentLocation = null;
- if (location == null) {
- ServiceReference<IAgentLocation> ref = context.getServiceReference(IAgentLocation.class);
- if (ref != null) {
- agentLocation = context.getService(ref);
- context.ungetService(ref);
- }
- } else {
- agentLocation = new AgentLocation(location);
- }
- registerService(IAgentLocation.SERVICE_NAME, agentLocation);
- }
-
- public void unregisterService(String serviceName, Object service) {
- synchronized (agentServices) {
- if (stopped)
- return;
- if (agentServices.get(serviceName) == service)
- agentServices.remove(serviceName);
- }
- if (service instanceof IAgentService)
- ((IAgentService) service).stop();
- }
-
- public void stop() {
- List<Object> toStop;
- synchronized (agentServices) {
- toStop = new ArrayList<Object>(agentServices.values());
- }
- //give services a chance to do their own shutdown
- for (Object service : toStop) {
- if (service instanceof IAgentService)
- if (service != this)
- ((IAgentService) service).stop();
- }
- stopped = true;
- //close all service trackers
- synchronized (trackers) {
- for (ServiceTracker<IAgentServiceFactory, Object> t : trackers.values())
- t.close();
- trackers.clear();
- }
- if (reg != null) {
- reg.unregister();
- reg = null;
- }
- }
-
- public void setServiceRegistration(ServiceRegistration<IProvisioningAgent> reg) {
- this.reg = reg;
- }
-
- /*(non-Javadoc)
- * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
- */
- public Object addingService(ServiceReference<IAgentServiceFactory> reference) {
- if (stopped)
- return null;
- return context.getService(reference);
- }
-
- /*(non-Javadoc)
- * @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)
- */
- public void modifiedService(ServiceReference<IAgentServiceFactory> reference, Object service) {
- //nothing to do
- }
-
- /*(non-Javadoc)
- * @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
- */
- public void removedService(ServiceReference<IAgentServiceFactory> reference, Object factoryService) {
- if (stopped)
- return;
- String serviceName = (String) reference.getProperty(IAgentServiceFactory.PROP_CREATED_SERVICE_NAME);
- if (serviceName == null)
- return;
- Object registered = agentServices.get(serviceName);
- if (registered == null)
- return;
- if (FrameworkUtil.getBundle(registered.getClass()) == FrameworkUtil.getBundle(factoryService.getClass())) {
- //the service we are holding is going away
- unregisterService(serviceName, registered);
- ServiceTracker<IAgentServiceFactory, Object> toRemove = trackers.remove(reference);
- if (toRemove != null)
- toRemove.close();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java
deleted file mode 100644
index 883b95243..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/ProvisioningEventBus.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core;
-
-import java.util.EventObject;
-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.provisional.p2.core.eventbus.*;
-import org.eclipse.equinox.p2.core.spi.IAgentService;
-import org.eclipse.osgi.framework.eventmgr.*;
-
-/**
- * Default implementation of the {@link IProvisioningEventBus} service.
- */
-public class ProvisioningEventBus implements EventDispatcher<ProvisioningListener, ProvisioningListener, EventObject>, IProvisioningEventBus, IAgentService {
- private final CopyOnWriteIdentityMap<ProvisioningListener, ProvisioningListener> syncListeners = new CopyOnWriteIdentityMap<ProvisioningListener, ProvisioningListener>();
- private final CopyOnWriteIdentityMap<ProvisioningListener, ProvisioningListener> asyncListeners = new CopyOnWriteIdentityMap<ProvisioningListener, ProvisioningListener>();
- private EventManager eventManager = new EventManager("Provisioning Event Dispatcher"); //$NON-NLS-1$
-
- private Object dispatchEventLock = new Object();
- /* @GuardedBy("dispatchEventLock") */
- private boolean closed = false;
- /* @GuardedBy("dispatchEventLock") */
- private int dispatchingEvents = 0;
-
- public ProvisioningEventBus() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus#addListener(org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener)
- */
- public void addListener(ProvisioningListener toAdd) {
- if (toAdd instanceof SynchronousProvisioningListener) {
- synchronized (syncListeners) {
- syncListeners.put(toAdd, toAdd);
- }
- } else {
- synchronized (asyncListeners) {
- asyncListeners.put(toAdd, toAdd);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus#removeListener(org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener)
- */
- public void removeListener(ProvisioningListener toRemove) {
- if (toRemove instanceof SynchronousProvisioningListener) {
- synchronized (syncListeners) {
- syncListeners.remove(toRemove);
- }
- } else {
- synchronized (asyncListeners) {
- asyncListeners.remove(toRemove);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus#publishEvent(java.util.EventObject)
- */
- public void publishEvent(EventObject event) {
- synchronized (dispatchEventLock) {
- if (closed)
- return;
- }
- /* queue to hold set of listeners */
- ListenerQueue<ProvisioningListener, ProvisioningListener, EventObject> listeners = new ListenerQueue<ProvisioningListener, ProvisioningListener, EventObject>(eventManager);
-
- /* synchronize while building the listener list */
- synchronized (syncListeners) {
- /* add set of BundleContexts w/ listeners to queue */
- listeners.queueListeners(syncListeners.entrySet(), this);
- /* synchronously dispatch to populate listeners queue */
- listeners.dispatchEventSynchronous(0, event);
- }
-
- listeners = new ListenerQueue<ProvisioningListener, ProvisioningListener, EventObject>(eventManager);
- synchronized (asyncListeners) {
- listeners.queueListeners(asyncListeners.entrySet(), this);
- synchronized (dispatchEventLock) {
- if (!closed)
- listeners.dispatchEventAsynchronous(0, event);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus#dispatchEvent(java.lang.Object, java.lang.Object, int, java.lang.Object)
- */
- public void dispatchEvent(ProvisioningListener eventListener, ProvisioningListener listenerObject, int eventAction, EventObject eventObject) {
- synchronized (dispatchEventLock) {
- if (closed)
- return;
- dispatchingEvents++;
- }
- try {
- eventListener.notify(eventObject);
- } catch (Exception e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Exception during event notification", e)); //$NON-NLS-1$
- } finally {
- synchronized (dispatchEventLock) {
- dispatchingEvents--;
- if (dispatchingEvents == 0)
- dispatchEventLock.notifyAll();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus#close()
- */
- public void close() {
- boolean interrupted = false;
- synchronized (dispatchEventLock) {
- eventManager.close();
- closed = true;
- while (dispatchingEvents != 0) {
- try {
- dispatchEventLock.wait(30000); // we're going to cap waiting time at 30s
- break;
- } catch (InterruptedException e) {
- // keep waiting but flag interrupted
- interrupted = true;
- }
- }
- }
- if (interrupted)
- Thread.currentThread().interrupt();
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentService#start()
- */
- public void start() {
- //nothing to do
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentService#stop()
- */
- public void stop() {
- close();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java
deleted file mode 100644
index 5bea8c961..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/CollectionUtils.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.io.*;
-import java.lang.reflect.Array;
-import java.util.*;
-
-/**
- * Helper class that provides some useful support when dealing with collections.
- */
-public class CollectionUtils {
-
- /**
- * A unmodifiable {@link List} implementation on top of an object array.
- * @param <E> The element type.
- */
- private static class UnmodifiableArrayList<E> extends AbstractList<E> implements RandomAccess, java.io.Serializable {
- private static final long serialVersionUID = 7435304230643855579L;
- final E[] array;
-
- UnmodifiableArrayList(E[] array) {
- this.array = array;
- }
-
- public boolean contains(Object o) {
- return indexOf(o) != -1;
- }
-
- public E get(int index) {
- return array[index];
- }
-
- public int indexOf(Object o) {
- int size = array.length;
- if (o == null) {
- for (int i = 0; i < size; i++)
- if (array[i] == null)
- return i;
- } else {
- for (int i = 0; i < size; i++)
- if (o.equals(array[i]))
- return i;
- }
- return -1;
- }
-
- public Iterator<E> iterator() {
- return listIterator();
- }
-
- /**
- * Rapid iterator, motivated by the fact that we don't need to check
- * for concurrent modifications.
- */
- public ListIterator<E> listIterator() {
- return new ListIterator<E>() {
- private int index = 0;
-
- public boolean hasNext() {
- return index < array.length;
- }
-
- public E next() {
- if (index >= array.length)
- throw new NoSuchElementException();
- return array[index++];
- }
-
- public boolean hasPrevious() {
- return index > 0;
- }
-
- public E previous() {
- if (--index < 0) {
- ++index;
- throw new NoSuchElementException();
- }
- return array[index];
- }
-
- public int nextIndex() {
- return index;
- }
-
- public int previousIndex() {
- return index - 1;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public void set(E e) {
- throw new UnsupportedOperationException();
- }
-
- public void add(E e) {
- throw new UnsupportedOperationException();
- }
- };
- }
-
- public int lastIndexOf(Object o) {
- int idx = array.length;
- if (o == null) {
- while (--idx >= 0)
- if (array[idx] == null)
- return idx;
- } else {
- while (--idx >= 0)
- if (o.equals(array[idx]))
- return idx;
- }
- return -1;
- }
-
- public E set(int index, E element) {
- throw new UnsupportedOperationException();
- }
-
- public int size() {
- return array.length;
- }
-
- public Object[] toArray() {
- return array.clone();
- }
-
- @SuppressWarnings("unchecked")
- public <T> T[] toArray(T[] a) {
- int size = array.length;
- if (a.length < size)
- a = (T[]) Array.newInstance(a.getClass().getComponentType(), size);
- System.arraycopy(this.array, 0, a, 0, size);
- while (size < a.length)
- a[size++] = null;
- return a;
- }
- }
-
- /**
- * Creates a combined hash for an array of objects.
- * @param objects The objects to hash
- * @return The combined hashCode of the objects.
- */
- public static int hashCode(Object objects[]) {
- if (objects == null)
- return 0;
-
- int result = 1;
- int idx = objects.length;
- while (--idx >= 0) {
- Object object = objects[idx];
- result = 17 * result + (object == null ? 0 : object.hashCode());
- }
- return result;
- }
-
- /**
- * The emptyList() method was introduced in Java 1.5 so we need this here to be able to
- * down compile to 1.4.
- * @param <T> The type of the elements
- * @return An empty list
- */
- @SuppressWarnings("unchecked")
- public static <T> List<T> emptyList() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * The emptySet() method was introduced in Java 1.5 so we need this here to be able to
- * down compile to 1.4.
- * @param <T> The type of the elements
- * @return An empty set
- */
- @SuppressWarnings("unchecked")
- public static <T> Set<T> emptySet() {
- return Collections.EMPTY_SET;
- }
-
- /**
- * The emptyMap() method was introduced in Java 1.5 so we need this here to be able to
- * down compile to 1.4.
- * @param <K> The type of the map keys
- * @param <V> The type of the map values
- * @return An empty set
- */
- @SuppressWarnings("unchecked")
- public static <K, V> Map<K, V> emptyMap() {
- return Collections.EMPTY_MAP;
- }
-
- /**
- * Returns an unmodifiable list that is backed by the <code>array</code>.
- * @param <T> The list element type
- * @param array The array of elements
- * @return The unmodifiable list
- */
- public static <T> List<T> unmodifiableList(T[] array) {
- return array == null || array.length == 0 ? CollectionUtils.<T> emptyList() : new UnmodifiableArrayList<T>(array);
- }
-
- /**
- * Reads a property list using the {@link Properties#load(InputStream)} method. The
- * properties are stored in a map.
- * @param stream The stream to read from
- * @return The resulting map
- * @throws IOException propagated from the load method.
- */
- public static Map<String, String> loadProperties(InputStream stream) throws IOException {
- Properties properties = new Properties();
- properties.load(stream);
- return toMap(properties);
- }
-
- /**
- * Copies all elements from <code>properties</code> into a Map. The returned map might be unmodifiable
- * @param properties
- * @return The map containing all elements
- */
- public static Map<String, String> toMap(Properties properties) {
- if (properties == null || properties.isEmpty())
- return emptyMap();
-
- Map<String, String> props = new HashMap<String, String>(properties.size());
- putAll(properties, props);
- return props;
- }
-
- /**
- * Copies all elements from <code>properties</code> into the given <code>result</code>.
- * @param properties
- * @param result
- */
- public static void putAll(Properties properties, Map<String, String> result) {
- for (Enumeration<Object> keys = properties.keys(); keys.hasMoreElements();) {
- String key = (String) keys.nextElement();
- result.put(key, properties.getProperty(key));
- }
- }
-
- /**
- * Stores the properties using {@link Properties#store(OutputStream, String)} on the given <code>stream</code>.
- * @param properties The properties to store
- * @param stream The stream to store to
- * @param comment The comment to use
- * @throws IOException
- */
- public static void storeProperties(Map<String, String> properties, OutputStream stream, String comment) throws IOException {
- Properties props = new Properties();
- props.putAll(properties);
- props.store(stream, comment);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java
deleted file mode 100644
index ded76dffc..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/FileUtils.java
+++ /dev/null
@@ -1,497 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.io.*;
-import java.util.*;
-import java.util.jar.JarFile;
-import java.util.zip.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.osgi.util.NLS;
-
-public class FileUtils {
-
- private static File[] untarFile(File source, File outputDir) throws IOException, TarException {
- TarFile tarFile = new TarFile(source);
- List<File> untarredFiles = new ArrayList<File>();
- try {
- for (Enumeration<TarEntry> e = tarFile.entries(); e.hasMoreElements();) {
- TarEntry entry = e.nextElement();
- InputStream input = tarFile.getInputStream(entry);
- try {
- File outFile = new File(outputDir, entry.getName());
- outFile = outFile.getCanonicalFile(); //bug 266844
- untarredFiles.add(outFile);
- if (entry.getFileType() == TarEntry.DIRECTORY) {
- outFile.mkdirs();
- } else {
- if (outFile.exists())
- outFile.delete();
- else
- outFile.getParentFile().mkdirs();
- try {
- copyStream(input, false, new FileOutputStream(outFile), true);
- } catch (FileNotFoundException e1) {
- // TEMP: ignore this for now in case we're trying to replace
- // a running eclipse.exe
- }
- outFile.setLastModified(entry.getTime());
- }
- } finally {
- input.close();
- }
- }
- } finally {
- tarFile.close();
- }
- return untarredFiles.toArray(new File[untarredFiles.size()]);
- }
-
- /**
- * Unzip from a File to an output directory.
- */
- public static File[] unzipFile(File zipFile, File outputDir) throws IOException {
- // check to see if we have a tar'd and gz'd file
- if (zipFile.getName().toLowerCase().endsWith(".tar.gz")) { //$NON-NLS-1$
- try {
- return untarFile(zipFile, outputDir);
- } catch (TarException e) {
- throw new IOException(e.getMessage());
- }
- }
- InputStream in = new FileInputStream(zipFile);
- try {
- return unzipStream(in, zipFile.length(), outputDir, null, null);
- } catch (IOException e) {
- // add the file name to the message
- throw new IOException(NLS.bind(Messages.Util_Error_Unzipping, zipFile, e.getMessage()));
- } finally {
- in.close();
- }
- }
-
- /**
- * Unzip from a File to an output directory, with progress indication.
- * monitor may be null.
- */
- public static File[] unzipFile(File zipFile, File outputDir, String taskName, IProgressMonitor monitor) throws IOException {
- InputStream in = new FileInputStream(zipFile);
- try {
- return unzipStream(in, zipFile.length(), outputDir, taskName, monitor);
- } catch (IOException e) {
- // add the file name to the message
- throw new IOException(NLS.bind(Messages.Util_Error_Unzipping, zipFile, e.getMessage()));
- } finally {
- in.close();
- }
- }
-
- /**
- * Unzip from an InputStream to an output directory.
- */
- public static File[] unzipStream(InputStream stream, long size, File outputDir, String taskName, IProgressMonitor monitor) throws IOException {
- InputStream is = monitor == null ? stream : stream; // new ProgressMonitorInputStream(stream, size, size, taskName, monitor); TODO Commented code
- ZipInputStream in = new ZipInputStream(new BufferedInputStream(is));
- ZipEntry ze = in.getNextEntry();
- if (ze == null) {
- // There must be at least one entry in a zip file.
- // When there isn't getNextEntry returns null.
- in.close();
- throw new IOException(Messages.Util_Invalid_Zip_File_Format);
- }
- ArrayList<File> unzippedFiles = new ArrayList<File>();
- do {
- File outFile = new File(outputDir, ze.getName());
- unzippedFiles.add(outFile);
- if (ze.isDirectory()) {
- outFile.mkdirs();
- } else {
- if (outFile.exists()) {
- outFile.delete();
- } else {
- outFile.getParentFile().mkdirs();
- }
- try {
- copyStream(in, false, new FileOutputStream(outFile), true);
- } catch (FileNotFoundException e) {
- // TEMP: ignore this for now in case we're trying to replace
- // a running eclipse.exe
- }
- outFile.setLastModified(ze.getTime());
- }
- in.closeEntry();
- } while ((ze = in.getNextEntry()) != null);
- in.close();
-
- return unzippedFiles.toArray(new File[unzippedFiles.size()]);
- }
-
- // Delete empty directories under dir, including dir itself.
- public static void deleteEmptyDirs(File dir) throws IOException {
- File[] files = dir.listFiles();
- if (files != null) {
- for (int i = 0; i < files.length; i += 1) {
- deleteEmptyDirs(files[i]);
- }
- dir.getCanonicalFile().delete();
- }
- }
-
- // Delete the given file whether it is a file or a directory
- public static void deleteAll(File file) {
- if (!file.exists())
- return;
- if (file.isDirectory()) {
- File[] files = file.listFiles();
- if (files != null)
- for (int i = 0; i < files.length; i++)
- deleteAll(files[i]);
- }
- file.delete();
- }
-
- /**
- * Copy an input stream to an output stream.
- * Optionally close the streams when done.
- * Return the number of bytes written.
- */
- public static int copyStream(InputStream in, boolean closeIn, OutputStream out, boolean closeOut) throws IOException {
- try {
- int written = 0;
- byte[] buffer = new byte[16 * 1024];
- int len;
- while ((len = in.read(buffer)) != -1) {
- out.write(buffer, 0, len);
- written += len;
- }
- return written;
- } finally {
- try {
- if (closeIn) {
- in.close();
- }
- } finally {
- if (closeOut) {
- out.close();
- }
- }
- }
- }
-
- public static void copy(File source, File destination, File root, boolean overwrite) throws IOException {
- File sourceFile = new File(source, root.getPath());
- if (!sourceFile.exists())
- throw new FileNotFoundException("Source: " + sourceFile + " does not exist"); //$NON-NLS-1$//$NON-NLS-2$
-
- File destinationFile = new File(destination, root.getPath());
-
- if (destinationFile.exists())
- if (overwrite)
- deleteAll(destinationFile);
- else
- throw new IOException("Destination: " + destinationFile + " already exists"); //$NON-NLS-1$//$NON-NLS-2$
- if (sourceFile.isDirectory()) {
- destinationFile.mkdirs();
- File[] list = sourceFile.listFiles();
- for (int i = 0; i < list.length; i++)
- copy(source, destination, new File(root, list[i].getName()), false);
- } else {
- destinationFile.getParentFile().mkdirs();
- InputStream in = null;
- OutputStream out = null;
- try {
- in = new BufferedInputStream(new FileInputStream(sourceFile));
- out = new BufferedOutputStream(new FileOutputStream(destinationFile));
- copyStream(in, false, out, false);
- } finally {
- try {
- if (in != null)
- in.close();
- } finally {
- if (out != null)
- out.close();
- }
- }
- }
- }
-
- /**
- * Creates a zip archive at the given destination that contains all of the given inclusions
- * except for the given exclusions. Inclusions and exclusions can be phrased as files or folders.
- * Including a folder implies that all files and folders under the folder
- * should be considered for inclusion. Excluding a folder implies that all files and folders
- * under that folder will be excluded. Inclusions with paths deeper than an exclusion folder
- * are filtered out and do not end up in the resultant archive.
- * <p>
- * All entries in the archive are computed using the given path computer. the path computer
- * is reset between every explicit entry in the inclusions list.
- * </p>
- * @param inclusions the set of files and folders to be considered for inclusion in the result
- * @param exclusions the set of files and folders to be excluded from the result. May be <code>null</code>.
- * @param destinationArchive the location of the resultant archive
- * @param pathComputer the path computer used to create the path of the files in the result
- * @throws IOException if there is an IO issue during this operation.
- */
- public static void zip(File[] inclusions, File[] exclusions, File destinationArchive, IPathComputer pathComputer) throws IOException {
- FileOutputStream fileOutput = new FileOutputStream(destinationArchive);
- ZipOutputStream output = new ZipOutputStream(fileOutput);
- HashSet<File> exclusionSet = exclusions == null ? new HashSet<File>() : new HashSet<File>(Arrays.asList(exclusions));
- HashSet<IPath> directoryEntries = new HashSet<IPath>();
- try {
- for (int i = 0; i < inclusions.length; i++) {
- pathComputer.reset();
- zip(output, inclusions[i], exclusionSet, pathComputer, directoryEntries);
- }
- } finally {
- try {
- output.close();
- } catch (IOException e) {
- // closing a zip file with no entries apparently fails on some JREs.
- // if we failed closing the zip, try closing the raw file.
- try {
- fileOutput.close();
- } catch (IOException e2) {
- // give up.
- }
- }
- }
- }
-
- /**
- * Writes the given file or folder to the given ZipOutputStream. The stream is not closed, we recurse into folders
- * @param output - the ZipOutputStream to write into
- * @param source - the file or folder to zip
- * @param exclusions - set of files or folders to exclude
- * @param pathComputer - computer used to create the path of the files in the result.
- * @throws IOException
- */
- public static void zip(ZipOutputStream output, File source, Set<File> exclusions, IPathComputer pathComputer) throws IOException {
- zip(output, source, exclusions, pathComputer, new HashSet<IPath>());
- }
-
- public static void zip(ZipOutputStream output, File source, Set<File> exclusions, IPathComputer pathComputer, Set<IPath> directoryEntries) throws IOException {
- if (exclusions.contains(source))
- return;
- if (source.isDirectory()) //if the file path is a URL then isDir and isFile are both false
- zipDir(output, source, exclusions, pathComputer, directoryEntries);
- else
- zipFile(output, source, pathComputer, directoryEntries);
- }
-
- private static void zipDirectoryEntry(ZipOutputStream output, IPath entry, long time, Set<IPath> directoryEntries) throws IOException {
- entry = entry.addTrailingSeparator();
- if (!directoryEntries.contains(entry)) {
- //make sure parent entries are in the zip
- if (entry.segmentCount() > 1)
- zipDirectoryEntry(output, entry.removeLastSegments(1), time, directoryEntries);
-
- try {
- ZipEntry dirEntry = new ZipEntry(entry.toString());
- dirEntry.setTime(time);
- output.putNextEntry(dirEntry);
- directoryEntries.add(entry);
- } catch (ZipException ze) {
- //duplicate entries shouldn't happen because we checked the set
- } finally {
- try {
- output.closeEntry();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- }
-
- /*
- * Zip the contents of the given directory into the zip file represented by
- * the given zip stream. Prepend the given prefix to the file paths.
- */
- private static void zipDir(ZipOutputStream output, File source, Set<File> exclusions, IPathComputer pathComputer, Set<IPath> directoryEntries) throws IOException {
- File[] files = source.listFiles();
- if (files.length == 0) {
- zipDirectoryEntry(output, pathComputer.computePath(source), source.lastModified(), directoryEntries);
- }
-
- // Different OSs return files in a different order. This affects the creation
- // the dynamic path computer. To address this, we sort the files such that
- // those with deeper paths appear later, and files are always before directories
- // foo/bar.txt
- // foo/something/bar2.txt
- // foo/something/else/bar3.txt
- Arrays.sort(files, new Comparator<File>() {
- public int compare(File arg0, File arg1) {
- Path a = new Path(arg0.getAbsolutePath());
- Path b = new Path(arg1.getAbsolutePath());
- if (a.segmentCount() == b.segmentCount()) {
- if (arg0.isDirectory() && arg1.isFile())
- return 1;
- else if (arg0.isDirectory() && arg1.isDirectory())
- return 0;
- else if (arg0.isFile() && arg1.isDirectory())
- return -1;
- else
- return 0;
- }
- return a.segmentCount() - b.segmentCount();
- }
- });
-
- for (int i = 0; i < files.length; i++)
- zip(output, files[i], exclusions, pathComputer, directoryEntries);
- }
-
- /*
- * Add the given file to the zip file represented by the specified stream.
- * Prepend the given prefix to the path of the file.
- */
- private static void zipFile(ZipOutputStream output, File source, IPathComputer pathComputer, Set<IPath> directoryEntries) throws IOException {
- boolean isManifest = false; //manifest files are special
- InputStream input = new BufferedInputStream(new FileInputStream(source));
- try {
- IPath entryPath = pathComputer.computePath(source);
- if (entryPath.isAbsolute())
- throw new IOException(Messages.Util_Absolute_Entry);
- if (entryPath.segmentCount() == 0)
- throw new IOException(Messages.Util_Empty_Zip_Entry);
-
- //make sure parent directory entries are in the zip
- if (entryPath.segmentCount() > 1) {
- //manifest files should be first, add their directory entry afterwards
- isManifest = JarFile.MANIFEST_NAME.equals(entryPath.toString());
- if (!isManifest)
- zipDirectoryEntry(output, entryPath.removeLastSegments(1), source.lastModified(), directoryEntries);
- }
-
- ZipEntry zipEntry = new ZipEntry(entryPath.toString());
- zipEntry.setTime(source.lastModified());
- output.putNextEntry(zipEntry);
- copyStream(input, true, output, false);
- } catch (ZipException ze) {
- //TODO: something about duplicate entries, and rethrow other exceptions
- } finally {
- try {
- input.close();
- } catch (IOException e) {
- // ignore
- }
- try {
- output.closeEntry();
- } catch (IOException e) {
- // ignore
- }
- }
-
- if (isManifest) {
- zipDirectoryEntry(output, new Path("META-INF"), source.lastModified(), directoryEntries); //$NON-NLS-1$
- }
- }
-
- /**
- * Path computers are used to transform a given File path into a path suitable for use
- * as the to identify that file in an archive file or copy.
- */
- public static interface IPathComputer {
- /**
- * Returns the path representing the given file. Often this trims or otherwise
- * transforms the segments of the source file path.
- * @param source the file path to be transformed
- * @return the transformed path
- */
- public IPath computePath(File source);
-
- /**
- * Resets this path computer. Path computers can accumulate state or other information
- * for use in computing subsequent paths. Resetting a computer causes it to flush that
- * state and start afresh. The exact semantics of resetting depends on the nature of the
- * computer itself.
- */
- public void reset();
- }
-
- /**
- * Creates a path computer that trims all paths according to the given root path.
- * Paths that have no matching segments are returned unchanged.
- * @param root the base path to use for trimming
- * @return a path computer that trims according to the given root
- */
- public static IPathComputer createRootPathComputer(final File root) {
- return new IPathComputer() {
- public IPath computePath(File source) {
- IPath result = new Path(source.getAbsolutePath());
- IPath rootPath = new Path(root.getAbsolutePath());
- result = result.removeFirstSegments(rootPath.matchingFirstSegments(result));
- return result.setDevice(null);
- }
-
- public void reset() {
- //nothing
- }
- };
- }
-
- /**
- * Creates a path computer that is a cross between the root and parent computers.
- * When this computer is reset, the first path seen is considered a new root. That path
- * is trimmed by the given number of segments and then used as in the same way as the
- * root path computer. Every time this computer is reset, a new root is computed.
- * <p>
- * This is useful when handling several sets of disjoint files but for each set you want
- * to have a common root. Rather than having to compute the roots ahead of time and
- * then manage their relationships, you can simply reset the computer between groups.
- * </p><p>
- * For example, say you have the a list of folders { /a/b/c/eclipse/plugins/, /x/y/eclipse/features/}
- * and want to end up with a zip containing plugins and features folders. Using a dynamic
- * path computer and keeping 1 segment allows this to be done simply by resetting the computer
- * between elements of the top level list.
- * </p>
- * @param segmentsToKeep the number of segments of encountered paths to keep
- * relative to the dynamically computed roots.
- * @return a path computer that trims but keeps the given number of segments relative
- * to the dynamically computed roots.
- */
- public static IPathComputer createDynamicPathComputer(final int segmentsToKeep) {
- return new IPathComputer() {
- IPathComputer computer = null;
-
- public IPath computePath(File source) {
- if (computer == null) {
- IPath sourcePath = new Path(source.getAbsolutePath());
- sourcePath = sourcePath.removeLastSegments(segmentsToKeep);
- computer = createRootPathComputer(sourcePath.toFile());
- }
- return computer.computePath(source);
- }
-
- public void reset() {
- computer = null;
- }
- };
- }
-
- /**
- * Creates a path computer that retains the given number of trailing segments.
- * @param segmentsToKeep number of segments to keep
- * @return a path computer that retains the given number of trailing segments.
- */
- public static IPathComputer createParentPrefixComputer(final int segmentsToKeep) {
- return new IPathComputer() {
- public IPath computePath(File source) {
- IPath sourcePath = new Path(source.getAbsolutePath());
- sourcePath = sourcePath.removeFirstSegments(Math.max(0, sourcePath.segmentCount() - segmentsToKeep));
- return sourcePath.setDevice(null);
- }
-
- public void reset() {
- //nothing
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/LogHelper.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/LogHelper.java
deleted file mode 100644
index 749401c68..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/LogHelper.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.Activator;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.framework.log.FrameworkLogEntry;
-
-public class LogHelper {
-
- public static void log(IStatus status) {
- FrameworkLog log = Activator.getFrameworkLog();
- if (log != null) {
- log.log(getLog(status));
- } else {
- System.out.println(status.getMessage());
- if (status.getException() != null)
- status.getException().printStackTrace();
- }
- }
-
- public static void log(ProvisionException exception) {
- log(new Status(exception.getStatus().getSeverity(), Activator.ID, "Provisioning exception", exception)); //$NON-NLS-1$
- }
-
- /**
- * Copied from PlatformLogWriter in core runtime.
- */
- private static FrameworkLogEntry getLog(IStatus status) {
- Throwable t = status.getException();
- ArrayList<FrameworkLogEntry> childlist = new ArrayList<FrameworkLogEntry>();
-
- int stackCode = t instanceof CoreException ? 1 : 0;
- // ensure a substatus inside a CoreException is properly logged
- if (stackCode == 1) {
- IStatus coreStatus = ((CoreException) t).getStatus();
- if (coreStatus != null) {
- childlist.add(getLog(coreStatus));
- }
- }
-
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- childlist.add(getLog(children[i]));
- }
- }
-
- FrameworkLogEntry[] children = (childlist.size() == 0 ? null : childlist.toArray(new FrameworkLogEntry[childlist.size()]));
-
- return new FrameworkLogEntry(status.getPlugin(), status.getSeverity(), status.getCode(), status.getMessage(), stackCode, t, children);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Messages.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Messages.java
deleted file mode 100644
index 91a3ecddc..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Messages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import org.eclipse.osgi.util.NLS;
-
-class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.core.helpers.messages"; //$NON-NLS-1$
-
- static {
- // load message values from bundle file and assign to fields below
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-
- public static String Util_Invalid_Zip_File_Format;
- public static String Util_Error_Unzipping;
- public static String Util_Empty_Zip_Entry;
- public static String Util_Absolute_Entry;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java
deleted file mode 100644
index 2520f2d0d..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/OrderedProperties.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.util.*;
-
-/**
- * A Properties collection that maintains the order of insertion.
- * <p>
- * This class is used to store properties similar to {@link java.util.Properties}.
- * In particular both keys and values are strings and must be not null.
- * However this class is somewhat simplified and does not implement Cloneable,
- * Serializable and Hashtable.
- * <p>
- * In contrast to java.util.Properties this class maintains the order by which
- * properties are added. This is implemented using a {@link LinkedHashMap}.
- * <p>
- * The class does not support default properties as they can be expressed by
- * creating java.util.Properties hierarchies.
- */
-public class OrderedProperties extends Dictionary<String, String> implements Map<String, String> {
-
- LinkedHashMap<String, String> propertyMap = null;
-
- public static OrderedProperties unmodifiableProperties(Map<String, String> properties) {
- return new UnmodifiableProperties(properties);
- }
-
- public OrderedProperties() {
- super();
- }
-
- public OrderedProperties(int size) {
- super();
- propertyMap = new LinkedHashMap<String, String>(size);
- }
-
- public OrderedProperties(OrderedProperties properties) {
- super();
- propertyMap = new LinkedHashMap<String, String>(properties.size());
- putAll(properties);
- }
-
- /**
- * Set the property value.
- * <p>
- * If a property with the key already exists, the previous
- * value is replaced. Otherwise a new property is added at
- * the end collection.
- *
- * @param key must not be null
- * @param value must not be null
- * @return previous value associated with specified key, or <tt>null</tt>
- * if there was no mapping for key.
- */
- public Object setProperty(String key, String value) {
- init();
- return propertyMap.put(key, value);
- }
-
- public String getProperty(String key) {
- return (propertyMap == null ? null : propertyMap.get(key));
- }
-
- public void putAll(OrderedProperties properties) {
- putAll(properties);
- }
-
- /**
- * Initialize the map.
- */
- private void init() {
- if (propertyMap == null) {
- propertyMap = new LinkedHashMap<String, String>();
- }
- }
-
- public int size() {
- return propertyMap == null ? 0 : propertyMap.size();
- }
-
- public boolean isEmpty() {
- return propertyMap == null ? true : propertyMap.isEmpty();
- }
-
- public synchronized void clear() {
- propertyMap = null;
- }
-
- public String put(String key, String value) {
- init();
- return propertyMap.put(key, value);
- }
-
- public boolean containsKey(Object key) {
- return propertyMap != null ? propertyMap.containsKey(key) : false;
- }
-
- public boolean containsValue(Object value) {
- return propertyMap != null ? propertyMap.containsValue(value) : false;
- }
-
- public Set<Map.Entry<String, String>> entrySet() {
- return propertyMap != null ? propertyMap.entrySet() : CollectionUtils.<Map.Entry<String, String>> emptySet();
- }
-
- public String get(Object key) {
- return propertyMap != null ? propertyMap.get(key) : null;
- }
-
- public Set<String> keySet() {
- return propertyMap != null ? propertyMap.keySet() : CollectionUtils.<String> emptySet();
- }
-
- public void putAll(Map<? extends String, ? extends String> arg0) {
- init();
- propertyMap.putAll(arg0);
- }
-
- public String remove(Object key) {
- return propertyMap != null ? propertyMap.remove(key) : null;
- }
-
- public Collection<String> values() {
- return propertyMap != null ? propertyMap.values() : CollectionUtils.<String> emptyList();
- }
-
- public boolean equals(Object o) {
- if (o == this)
- return true;
- if (o instanceof OrderedProperties) {
- OrderedProperties rhs = (OrderedProperties) o;
- if (rhs.propertyMap == this.propertyMap)
- return true;
- if (rhs.propertyMap == null)
- return this.propertyMap.isEmpty();
- else if (this.propertyMap == null)
- return rhs.isEmpty();
- return rhs.propertyMap.equals(this.propertyMap);
- }
- if (this.propertyMap == null) {
- if (o instanceof Map<?, ?>)
- return ((Map<?, ?>) o).isEmpty();
- return false;
- }
- return this.propertyMap.equals(o);
- }
-
- public int hashCode() {
- return propertyMap == null || propertyMap.isEmpty() ? 0 : propertyMap.hashCode();
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append(propertyMap);
- return sb.toString();
- }
-
- private class StringsEnum implements Enumeration<String> {
-
- private final Iterator<String> iterator;
-
- public StringsEnum(Collection<String> elems) {
- this.iterator = elems.iterator();
- }
-
- public boolean hasMoreElements() {
- return iterator.hasNext();
- }
-
- public String nextElement() {
- return iterator.next();
- }
- }
-
- public Enumeration<String> elements() {
- return new StringsEnum(propertyMap.values());
- }
-
- public Enumeration<String> keys() {
- return new StringsEnum(propertyMap.keySet());
- }
-
- private static class UnmodifiableProperties extends OrderedProperties {
-
- UnmodifiableProperties(Map<String, String> properties) {
- super();
- for (Map.Entry<String, String> entry : properties.entrySet()) {
- super.put(entry.getKey(), entry.getValue());
- }
- }
-
- public synchronized Object setProperty(String key, String value) {
- throw new UnsupportedOperationException();
- }
-
- public synchronized String put(String key, String value) {
- throw new UnsupportedOperationException();
- }
-
- public synchronized String remove(Object key) {
- throw new UnsupportedOperationException();
- }
-
- public synchronized void putAll(Map<? extends String, ? extends String> t) {
- throw new UnsupportedOperationException();
- }
-
- public synchronized void clear() {
- throw new UnsupportedOperationException();
- }
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java
deleted file mode 100644
index bf06f0c35..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/ServiceHelper.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.util.Collection;
-import org.osgi.framework.*;
-
-public class ServiceHelper {
- /**
- * Returns the service described by the given arguments. Note that this is a helper class
- * that <b>immediately</b> ungets the service reference. This results in a window where the
- * system thinks the service is not in use but indeed the caller is about to use the returned
- * service object.
- * @param context
- * @param clazz the service class
- * @return The requested service
- */
- public static <T> T getService(BundleContext context, Class<T> clazz) {
- if (context == null)
- return null;
- ServiceReference<T> reference = context.getServiceReference(clazz);
- if (reference == null)
- return null;
- T result = context.getService(reference);
- context.ungetService(reference);
- return result;
- }
-
- public static <T> T getService(BundleContext context, Class<T> clazz, String filter) {
- Collection<ServiceReference<T>> references;
- try {
- references = context.getServiceReferences(clazz, filter);
- } catch (InvalidSyntaxException e) {
- // TODO Auto-generated catch block
- return null;
- }
- if (references.isEmpty())
- return null;
- final ServiceReference<T> ref = references.iterator().next();
- T result = context.getService(ref);
- context.ungetService(ref);
- return result;
- }
-
- /**
- * Returns the service described by the given arguments. Note that this is a helper class
- * that <b>immediately</b> ungets the service reference. This results in a window where the
- * system thinks the service is not in use but indeed the caller is about to use the returned
- * service object.
- * @param context
- * @param name
- * @return The requested service
- */
- public static Object getService(BundleContext context, String name) {
- if (context == null)
- return null;
- ServiceReference<?> reference = context.getServiceReference(name);
- if (reference == null)
- return null;
- Object result = context.getService(reference);
- context.ungetService(reference);
- return result;
- }
-
- public static Object getService(BundleContext context, String name, String filter) {
- ServiceReference<?>[] references;
- try {
- references = context.getServiceReferences(name, filter);
- } catch (InvalidSyntaxException e) {
- // TODO Auto-generated catch block
- return null;
- }
- if (references == null || references.length == 0)
- return null;
- Object result = context.getService(references[0]);
- context.ungetService(references[0]);
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/StringHelper.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/StringHelper.java
deleted file mode 100644
index 2d6a9e557..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/StringHelper.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class StringHelper {
-
- public static String[] EMPTY_ARRAY = new String[0];
-
- public static String[] getArrayFromString(String spec, char c) {
- String[] resultArr = EMPTY_ARRAY;
- if (spec != null) {
- int splitIdx = spec.indexOf(c);
- if (splitIdx <= 0) {
- spec = spec.trim();
- if (spec.length() > 0)
- resultArr = new String[] {spec};
- } else {
- List<String> result = new ArrayList<String>();
- while (splitIdx >= 0) {
- String part = spec.substring(0, splitIdx).trim();
- if (part.length() > 0)
- result.add(part);
- spec = spec.substring(splitIdx + 1);
- splitIdx = spec.indexOf(c);
- }
- spec = spec.trim();
- if (spec.length() > 0)
- result.add(spec);
- resultArr = result.toArray(new String[result.size()]);
- }
- }
- return resultArr;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarEntry.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarEntry.java
deleted file mode 100644
index d6f161c17..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarEntry.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-/**
- * Copied from org.eclipse.ui.internal.wizards.datatransfer.TarEntry.
- */
-public class TarEntry implements Cloneable {
- private String name;
- private long mode, time, size;
- private int type;
- int filepos;
-
- /**
- * Entry type for normal files.
- */
- public static final int FILE = '0';
-
- /**
- * Entry type for directories.
- */
- public static final int DIRECTORY = '5';
-
- /**
- * Create a new TarEntry for a file of the given name at the
- * given position in the file.
- *
- * @param name filename
- * @param pos position in the file in bytes
- */
- TarEntry(String name, int pos) {
- this.name = name;
- mode = 0644;
- type = FILE;
- filepos = pos;
- time = System.currentTimeMillis() / 1000;
- }
-
- /**
- * Returns the type of this file, one of FILE, LINK, SYM_LINK,
- * CHAR_DEVICE, BLOCK_DEVICE, DIRECTORY or FIFO.
- *
- * @return file type
- */
- public int getFileType() {
- return type;
- }
-
- /**
- * Returns the mode of the file in UNIX permissions format.
- *
- * @return file mode
- */
- public long getMode() {
- return mode;
- }
-
- /**
- * Returns the name of the file.
- *
- * @return filename
- */
- public String getName() {
- return name;
- }
-
- /**
- * Returns the size of the file in bytes.
- *
- * @return filesize
- */
- public long getSize() {
- return size;
- }
-
- /**
- * Returns the modification time of the file in seconds since January
- * 1st 1970.
- *
- * @return time
- */
- public long getTime() {
- return time;
- }
-
- /**
- * Sets the type of the file, one of FILE, LINK, SYMLINK, CHAR_DEVICE,
- * BLOCK_DEVICE, or DIRECTORY.
- *
- * @param type
- */
- public void setFileType(int type) {
- this.type = type;
- }
-
- /**
- * Sets the mode of the file in UNIX permissions format.
- *
- * @param mode
- */
- public void setMode(long mode) {
- this.mode = mode;
- }
-
- /**
- * Sets the size of the file in bytes.
- *
- * @param size
- */
- public void setSize(long size) {
- this.size = size;
- }
-
- /**
- * Sets the modification time of the file in seconds since January
- * 1st 1970.
- *
- * @param time
- */
- public void setTime(long time) {
- this.time = time;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarException.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarException.java
deleted file mode 100644
index 0a591da59..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-/**
- * Copied from org.eclipse.ui.internal.wizards.datatransfer.TarException.
- */
-public class TarException extends Exception {
- /**
- * Generated serial version UID for this class.
- */
- private static final long serialVersionUID = 2886671254518853528L;
-
- /**
- * Constructs a TarException with the specified detail string.
- *
- * @param s the detail string
- */
- public TarException(String s) {
- super(s);
- }
-
- /**
- * Constructs a TarException with the specified detail string.
- *
- * @param s the detail string
- * @param cause the cause
- */
- public TarException(String s, Throwable cause) {
- super(s, cause);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarFile.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarFile.java
deleted file mode 100644
index 4b4971236..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarFile.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.io.*;
-import java.util.Enumeration;
-import java.util.zip.GZIPInputStream;
-
-/**
- * Copied from org.eclipse.ui.internal.wizards.datatransfer.TarFile.
- */
-public class TarFile {
- private File file;
- private TarInputStream entryEnumerationStream;
- private TarEntry curEntry;
- private TarInputStream entryStream;
-
- private InputStream internalEntryStream;
-
- /**
- * Create a new TarFile for the given file.
- *
- * @param file
- * @throws TarException
- * @throws IOException
- */
- public TarFile(File file) throws TarException, IOException {
- this.file = file;
-
- InputStream in = new FileInputStream(file);
- // First, check if it's a GZIPInputStream.
- try {
- in = new GZIPInputStream(in);
- } catch (IOException e) {
- //If it is not compressed we close
- //the old one and recreate
- in.close();
- in = new FileInputStream(file);
- }
- try {
- entryEnumerationStream = new TarInputStream(in);
- } catch (TarException ex) {
- in.close();
- throw ex;
- }
- curEntry = entryEnumerationStream.getNextEntry();
- }
-
- /**
- * Close the tar file input stream.
- *
- * @throws IOException if the file cannot be successfully closed
- */
- public void close() throws IOException {
- entryEnumerationStream.close();
- if (internalEntryStream != null)
- internalEntryStream.close();
- }
-
- /**
- * Returns an enumeration cataloguing the tar archive.
- *
- * @return enumeration of all files in the archive
- */
- public Enumeration<TarEntry> entries() {
- return new Enumeration<TarEntry>() {
- public boolean hasMoreElements() {
- return (curEntry != null);
- }
-
- public TarEntry nextElement() {
- TarEntry oldEntry = curEntry;
- try {
- curEntry = entryEnumerationStream.getNextEntry();
- } catch (TarException e) {
- curEntry = null;
- } catch (IOException e) {
- curEntry = null;
- }
- return oldEntry;
- }
- };
- }
-
- /**
- * Returns a new InputStream for the given file in the tar archive.
- *
- * @param entry
- * @return an input stream for the given file
- * @throws TarException
- * @throws IOException
- */
- public InputStream getInputStream(TarEntry entry) throws TarException, IOException {
- if (entryStream == null || !entryStream.skipToEntry(entry)) {
- if (internalEntryStream != null) {
- internalEntryStream.close();
- }
- internalEntryStream = new FileInputStream(file);
- // First, check if it's a GZIPInputStream.
- try {
- internalEntryStream = new GZIPInputStream(internalEntryStream);
- } catch (IOException e) {
- //If it is not compressed we close
- //the old one and recreate
- internalEntryStream.close();
- internalEntryStream = new FileInputStream(file);
- }
- entryStream = new TarInputStream(internalEntryStream, entry) {
- public void close() {
- // Ignore close() since we want to reuse the stream.
- }
- };
- }
- return entryStream;
- }
-
- /**
- * Returns the path name of the file this archive represents.
- *
- * @return path
- */
- public String getName() {
- return file.getPath();
- }
-
- /* (non-Javadoc)
- * @see java.util.zip.ZipFile#finalize()
- *
- */
- protected void finalize() throws Throwable {
- close();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarInputStream.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarInputStream.java
deleted file mode 100644
index 01238f8d2..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/TarInputStream.java
+++ /dev/null
@@ -1,337 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.io.*;
-
-/**
- * Copied from org.eclipse.ui.internal.wizards.datatransfer.TarInputStream.
- */
-public class TarInputStream extends FilterInputStream {
- private int nextEntry = 0;
- private int nextEOF = 0;
- private int filepos = 0;
- private int bytesread = 0;
- private TarEntry firstEntry = null;
- private String longLinkName = null;
-
- /**
- * Creates a new tar input stream on the given input stream.
- *
- * @param in input stream
- * @throws TarException
- * @throws IOException
- */
- public TarInputStream(InputStream in) throws TarException, IOException {
- super(in);
-
- // Read in the first TarEntry to make sure
- // the input is a valid tar file stream.
- firstEntry = getNextEntry();
- }
-
- /**
- * Create a new tar input stream, skipping ahead to the given entry
- * in the file.
- *
- * @param in input stream
- * @param entry skips to this entry in the file
- * @throws TarException
- * @throws IOException
- */
- TarInputStream(InputStream in, TarEntry entry) throws TarException, IOException {
- super(in);
- skipToEntry(entry);
- }
-
- /**
- * The checksum of a tar file header is simply the sum of the bytes in
- * the header.
- *
- * @param header
- * @return checksum
- */
- private long headerChecksum(byte[] header) {
- long sum = 0;
- for (int i = 0; i < 512; i++) {
- sum += header[i] & 0xff;
- }
- return sum;
- }
-
- /**
- * Skips ahead to the position of the given entry in the file.
- *
- * @param entry
- * @returns false if the entry has already been passed
- * @throws TarException
- * @throws IOException
- */
- boolean skipToEntry(TarEntry entry) throws TarException, IOException {
- int bytestoskip = entry.filepos - bytesread;
- if (bytestoskip < 0) {
- return false;
- }
- while (bytestoskip > 0) {
- long ret = in.skip(bytestoskip);
- if (ret < 0) {
- throw new IOException("early end of stream"); //$NON-NLS-1$
- }
- bytestoskip -= ret;
- bytesread += ret;
- }
- filepos = entry.filepos;
- nextEntry = 0;
- nextEOF = 0;
- // Read next header to seek to file data.
- getNextEntry();
- return true;
- }
-
- /**
- * Returns true if the header checksum is correct.
- *
- * @param header
- * @return true if this header has a valid checksum
- */
- private boolean isValidTarHeader(byte[] header) {
- long fileChecksum, calculatedChecksum;
- int pos, i;
-
- pos = 148;
- StringBuffer checksumString = new StringBuffer();
- for (i = 0; i < 8; i++) {
- if (header[pos + i] == ' ') {
- continue;
- }
- if (header[pos + i] == 0 || !Character.isDigit((char) header[pos + i])) {
- break;
- }
- checksumString.append((char) header[pos + i]);
- }
- if (checksumString.length() == 0) {
- return false;
- }
- if (checksumString.charAt(0) != '0') {
- checksumString.insert(0, '0');
- }
- try {
- fileChecksum = Long.decode(checksumString.toString()).longValue();
- } catch (NumberFormatException exception) {
- //This is not valid if it cannot be parsed
- return false;
- }
-
- // Blank out the checksum.
- for (i = 0; i < 8; i++) {
- header[pos + i] = ' ';
- }
- calculatedChecksum = headerChecksum(header);
-
- return (fileChecksum == calculatedChecksum);
- }
-
- /**
- * Returns the next entry in the tar file. Does not handle
- * GNU @LongLink extensions.
- *
- * @return the next entry in the tar file
- * @throws TarException
- * @throws IOException
- */
- TarEntry getNextEntryInternal() throws TarException, IOException {
- byte[] header = new byte[512];
- int pos = 0;
- int i;
-
- if (firstEntry != null) {
- TarEntry entryReturn = firstEntry;
- firstEntry = null;
- return entryReturn;
- }
-
- while (nextEntry > 0) {
- long ret = in.skip(nextEntry);
- if (ret < 0) {
- throw new IOException("early end of stream"); //$NON-NLS-1$
- }
- nextEntry -= ret;
- bytesread += ret;
- }
-
- int bytestoread = 512;
- while (bytestoread > 0) {
- int ret = super.read(header, 512 - bytestoread, bytestoread);
- if (ret < 0) {
- throw new IOException("early end of stream"); //$NON-NLS-1$
- }
- bytestoread -= ret;
- bytesread += ret;
- }
-
- // If we have a header of all zeros, this marks the end of the file.
- if (headerChecksum(header) == 0) {
- // We are at the end of the file.
- if (filepos > 0) {
- return null;
- }
-
- // Invalid stream.
- throw new TarException("not in tar format"); //$NON-NLS-1$
- }
-
- // Validate checksum.
- if (!isValidTarHeader(header)) {
- throw new TarException("not in tar format"); //$NON-NLS-1$
- }
-
- while (pos < 100 && header[pos] != 0) {
- pos++;
- }
- String name = new String(header, 0, pos, "UTF8"); //$NON-NLS-1$
- // Prepend the prefix here.
- pos = 345;
- if (header[pos] != 0) {
- while (pos < 500 && header[pos] != 0) {
- pos++;
- }
- String prefix = new String(header, 345, pos - 345, "UTF8"); //$NON-NLS-1$
- name = prefix + "/" + name; //$NON-NLS-1$
- }
-
- TarEntry entry;
- if (longLinkName != null) {
- entry = new TarEntry(longLinkName, filepos);
- longLinkName = null;
- } else {
- entry = new TarEntry(name, filepos);
- }
- if (header[156] != 0) {
- entry.setFileType(header[156]);
- }
-
- pos = 100;
- StringBuffer mode = new StringBuffer();
- for (i = 0; i < 8; i++) {
- if (header[pos + i] == 0) {
- break;
- }
- if (header[pos + i] == ' ') {
- continue;
- }
- mode.append((char) header[pos + i]);
- }
- if (mode.length() > 0 && mode.charAt(0) != '0') {
- mode.insert(0, '0');
- }
- try {
- long fileMode = Long.decode(mode.toString()).longValue();
- entry.setMode(fileMode);
- } catch (NumberFormatException nfe) {
- throw new TarException("Not a valid TAR format.", nfe);
- }
-
- pos = 100 + 24;
- StringBuffer size = new StringBuffer();
- for (i = 0; i < 12; i++) {
- if (header[pos + i] == 0) {
- break;
- }
- if (header[pos + i] == ' ') {
- continue;
- }
- size.append((char) header[pos + i]);
- }
- if (size.charAt(0) != '0') {
- size.insert(0, '0');
- }
- int fileSize;
- try {
- fileSize = Integer.decode(size.toString()).intValue();
- } catch (NumberFormatException nfe) {
- throw new TarException("Not a valid TAR format.", nfe);
- }
-
- entry.setSize(fileSize);
- nextEOF = fileSize;
- if (fileSize % 512 > 0) {
- nextEntry = fileSize + (512 - (fileSize % 512));
- } else {
- nextEntry = fileSize;
- }
- filepos += (nextEntry + 512);
- return entry;
- }
-
- /**
- * Moves ahead to the next file in the tar archive and returns
- * a TarEntry object describing it.
- *
- * @return the next entry in the tar file
- * @throws TarException
- * @throws IOException
- */
- public TarEntry getNextEntry() throws TarException, IOException {
- TarEntry entry = getNextEntryInternal();
-
- if (entry != null && entry.getName().equals("././@LongLink")) { //$NON-NLS-1$
- // This is a GNU extension for doing long filenames.
- // We get a file called ././@LongLink which just contains
- // the real pathname.
- byte[] longNameData = new byte[(int) entry.getSize()];
- int bytesread = 0;
- while (bytesread < longNameData.length) {
- int cur = read(longNameData, bytesread, longNameData.length - bytesread);
- if (cur < 0) {
- throw new IOException("early end of stream"); //$NON-NLS-1$
- }
- bytesread += cur;
- }
-
- int pos = 0;
- while (pos < longNameData.length && longNameData[pos] != 0) {
- pos++;
- }
- longLinkName = new String(longNameData, 0, pos, "UTF8"); //$NON-NLS-1$
- return getNextEntryInternal();
- }
- return entry;
- }
-
- /* (non-Javadoc)
- * @see java.io.FilterInputStream#read(byte[], int, int)
- */
- public int read(byte[] b, int off, int len) throws IOException {
- if (nextEOF == 0) {
- return -1;
- }
- if (len > nextEOF) {
- len = nextEOF;
- }
- int size = super.read(b, off, len);
- nextEntry -= size;
- nextEOF -= size;
- bytesread += size;
- return size;
- }
-
- /* (non-Javadoc)
- * @see java.io.FilterInputStream#read()
- */
- public int read() throws IOException {
- byte[] data = new byte[1];
- int size = read(data, 0, 1);
- if (size < 0) {
- return size;
- }
- return data[0];
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java
deleted file mode 100644
index b7fb78d38..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/Tracing.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.util.Date;
-import org.eclipse.equinox.internal.p2.core.Activator;
-import org.eclipse.osgi.service.debug.DebugOptions;
-
-/**
- * Manages debug tracing options and provides convenience methods for printing
- * debug statements.
- */
-public class Tracing {
- //master p2 debug flag
- public static boolean DEBUG = false;
-
- //debug constants
- public static boolean DEBUG_GENERATOR_PARSING = false;
- public static boolean DEBUG_INSTALL_REGISTRY = false;
- public static boolean DEBUG_METADATA_PARSING = false;
- public static boolean DEBUG_MIRRORS = false;
- public static boolean DEBUG_PARSE_PROBLEMS = false;
- public static boolean DEBUG_PLANNER_OPERANDS = false;
- public static boolean DEBUG_PLANNER_PROJECTOR = false;
- public static boolean DEBUG_PROFILE_PREFERENCES = false;
- public static boolean DEBUG_PUBLISHING = false;
- public static boolean DEBUG_RECONCILER = false;
- public static boolean DEBUG_REMOVE_REPO = false;
- public static boolean DEBUG_UPDATE_CHECK = false;
- public static boolean DEBUG_EVENTS_CLIENT = false;
-
- static {
- DebugOptions options = (DebugOptions) ServiceHelper.getService(Activator.context, DebugOptions.class.getName());
- if (options != null) {
- DEBUG = options.getBooleanOption(Activator.ID + "/debug", false); //$NON-NLS-1$
- if (DEBUG) {
- DEBUG_EVENTS_CLIENT = options.getBooleanOption(Activator.ID + "/events/client", false); //$NON-NLS-1$
- DEBUG_GENERATOR_PARSING = options.getBooleanOption(Activator.ID + "/generator/parsing", false); //$NON-NLS-1$
- DEBUG_INSTALL_REGISTRY = options.getBooleanOption(Activator.ID + "/engine/installregistry", false); //$NON-NLS-1$
- DEBUG_METADATA_PARSING = options.getBooleanOption(Activator.ID + "/metadata/parsing", false); //$NON-NLS-1$
- DEBUG_MIRRORS = options.getBooleanOption(Activator.ID + "/artifacts/mirrors", false); //$NON-NLS-1$
- DEBUG_PARSE_PROBLEMS = options.getBooleanOption(Activator.ID + "/core/parseproblems", false); //$NON-NLS-1$
- DEBUG_PLANNER_OPERANDS = options.getBooleanOption(Activator.ID + "/planner/operands", false); //$NON-NLS-1$
- DEBUG_PLANNER_PROJECTOR = options.getBooleanOption(Activator.ID + "/planner/projector", false); //$NON-NLS-1$
- DEBUG_PROFILE_PREFERENCES = options.getBooleanOption(Activator.ID + "/engine/profilepreferences", false); //$NON-NLS-1$
- DEBUG_PUBLISHING = options.getBooleanOption(Activator.ID + "/publisher", false); //$NON-NLS-1$
- DEBUG_RECONCILER = options.getBooleanOption(Activator.ID + "/reconciler", false); //$NON-NLS-1$
- DEBUG_REMOVE_REPO = options.getBooleanOption(Activator.ID + "/core/removeRepo", false); //$NON-NLS-1$
- DEBUG_UPDATE_CHECK = options.getBooleanOption(Activator.ID + "/updatechecker", false); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Prints a debug message on stdout. Callers should first ensure their specific
- * debug option is enabled.
- */
- public static void debug(String message) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("[p2] "); //$NON-NLS-1$
- buffer.append(new Date(System.currentTimeMillis()));
- buffer.append(" - ["); //$NON-NLS-1$
- buffer.append(Thread.currentThread().getName());
- buffer.append("] "); //$NON-NLS-1$
- buffer.append(message);
- System.out.println(buffer.toString());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/URLUtil.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/URLUtil.java
deleted file mode 100644
index 1eb23baf5..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/URLUtil.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * compeople AG (Stefan Liebig) - Fix for bug 121201 - Poor performance behind proxy/firewall
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.core.helpers;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URL;
-
-/**
- * A utility class for manipulating URLs. This class works around some of the
- * broken behavior of the java.net.URL class.
- */
-public class URLUtil {
-
- /**
- * Returns the URL as a local file, or <code>null</code> if the given
- * URL does not represent a local file.
- * @param url The url to return the file for
- * @return The local file corresponding to the given url, or <code>null</code>
- */
- public static File toFile(URL url) {
-
- if (!"file".equalsIgnoreCase(url.getProtocol())) //$NON-NLS-1$
- return null;
- //assume all illegal characters have been properly encoded, so use URI class to unencode
-
- String externalForm = url.toExternalForm();
- String pathString = externalForm.substring(5);
-
- try {
- if (pathString.indexOf('/') == 0) {
- if (pathString.indexOf("//") == 0) //$NON-NLS-1$
- externalForm = "file:" + ensureUNCPath(pathString); //$NON-NLS-1$
- return new File(new URI(externalForm));
- }
- if (pathString.indexOf(':') == 1)
- return new File(new URI("file:/" + pathString)); //$NON-NLS-1$
-
- return new File(new URI(pathString).getSchemeSpecificPart());
- } catch (Exception e) {
- //URL contains unencoded characters
- return new File(pathString);
- }
- }
-
- /**
- * Ensures the given path string starts with exactly four leading slashes.
- */
- private static String ensureUNCPath(String path) {
- int len = path.length();
- StringBuffer result = new StringBuffer(len);
- for (int i = 0; i < 4; i++) {
- // if we have hit the first non-slash character, add another leading slash
- if (i >= len || result.length() > 0 || path.charAt(i) != '/')
- result.append('/');
- }
- result.append(path);
- return result.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/messages.properties b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/messages.properties
deleted file mode 100644
index 6874d7735..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/helpers/messages.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-
-Util_Invalid_Zip_File_Format=Invalid zip file format
-Util_Error_Unzipping=Error unzipping {0}: {1}
-
-Util_Empty_Zip_Entry=Cannot have an empty zip entry.
-Util_Absolute_Entry=Zip entries cannot be absolute.
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java
deleted file mode 100644
index 32b6d45cd..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/IProvisioningEventBus.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core.eventbus;
-
-import java.util.EventObject;
-import org.eclipse.osgi.framework.eventmgr.EventDispatcher;
-
-/**
- * The bus for events related to provisioning. This service can be used to register
- * a listener to receive provisioning events, or to broadcast events.
- */
-public interface IProvisioningEventBus extends EventDispatcher<ProvisioningListener, ProvisioningListener, EventObject> {
- /**
- * The name used for obtaining a reference to the event bus service.
- */
- public static final String SERVICE_NAME = IProvisioningEventBus.class.getName();
-
- public abstract void addListener(ProvisioningListener toAdd);
-
- public abstract void removeListener(ProvisioningListener toRemove);
-
- public abstract void publishEvent(EventObject event);
-
- /**
- * Closes the event bus. This will stop dispatching of any events currently
- * being processed by the bus. Events published after the bus is closed
- * are ignored.
- */
- public abstract void close();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/ProvisioningListener.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/ProvisioningListener.java
deleted file mode 100644
index de7641542..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/ProvisioningListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core.eventbus;
-
-import java.util.EventListener;
-import java.util.EventObject;
-import org.eclipse.equinox.internal.p2.core.ProvisioningEventBus;
-
-/**
- * A listener that is notified about events related to provisioning.
- * @see ProvisioningEventBus
- */
-public interface ProvisioningListener extends EventListener {
- //TODO: rename this interface to match eclipse conventions (IProvisioningListener)
-
- /**
- * Notifies the listener about a provisioning event.
- */
- public void notify(EventObject o);
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/SynchronousProvisioningListener.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/SynchronousProvisioningListener.java
deleted file mode 100644
index 0df2c89f7..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/provisional/p2/core/eventbus/SynchronousProvisioningListener.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.core.eventbus;
-
-public interface SynchronousProvisioningListener extends ProvisioningListener {
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IAgentLocation.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IAgentLocation.java
deleted file mode 100644
index 13b18ab3a..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IAgentLocation.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.core;
-
-import java.net.URI;
-
-/**
- * An instance of this service represents the location of a provisioning agent's
- * metadata.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IAgentLocation {
- /**
- * Service name constant for the agent location service.
- */
- public static final String SERVICE_NAME = IAgentLocation.class.getName();
-
- /**
- * Returns the location where the bundle with the given namespace
- * may write its agent-related data.
- * @param namespace The namespace of the bundle storing the data
- * @return The data location
- */
- public URI getDataArea(String namespace);
-
- /**
- * Returns the root {@link URI} of the agent metadata.
- *
- * @return the location of the agent metadata
- */
- public URI getRootLocation();
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgent.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgent.java
deleted file mode 100644
index b6c20e14c..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgent.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.core;
-
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-
-/**
- * A provisioning agent is comprised of a modular, extensible set of related services.
- * Each agent instance has its own separate instances of these services that are
- * not shared with other agents. There is at most one instance of a given service
- * tracked by an agent at any given time, which ensures all services that make
- * up an agent instance share common service instances with each other.
- * <p>
- * Services are registered with an agent either directly, via the {@link #registerService(String, Object)}
- * method, or indirectly by registering an {@link IAgentServiceFactory} in the OSGi
- * service registry.
- * </p>
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IProvisioningAgent {
- /**
- * Service name constant for the agent service. Note that an agent obtained directly
- * as a service typically represents the agent of the currently running system. To
- * obtain an agent for a different system the {@link IProvisioningAgentProvider}
- * service must be used.
- */
- public static final String SERVICE_NAME = IProvisioningAgent.class.getName();
-
- public static final String INSTALLER_AGENT = "org.eclipse.equinox.p2.installer.agent"; //$NON-NLS-1$
- public static final String INSTALLER_PROFILEID = "org.eclipse.equinox.p2.installer.profile.id"; //$NON-NLS-1$
-
- /**
- * Service property identifying whether an agent is the default agent.
- *
- * <p>
- * This property may be used by clients wishing to obtain or track the
- * provisioning agent for the currently running system. When the value of
- * this property is <code>"true"</code> then the corresponding service is
- * the agent for the currently running system. If the property is undefined or
- * has any other value, then the service is not the agent for the currently running system.
- * </p>
- */
- public static final String SERVICE_CURRENT = "agent.current"; //$NON-NLS-1$
-
- /**
- * Returns the service with the given service name, or <code>null</code>
- * if no such service is available in this agent.
- * @exception IllegalStateException if this agent has been stopped
- */
- public Object getService(String serviceName);
-
- /**
- * Registers a service with this provisioning agent.
- *
- * @param serviceName The name of the service to register
- * @param service The service implementation
- * @exception IllegalStateException if this agent has been stopped
- */
- public void registerService(String serviceName, Object service);
-
- /**
- * Stops the provisioning agent. This causes services provided by this
- * agent to be cleaned up and discarded. No services provided by the agent
- * should be referenced after the agent has been stopped, and subsequent
- * attempts to obtain services after the agent has stopped will fail.
- * <p>
- * An agent should only be stopped by the client who first created the agent
- * by invoking {@link IProvisioningAgentProvider#createAgent(java.net.URI)}.
- * </p>
- */
- public void stop();
-
- /**
- * Unregisters a service that has previously been registered with this
- * agent via {@link #registerService(String, Object)}. This method has
- * no effect if no such service is registered with this agent.
- *
- * @param serviceName The name of the service to unregister
- * @param service The service implementation to unregister.
- */
- public void unregisterService(String serviceName, Object service);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgentProvider.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgentProvider.java
deleted file mode 100644
index 11fdd1195..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/IProvisioningAgentProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.core;
-
-import java.net.URI;
-
-/**
- * An OSGi service that is used to create or obtain instances of an
- * {@link IProvisioningAgent}.
- * @since 2.0
- */
-public interface IProvisioningAgentProvider {
-
- /**
- * Service name constant for the agent provider service.
- */
- public static final String SERVICE_NAME = IProvisioningAgentProvider.class.getName();
-
- /**
- * Creates a provisioning agent who metadata is stored at the given location.
- * If a <code>null</code> location is provided, the provisioning agent for the
- * currently running system is returned, if available. If a <code>null</code>
- * location is provided and the currently running system has not been provisioned
- * by any known agent, <code>null</code> is returned.
- * <p>
- * Callers of this method are responsible for stopping the agent
- * when they are finished using it by invoking {@link IProvisioningAgent#stop()}.
- * </p>
- * @param location The location where the agent metadata is stored
- * @return A provisioning agent, or <code>null</code> if a <code>null</code>
- * parameter is provided and there is no currently running agent.
- * @throws ProvisionException If agent creation failed. Reasons include:
- * <ul>
- * <li>The location is not writeable.</li>
- * </ul>
- * @see IProvisioningAgent#stop()
- */
- public IProvisioningAgent createAgent(URI location) throws ProvisionException;
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java
deleted file mode 100644
index af5b6786a..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/ProvisionException.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.core;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.Activator;
-
-/**
- * A checked exception indicating a recoverable error occurred while provisioning.
- * The status provides a further description of the problem.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class ProvisionException extends CoreException {
- private static final long serialVersionUID = 1L;
-
- //General and core status codes [0-1000]
- /**
- * Status code constant (value 1) for an uncategorized error.
- */
- public static final int INTERNAL_ERROR = 1;
-
- //Repository status codes [1000-1999]
- //General repository codes [1000-1099]
- /**
- * Status code constant (value 1000) indicating a repository
- * unexpectedly does not exist.
- */
- public static final int REPOSITORY_NOT_FOUND = 1000;
-
- /**
- * Status code constant (value 1001) indicating a repository
- * unexpectedly exists.
- */
- public static final int REPOSITORY_EXISTS = 1001;
-
- /**
- * Status code constant (value 1002) indicating a repository
- * could not be read
- */
- public static final int REPOSITORY_FAILED_READ = 1002;
-
- /**
- * Status code constant (value 1003) indicating a failure occurred
- * while writing to a repository.
- */
- public static final int REPOSITORY_FAILED_WRITE = 1003;
-
- /**
- * Status code constant (value 1004) indicating a repository
- * could not be written because it is a read-only repository.
- */
- public static final int REPOSITORY_READ_ONLY = 1004;
-
- /**
- * Status code constant (value 1005) indicating an attempt was
- * made to create or access a repository of unknown type.
- */
- public static final int REPOSITORY_UNKNOWN_TYPE = 1005;
- /**
- * Status code constant (value 1006) indicating that a specified
- * repository location is not valid.
- */
- public static final int REPOSITORY_INVALID_LOCATION = 1006;
-
- /**
- * Status code constant (value 1007) indicating that there was
- * an authentication error while reading a repository
- */
- public static final int REPOSITORY_FAILED_AUTHENTICATION = 1007;
-
- //Metadata repository codes [1100-1199]
-
- //Artifact repository codes [1200-1299]
-
- /**
- * Status code constant (value 1200) indicating an artifact unexpectedly
- * does not exist.
- */
- public static final int ARTIFACT_NOT_FOUND = 1200;
-
- /**
- * Status code constant (value 1201) indicating an artifact unexpectedly
- * already exists.
- */
- public static final int ARTIFACT_EXISTS = 1201;
-
- /**
- * Status code constant (value 1202) indicating an artifact's size
- * could not be found.
- */
- public static final int ARTIFACT_INCOMPLETE_SIZING = 1202;
-
- /**
- * Creates a new exception with the given status object. The message
- * of the given status is used as the exception message.
- *
- * @param status the status object to be associated with this exception
- */
- public ProvisionException(IStatus status) {
- super(status);
- }
-
- /**
- * Creates a new exception with the given message and a severity of
- * {@link IStatus#ERROR}.
- *
- * @param message The human-readable problem message
- */
- public ProvisionException(String message) {
- super(new Status(IStatus.ERROR, Activator.ID, message));
- }
-
- /**
- * Creates a new exception with the given message and cause, and
- * a severity of {@link IStatus#ERROR}.
- *
- * @param message The human-readable problem message
- * @param cause The underlying cause of the exception
- */
- public ProvisionException(String message, Throwable cause) {
- super(new Status(IStatus.ERROR, Activator.ID, message, cause));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java
deleted file mode 100644
index 2510d4db4..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/UIServices.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.core;
-
-import java.security.cert.Certificate;
-
-/**
- * Service used for prompting for user information from within lower level code.
- * Implementors of this service are responsible for registering the service.
- *
- * It is possible that the UIServices service is requested very early in the startup
- * sequence for an application. For example, applications that check for updates
- * during startup will trigger the service lookup if a server requiring authentication
- * is detected. For this reason, implementors of UIServices should ensure that the
- * bundle providing the service is partitioned appropriately.
- *
- * @since 2.0
- */
-public abstract class UIServices {
- /**
- * Service name constant for the UI service.
- */
- public static final String SERVICE_NAME = UIServices.class.getName();
-
- /**
- * Authentication information returned from an authentication prompt request.
- */
- public static class AuthenticationInfo {
- private final boolean save;
- private final String userName;
- private final String password;
-
- public AuthenticationInfo(String userName, String password, boolean saveResult) {
- this.userName = userName;
- this.password = password;
- this.save = saveResult;
- }
-
- public boolean saveResult() {
- return save;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public String getPassword() {
- return password;
- }
- }
-
- /**
- * Trust information returned from a trust request. *
- */
- public static class TrustInfo {
- private final Certificate[] trustedCertificates;
- private final boolean saveTrustedCertificates;
- private final boolean trustUnsigned;
-
- public TrustInfo(Certificate[] trusted, boolean save, boolean trustUnsigned) {
- this.trustedCertificates = trusted;
- this.saveTrustedCertificates = save;
- this.trustUnsigned = trustUnsigned;
- }
-
- /**
- * Return an array of the certificates that should be trusted for the
- * requested operation.
- *
- * @return the trusted certificates, or <code>null</code> if there are
- * no certificates that were verified as trusted.
- */
- public Certificate[] getTrustedCertificates() {
- return trustedCertificates;
- }
-
- /**
- * Return a boolean indicating whether the trusted certificates should
- * be persisted for future operations.
- *
- * @return <code>true</code> if the trusted certificates should be persisted, <code>false</code> if
- * the trust only applies for this request.
- */
- public boolean persistTrust() {
- return saveTrustedCertificates;
- }
-
- /**
- * Return a boolean indicating whether the unsigned content should be trusted
- * during this operation.
- *
- * @return <code>true</code> if the unsigned content should be trusted, or if there was no unsigned content,
- * and <code>false</code> if there was unsigned content and should not be trusted.
- */
- public boolean trustUnsignedContent() {
- return trustUnsigned;
- }
- }
-
- /**
- * Opens a UI prompt for authentication details
- *
- * @param location - the location requiring login details, may be <code>null</code>.
- * @return The authentication result
- */
- public abstract AuthenticationInfo getUsernamePassword(String location);
-
- /**
- * Opens a UI prompt for authentication details when cached or remembered details
- * where not accepted.
- *
- * @param location the location requiring login details
- * @param previousInfo - the previously used authentication details - may not be null.
- * @return The authentication result
- */
- public abstract AuthenticationInfo getUsernamePassword(String location, AuthenticationInfo previousInfo);
-
- /**
- * Opens a UI prompt to capture information about trusted content.
- *
- * @param untrustedChain - an array of certificate chains for which there is no current trust anchor. May be
- * <code>null</code>, which means there are no untrusted certificate chains.
- * @param unsignedDetail - an array of strings, where each String describes content that is not signed.
- * May be <code>null</code>, which means there is no unsigned content
- * @return the TrustInfo that describes the user's choices for trusting certificates and
- * unsigned content.
- */
- public abstract TrustInfo getTrustInfo(Certificate[][] untrustedChain, String[] unsignedDetail);
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/package.html b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/package.html
deleted file mode 100644
index e79ec122b..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/package.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides core support for interacting with a p2-based provisioning system
-<h2>
-Package Specification</h2>
-<p>
-This package specifies API for creating, using, and extending a provisioning system.
-A provisioning agent ties together a set of related services that work together
-to implement a provisioning system. For end users of the provisioning system,
-they simply instantiate or obtain an agent and get the services they require from
-the agent. Extenders can register a factory for adding new services to the system,
-or add services directly to an agent.
-</p>
-<p>
-This package also provides some basic utility classes that are common across large
-parts of the system.
-</p>
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentService.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentService.java
deleted file mode 100644
index c8a69afd4..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentService.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.core.spi;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-
-/**
- * Services created by {@link IAgentServiceFactory} objects can optionally implement
- * this interface to participate in the agent lifecycle.
- * @since 2.0
- */
-public interface IAgentService {
- /**
- * This method is invoked when a service is added to an agent. This can occur
- * either because a client looked up the service and it was lazily instantiated by
- * the agent, or because the service was registered manually via {@link IProvisioningAgent#registerService(String, Object)}.
- */
- public void start();
-
- /**
- * This method is invoked when a service is removed from an agent. This can occur
- * either because the agent was stopped, or because the service was manually
- * unregistered via {@link IProvisioningAgent#unregisterService(String, Object)}.
- * <p>
- * Services must not attempt to obtain further services from their agent while
- * stopping, as some required services may no longer be available.
- */
- public void stop();
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentServiceFactory.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentServiceFactory.java
deleted file mode 100644
index 0c1b7de12..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/IAgentServiceFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.core.spi;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-
-/**
- * A factory for creating a service that forms part of a provisioning agent instance.
- * Factories themselves are registered in the OSGi service registry so that they
- * can be obtained by a provisioning agent.
- * @since 2.0
- */
-public interface IAgentServiceFactory {
- /**
- * The service name for the factory service.
- */
- public static final String SERVICE_NAME = IAgentServiceFactory.class.getName();
-
- /**
- * The service property specifying the name of the service created by this factory.
- */
- public static final String PROP_CREATED_SERVICE_NAME = "p2.agent.servicename"; //$NON-NLS-1$
-
- /**
- * Instantiates a service instance for the given provisioning agent.
- *
- * @param agent The agent this service will belong to
- * @return The created service
- */
- public Object createService(IProvisioningAgent agent);
-}
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/package.html b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/package.html
deleted file mode 100644
index 70d3ca559..000000000
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/p2/core/spi/package.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides API for customizing and extending a p2-based provisioning system
-<h2>
-Package Specification</h2>
-<p>
-This package specifies API for extending and customizing a provisioning system.
-A provisioning agent ties together a set of related services that work together
-to implement a provisioning system. Extenders can register a factory for adding new
-services to the system, or add services directly to an agent.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.classpath b/bundles/org.eclipse.equinox.p2.director.app/.classpath
deleted file mode 100644
index 834ea833e..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bin_ant" path="src_ant"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.cvsignore b/bundles/org.eclipse.equinox.p2.director.app/.cvsignore
deleted file mode 100644
index 8bddca612..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-ant_tasks
-target
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch b/bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch
deleted file mode 100644
index 14a07a3fd..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.externalToolBuilders/Build Director Ant Tasks.launch
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1255396835944_5&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.equinox.p2.director.app&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.director.app"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.project b/bundles/org.eclipse.equinox.p2.director.app/.project
deleted file mode 100644
index cccb79f1a..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.director.app</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build Director Ant Tasks.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 61d18f7dd..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,350 +0,0 @@
-#Thu Aug 05 08:38:45 CDT 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=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
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs
deleted file mode 100644
index 233758b1b..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.launching.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Oct 07 15:35:11 EDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 7acf5447f..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,56 +0,0 @@
-#Fri Apr 24 11:01:31 EDT 2009
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
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
deleted file mode 100644
index 6515e7544..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,32 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.director.app;singleton:=true
-Bundle-Version: 1.0.300.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.director.app.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.director.app;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.app,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.director,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.framework.log,
- org.eclipse.osgi.service.environment,
- org.eclipse.osgi.util,
- org.osgi.framework;version="1.6.0",
- org.osgi.service.packageadmin
diff --git a/bundles/org.eclipse.equinox.p2.director.app/about.html b/bundles/org.eclipse.equinox.p2.director.app/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/build.properties b/bundles/org.eclipse.equinox.p2.director.app/build.properties
deleted file mode 100644
index d80a7ff0d..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/build.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-source.ant_tasks/director-ant.jar=src_ant/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- ant_tasks/director-ant.jar,\
- about.html,\
- plugin.properties
-src.includes = about.html
-jars.compile.order=.,ant_tasks/director-ant.jar
-extra.ant_tasks/director-ant.jar = platform:/plugin/org.apache.ant
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.director.app/config.ini b/bundles/org.eclipse.equinox.p2.director.app/config.ini
deleted file mode 100644
index fe0772359..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/config.ini
+++ /dev/null
@@ -1,87 +0,0 @@
-# Eclipse runtime configuration file
-# This file contains a number of key/value pairs that are merged into the
-# System properties on system startup. The values control the way the
-# runtime is structured and runs.
-
-# Note: Only platform:/base/ and file: URLs are supported. In general the
-# URLs given may include a version number (e.g., .../location_1.2.3).
-# If a version is not specified, the system binds
-# to the location which matches exactly or to the versioned location with the
-# latest version number. If a version number is given then only exact matches
-# are considered.
-
-# The URL for the runtime entry point. The default value is
-# platform:/base/plugins/org.eclipse.osgi
-#osgi.framework=platform:/base/plugins/org.eclipse.osgi
-
-# The classpath for the framework found at the osgi.framework location. This
-# comma-separated list contains either URLs or simple element names. Simple
-# names are assumed to be relative to the framework's install directory.
-# Typically this value need not be set as it is initialized by the framework itself.
-# Version match searching is not done for URLs listed here.
-#osgi.frameworkClassPath =
-
-# The comma-separated list of locations to search for the splash screen file (splash.bmp).
-# For each list element a subdirectory structure based on the pattern nl/<locale> is searched.
-# The system binds to the first matching file. There is no default value.
-#osgi.splashPath=
-
-# The location of the splash screen file. If this value is set at system startup it is used
-# in favour of the osgi.splashPath searching outlined above. If the value is not set
-# the searching is done and this key is bound to the result of the search.
-#osgi.splashLocation =
-
-# The comma-separated list of bundles which are automatically installed and optionally started
-# once the system is up and running. Each entry if of the form
-# <URL | simple bundle location>[@ [<startlevel>] [":start"]]
-# If the startlevel is omitted then the framework will use the default start level for the bundle.
-# If the "start" tag is added then the bundle will be marked as started after being installed.
-# Simple bundle locations are interepreted as relative to the framework's parent directory.
-# The startlevel indicates the OSGi start level at which the bundle should run.
-osgi.bundles=\
- org.eclipse.core.jobs,\
- org.eclipse.ecf,\
- org.eclipse.ecf.filetransfer,\
- org.eclipse.ecf.identity,\
- org.eclipse.ecf.provider.filetransfer,\
- org.eclipse.equinox.app@start,\
- org.eclipse.equinox.common,\
- org.eclipse.equinox.frameworkadmin,\
- org.eclipse.equinox.frameworkadmin.equinox@start,\
- org.eclipse.equinox.p2.artifact.repository,\
- org.eclipse.equinox.p2.console,\
- org.eclipse.equinox.p2.core,\
- org.eclipse.equinox.p2.director,\
- org.eclipse.equinox.p2.director.app,\
- org.eclipse.equinox.p2.download,\
- org.eclipse.equinox.p2.engine,\
- org.eclipse.equinox.p2.jarprocessor,\
- org.eclipse.equinox.p2.metadata,\
- org.eclipse.equinox.p2.metadata.repository,\
- org.eclipse.equinox.p2.operations,\
- org.eclipse.equinox.p2.touchpoint.eclipse,\
- org.eclipse.equinox.p2.touchpoint.natives,\
- org.eclipse.equinox.registry,\
- org.eclipse.equinox.simpleconfigurator,\
- org.eclipse.equinox.simpleconfigurator.manipulator@start,\
- org.eclipse.osgi.services,\
- org.sat4j.core,\
- org.sat4j.pb
-
-org.eclipse.update.reconcile=false
-
-# The product to run. A given Eclipse configuration may contain many products.
-# The product identified will supply the branding (window icons, title bar text) etc
-# as well as define the default application to run.
-#eclipse.product=
-
-# The application to run. The value specified here is the id of the application extension
-# the runtime will find, instantiate and execute once the system is up. Note that typically
-# the identified eclipse.product defines the default application to run.
-#eclipse.application=
-
-# The build identifier
-eclipse.buildId=@build@
-
-# End of file marker - must be here
-eof=eof \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/director app.launch b/bundles/org.eclipse.equinox.p2.director.app/director app.launch
deleted file mode 100644
index e2020f827..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/director app.launch
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/director app"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consoleLog -application org.eclipse.equinox.p2.director -installIU org.eclipse.e4.workbench.sdk -p2.os macosx -p2.ws cocoa -p2.arch x86 -roaming -profile SDKProfile -metadatarepository file:/Users/Pascal/tmp/paul/helios/,file:/Users/Pascal/tmp/paul/e4/ -destination /Users/Pascal/tmp/paul/install -bundlepool /Users/Pascal/tmp/paul/install"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Doff.eclipse.p2.data.area=file:/Application/eclipse/p2/&#10;-Doff.eclipse.p2.profile=SDKProfile"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.security@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.security.macosx@default:false,org.eclipse.osgi@-1:true,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.common@2:true,org.eclipse.osgi.services@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.jobs@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.simpleconfigurator@default:true,org.eclipse.equinox.p2.exemplarysetup@default:true,org.eclipse.equinox.simpleconfigurator.manipulator@default:true,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.console@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.sat4j.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/director.product b/bundles/org.eclipse.equinox.p2.director.app/director.product
deleted file mode 100644
index 0fa6e99ca..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/director.product
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.1"?>
-
-<product name="Equinox Provisioning Director" id="org.eclipse.equinox.p2.director.app.product" application="org.eclipse.equinox.p2.director.app.application" useFeatures="true">
-
- <configIni use="custom" path="/org.eclipse.equinox.p2.director.app/config.ini"/>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <launcher name="eclipse">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- </plugins>
-
- <features>
- <feature id="org.eclipse.equinox.p2.director.feature" version="0.0.0"/>
- <feature id="org.eclipse.rcp" version="0.0.0"/>
- </features>
-
-</product>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/plugin.properties b/bundles/org.eclipse.equinox.p2.director.app/plugin.properties
deleted file mode 100644
index 3e0d50f9b..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Director Application
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.director.app/plugin.xml b/bundles/org.eclipse.equinox.p2.director.app/plugin.xml
deleted file mode 100644
index 6d9af373f..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension id="application" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.director.app.Application"/>
- </application>
- </extension>
- <extension id="org.eclipse.equinox.p2.director" point="org.eclipse.core.runtime.applications">
- <application
- cardinality="singleton-global"
- thread="main"
- visible="true">
- <run class="org.eclipse.equinox.internal.p2.director.app.DirectorApplication"/>
- </application>
- </extension>
- <extension id="product" point="org.eclipse.core.runtime.products">
- <product application="org.eclipse.equinox.p2.director.app.application" name="Equinox Provisioning Director" />
- </extension>
- <extension id="org.eclipse.equinox.p2.director.product" point="org.eclipse.core.runtime.products">
- <product application="org.eclipse.equinox.p2.director" name="Equinox P2 Director" />
- </extension>
- <extension point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry library="ant_tasks/director-ant.jar"/>
- </extension>
- <extension point="org.eclipse.ant.core.antTasks">
- <antTask
- library="ant_tasks/director-ant.jar"
- name="p2.director"
- class="org.eclipse.equinox.p2.director.app.ant.DirectorTask">
- </antTask>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/pom.xml b/bundles/org.eclipse.equinox.p2.director.app/pom.xml
deleted file mode 100644
index 4451f7ce6..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.director.app</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml b/bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml
deleted file mode 100644
index 1582323b9..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/scripts/buildExtraJAR.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.equinox.p2.director.app" default="default" basedir="..">
-
- <target name="default" description="Jar up the binaries that were compiled by the jdt builder" >
- <mkdir dir="${basedir}/ant_tasks" />
- <delete file="${basedir}/ant_tasks/director-ant.jar" failonerror="false"/>
- <jar destfile="${basedir}/ant_tasks/director-ant.jar" basedir="${basedir}/bin_ant"/>
- </target>
-
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Activator.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Activator.java
deleted file mode 100644
index de0403a9a..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Activator.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.director.app;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.director.app"; //$NON-NLS-1$
- private static BundleContext bundleContext;
-
- public static BundleContext getContext() {
- return bundleContext;
- }
-
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
- }
-
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-}
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
deleted file mode 100644
index 6619426d7..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
+++ /dev/null
@@ -1,662 +0,0 @@
-/*******************************************************************************
- * 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
- * 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 java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
-import org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.*;
-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.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceReference;
-
-/**
- * This is the original p2 director application created for the p2 1.0 release. There
- * is a replacement application in {@link DirectorApplication} that should be preferred
- * over this implementation where possible. This implementation remains for backwards
- * compatibility purposes.
- * @deprecated
- */
-public class Application implements IApplication {
- private static final Integer EXIT_ERROR = new Integer(13);
- static private final String ANT_PROPERTY_PREFIX = "${"; //$NON-NLS-1$
- static private final String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
-
- public static final int COMMAND_INSTALL = 0;
- public static final int COMMAND_UNINSTALL = 1;
- public static final int COMMAND_LIST = 2;
-
- public static final String[] COMMAND_NAMES = {"-installIU", "-uninstallIU", "-list"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- private Path destination;
-
- private URI[] artifactRepositoryLocations;
- private URI[] metadataRepositoryLocations;
-
- private URI[] metadataReposForRemoval;
- private URI[] artifactReposForRemoval;
- private IArtifactRepositoryManager artifactManager;
- private IMetadataRepositoryManager metadataManager;
-
- private String root;
- private Version version = null;
- private String flavor;
- private String profileId;
- private String profileProperties; // a comma-separated list of property pairs "tag=value"
- private String bundlePool = null;
- private String nl;
- private String os;
- private String arch;
- private String ws;
- private boolean roamingProfile = false;
- private IPlanner planner;
- private IEngine engine;
- private boolean noProfileId = false;
-
- private int command = -1;
- protected IProvisioningAgent agent;
-
- private void ambigousCommand(int cmd1, int cmd2) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Ambigous_Command, new Object[] {COMMAND_NAMES[cmd1], COMMAND_NAMES[cmd2]})));
- }
-
- private ProfileChangeRequest buildProvisioningRequest(IProfile profile, IQueryResult<IInstallableUnit> roots, boolean install) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- markRoots(request, roots);
- if (install) {
- request.addAll(roots.toUnmodifiableSet());
- } else {
- request.removeAll(roots.toUnmodifiableSet());
- }
- return request;
- }
-
- /*
- * Copied from ProvisioningHelper 1.57
- */
- static IProfile addProfile(IProvisioningAgent agent, String profileId, Map<String, String> properties) throws ProvisionException {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- IProfile profile = profileRegistry.getProfile(profileId);
- if (profile != null)
- return profile;
-
- Map<String, String> profileProperties = new HashMap<String, String>(properties);
- if (profileProperties.get(IProfile.PROP_ENVIRONMENTS) == null) {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (info != null)
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, "osgi.os=" + info.getOS() + ",osgi.ws=" + info.getWS() + ",osgi.arch=" + info.getOSArch()); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- else
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, ""); //$NON-NLS-1$
- }
- return profileRegistry.addProfile(profileId, profileProperties);
- }
-
- /*
- * Copied from ProvisioningHelper 1.57
- */
- static IProfile getProfile(IProvisioningAgent agent, String id) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return null;
- return profileRegistry.getProfile(id);
- }
-
- /*
- * Copied from ProvisioningHelper 1.57
- */
- static IMetadataRepository getMetadataRepository(IProvisioningAgent agent, URI location) {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new IllegalStateException("No metadata repository manager found"); //$NON-NLS-1$
- try {
- return manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- return null;
- }
- }
-
- /*
- * Copied from ProvisioningHelper 1.57
- */
- static IQueryResult<IInstallableUnit> getInstallableUnits(IProvisioningAgent agent, URI location, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- IQueryable<IInstallableUnit> queryable = null;
- if (location == null) {
- queryable = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- } else {
- queryable = getMetadataRepository(agent, location);
- }
- if (queryable != null)
- return queryable.query(query, monitor);
- return Collector.emptyCollector();
- }
-
- private String getEnvironmentProperty() {
- Map<String, String> values = new HashMap<String, String>();
- if (os != null)
- values.put("osgi.os", os); //$NON-NLS-1$
- if (nl != null)
- values.put("osgi.nl", nl); //$NON-NLS-1$
- if (ws != null)
- values.put("osgi.ws", ws); //$NON-NLS-1$
- if (arch != null)
- values.put("osgi.arch", arch); //$NON-NLS-1$
- if (values.isEmpty())
- return null;
- return toString(values);
- }
-
- private IProfile initializeProfile() throws CoreException {
- if (profileId == null) {
- profileId = IProfileRegistry.SELF;
- noProfileId = true;
- }
- IProfile profile = getProfile(agent, profileId);
- if (profile == null) {
- if (destination == null)
- missingArgument("destination"); //$NON-NLS-1$
- if (flavor == null)
- flavor = System.getProperty("eclipse.p2.configurationFlavor", FLAVOR_DEFAULT); //$NON-NLS-1$
-
- Map<String, String> props = new HashMap<String, String>();
- props.put(IProfile.PROP_INSTALL_FOLDER, destination.toOSString());
- if (bundlePool == null || bundlePool.equals(Messages.destination_commandline))
- props.put(IProfile.PROP_CACHE, destination.toOSString());
- else
- props.put(IProfile.PROP_CACHE, bundlePool);
- if (roamingProfile)
- props.put(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
-
- String env = getEnvironmentProperty();
- if (env != null)
- props.put(IProfile.PROP_ENVIRONMENTS, env);
- if (profileProperties != null) {
- putProperties(profileProperties, props);
- }
- profile = addProfile(agent, profileId, props);
- }
- return profile;
- }
-
- private void initializeRepositories(boolean throwException) throws CoreException {
- if (artifactRepositoryLocations == null) {
- if (throwException)
- missingArgument("artifactRepository"); //$NON-NLS-1$
- } else {
- artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (artifactManager == null) {
- if (throwException)
- throw new ProvisionException(Messages.Application_NoManager);
- } else {
- int removalIdx = 0;
- boolean anyValid = false; // do we have any valid repos or did they all fail to load?
- artifactReposForRemoval = new URI[artifactRepositoryLocations.length];
- for (int i = 0; i < artifactRepositoryLocations.length; i++) {
- try {
- if (!artifactManager.contains(artifactRepositoryLocations[i])) {
- artifactManager.loadRepository(artifactRepositoryLocations[i], null);
- artifactReposForRemoval[removalIdx++] = artifactRepositoryLocations[i];
- }
- anyValid = true;
- } catch (ProvisionException e) {
- //one of the repositories did not load
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, artifactRepositoryLocations[i].toString() + " failed to load", e)); //$NON-NLS-1$
- }
- }
- if (throwException && !anyValid)
- //all repositories failed to load
- throw new ProvisionException(Messages.Application_NoRepositories);
- }
- }
-
- if (metadataRepositoryLocations == null) {
- if (throwException)
- missingArgument("metadataRepository"); //$NON-NLS-1$
- } else {
- metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (metadataManager == null) {
- if (throwException)
- throw new ProvisionException(Messages.Application_NoManager);
- } else {
- int removalIdx = 0;
- boolean anyValid = false; // do we have any valid repos or did they all fail to load?
- metadataReposForRemoval = new URI[metadataRepositoryLocations.length];
- for (int i = 0; i < metadataRepositoryLocations.length; i++) {
- try {
- if (!metadataManager.contains(metadataRepositoryLocations[i])) {
- metadataManager.loadRepository(metadataRepositoryLocations[i], null);
- metadataReposForRemoval[removalIdx++] = metadataRepositoryLocations[i];
- }
- anyValid = true;
- } catch (ProvisionException e) {
- //one of the repositories did not load
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, metadataRepositoryLocations[i].toString() + " failed to load", e)); //$NON-NLS-1$
- }
- }
- if (throwException && !anyValid)
- //all repositories failed to load
- throw new ProvisionException(Messages.Application_NoRepositories);
- }
- }
- }
-
- private void initializeServices() throws ProvisionException {
- ServiceReference<IProvisioningAgentProvider> agentProviderRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.class);
- IProvisioningAgentProvider provider = Activator.getContext().getService(agentProviderRef);
- agent = provider.createAgent(null);
-
- IDirector director = (IDirector) agent.getService(IDirector.SERVICE_NAME);
- if (director == null)
- throw new RuntimeException(Messages.Missing_director);
-
- planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new RuntimeException(Messages.Missing_planner);
-
- engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new RuntimeException(Messages.Missing_Engine);
- }
-
- 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());
- }
- }
-
- private void missingArgument(String argumentName) throws CoreException {
- throw new CoreException(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_Required_Argument, argumentName)));
- }
-
- private IStatus planAndExecute(IProfile profile, ProvisioningContext context, ProfileChangeRequest request) {
- IProvisioningPlan result;
- IStatus operationStatus;
- result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- if (!result.getStatus().isOK())
- operationStatus = result.getStatus();
- else {
- operationStatus = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- }
- return operationStatus;
- }
-
- private void printRequest(ProfileChangeRequest request) {
- 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 (IInstallableUnit removed : toRemove) {
- System.out.println(NLS.bind(Messages.Uninstalling, removed.getId(), removed.getVersion()));
- }
- }
-
- public void processArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
-
- String opt = args[i];
- if (opt.equals("-roaming")) { //$NON-NLS-1$
- roamingProfile = true;
- }
-
- if (opt.equals(COMMAND_NAMES[COMMAND_LIST])) {
- if (command != -1)
- ambigousCommand(COMMAND_LIST, command);
- command = COMMAND_LIST;
- }
-
- // check for args without parameters (i.e., a flag arg)
-
- // check for args with parameters. If we are at the last
- // argument or
- // if the next one
- // has a '-' as the first character, then we can't have an arg
- // with
- // a parm so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
-
- String arg = args[++i];
-
- if (opt.equalsIgnoreCase("-profile")) //$NON-NLS-1$
- profileId = arg;
-
- if (opt.equalsIgnoreCase("-profileProperties") || opt.equalsIgnoreCase("-props")) //$NON-NLS-1$ //$NON-NLS-2$
- profileProperties = arg;
-
- // we create a path object here to handle ../ entries in the middle of paths
- if (opt.equalsIgnoreCase("-destination") || opt.equalsIgnoreCase("-dest")) { //$NON-NLS-1$ //$NON-NLS-2$
- if (arg.startsWith("file:")) //$NON-NLS-1$
- arg = arg.substring(5);
- destination = new Path(arg);
- }
-
- // we create a path object here to handle ../ entries in the middle of paths
- if (opt.equalsIgnoreCase("-bundlepool") || opt.equalsIgnoreCase("-bp")) { //$NON-NLS-1$ //$NON-NLS-2$
- if (arg.startsWith("file:")) //$NON-NLS-1$
- arg = arg.substring(5);
- bundlePool = new Path(arg).toOSString();
- }
-
- if (opt.equalsIgnoreCase("-metadataRepository") || opt.equalsIgnoreCase("-metadataRepositories") || opt.equalsIgnoreCase("-mr")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- metadataRepositoryLocations = getURIs(arg);
-
- if (opt.equalsIgnoreCase("-artifactRepository") || opt.equalsIgnoreCase("-artifactRepositories") || opt.equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- artifactRepositoryLocations = getURIs(arg);
-
- if (opt.equalsIgnoreCase("-flavor")) //$NON-NLS-1$
- flavor = arg;
-
- if (opt.equalsIgnoreCase(COMMAND_NAMES[COMMAND_INSTALL])) {
- if (command != -1)
- ambigousCommand(COMMAND_INSTALL, command);
- root = arg;
- command = COMMAND_INSTALL;
- }
-
- if (opt.equalsIgnoreCase("-version")) { //$NON-NLS-1$
- if (arg != null && !arg.startsWith(ANT_PROPERTY_PREFIX))
- version = Version.create(arg);
- }
-
- if (opt.equalsIgnoreCase(COMMAND_NAMES[COMMAND_UNINSTALL])) {
- if (command != -1)
- ambigousCommand(COMMAND_UNINSTALL, command);
- root = arg;
- command = COMMAND_UNINSTALL;
- }
-
- if (opt.equalsIgnoreCase("-p2.os")) { //$NON-NLS-1$
- os = arg;
- }
- if (opt.equalsIgnoreCase("-p2.ws")) { //$NON-NLS-1$
- ws = arg;
- }
- if (opt.equalsIgnoreCase("-p2.nl")) { //$NON-NLS-1$
- nl = arg;
- }
- if (opt.equalsIgnoreCase("-p2.arch")) { //$NON-NLS-1$
- arch = arg;
- }
- }
-
- }
-
- /**
- * @param pairs a comma separated list of tag=value pairs
- * @param properties the collection into which the pairs are put
- */
- private void putProperties(String pairs, Map<String, String> properties) {
- StringTokenizer tok = new StringTokenizer(pairs, ",", true); //$NON-NLS-1$
- while (tok.hasMoreTokens()) {
- String next = tok.nextToken().trim();
- int i = next.indexOf('=');
- if (i > 0 && i < next.length() - 1) {
- String tag = next.substring(0, i).trim();
- String value = next.substring(i + 1, next.length()).trim();
- if (tag.length() > 0 && value.length() > 0) {
- properties.put(tag, value);
- }
- }
- }
- }
-
- public Object run(String[] args) throws Exception {
- System.out.println(Messages.Deprecated_application);
- long time = -System.currentTimeMillis();
- initializeServices();
- processArguments(args);
-
- IStatus operationStatus = Status.OK_STATUS;
- IQuery<IInstallableUnit> query;
- IQueryResult<IInstallableUnit> roots;
- try {
- initializeRepositories(command == COMMAND_INSTALL);
- switch (command) {
- case COMMAND_INSTALL :
- case COMMAND_UNINSTALL :
-
- IProfile profile = initializeProfile();
- query = QueryUtil.createIUQuery(root, version == null ? VersionRange.emptyRange : new VersionRange(version, true, version, true));
- roots = collectRootIUs(metadataRepositoryLocations, QueryUtil.createLatestQuery(query));
- if (roots.isEmpty())
- roots = profile.query(query, new NullProgressMonitor());
- if (roots.isEmpty()) {
- System.out.println(NLS.bind(Messages.Missing_IU, root));
- logFailure(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Missing_IU, root)));
- return EXIT_ERROR;
- }
- // 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();
- try {
- IStatus updateRoamStatus = updateRoamingProperties(profile);
- if (!updateRoamStatus.isOK()) {
- MultiStatus multi = new MultiStatus(Activator.ID, IStatus.ERROR, NLS.bind(Messages.Cant_change_roaming, profile.getProfileId()), null);
- multi.add(updateRoamStatus);
- System.out.println(multi.getMessage());
- System.out.println(updateRoamStatus.getMessage());
- logFailure(multi);
- return EXIT_ERROR;
- }
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(metadataRepositoryLocations);
- context.setArtifactRepositories(artifactRepositoryLocations);
- ProfileChangeRequest request = buildProvisioningRequest(profile, roots, command == COMMAND_INSTALL);
- printRequest(request);
- operationStatus = planAndExecute(profile, context, request);
- } finally {
- // if we were originally were set to be roaming and we changed it, change it back before we return
- if (wasRoaming && !Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
- setRoaming(profile);
- }
- break;
- case COMMAND_LIST :
- query = QueryUtil.createIUQuery(null, VersionRange.emptyRange);
- if (metadataRepositoryLocations == null)
- missingArgument("metadataRepository"); //$NON-NLS-1$
-
- roots = collectRootIUs(metadataRepositoryLocations, query);
- Iterator<IInstallableUnit> unitIterator = roots.iterator();
- while (unitIterator.hasNext()) {
- IInstallableUnit iu = unitIterator.next();
- System.out.println(iu.getId());
- }
- break;
- }
- } finally {
- cleanupRepositories();
- }
-
- time += System.currentTimeMillis();
- if (operationStatus.isOK())
- System.out.println(NLS.bind(Messages.Operation_complete, new Long(time)));
- else {
- System.out.println(Messages.Operation_failed);
- logFailure(operationStatus);
- return EXIT_ERROR;
- }
- return IApplication.EXIT_OK;
- }
-
- private void cleanupRepositories() {
- if (artifactReposForRemoval != null && artifactManager != null) {
- for (int i = 0; i < artifactReposForRemoval.length && artifactReposForRemoval[i] != null; i++) {
- artifactManager.removeRepository(artifactReposForRemoval[i]);
- }
- }
- if (metadataReposForRemoval != null && metadataManager != null) {
- for (int i = 0; i < metadataReposForRemoval.length && metadataReposForRemoval[i] != null; i++) {
- metadataManager.removeRepository(metadataReposForRemoval[i]);
- }
- }
- }
-
- class LocationQueryable implements IQueryable<IInstallableUnit> {
- private URI location;
-
- public LocationQueryable(URI location) {
- this.location = location;
- }
-
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return getInstallableUnits(agent, location, query, monitor);
- }
- }
-
- private IQueryResult<IInstallableUnit> collectRootIUs(URI[] locations, IQuery<IInstallableUnit> query) {
- IProgressMonitor nullMonitor = new NullProgressMonitor();
-
- if (locations == null || locations.length == 0)
- return getInstallableUnits(agent, (URI) null, query, nullMonitor);
-
- List<IQueryable<IInstallableUnit>> locationQueryables = new ArrayList<IQueryable<IInstallableUnit>>(locations.length);
- for (int i = 0; i < locations.length; i++)
- locationQueryables.add(new LocationQueryable(locations[i]));
- return QueryUtil.compoundQueryable(locationQueryables).query(query, nullMonitor);
- }
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- public void stop() {
- //nothing to do
- }
-
- private String toString(Map<String, String> context) {
- StringBuffer result = new StringBuffer();
- boolean first = true;
- for (String key : context.keySet()) {
- if (first)
- first = false;
- else
- result.append(',');
- result.append(key);
- result.append('=');
- result.append(context.get(key));
- }
- return result.toString();
- }
-
- private IStatus updateRoamingProperties(IProfile profile) {
- // if the user didn't specify a destination path on the command-line
- // then we assume they are installing into the currently running
- // instance and we don't have anything to update
- if (destination == null)
- return Status.OK_STATUS;
-
- // if the user didn't set a profile id on the command-line this is ok if they
- // also didn't set the destination path. (handled in the case above) otherwise throw an error.
- if (noProfileId) // && destination != null
- return new Status(IStatus.ERROR, Activator.ID, Messages.Missing_profileid);
-
- // make sure that we are set to be roaming before we update the values
- if (!Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
- return Status.OK_STATUS;
-
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- File destinationFile = destination.toFile();
- if (!destinationFile.equals(new File(profile.getProperty(IProfile.PROP_INSTALL_FOLDER))))
- request.setProfileProperty(IProfile.PROP_INSTALL_FOLDER, destination.toOSString());
- if (!destinationFile.equals(new File(profile.getProperty(IProfile.PROP_CACHE))))
- request.setProfileProperty(IProfile.PROP_CACHE, destination.toOSString());
- if (request.getProfileProperties().size() == 0)
- return Status.OK_STATUS;
-
- // otherwise we have to make a change so set the profile to be non-roaming so the
- // values don't get recalculated to the wrong thing if we are flushed from memory - we
- // will set it back later (see bug 269468)
- request.setProfileProperty(IProfile.PROP_ROAMING, "false"); //$NON-NLS-1$
-
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- }
-
- /*
- * Set the roaming property on the given profile.
- */
- private IStatus setRoaming(IProfile profile) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.setProfileProperty(IProfile.PROP_ROAMING, "true"); //$NON-NLS-1$
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- }
-
- private static URI[] getURIs(String spec) {
- if (spec == null)
- return null;
- String[] urlSpecs = getArrayFromString(spec, ","); //$NON-NLS-1$
- ArrayList<URI> result = new ArrayList<URI>(urlSpecs.length);
- for (int i = 0; i < urlSpecs.length; i++) {
- try {
- result.add(URIUtil.fromString(urlSpecs[i]));
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.Ignored_repo, urlSpecs[i])));
- }
- }
- if (result.size() == 0)
- return null;
- return result.toArray(new URI[result.size()]);
- }
-
- /**
- * Convert a list of tokens into an array. The list separator has to be
- * specified.
- */
- public static String[] getArrayFromString(String list, String separator) {
- if (list == null || list.trim().equals("")) //$NON-NLS-1$
- return new String[0];
- List<String> result = new ArrayList<String>();
- for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
- String token = tokens.nextToken().trim();
- if (!token.equals("")) //$NON-NLS-1$
- result.add(token);
- }
- return result.toArray(new String[result.size()]);
- }
-
- private void logFailure(IStatus status) {
- FrameworkLog log = (FrameworkLog) ServiceHelper.getService(Activator.getContext(), FrameworkLog.class.getName());
- if (log != null)
- System.err.println("Application failed, log file location: " + log.getFile()); //$NON-NLS-1$
- LogHelper.log(status);
- }
-}
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
deleted file mode 100644
index 2b2de0d18..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
+++ /dev/null
@@ -1,1043 +0,0 @@
-/*******************************************************************************
- * 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
- * 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 java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.cert.Certificate;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
-import org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.Version;
-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.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * This director implementation is a complete replacement for the old director application.
- * This implementation has simplified command line
- * arguments, and doesn't require the user to set system property such as the
- * p2 data location. See bug 268138 for related discussion.
- */
-public class DirectorApplication implements IApplication {
- class AvoidTrustPromptService extends UIServices {
- @Override
- public AuthenticationInfo getUsernamePassword(String location) {
- return null;
- }
-
- @Override
- public AuthenticationInfo getUsernamePassword(String location, AuthenticationInfo previousInfo) {
- return null;
- }
-
- @Override
- public TrustInfo getTrustInfo(Certificate[][] untrustedChain, String[] unsignedDetail) {
- return new TrustInfo(null, false, true);
- }
- }
-
- class LocationQueryable implements IQueryable<IInstallableUnit> {
- private URI location;
-
- public LocationQueryable(URI location) {
- this.location = location;
- Assert.isNotNull(location);
- }
-
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return getInstallableUnits(location, query, monitor);
- }
- }
-
- private static class CommandLineOption {
- private final String[] identifiers;
- private final String optionSyntaxString;
- private final String helpString;
-
- CommandLineOption(String[] identifiers, String optionSyntaxString, String helpString) {
- this.identifiers = identifiers;
- this.optionSyntaxString = optionSyntaxString;
- this.helpString = helpString;
- }
-
- boolean isOption(String opt) {
- int idx = identifiers.length;
- while (--idx >= 0)
- if (identifiers[idx].equalsIgnoreCase(opt))
- return true;
- return false;
- }
-
- void appendHelp(PrintStream out) {
- out.print(identifiers[0]);
- for (int idx = 1; idx < identifiers.length; ++idx) {
- out.print(" | "); //$NON-NLS-1$
- out.print(identifiers[idx]);
- }
- if (optionSyntaxString != null) {
- out.print(' ');
- out.print(optionSyntaxString);
- }
- out.println();
- out.print(" "); //$NON-NLS-1$
- out.println(helpString);
- }
- }
-
- private static final CommandLineOption OPTION_HELP = new CommandLineOption(new String[] {"-help", "-h", "-?"}, null, Messages.Help_Prints_this_command_line_help); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_LIST = new CommandLineOption(new String[] {"-list", "-l"}, Messages.Help_lb_lt_comma_separated_list_gt_rb, Messages.Help_List_all_IUs_found_in_repos); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_LIST_INSTALLED = new CommandLineOption(new String[] {"-listInstalledRoots", "-lir"}, null, Messages.Help_List_installed_roots); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_INSTALL_IU = new CommandLineOption(new String[] {"-installIU", "-installIUs", "-i"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_Installs_the_listed_IUs); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_UNINSTALL_IU = new CommandLineOption(new String[] {"-uninstallIU", "-uninstallIUs", "-u"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_Uninstalls_the_listed_IUs); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_REVERT = new CommandLineOption(new String[] {"-revert"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_Revert_to_previous_state); //$NON-NLS-1$
- private static final CommandLineOption OPTION_DESTINATION = new CommandLineOption(new String[] {"-destination", "-d"}, Messages.Help_lt_path_gt, Messages.Help_The_folder_in_which_the_targetd_product_is_located); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_METADATAREPOS = new CommandLineOption(new String[] {"-metadatarepository", "metadatarepositories", "-m"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_URLs_denoting_metadata_repositories); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_ARTIFACTREPOS = new CommandLineOption(new String[] {"-artifactrepository", "artifactrepositories", "-a"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_URLs_denoting_artifact_repositories); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_REPOSITORIES = new CommandLineOption(new String[] {"-repository", "repositories", "-r"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_URLs_denoting_colocated_repositories); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final CommandLineOption OPTION_VERIFY_ONLY = new CommandLineOption(new String[] {"-verifyOnly"}, null, Messages.Help_Only_verify_dont_install); //$NON-NLS-1$
- private static final CommandLineOption OPTION_PROFILE = new CommandLineOption(new String[] {"-profile", "-p"}, Messages.Help_lt_name_gt, Messages.Help_Defines_what_profile_to_use_for_the_actions); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_FLAVOR = new CommandLineOption(new String[] {"-flavor", "-f"}, Messages.Help_lt_name_gt, Messages.Help_Defines_flavor_to_use_for_created_profile); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_SHARED = new CommandLineOption(new String[] {"-shared", "-s"}, Messages.Help_lb_lt_path_gt_rb, Messages.Help_Use_a_shared_location_for_the_install); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_BUNDLEPOOL = new CommandLineOption(new String[] {"-bundlepool", "-b"}, Messages.Help_lt_path_gt, Messages.Help_The_location_where_the_plugins_and_features_will_be_stored); //$NON-NLS-1$ //$NON-NLS-2$
- private static final CommandLineOption OPTION_PROFILE_PROPS = new CommandLineOption(new String[] {"-profileproperties"}, Messages.Help_lt_comma_separated_list_gt, Messages.Help_A_list_of_properties_in_the_form_key_value_pairs); //$NON-NLS-1$
- private static final CommandLineOption OPTION_ROAMING = new CommandLineOption(new String[] {"-roaming"}, null, Messages.Help_Indicates_that_the_product_can_be_moved); //$NON-NLS-1$
- private static final CommandLineOption OPTION_P2_OS = new CommandLineOption(new String[] {"-p2.os"}, null, Messages.Help_The_OS_when_profile_is_created); //$NON-NLS-1$
- private static final CommandLineOption OPTION_P2_WS = new CommandLineOption(new String[] {"-p2.ws"}, null, Messages.Help_The_WS_when_profile_is_created); //$NON-NLS-1$
- private static final CommandLineOption OPTION_P2_ARCH = new CommandLineOption(new String[] {"-p2.arch"}, null, Messages.Help_The_ARCH_when_profile_is_created); //$NON-NLS-1$
- private static final CommandLineOption OPTION_P2_NL = new CommandLineOption(new String[] {"-p2.nl"}, null, Messages.Help_The_NL_when_profile_is_created); //$NON-NLS-1$
- private static final CommandLineOption OPTION_PURGEHISTORY = new CommandLineOption(new String[] {"-purgeHistory"}, null, Messages.Help_Purge_the_install_registry); //$NON-NLS-1$
- private static final CommandLineOption OPTION_FOLLOW_REFERENCES = new CommandLineOption(new String[] {"-followReferences"}, null, Messages.Help_Follow_references); //$NON-NLS-1$
-
- private static final Integer EXIT_ERROR = new Integer(13);
- static private final String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
- static private final String PROP_P2_PROFILE = "eclipse.p2.profile"; //$NON-NLS-1$
- static private final String NO_ARTIFACT_REPOSITORIES_AVAILABLE = "noArtifactRepositoriesAvailable"; //$NON-NLS-1$
-
- private static final String FOLLOW_ARTIFACT_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followArtifactRepositoryReferences"; //$NON-NLS-1$
-
- public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
-
- private static void getURIs(List<URI> uris, String spec) throws CoreException {
- if (spec == null)
- return;
- String[] urlSpecs = StringHelper.getArrayFromString(spec, ',');
- for (int i = 0; i < urlSpecs.length; i++) {
- try {
- uris.add(new URI(urlSpecs[i]));
- } catch (URISyntaxException e1) {
- try {
- uris.add(URIUtil.fromString(urlSpecs[i]));
- } catch (URISyntaxException e) {
- throw new ProvisionException(NLS.bind(Messages.unable_to_parse_0_to_uri_1, urlSpecs[i], e.getMessage()));
- }
- }
-
- }
- }
-
- private static String getRequiredArgument(String[] args, int argIdx) throws CoreException {
- if (argIdx < args.length) {
- String arg = args[argIdx];
- if (!arg.startsWith("-")) //$NON-NLS-1$
- return arg;
- }
- throw new ProvisionException(NLS.bind(Messages.option_0_requires_an_argument, args[argIdx - 1]));
- }
-
- private static String getOptionalArgument(String[] args, int argIdx) {
- //Look ahead to the next argument
- ++argIdx;
- if (argIdx < args.length) {
- String arg = args[argIdx];
- if (!arg.startsWith("-")) //$NON-NLS-1$
- return arg;
- }
- return null;
- }
-
- private static void parseIUsArgument(List<IVersionedId> vnames, String arg) {
- String[] roots = StringHelper.getArrayFromString(arg, ',');
- for (int i = 0; i < roots.length; ++i)
- vnames.add(VersionedId.parse(roots[i]));
- }
-
- private static File processFileArgument(String arg) {
- if (arg.startsWith("file:")) //$NON-NLS-1$
- arg = arg.substring(5);
-
- // we create a path object here to handle ../ entries in the middle of paths
- return Path.fromOSString(arg).toFile();
- }
-
- private IArtifactRepositoryManager artifactManager;
- IMetadataRepositoryManager metadataManager;
-
- private URI[] artifactReposForRemoval;
- private URI[] metadataReposForRemoval;
-
- private final List<URI> artifactRepositoryLocations = new ArrayList<URI>();
- private final List<URI> metadataRepositoryLocations = new ArrayList<URI>();
- private final List<IVersionedId> rootsToInstall = new ArrayList<IVersionedId>();
- private final List<IVersionedId> rootsToUninstall = new ArrayList<IVersionedId>();
- private final List<IVersionedId> rootsToList = new ArrayList<IVersionedId>();
-
- private File bundlePool = null;
- private File destination;
- private File sharedLocation;
- private String flavor;
- private boolean printHelpInfo = false;
- private boolean printIUList = false;
- private boolean printRootIUList = false;
- private long revertToPreviousState = -1;
- private boolean verifyOnly = false;
- private boolean roamingProfile = false;
- private boolean purgeRegistry = false;
- private boolean stackTrace = false;
- private boolean followReferences = false;
- private String profileId;
- private String profileProperties; // a comma-separated list of property pairs "tag=value"
- private String ws;
- private String os;
- private String arch;
- private String nl;
-
- private IEngine engine;
- private boolean noProfileId = false;
- private PackageAdmin packageAdmin;
- private ServiceReference<PackageAdmin> packageAdminRef;
- private IPlanner planner;
- private ILog log = null;
-
- private IProvisioningAgent targetAgent;
- private boolean noArtifactRepositorySpecified = false;
-
- private ProfileChangeRequest buildProvisioningRequest(IProfile profile, Collection<IInstallableUnit> installs, Collection<IInstallableUnit> uninstalls) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- markRoots(request, installs);
- markRoots(request, uninstalls);
- request.addAll(installs);
- request.removeAll(uninstalls);
- return request;
- }
-
- private void cleanupRepositories() {
- if (artifactReposForRemoval != null && artifactManager != null) {
- for (int i = 0; i < artifactReposForRemoval.length && artifactReposForRemoval[i] != null; i++) {
- artifactManager.removeRepository(artifactReposForRemoval[i]);
- }
- }
- if (metadataReposForRemoval != null && metadataManager != null) {
- for (int i = 0; i < metadataReposForRemoval.length && metadataReposForRemoval[i] != null; i++) {
- metadataManager.removeRepository(metadataReposForRemoval[i]);
- }
- }
- }
-
- private IQueryResult<IInstallableUnit> collectRootIUs(IQuery<IInstallableUnit> query) {
- IProgressMonitor nullMonitor = new NullProgressMonitor();
-
- int top = metadataRepositoryLocations.size();
- if (top == 0)
- return getInstallableUnits(null, query, nullMonitor);
-
- List<IQueryable<IInstallableUnit>> locationQueryables = new ArrayList<IQueryable<IInstallableUnit>>(top);
- for (int i = 0; i < top; i++)
- locationQueryables.add(new LocationQueryable(metadataRepositoryLocations.get(i)));
- return QueryUtil.compoundQueryable(locationQueryables).query(query, nullMonitor);
- }
-
- 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) {
- IVersionedId rootName = rootNames.get(i);
- Version v = rootName.getVersion();
- IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(rootName.getId(), Version.emptyVersion.equals(v) ? VersionRange.emptyRange : new VersionRange(v, true, v, true));
- IQueryResult<IInstallableUnit> roots = null;
- if (forInstall)
- roots = collectRootIUs(QueryUtil.createLatestQuery(query));
-
- if (roots == null || roots.isEmpty())
- roots = profile.query(query, new NullProgressMonitor());
-
- Iterator<IInstallableUnit> itor = roots.iterator();
- if (!itor.hasNext())
- throw new CoreException(new Status(IStatus.ERROR, org.eclipse.equinox.internal.p2.director.app.Activator.ID, NLS.bind(Messages.Missing_IU, rootName)));
- do {
- allRoots.add(itor.next());
- } while (itor.hasNext());
- }
- return allRoots;
- }
-
- synchronized Bundle getBundle(String symbolicName) {
- if (packageAdmin == null)
- return null;
-
- Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
- if (bundles == null)
- return null;
- //Return the first bundle that is not installed or uninstalled
- for (int i = 0; i < bundles.length; i++) {
- if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
- return bundles[i];
- }
- }
- return null;
- }
-
- private String getEnvironmentProperty() {
- HashMap<String, String> values = new HashMap<String, String>();
- if (os != null)
- values.put("osgi.os", os); //$NON-NLS-1$
- if (nl != null)
- values.put("osgi.nl", nl); //$NON-NLS-1$
- if (ws != null)
- values.put("osgi.ws", ws); //$NON-NLS-1$
- if (arch != null)
- values.put("osgi.arch", arch); //$NON-NLS-1$
- return values.isEmpty() ? null : toString(values);
- }
-
- private IProfile getProfile() {
- IProfileRegistry profileRegistry = (IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileId == null) {
- profileId = IProfileRegistry.SELF;
- noProfileId = true;
- }
- return profileRegistry.getProfile(profileId);
- }
-
- private IProfile initializeProfile() throws CoreException {
- IProfile profile = getProfile();
- if (profile == null) {
- if (destination == null)
- missingArgument("destination"); //$NON-NLS-1$
- if (flavor == null)
- flavor = System.getProperty("eclipse.p2.configurationFlavor", FLAVOR_DEFAULT); //$NON-NLS-1$
-
- Map<String, String> props = new HashMap<String, String>();
- props.put(IProfile.PROP_INSTALL_FOLDER, destination.toString());
- if (bundlePool == null)
- props.put(IProfile.PROP_CACHE, sharedLocation == null ? destination.getAbsolutePath() : sharedLocation.getAbsolutePath());
- else
- props.put(IProfile.PROP_CACHE, bundlePool.getAbsolutePath());
- if (roamingProfile)
- props.put(IProfile.PROP_ROAMING, Boolean.TRUE.toString());
-
- String env = getEnvironmentProperty();
- if (env != null)
- props.put(IProfile.PROP_ENVIRONMENTS, env);
- if (profileProperties != null)
- putProperties(profileProperties, props);
- profile = ((IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME)).addProfile(profileId, props);
- }
- return profile;
- }
-
- private void initializeRepositories() throws CoreException {
- if (rootsToInstall.isEmpty() && revertToPreviousState == -1 && !printIUList)
- // Not much point initializing repositories if we have nothing to install
- return;
- if (artifactRepositoryLocations == null)
- missingArgument("-artifactRepository"); //$NON-NLS-1$
-
- artifactManager = (IArtifactRepositoryManager) targetAgent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- if (artifactManager == null)
- throw new ProvisionException(Messages.Application_NoManager);
-
- int removalIdx = 0;
- boolean anyValid = false; // do we have any valid repos or did they all fail to load?
- artifactReposForRemoval = new URI[artifactRepositoryLocations.size()];
- for (int i = 0; i < artifactRepositoryLocations.size(); i++) {
- URI location = artifactRepositoryLocations.get(i);
- try {
- if (!artifactManager.contains(location)) {
- artifactManager.loadRepository(location, null);
- artifactReposForRemoval[removalIdx++] = location;
- }
- anyValid = true;
- } catch (ProvisionException e) {
- //one of the repositories did not load
- logStatus(e.getStatus());
- }
- }
- if (!anyValid)
- noArtifactRepositorySpecified = true;
-
- if (metadataRepositoryLocations == null)
- missingArgument("metadataRepository"); //$NON-NLS-1$
-
- metadataManager = (IMetadataRepositoryManager) targetAgent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (metadataManager == null)
- throw new ProvisionException(Messages.Application_NoManager);
-
- removalIdx = 0;
- anyValid = false; // do we have any valid repos or did they all fail to load?
- int top = metadataRepositoryLocations.size();
- metadataReposForRemoval = new URI[top];
- for (int i = 0; i < top; i++) {
- URI location = metadataRepositoryLocations.get(i);
- try {
- if (!metadataManager.contains(location)) {
- metadataManager.loadRepository(location, null);
- metadataReposForRemoval[removalIdx++] = location;
- }
- anyValid = true;
- } catch (ProvisionException e) {
- //one of the repositories did not load
- logStatus(e.getStatus());
- }
- }
- if (!anyValid)
- //all repositories failed to load
- throw new ProvisionException(Messages.Application_NoRepositories);
- }
-
- private void initializeServices() throws CoreException {
- BundleContext context = Activator.getContext();
- packageAdminRef = context.getServiceReference(PackageAdmin.class);
- packageAdmin = context.getService(packageAdminRef);
- ServiceReference<IProvisioningAgentProvider> agentProviderRef = context.getServiceReference(IProvisioningAgentProvider.class);
- IProvisioningAgentProvider provider = context.getService(agentProviderRef);
- URI p2DataArea;
- if (destination != null || sharedLocation != null) {
- File dataAreaFile = sharedLocation == null ? new File(destination, "p2") : sharedLocation;//$NON-NLS-1$
- p2DataArea = dataAreaFile.toURI();
- } else {
- p2DataArea = null;
- }
- targetAgent = provider.createAgent(p2DataArea);
- targetAgent.registerService(IProvisioningAgent.INSTALLER_AGENT, provider.createAgent(null));
-
- context.ungetService(agentProviderRef);
- if (profileId == null) {
- if (destination != null) {
- File configIni = new File(destination, "configuration/config.ini"); //$NON-NLS-1$
- InputStream in = null;
- try {
- Properties ciProps = new Properties();
- in = new BufferedInputStream(new FileInputStream(configIni));
- ciProps.load(in);
- profileId = ciProps.getProperty(PROP_P2_PROFILE);
- } catch (IOException e) {
- // Ignore
- } finally {
- if (in != null)
- try {
- in.close();
- } catch (IOException e) {
- // Ignore;
- }
- }
- if (profileId == null)
- profileId = destination.toString();
- }
- }
- if (profileId != null)
- targetAgent.registerService(PROP_P2_PROFILE, profileId);
- else
- targetAgent.unregisterService(PROP_P2_PROFILE, null);
-
- IDirector director = (IDirector) targetAgent.getService(IDirector.SERVICE_NAME);
- if (director == null)
- throw new ProvisionException(Messages.Missing_director);
-
- planner = (IPlanner) targetAgent.getService(IPlanner.SERVICE_NAME);
- if (planner == null)
- throw new ProvisionException(Messages.Missing_planner);
-
- engine = (IEngine) targetAgent.getService(IEngine.SERVICE_NAME);
- if (engine == null)
- throw new ProvisionException(Messages.Missing_Engine);
-
- targetAgent.registerService(UIServices.SERVICE_NAME, new AvoidTrustPromptService());
- }
-
- private void logStatus(IStatus status) {
- if (log != null)
- log.log(status);
- else
- LogHelper.log(status);
- }
-
- private void printMessage(String message) {
- if (log != null)
- log.log(message);
- else
- System.out.println(message);
- }
-
- private void logFailure(IStatus status) {
- if (log == null) {
- FrameworkLog frameworkLog = (FrameworkLog) ServiceHelper.getService(Activator.getContext(), FrameworkLog.class.getName());
- if (frameworkLog != null)
- System.err.println("Application failed, log file location: " + frameworkLog.getFile()); //$NON-NLS-1$
- }
-
- logStatus(status);
- }
-
- 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 {
- throw new ProvisionException(NLS.bind(Messages.Missing_Required_Argument, argumentName));
- }
-
- private void performList() throws CoreException {
- if (metadataRepositoryLocations.isEmpty())
- missingArgument("metadataRepository"); //$NON-NLS-1$
-
- ArrayList<IInstallableUnit> allRoots = new ArrayList<IInstallableUnit>();
- if (rootsToList.size() == 0) {
- Iterator<IInstallableUnit> roots = collectRootIUs(QueryUtil.createIUAnyQuery()).iterator();
- while (roots.hasNext())
- allRoots.add(roots.next());
- } else {
- for (IVersionedId rootName : rootsToList) {
- Version v = rootName.getVersion();
- IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(rootName.getId(), Version.emptyVersion.equals(v) ? VersionRange.emptyRange : new VersionRange(v, true, v, true));
- Iterator<IInstallableUnit> roots = collectRootIUs(query).iterator();
- while (roots.hasNext())
- allRoots.add(roots.next());
- }
- }
-
- Collections.sort(allRoots);
- for (IInstallableUnit iu : allRoots) {
- System.out.println(iu.getId() + '=' + iu.getVersion());
- }
- }
-
- private void performProvisioningActions() throws CoreException {
- IProfile profile = initializeProfile();
- 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();
- try {
- updateRoamingProperties(profile);
- ProvisioningContext context = new ProvisioningContext(targetAgent);
- context.setMetadataRepositories(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
- context.setArtifactRepositories(artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
- context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, String.valueOf(followReferences));
- context.setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, String.valueOf(followReferences));
- ProfileChangeRequest request = buildProvisioningRequest(profile, installs, uninstalls);
- printRequest(request);
- planAndExecute(profile, context, request);
- } finally {
- // if we were originally were set to be roaming and we changed it, change it back before we return
- if (wasRoaming && !Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
- setRoaming(profile);
- }
- }
-
- private void planAndExecute(IProfile profile, ProvisioningContext context, ProfileChangeRequest request) throws CoreException {
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- IStatus operationStatus = result.getStatus();
- if (!operationStatus.isOK())
- throw new CoreException(operationStatus);
- executePlan(context, result);
- }
-
- private void executePlan(ProvisioningContext context, IProvisioningPlan result) throws CoreException {
- IStatus operationStatus;
- if (!verifyOnly) {
- operationStatus = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- if (!operationStatus.isOK()) {
- if (noArtifactRepositorySpecified && hasNoRepositoryFound(operationStatus))
- throw new ProvisionException(Messages.Application_NoRepositories);
- throw new CoreException(operationStatus);
- }
- }
- }
-
- private boolean hasNoRepositoryFound(IStatus status) {
- if (status.getException() != null && NO_ARTIFACT_REPOSITORIES_AVAILABLE.equals(status.getException().getMessage()))
- return true;
- if (status.isMultiStatus()) {
- for (IStatus child : status.getChildren()) {
- if (hasNoRepositoryFound(child))
- return true;
- }
- }
- return false;
- }
-
- private void printRequest(ProfileChangeRequest request) {
- Collection<IInstallableUnit> toAdd = request.getAdditions();
- for (IInstallableUnit added : toAdd) {
- printMessage(NLS.bind(Messages.Installing, added.getId(), added.getVersion()));
- }
- Collection<IInstallableUnit> toRemove = request.getRemovals();
- for (IInstallableUnit removed : toRemove) {
- printMessage(NLS.bind(Messages.Uninstalling, removed.getId(), removed.getVersion()));
- }
- }
-
- public void processArguments(String[] args) throws CoreException {
- if (args == null) {
- printHelpInfo = true;
- return;
- }
-
- // Set platform environment defaults
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- os = info.getOS();
- ws = info.getWS();
- nl = info.getNL();
- arch = info.getOSArch();
-
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
- String opt = args[i];
- if (OPTION_LIST.isOption(opt)) {
- printIUList = true;
- String optionalArgument = getOptionalArgument(args, i);
- if (optionalArgument != null) {
- parseIUsArgument(rootsToList, optionalArgument);
- i++;
- }
- continue;
- }
-
- if (OPTION_LIST_INSTALLED.isOption(opt)) {
- printRootIUList = true;
- continue;
- }
-
- if (OPTION_HELP.isOption(opt)) {
- printHelpInfo = true;
- continue;
- }
-
- if (OPTION_INSTALL_IU.isOption(opt)) {
- parseIUsArgument(rootsToInstall, getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_UNINSTALL_IU.isOption(opt)) {
- parseIUsArgument(rootsToUninstall, getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_REVERT.isOption(opt)) {
- String targettedState = getOptionalArgument(args, i);
- if (targettedState == null) {
- revertToPreviousState = 0;
- } else {
- i++;
- revertToPreviousState = Long.valueOf(targettedState).longValue();
- }
- continue;
-
- }
- if (OPTION_PROFILE.isOption(opt)) {
- profileId = getRequiredArgument(args, ++i);
- continue;
- }
-
- if (OPTION_FLAVOR.isOption(opt)) {
- flavor = getRequiredArgument(args, ++i);
- continue;
- }
-
- if (OPTION_SHARED.isOption(opt)) {
- if (++i < args.length) {
- String nxt = args[i];
- if (nxt.startsWith("-")) //$NON-NLS-1$
- --i; // Oops, that's the next option, not an argument
- else
- sharedLocation = processFileArgument(nxt);
- }
- if (sharedLocation == null)
- // -shared without an argument means "Use default shared area"
- sharedLocation = Path.fromOSString(System.getProperty("user.home")).append(".p2/").toFile(); //$NON-NLS-1$ //$NON-NLS-2$
- continue;
- }
-
- if (OPTION_DESTINATION.isOption(opt)) {
- destination = processFileArgument(getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_BUNDLEPOOL.isOption(opt)) {
- bundlePool = processFileArgument(getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_METADATAREPOS.isOption(opt)) {
- getURIs(metadataRepositoryLocations, getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_ARTIFACTREPOS.isOption(opt)) {
- getURIs(artifactRepositoryLocations, getRequiredArgument(args, ++i));
- continue;
- }
-
- if (OPTION_REPOSITORIES.isOption(opt)) {
- String arg = getRequiredArgument(args, ++i);
- getURIs(metadataRepositoryLocations, arg);
- getURIs(artifactRepositoryLocations, arg);
- continue;
- }
-
- if (OPTION_PROFILE_PROPS.isOption(opt)) {
- profileProperties = getRequiredArgument(args, ++i);
- continue;
- }
-
- if (OPTION_ROAMING.isOption(opt)) {
- roamingProfile = true;
- continue;
- }
-
- if (OPTION_VERIFY_ONLY.isOption(opt)) {
- verifyOnly = true;
- continue;
- }
-
- if (OPTION_PURGEHISTORY.isOption(opt)) {
- purgeRegistry = true;
- continue;
- }
-
- if (OPTION_FOLLOW_REFERENCES.isOption(opt)) {
- followReferences = true;
- continue;
- }
-
- if (OPTION_P2_OS.isOption(opt)) {
- os = getRequiredArgument(args, ++i);
- continue;
- }
-
- if (OPTION_P2_WS.isOption(opt)) {
- ws = getRequiredArgument(args, ++i);
- continue;
- }
-
- if (OPTION_P2_NL.isOption(opt)) {
- nl = getRequiredArgument(args, ++i);
- continue;
- }
-
- if (OPTION_P2_ARCH.isOption(opt)) {
- arch = getRequiredArgument(args, ++i);
- continue;
- }
- throw new ProvisionException(NLS.bind(Messages.unknown_option_0, opt));
- }
-
- if (!printHelpInfo && !printIUList && !printRootIUList && !purgeRegistry && rootsToInstall.isEmpty() && rootsToUninstall.isEmpty() && revertToPreviousState == -1) {
- printMessage(Messages.Help_Missing_argument);
- printHelpInfo = true;
- }
- }
-
- /**
- * @param pairs a comma separated list of tag=value pairs
- * @param properties the collection into which the pairs are put
- */
- private void putProperties(String pairs, Map<String, String> properties) {
- String[] propPairs = StringHelper.getArrayFromString(pairs, ',');
- for (int i = 0; i < propPairs.length; ++i) {
- String propPair = propPairs[i];
- int eqIdx = propPair.indexOf('=');
- if (eqIdx < 0)
- continue;
- String tag = propPair.substring(0, eqIdx).trim();
- if (tag.length() == 0)
- continue;
- String value = propPair.substring(eqIdx + 1).trim();
- if (value.length() > 0)
- properties.put(tag, value);
- }
- }
-
- private void cleanupServices() {
- BundleContext context = Activator.getContext();
- //dispose agent
- if (targetAgent != null) {
- targetAgent.stop();
- targetAgent = null;
- }
- if (packageAdminRef != null)
- context.ungetService(packageAdminRef);
- }
-
- public Object run(String[] args) {
- long time = System.currentTimeMillis();
-
- try {
- processArguments(args);
- if (printHelpInfo)
- performHelpInfo();
- else {
- initializeServices();
- initializeRepositories();
- if (revertToPreviousState >= 0) {
- revertToPreviousState();
- } else if (!(rootsToInstall.isEmpty() && rootsToUninstall.isEmpty()))
- performProvisioningActions();
- if (printIUList)
- performList();
- if (printRootIUList)
- performListInstalledRoots();
- if (purgeRegistry)
- purgeRegistry();
- printMessage(NLS.bind(Messages.Operation_complete, new Long(System.currentTimeMillis() - time)));
- }
- return IApplication.EXIT_OK;
- } catch (CoreException e) {
- printMessage(Messages.Operation_failed);
- deeplyPrint(e.getStatus(), System.err, 0);
- logFailure(e.getStatus());
- //set empty exit data to suppress error dialog from launcher
- setSystemProperty("eclipse.exitdata", ""); //$NON-NLS-1$ //$NON-NLS-2$
- return EXIT_ERROR;
- } finally {
- if (packageAdminRef != null) {
- cleanupRepositories();
- cleanupServices();
- }
- }
- }
-
- private void purgeRegistry() throws ProvisionException {
- if (getProfile() == null)
- return;
- IProfileRegistry registry = (IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME);
- long[] allProfiles = registry.listProfileTimestamps(profileId);
- for (int i = 0; i < allProfiles.length - 1; i++) {
- registry.removeProfile(profileId, allProfiles[i]);
- }
- }
-
- private void revertToPreviousState() throws CoreException {
- IProfile profile = initializeProfile();
- IProfileRegistry profileRegistry = (IProfileRegistry) targetAgent.getService(IProfileRegistry.SERVICE_NAME);
- IProfile targetProfile = null;
- if (revertToPreviousState == 0) {
- long[] profiles = profileRegistry.listProfileTimestamps(profile.getProfileId());
- if (profiles.length == 0)
- return;
- targetProfile = profileRegistry.getProfile(profile.getProfileId(), profiles[profiles.length - 1]);
- } else {
- targetProfile = profileRegistry.getProfile(profile.getProfileId(), revertToPreviousState);
- }
- if (targetProfile == null)
- throw new CoreException(new Status(IStatus.ERROR, Activator.ID, Messages.Missing_profile));
- IProvisioningPlan plan = planner.getDiffPlan(profile, targetProfile, new NullProgressMonitor());
-
- ProvisioningContext context = new ProvisioningContext(targetAgent);
- context.setMetadataRepositories(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
- context.setArtifactRepositories(artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
- context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, String.valueOf(followReferences));
- context.setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, String.valueOf(followReferences));
- executePlan(context, plan);
- }
-
- /**
- * Sets a system property, using the EnvironmentInfo service if possible.
- */
- private void setSystemProperty(String key, String value) {
- EnvironmentInfo env = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (env != null) {
- env.setProperty(key, value);
- } else {
- System.getProperties().put(key, value);
- }
- }
-
- private static void appendLevelPrefix(PrintStream strm, int level) {
- for (int idx = 0; idx < level; ++idx)
- strm.print(' ');
- }
-
- IQueryResult<IInstallableUnit> getInstallableUnits(URI location, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- IQueryable<IInstallableUnit> queryable = null;
- if (location == null) {
- queryable = metadataManager;
- } else {
- try {
- queryable = metadataManager.loadRepository(location, monitor);
- } catch (ProvisionException e) {
- //repository is not available - just return empty result
- }
- }
- if (queryable != null)
- return queryable.query(query, monitor);
- return Collector.emptyCollector();
- }
-
- private void deeplyPrint(CoreException ce, PrintStream strm, int level) {
- appendLevelPrefix(strm, level);
- if (stackTrace)
- ce.printStackTrace(strm);
- deeplyPrint(ce.getStatus(), strm, level);
- }
-
- private void deeplyPrint(IStatus status, PrintStream strm, int level) {
- appendLevelPrefix(strm, level);
- String msg = status.getMessage();
- strm.println(msg);
- Throwable cause = status.getException();
- if (cause != null) {
- strm.print("Caused by: "); //$NON-NLS-1$
- if (stackTrace || !(msg.equals(cause.getMessage()) || msg.equals(cause.toString())))
- deeplyPrint(cause, strm, level);
- }
-
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++)
- deeplyPrint(children[i], strm, level + 1);
- }
- }
-
- private void deeplyPrint(Throwable t, PrintStream strm, int level) {
- if (t instanceof CoreException)
- deeplyPrint((CoreException) t, strm, level);
- else {
- appendLevelPrefix(strm, level);
- if (stackTrace)
- t.printStackTrace(strm);
- else {
- strm.println(t.toString());
- Throwable cause = t.getCause();
- if (cause != null) {
- strm.print("Caused by: "); //$NON-NLS-1$
- deeplyPrint(cause, strm, level);
- }
- }
- }
- }
-
- private void performHelpInfo() {
- CommandLineOption[] allOptions = new CommandLineOption[] {OPTION_HELP, OPTION_LIST, OPTION_LIST_INSTALLED, OPTION_INSTALL_IU, OPTION_UNINSTALL_IU, OPTION_REVERT, OPTION_DESTINATION, OPTION_METADATAREPOS, OPTION_ARTIFACTREPOS, OPTION_REPOSITORIES, OPTION_VERIFY_ONLY, OPTION_PROFILE, OPTION_FLAVOR, OPTION_SHARED, OPTION_BUNDLEPOOL, OPTION_PROFILE_PROPS, OPTION_ROAMING, OPTION_P2_OS, OPTION_P2_WS, OPTION_P2_ARCH, OPTION_P2_NL, OPTION_PURGEHISTORY, OPTION_FOLLOW_REFERENCES};
- for (int i = 0; i < allOptions.length; ++i) {
- allOptions[i].appendHelp(System.out);
- }
- }
-
- /*
- * Set the roaming property on the given profile.
- */
- private IStatus setRoaming(IProfile profile) {
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- request.setProfileProperty(IProfile.PROP_ROAMING, "true"); //$NON-NLS-1$
- ProvisioningContext context = new ProvisioningContext(targetAgent);
- context.setMetadataRepositories(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- }
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- private String toString(Map<String, String> context) {
- StringBuffer result = new StringBuffer();
- for (Map.Entry<String, String> entry : context.entrySet()) {
- if (result.length() > 0)
- result.append(',');
- result.append(entry.getKey());
- result.append('=');
- result.append(entry.getValue());
- }
- return result.toString();
- }
-
- private void updateRoamingProperties(IProfile profile) throws CoreException {
- // if the user didn't specify a destination path on the command-line
- // then we assume they are installing into the currently running
- // instance and we don't have anything to update
- if (destination == null)
- return;
-
- // if the user didn't set a profile id on the command-line this is ok if they
- // also didn't set the destination path. (handled in the case above) otherwise throw an error.
- if (noProfileId) // && destination != null
- throw new ProvisionException(Messages.Missing_profileid);
-
- // make sure that we are set to be roaming before we update the values
- if (!Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
- return;
-
- ProfileChangeRequest request = new ProfileChangeRequest(profile);
- if (!destination.equals(new File(profile.getProperty(IProfile.PROP_INSTALL_FOLDER))))
- request.setProfileProperty(IProfile.PROP_INSTALL_FOLDER, destination.getAbsolutePath());
- if (!destination.equals(new File(profile.getProperty(IProfile.PROP_CACHE))))
- request.setProfileProperty(IProfile.PROP_CACHE, destination.getAbsolutePath());
- if (request.getProfileProperties().size() == 0)
- return;
-
- // otherwise we have to make a change so set the profile to be non-roaming so the
- // values don't get recalculated to the wrong thing if we are flushed from memory - we
- // will set it back later (see bug 269468)
- request.setProfileProperty(IProfile.PROP_ROAMING, "false"); //$NON-NLS-1$
-
- ProvisioningContext context = new ProvisioningContext(targetAgent);
- context.setMetadataRepositories(new URI[0]);
- context.setArtifactRepositories(new URI[0]);
- IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
- IStatus status = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
- if (!status.isOK())
- throw new CoreException(new MultiStatus(org.eclipse.equinox.internal.p2.director.app.Activator.ID, IStatus.ERROR, new IStatus[] {status}, NLS.bind(Messages.Cant_change_roaming, profile.getProfileId()), null));
- }
-
- public void stop() {
- if (log != null)
- log.close();
- }
-
- public void setLog(ILog log) {
- this.log = log;
- }
-
- private void performListInstalledRoots() throws CoreException {
- IProfile profile = initializeProfile();
- IQueryResult<IInstallableUnit> roots = profile.query(new UserVisibleRootQuery(), null);
- Set<IInstallableUnit> sorted = new TreeSet<IInstallableUnit>(roots.toUnmodifiableSet());
- for (IInstallableUnit iu : sorted)
- System.out.println(iu.getId() + '/' + iu.getVersion());
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java
deleted file mode 100644
index 7d12bf3f2..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/ILog.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.equinox.internal.p2.director.app;
-
-import org.eclipse.core.runtime.IStatus;
-
-public interface ILog {
-
- // Log a status
- public void log(IStatus status);
-
- public void log(String message);
-
- // Notify that logging is completed & cleanup resources
- public void close();
-}
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java
deleted file mode 100644
index 744780f5a..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Messages.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * 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
- * Cloudsmith - https://bugs.eclipse.org/bugs/show_bug.cgi?id=226401
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.director.app;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.director.app.messages"; //$NON-NLS-1$
-
- public static String could_not_remove_initialProfile;
-
- public static String Deprecated_application;
- public static String Ambigous_Command;
- public static String Application_NoManager;
-
- public static String Application_NoRepositories;
- public static String Cant_change_roaming;
- public static String destination_commandline;
-
- public static String Help_A_list_of_properties_in_the_form_key_value_pairs;
- public static String Help_A_list_of_URLs_denoting_artifact_repositories;
- public static String Help_A_list_of_URLs_denoting_colocated_repositories;
- public static String Help_A_list_of_URLs_denoting_metadata_repositories;
- public static String Help_Defines_flavor_to_use_for_created_profile;
- public static String Help_Defines_what_profile_to_use_for_the_actions;
- public static String Help_Indicates_that_the_product_can_be_moved;
- public static String Help_Installs_the_listed_IUs;
- public static String Help_lb_lt_path_gt_rb;
- public static String Help_List_all_IUs_found_in_repos;
- public static String Help_List_installed_roots;
- public static String Help_lt_comma_separated_list_gt;
- public static String Help_lb_lt_comma_separated_list_gt_rb;
- public static String Help_lt_name_gt;
- public static String Help_lt_path_gt;
- public static String Help_Missing_argument;
- public static String Help_Only_verify_dont_install;
- public static String Help_Prints_this_command_line_help;
- public static String Help_The_ARCH_when_profile_is_created;
- public static String Help_The_folder_in_which_the_targetd_product_is_located;
- public static String Help_The_location_where_the_plugins_and_features_will_be_stored;
- public static String Help_The_NL_when_profile_is_created;
- public static String Help_The_OS_when_profile_is_created;
- public static String Help_The_WS_when_profile_is_created;
- public static String Help_Uninstalls_the_listed_IUs;
- public static String Help_Revert_to_previous_state;
- public static String Help_Use_a_shared_location_for_the_install;
- public static String Help_Purge_the_install_registry;
- public static String Help_Follow_references;
-
- public static String Ignored_repo;
- public static String Installing;
- public static String Missing_director;
- public static String Missing_Engine;
- public static String Missing_IU;
- public static String Missing_planner;
- public static String Missing_profileid;
- public static String Missing_Required_Argument;
- public static String Missing_profile;
-
- public static String Operation_complete;
- public static String Operation_failed;
- public static String option_0_requires_an_argument;
- public static String unable_to_parse_0_to_uri_1;
- public static String Uninstalling;
- public static String unknown_option_0;
-
- public static String problem_CallingDirector;
- public static String problem_repoMustBeURI;
- public static String unableToWriteLogFile;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- //empty
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties
deleted file mode 100644
index 176bee5b5..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/messages.properties
+++ /dev/null
@@ -1,66 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 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
-# Cloudsmith - ongoing development
-###############################################################################
-destination_commandline=<destination>
-Deprecated_application=This application is deprecated and will be removed in a future release. Please use the org.eclipse.equinox.p2.director application.
-Help_Only_verify_dont_install=Only verify that the actions can be performed. Don't actually install or remove anything.
-Operation_complete=Operation completed in {0} ms.
-Operation_failed=Installation failed.
-Cant_change_roaming=Problem while updating the profile {0}.
-
-Missing_profileid = Must specify a profile id if a destination is specified.
-Missing_director=Director could not be loaded.
-Missing_Engine=Engine could not be loaded.
-Missing_planner=Planner could not be loaded.
-Missing_IU=The installable unit {0} has not been found.
-Missing_Required_Argument=Missing required argument -{0}.
-Help_A_list_of_properties_in_the_form_key_value_pairs=A list of properties in the form key=value pairs. Effective only when a new profile is created.
-Help_A_list_of_URLs_denoting_artifact_repositories=A list of URL's denoting artifact repositories.
-Help_A_list_of_URLs_denoting_colocated_repositories=A list of URL's denoting co-located meta-data and artifact repositories.
-Help_A_list_of_URLs_denoting_metadata_repositories=A list of URL's denoting meta-data repositories.
-Ambigous_Command=Cannot execute both {0} and {1} in one invocation.
-Application_NoManager=The repository manager is not available.
-Application_NoRepositories=Unable to load repositories.
-Help_Defines_flavor_to_use_for_created_profile=Defines what flavor to use for a newly created profile.
-Help_Defines_what_profile_to_use_for_the_actions=Defines what profile to use for the actions.
-Help_Indicates_that_the_product_can_be_moved=Indicates that the product resulting from the installation can be moved. Effective only when a new profile is created.
-Installing=Installing {0} {1}.
-Help_Installs_the_listed_IUs=Installs the listed IU's. Each entry in the list is in the form <id> [ '/' <version> ].
-Uninstalling=Uninstalling {0} {1}.
-Help_Uninstalls_the_listed_IUs=Uninstalls the listed IU's. Each entry in the list is in the form <id> [ '/' <version> ].
-Help_Use_a_shared_location_for_the_install=Use a shared location for the install. The <path> defaults to ${user.home}/.p2
-Ignored_repo=The repository {1} will not be considered.
-Help_lb_lt_path_gt_rb=[ <path> ]
-Help_List_all_IUs_found_in_repos=Lists all IU's found in the given repositories. IUs can optionally be listed. Each entry in the list is in the form <id> [ '/' <version> ].
-Help_List_installed_roots=Lists all root IU's found in the given profile. Each entry in the list is in the form <id> [ '/' <version> ].
-Help_Revert_to_previous_state=Revert the installation to a previous state [ the number representing the previous state of the profile as found in p2/org.eclipse.equinox.p2.engine/<profileId>/ ].
-Help_lt_comma_separated_list_gt=<comma separated list>
-Help_lb_lt_comma_separated_list_gt_rb=[ <comma separated list> ]
-Help_lt_name_gt=<name>
-Help_lt_path_gt=<path>
-option_0_requires_an_argument=Option {0} requires an argument.
-Help_Prints_this_command_line_help=Prints this command line help information.
-Help_The_ARCH_when_profile_is_created=The architecture to use when the profile is created.
-Help_The_folder_in_which_the_targetd_product_is_located=The folder in which the targeted product is located.
-Help_The_location_where_the_plugins_and_features_will_be_stored=The location where the plug-ins and features will be stored. Effective only when a new profile is created.
-Help_The_NL_when_profile_is_created=The language to use when the profile is created.
-Help_The_OS_when_profile_is_created=The OS to use when the profile is created.
-Help_The_WS_when_profile_is_created=The windowing system to use when the profile is created.
-Help_Purge_the_install_registry=Remove the history of the profile registry.
-Help_Follow_references=Follow repository references.
-unable_to_parse_0_to_uri_1=Unable to parse {0} into an URI: {1}.
-unknown_option_0=Unknown option {0}. Use -help for a list of known options.
-Help_Missing_argument=The argument specifying what to install or uninstall is missing.
-Missing_profile = The profile to revert to could not be found.
-problem_CallingDirector=A problem occured while invoking the director.
-problem_repoMustBeURI = The repository location ({0}) must be a URI.
-unableToWriteLogFile=Unable to write to the log file {0}.
-could_not_remove_initialProfile=Could not remove the initial profile created {0}.
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java b/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
deleted file mode 100644
index a753b225f..000000000
--- a/bundles/org.eclipse.equinox.p2.director.app/src_ant/org/eclipse/equinox/p2/director/app/ant/DirectorTask.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.director.app.ant;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.apache.tools.ant.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.internal.p2.director.app.*;
-import org.eclipse.equinox.p2.metadata.VersionedId;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * An Ant task to call the p2 Director application.
- *
- * @since 1.0
- */
-public class DirectorTask extends Task implements ILog {
- private static final String ANT_PREFIX = "${"; //$NON-NLS-1$
- private static final String ENTRY = "!ENTRY "; //$NON-NLS-1$
- private static final String SUBENTRY = "!SUBENTRY "; //$NON-NLS-1$
- private static final String logEntry = "{0} {1} {2}\n"; //$NON-NLS-1$
- private static final String MESSAGE = "!MESSAGE "; //$NON-NLS-1$
-
- private boolean roaming;
- private boolean list;
- private String profile, flavor, os, ws, nl, arch, uninstallIU;
- private String extraArguments;
- private File destination, bundlePool, agentLocation;
- private URI metadataRepository, artifactRepository;
- private List<IUDescription> ius = new ArrayList<IUDescription>();
- private String outputProperty;
- private StringBuffer outputBuffer = null;
- private File logFile = null;
-
- public static class IUDescription {
- private String id = null;
- private String version = null;
-
- public VersionedId getVersionedId() {
- return new VersionedId(id, version);
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public void setVersion(String version) {
- if (version.length() > 0 && !version.startsWith(ANT_PREFIX))
- this.version = version;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- Object result = null;
- try {
- if (outputProperty != null)
- outputBuffer = new StringBuffer();
-
- // collect the arguments and call the application
- DirectorApplication application = new DirectorApplication();
- application.setLog(this);
- result = application.run(getArguments());
- } catch (Exception e) {
- getProject().log(Messages.problem_CallingDirector, e, Project.MSG_ERR);
- throw new BuildException(Messages.problem_CallingDirector, e);
- } finally {
- log(outputBuffer);
- }
- if (result != null && !result.equals(IApplication.EXIT_OK)) {
- getProject().log(Messages.problem_CallingDirector, Project.MSG_ERR);
- throw new BuildException(Messages.problem_CallingDirector);
- }
- }
-
- public void addConfiguredIu(IUDescription iu) {
- ius.add(iu);
- }
-
- private String[] getArguments() {
- List<String> result = new ArrayList<String>();
- if (roaming)
- result.add("-roaming"); //$NON-NLS-1$
- if (profile != null) {
- result.add("-profile"); //$NON-NLS-1$
- result.add(profile);
- }
- if (extraArguments != null) {
- StringTokenizer tokenizer = new StringTokenizer(extraArguments);
- while (tokenizer.hasMoreTokens()) {
- result.add(tokenizer.nextToken());
- }
- }
- if (destination != null) {
- result.add("-destination"); //$NON-NLS-1$
- result.add(destination.getAbsolutePath());
- }
- if (bundlePool != null) {
- result.add("-bundlePool"); //$NON-NLS-1$
- result.add(bundlePool.getAbsolutePath());
- }
- if (agentLocation != null) {
- result.add("-shared"); //$NON-NLS-1$
- result.add(agentLocation.getAbsolutePath());
- }
- if (metadataRepository != null) {
- result.add("-metadataRepository"); //$NON-NLS-1$
- result.add(URIUtil.toUnencodedString(metadataRepository));
- }
- if (artifactRepository != null) {
- result.add("-artifactRepository"); //$NON-NLS-1$
- result.add(URIUtil.toUnencodedString(artifactRepository));
- }
- if (flavor != null) {
- result.add("-flavor"); //$NON-NLS-1$
- result.add(flavor);
- }
- if (ius.size() > 0) {
- result.add("-installIUs"); //$NON-NLS-1$
- StringBuffer arg = new StringBuffer();
- for (Iterator<IUDescription> iterator = ius.iterator(); iterator.hasNext();) {
- IUDescription object = iterator.next();
- arg.append(object.getVersionedId().toString());
- if (iterator.hasNext())
- arg.append(',');
- }
- result.add(arg.toString());
- }
- if (os != null) {
- result.add("-p2.os"); //$NON-NLS-1$
- result.add(os);
- }
- if (ws != null) {
- result.add("-p2.ws"); //$NON-NLS-1$
- result.add(ws);
- }
- if (arch != null) {
- result.add("-p2.arch"); //$NON-NLS-1$
- result.add(arch);
- }
- if (nl != null) {
- result.add("-p2.nl"); //$NON-NLS-1$
- result.add(nl);
- }
- if (list) {
- result.add("-list"); //$NON-NLS-1$
- }
-
- if (uninstallIU != null) {
- result.add("-uninstallIU"); //$NON-NLS-1$
- result.add(uninstallIU);
- }
- return result.toArray(new String[result.size()]);
- }
-
- public void setArch(String value) {
- arch = value;
- }
-
- public void setArtifactRepository(String value) {
- try {
- artifactRepository = URIUtil.fromString(value);
- } catch (URISyntaxException e) {
- log(NLS.bind(Messages.problem_repoMustBeURI, value), e, Project.MSG_ERR);
- }
- }
-
- public void setBundlePool(String value) {
- bundlePool = new File(value);
- }
-
- public void setDestination(String value) {
- destination = new File(value);
- }
-
- public void setFlavor(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- flavor = value;
- }
-
- public void setList(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- list = Boolean.valueOf(value).booleanValue();
- }
-
- public void setMetadataRepository(String value) {
- try {
- metadataRepository = URIUtil.fromString(value);
- } catch (URISyntaxException e) {
- log(NLS.bind(Messages.problem_repoMustBeURI, value), e, Project.MSG_ERR);
- }
- }
-
- public void setNl(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- nl = value;
- }
-
- public void setOs(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- os = value;
- }
-
- public void setProfile(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- profile = value;
- }
-
- public void setExtraArguments(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX)) {
- extraArguments = value;
- }
-
- }
-
- public void setRoaming(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- roaming = Boolean.valueOf(value).booleanValue();
- }
-
- public void setUninstallIU(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- uninstallIU = value;
- }
-
- public void setWs(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- ws = value;
- }
-
- public void setAgentLocation(String value) {
- if (value != null && value.length() > 0 && !value.startsWith(ANT_PREFIX))
- agentLocation = new File(value);
- }
-
- public void log(String msg) {
- if (outputBuffer != null) {
- outputBuffer.append(msg);
- if (!msg.endsWith("\n")) //$NON-NLS-1$
- outputBuffer.append('\n');
- }
- super.log(msg, Project.MSG_INFO);
- }
-
- public void log(IStatus status) {
- log(0, status);
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- log(1, children[i]);
- }
- }
- }
-
- private void log(int depth, IStatus status) {
- log(status.getMessage(), status.getException(), Project.MSG_ERR);
- if (outputBuffer != null) {
- if (depth == 0)
- outputBuffer.append(ENTRY);
- else
- outputBuffer.append(SUBENTRY);
- outputBuffer.append(NLS.bind(logEntry, new String[] {status.getPlugin(), Integer.toString(status.getSeverity()), Integer.toString(status.getCode())}));
- outputBuffer.append(MESSAGE);
- outputBuffer.append(status.getMessage());
- outputBuffer.append('\n');
- }
- }
-
- private void log(StringBuffer buffer) {
- if (outputBuffer == null)
- return;
-
- String logString = outputBuffer.toString();
- getProject().setNewProperty(outputProperty, logString);
-
- if (logFile != null) {
- File parentFile = logFile.getParentFile();
- if (parentFile != null && !parentFile.exists())
- parentFile.mkdirs();
-
- FileWriter writer = null;
- try {
- writer = new FileWriter(logFile);
- writer.write(logString);
-
- } catch (IOException e) {
- getProject().log(NLS.bind(Messages.unableToWriteLogFile, logFile.getAbsolutePath()), e, Project.MSG_WARN);
- } finally {
- if (writer != null) {
- try {
- writer.close();
- } catch (IOException e) {
- //ignore
- }
- }
- }
- }
- }
-
- public void setOutputProperty(String property) {
- this.outputProperty = property;
- }
-
- public void setLogFile(String file) {
- if (file != null && !file.startsWith(ANT_PREFIX)) {
- this.logFile = new File(file);
- if (!logFile.isAbsolute()) {
- logFile = new File(getProject().getBaseDir(), file);
- }
- }
- }
-
- public void close() {
- // ILog#close(), nothing to do here
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/.classpath b/bundles/org.eclipse.equinox.p2.director/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.director/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.director/.cvsignore b/bundles/org.eclipse.equinox.p2.director/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.director/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.director/.project b/bundles/org.eclipse.equinox.p2.director/.project
deleted file mode 100644
index 9b9c15e76..000000000
--- a/bundles/org.eclipse.equinox.p2.director/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.director</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5e1105ff0..000000000
--- a/bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Mon Dec 21 23:16:26 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 014501b61..000000000
--- a/bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:54 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.director/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
deleted file mode 100644
index 17d3cab24..000000000
--- a/bundles/org.eclipse.equinox.p2.director/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,42 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.director;singleton:=true
-Bundle-Version: 2.1.0.qualifier
-Bundle-ClassPath: .
-Bundle-Activator: org.eclipse.equinox.internal.p2.director.DirectorActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.director;
- x-friends:="org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.pde.core,
- org.eclipse.equinox.p2.reconciler.dropins,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.director.app",
- org.eclipse.equinox.internal.p2.rollback;x-internal:=true,
- org.eclipse.equinox.internal.provisional.p2.director;
- x-friends:="org.eclipse.equinox.p2.console,
- org.eclipse.equinox.p2.director.app,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.ui.admin,
- org.eclipse.equinox.p2.installer",
- org.eclipse.equinox.p2.planner;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0.0)",
- org.sat4j.core;bundle-version="[2.2.0,2.3.0)",
- org.sat4j.pb;bundle-version="[2.2.0,2.3.0)",
- org.eclipse.core.jobs;bundle-version="[3.3.0,4.0.0)",
- org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Service-Component: OSGI-INF/director.xml, OSGI-INF/planner.xml
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.configurator,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.director/OSGI-INF/director.xml b/bundles/org.eclipse.equinox.p2.director/OSGI-INF/director.xml
deleted file mode 100644
index d4b248761..000000000
--- a/bundles/org.eclipse.equinox.p2.director/OSGI-INF/director.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.director">
- <implementation class="org.eclipse.equinox.internal.p2.director.DirectorComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.provisional.p2.director.IDirector"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director/OSGI-INF/planner.xml b/bundles/org.eclipse.equinox.p2.director/OSGI-INF/planner.xml
deleted file mode 100644
index be042071d..000000000
--- a/bundles/org.eclipse.equinox.p2.director/OSGI-INF/planner.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.planner">
- <implementation class="org.eclipse.equinox.internal.p2.director.PlannerComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.planner.IPlanner"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director/about.html b/bundles/org.eclipse.equinox.p2.director/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.director/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director/build.properties b/bundles/org.eclipse.equinox.p2.director/build.properties
deleted file mode 100644
index 9ac550cbd..000000000
--- a/bundles/org.eclipse.equinox.p2.director/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-output.. = bin/
-bin.includes = META-INF/,\
- OSGI-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.director/plugin.properties b/bundles/org.eclipse.equinox.p2.director/plugin.properties
deleted file mode 100644
index 61929ebc6..000000000
--- a/bundles/org.eclipse.equinox.p2.director/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Director
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.director/pom.xml b/bundles/org.eclipse.equinox.p2.director/pom.xml
deleted file mode 100644
index 5c1fd845c..000000000
--- a/bundles/org.eclipse.equinox.p2.director/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.director</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ApplicablePatchQuery.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ApplicablePatchQuery.java
deleted file mode 100644
index bebb503a6..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ApplicablePatchQuery.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Cloudsmith Inc. - converted into expression based query
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnitPatch;
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * A query that accepts any patch that applies to a given installable unit.
- */
-public class ApplicablePatchQuery extends ExpressionMatchQuery<IInstallableUnit> {
- private static final IExpression applicablePatches = ExpressionUtil.parse(//
- "applicabilityScope.empty || applicabilityScope.exists(rqArr | rqArr.all(rq | $0 ~= rq))"); //$NON-NLS-1$
-
- /**
- * Creates a new patch query on the given installable unit. Patches that can
- * be applied to this unit will be accepted as matches by the query.
- * @param iu The unit to compare patches against
- */
- public ApplicablePatchQuery(IInstallableUnit iu) {
- super(IInstallableUnitPatch.class, applicablePatches, iu);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java
deleted file mode 100644
index fc60f0d16..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/AttachmentHelper.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-public class AttachmentHelper {
- private static final IInstallableUnitFragment[] NO_FRAGMENTS = new IInstallableUnitFragment[0];
-
- public static Collection<IInstallableUnit> attachFragments(Iterator<IInstallableUnit> toAttach, Map<IInstallableUnitFragment, List<IInstallableUnit>> fragmentsToIUs) {
- Map<IInstallableUnit, IInstallableUnitFragment[]> fragmentBindings = new HashMap<IInstallableUnit, IInstallableUnitFragment[]>();
- //Build a map inverse of the one provided in input (host --> List of fragments)
- Map<IInstallableUnit, List<IInstallableUnitFragment>> iusToFragment = new HashMap<IInstallableUnit, List<IInstallableUnitFragment>>(fragmentsToIUs.size());
- for (Map.Entry<IInstallableUnitFragment, List<IInstallableUnit>> mapping : fragmentsToIUs.entrySet()) {
- IInstallableUnitFragment fragment = mapping.getKey();
- List<IInstallableUnit> existingMatches = mapping.getValue();
-
- for (IInstallableUnit host : existingMatches) {
- List<IInstallableUnitFragment> potentialFragments = iusToFragment.get(host);
- if (potentialFragments == null) {
- potentialFragments = new ArrayList<IInstallableUnitFragment>();
- iusToFragment.put(host, potentialFragments);
- }
- potentialFragments.add(fragment);
- }
- }
-
- for (Map.Entry<IInstallableUnit, List<IInstallableUnitFragment>> entry : iusToFragment.entrySet()) {
- IInstallableUnit hostIU = entry.getKey();
- List<IInstallableUnitFragment> potentialIUFragments = entry.getValue();
- ArrayList<IInstallableUnitFragment> applicableFragments = new ArrayList<IInstallableUnitFragment>();
- for (IInstallableUnitFragment potentialFragment : potentialIUFragments) {
- if (hostIU.equals(potentialFragment))
- continue;
-
- // Check to make sure the host meets the requirements of the fragment
- Collection<IRequirement> reqsFromFragment = potentialFragment.getHost();
- boolean match = true;
- boolean requirementMatched = false;
- for (Iterator<IRequirement> iterator = reqsFromFragment.iterator(); iterator.hasNext() && match == true;) {
- IRequirement reqs = iterator.next();
- requirementMatched = false;
- if (hostIU.satisfies(reqs))
- requirementMatched = true;
- if (requirementMatched == false) {
- match = false;
- break;
- }
-
- }
- if (match) {
- applicableFragments.add(potentialFragment);
- }
- }
-
- IInstallableUnitFragment theFragment = null;
- int specificityLevel = 0;
- LinkedList<IInstallableUnitFragment> fragments = new LinkedList<IInstallableUnitFragment>();
- for (IInstallableUnitFragment fragment : applicableFragments) {
- if (isTranslation(fragment)) {
- fragments.add(fragment);
- continue;
- }
- if (fragment.getHost().size() > specificityLevel) {
- theFragment = fragment;
- specificityLevel = fragment.getHost().size();
- }
- }
- if (theFragment != null)
- fragments.addFirst(theFragment);
- if (!fragments.isEmpty())
- fragmentBindings.put(hostIU, fragments.toArray(new IInstallableUnitFragment[fragments.size()]));
- }
- //build the collection of resolved IUs
- Collection<IInstallableUnit> result = new HashSet<IInstallableUnit>();
- while (toAttach.hasNext()) {
- IInstallableUnit iu = toAttach.next();
- if (iu == null)
- continue;
- //just return fragments as they are
- if (QueryUtil.isFragment(iu)) {
- result.add(iu);
- continue;
- }
- //return a new IU that combines the IU with its bound fragments
- IInstallableUnitFragment[] fragments = fragmentBindings.get(iu);
- if (fragments == null)
- fragments = NO_FRAGMENTS;
- result.add(MetadataFactory.createResolvedInstallableUnit(iu, fragments));
- }
- return result;
- }
-
- private static boolean isTranslation(IInstallableUnitFragment fragment) {
- for (IProvidedCapability capability : fragment.getProvidedCapabilities()) {
- // TODO make the constant in the TranslationSupport class public and use it
- if ("org.eclipse.equinox.p2.localization".equals(capability.getNamespace())) //$NON-NLS-1$
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorActivator.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorActivator.java
deleted file mode 100644
index d3d20b640..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorActivator.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class DirectorActivator implements BundleActivator {
- public static final String PI_DIRECTOR = "org.eclipse.equinox.p2.director"; //$NON-NLS-1$
- public static BundleContext context;
-
- public void start(BundleContext ctx) throws Exception {
- context = ctx;
- }
-
- public void stop(BundleContext ctx) throws Exception {
- DirectorActivator.context = null;
- }
-
-}
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
deleted file mode 100644
index 08935c47a..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/DirectorComponent.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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 org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-import org.eclipse.equinox.p2.engine.IEngine;
-
-public class DirectorComponent implements IAgentServiceFactory {
-
- public Object createService(IProvisioningAgent agent) {
- IEngine engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- return new SimpleDirector(engine, planner);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java
deleted file mode 100644
index 719546c08..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Daniel Le Berre 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:
- * Daniel Le Berre - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.util.Arrays;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.osgi.util.NLS;
-
-public abstract class Explanation implements Comparable<Explanation> {
-
- public static class PatchedHardRequirement extends Explanation {
- public final IInstallableUnit iu;
- public final IInstallableUnitPatch patch;
- public final IRequirement req;
-
- public PatchedHardRequirement(IInstallableUnit iu, IInstallableUnitPatch patch) {
- this.iu = iu;
- this.req = null;
- this.patch = patch;
- }
-
- public PatchedHardRequirement(IInstallableUnit iu, IRequirement req, IInstallableUnitPatch patch) {
- this.iu = iu;
- this.req = req;
- this.patch = patch;
- }
-
- public int orderValue() {
- return 6;
- }
-
- public IStatus toStatus() {
- MultiStatus result = new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, Messages.Explanation_unsatisfied, null);
- final String fromString = patch.toString() + ' ' + getUserReadableName(iu);
- result.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_fromPatch, fromString)));
- result.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_to, req)));
- return result;
- }
-
- public String toString() {
- return NLS.bind(Messages.Explanation_patchedHardDependency, new Object[] {patch, iu, req});
- }
-
- @Override
- public int shortAnswer() {
- return Explanation.VIOLATED_PATCHED_HARD_REQUIREMENT;
- }
-
- }
-
- public static class HardRequirement extends Explanation {
- public final IInstallableUnit iu;
- public final IRequirement req;
-
- public HardRequirement(IInstallableUnit iu, IRequirement req) {
- this.iu = iu;
- this.req = req;
- }
-
- public int orderValue() {
- return 5;
- }
-
- public IStatus toStatus() {
- MultiStatus result = new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, Messages.Explanation_unsatisfied, null);
- result.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_from, getUserReadableName(iu))));
- result.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_to, req)));
- return result;
- }
-
- public String toString() {
- return NLS.bind(Messages.Explanation_hardDependency, iu, req);
- }
-
- @Override
- public int shortAnswer() {
- return VIOLATED_HARD_REQUIREMENT;
- }
- }
-
- public static class IUInstalled extends Explanation {
- public final IInstallableUnit iu;
-
- public IUInstalled(IInstallableUnit iu) {
- this.iu = iu;
- }
-
- public int orderValue() {
- return 2;
- }
-
- public String toString() {
- return NLS.bind(Messages.Explanation_alreadyInstalled, iu);
- }
-
- public IStatus toStatus() {
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_alreadyInstalled, getUserReadableName(iu)));
- }
-
- @Override
- public int shortAnswer() {
- return IU_INSTALLED;
- }
- }
-
- public static class IUToInstall extends Explanation {
- public final IInstallableUnit iu;
-
- public IUToInstall(IInstallableUnit iu) {
- this.iu = iu;
- }
-
- public int orderValue() {
- return 1;
- }
-
- public String toString() {
- return NLS.bind(Messages.Explanation_toInstall, iu);
- }
-
- public IStatus toStatus() {
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_toInstall, getUserReadableName(iu)));
- }
-
- @Override
- public int shortAnswer() {
- return IU_TO_INSTALL;
- }
- }
-
- public static class NotInstallableRoot extends Explanation {
- public final IRequirement req;
-
- public NotInstallableRoot(IRequirement req) {
- this.req = req;
- }
-
- public String toString() {
- return NLS.bind(Messages.Explanation_missingRootFilter, req);
- }
-
- public IStatus toStatus() {
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRootFilter, req));
- }
-
- protected int orderValue() {
- return 2;
- }
-
- @Override
- public int shortAnswer() {
- return NON_INSTALLABLE_ROOT;
- }
- }
-
- public static class MissingIU extends Explanation {
- public final IInstallableUnit iu;
- public final IRequirement req;
- public boolean isEntryPoint;
-
- public MissingIU(IInstallableUnit iu, IRequirement req, boolean isEntryPoint) {
- this.iu = iu;
- this.req = req;
- this.isEntryPoint = isEntryPoint;
- }
-
- public int orderValue() {
- return 3;
- }
-
- public int shortAnswer() {
- return MISSING_REQUIREMENT;
- }
-
- public String toString() {
- if (isEntryPoint) {
- return NLS.bind(Messages.Explanation_missingRootRequired, req);
- }
- if (req.getFilter() == null) {
- return NLS.bind(Messages.Explanation_missingRequired, iu, req);
- }
- return NLS.bind(Messages.Explanation_missingRequiredFilter, new Object[] {req.getFilter(), iu, req});
- }
-
- public IStatus toStatus() {
- if (isEntryPoint) {
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRootRequired, req));
- }
- if (req.getFilter() == null) {
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRequired, getUserReadableName(iu), req));
- }
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingRequiredFilter, new Object[] {req.getFilter(), getUserReadableName(iu), req}));
- }
- }
-
- public static class MissingGreedyIU extends Explanation {
- public final IInstallableUnit iu;
-
- public MissingGreedyIU(IInstallableUnit iu) {
- this.iu = iu;
- }
-
- public int orderValue() {
- return 3;
- }
-
- public int shortAnswer() {
- return MISSING_REQUIREMENT;
- }
-
- public String toString() {
- return NLS.bind(Messages.Explanation_missingNonGreedyRequired, iu);
- }
-
- public IStatus toStatus() {
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Explanation_missingNonGreedyRequired, getUserReadableName(iu)));
- }
- }
-
- public static class Singleton extends Explanation {
- public final IInstallableUnit[] ius;
-
- public Singleton(IInstallableUnit[] ius) {
- this.ius = ius;
- }
-
- public int orderValue() {
- return 4;
- }
-
- public int shortAnswer() {
- return VIOLATED_SINGLETON_CONSTRAINT;
- }
-
- public IStatus toStatus() {
- MultiStatus result = new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, NLS.bind(Messages.Explanation_singleton, ""), null); //$NON-NLS-1$
- for (int i = 0; i < ius.length; i++)
- result.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, getUserReadableName(ius[i])));
- return result;
- }
-
- public String toString() {
- return NLS.bind(Messages.Explanation_singleton, Arrays.asList(ius));
- }
-
- }
-
- public static final Explanation OPTIONAL_REQUIREMENT = new Explanation() {
-
- public int orderValue() {
- return 6;
- }
-
- public String toString() {
- return Messages.Explanation_optionalDependency;
- }
-
- @Override
- public int shortAnswer() {
- return OTHER_REASON;
- }
- };
-
- public static final int MISSING_REQUIREMENT = 1;
- public static final int VIOLATED_SINGLETON_CONSTRAINT = 2;
- public static final int IU_INSTALLED = 3;
- public static final int IU_TO_INSTALL = 4;
- public static final int VIOLATED_HARD_REQUIREMENT = 5;
- public static final int VIOLATED_PATCHED_HARD_REQUIREMENT = 6;
- public static final int NON_INSTALLABLE_ROOT = 7;
- public static final int OTHER_REASON = 100;
-
- protected Explanation() {
- super();
- }
-
- public int compareTo(Explanation exp) {
- if (this.orderValue() == exp.orderValue()) {
- return this.toString().compareTo(exp.toString());
- }
- return this.orderValue() - exp.orderValue();
- }
-
- protected abstract int orderValue();
-
- abstract public int shortAnswer();
-
- /**
- * Returns a representation of this explanation as a status object.
- */
- public IStatus toStatus() {
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, toString());
- }
-
- protected String getUserReadableName(IInstallableUnit iu) {
- if (iu == null)
- return ""; //$NON-NLS-1$
- String result = getLocalized(iu);
- if (result == null)
- return iu.toString();
- return result + ' ' + iu.getVersion() + " (" + iu.toString() + ')'; //$NON-NLS-1$
- }
-
- private String getLocalized(IInstallableUnit iu) {
- String value = iu.getProperty(IInstallableUnit.PROP_NAME);
- if (value == null || value.length() <= 1 || value.charAt(0) != '%')
- return value;
- final String actualKey = value.substring(1); // Strip off the %
- return iu.getProperty("df_LT." + actualKey); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/InfiniteProgress.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/InfiniteProgress.java
deleted file mode 100644
index db6f65338..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/InfiniteProgress.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ProgressMonitorWrapper;
-
-/**
- * This class provides a simulation of progress. This is useful
- * for situations where computing the amount of work to do in advance
- * is too costly. The monitor will accept any number of calls to
- * {@link #worked(int)}, and will scale the actual reported work appropriately
- * so that the progress never quite completes.
- */
-class InfiniteProgress extends ProgressMonitorWrapper {
- /*
- * Fields for progress monitoring algorithm.
- * Initially, give progress for every 4 resources, double
- * this value at halfway point, then reset halfway point
- * to be half of remaining work. (this gives an infinite
- * series that converges at total work after an infinite
- * number of resources).
- */
- private int totalWork;
- private int currentIncrement = 4;
- private int halfWay;
- private int nextProgress = currentIncrement;
- private int worked = 0;
-
- protected InfiniteProgress(IProgressMonitor monitor) {
- super(monitor);
- }
-
- public void beginTask(String name, int work) {
- super.beginTask(name, work);
- this.totalWork = work;
- this.halfWay = totalWork / 2;
- }
-
- public void worked(int work) {
- if (--nextProgress <= 0) {
- //we have exhausted the current increment, so report progress
- super.worked(1);
- worked++;
- if (worked >= halfWay) {
- //we have passed the current halfway point, so double the
- //increment and reset the halfway point.
- currentIncrement *= 2;
- halfWay += (totalWork - halfWay) / 2;
- }
- //reset the progress counter to another full increment
- nextProgress = currentIncrement;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java
deleted file mode 100644
index 7e04e0648..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.director.messages"; //$NON-NLS-1$
-
- static {
- // initialize resource bundles
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-
- public static String Director_Task_installer_plan;
- public static String Director_Task_Installing;
- public static String Director_Task_Updating;
- public static String Director_Task_Resolving_Dependencies;
- public static String Director_Unsatisfied_Dependencies;
- public static String Director_error_applying_configuration;
- public static String Director_For_Target;
- public static String Director_For_Target_Unselect_Required;
-
- public static String Explanation_alreadyInstalled;
- public static String Explanation_from;
- public static String Explanation_fromPatch;
- public static String Explanation_hardDependency;
- public static String Explanation_patchedHardDependency;
- public static String Explanation_missingRequired;
- public static String Explanation_missingRootRequired;
- public static String Explanation_missingNonGreedyRequired;
- public static String Explanation_missingRequiredFilter;
- public static String Explanation_missingRootFilter;
- public static String Explanation_optionalDependency;
- public static String Explanation_rootMissing;
- public static String Explanation_rootSingleton;
- public static String Explanation_singleton;
- public static String Explanation_to;
- public static String Explanation_toInstall;
- public static String Explanation_unsatisfied;
-
- public static String Planner_Timeout;
- public static String Planner_Problems_resolving_plan;
- public static String Planner_Unsatisfiable_problem;
- public static String Planner_Unsatisfied_dependency;
- public static String Planner_NoSolution;
- public static String Planner_Unexpected_problem;
- public static String Planner_actions_and_software_incompatible;
- public static String Planner_can_not_install_preq;
- public static String Planner_no_profile_registry;
- public static String Planner_profile_out_of_sync;
- public static String RequestStatus_message;
- public static String Planner_no_installer_agent;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java
deleted file mode 100644
index bcdc4c035..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/OperationGenerator.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.util.*;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.*;
-
-public class OperationGenerator {
- private static final IInstallableUnit NULL_IU = MetadataFactory.createResolvedInstallableUnit(MetadataFactory.createInstallableUnit(new MetadataFactory.InstallableUnitDescription()), new IInstallableUnitFragment[0]);
- private final IProvisioningPlan plan;
-
- public OperationGenerator(IProvisioningPlan plan) {
- this.plan = plan;
- }
-
- public void generateOperation(Collection<IInstallableUnit> from_, Collection<IInstallableUnit> to_) {
- Collection<IInstallableUnit> intersection = new HashSet<IInstallableUnit>(from_);
- intersection.retainAll(to_);
-
- HashSet<IInstallableUnit> tmpFrom = new HashSet<IInstallableUnit>(from_);
- HashSet<IInstallableUnit> tmpTo = new HashSet<IInstallableUnit>(to_);
- tmpFrom.removeAll(intersection);
- tmpTo.removeAll(intersection);
-
- List<IInstallableUnit> from = new ArrayList<IInstallableUnit>(tmpFrom);
- Collections.sort(from);
-
- List<IInstallableUnit> to = new ArrayList<IInstallableUnit>(tmpTo);
- Collections.sort(to);
-
- generateUpdates(from, to);
- generateInstallUninstall(from, to);
- generateConfigurationChanges(to_, intersection);
- }
-
- //This generates operations that are causing the IUs to be reconfigured.
- private void generateConfigurationChanges(Collection<IInstallableUnit> to_, Collection<IInstallableUnit> intersection) {
- if (intersection.size() == 0)
- return;
- //We retain from each set the things that are the same.
- //Note that despite the fact that they are the same, a different CU can be attached.
- //The objects contained in the intersection are the one that were originally in the from collection.
- TreeSet<IInstallableUnit> to = new TreeSet<IInstallableUnit>(to_);
- for (IInstallableUnit fromIU : intersection) {
- IInstallableUnit toIU = to.tailSet(fromIU).first();
- generateConfigurationOperation(fromIU, toIU);
- }
-
- }
-
- private void generateConfigurationOperation(IInstallableUnit fromIU, IInstallableUnit toIU) {
- Collection<IInstallableUnitFragment> fromFragments = fromIU.getFragments();
- Collection<IInstallableUnitFragment> toFragments = toIU.getFragments();
- if (fromFragments == toFragments)
- return;
- //Check to see if the two arrays are equals independently of the order of the fragments
- if (fromFragments.size() == toFragments.size() && fromFragments.containsAll(toFragments))
- return;
- plan.updateInstallableUnit(fromIU, toIU);
- }
-
- private void generateInstallUninstall(List<IInstallableUnit> from, List<IInstallableUnit> to) {
- int toIdx = 0;
- int fromIdx = 0;
- while (fromIdx != from.size() && toIdx != to.size()) {
- IInstallableUnit fromIU = from.get(fromIdx);
- IInstallableUnit toIU = to.get(toIdx);
- int comparison = toIU.compareTo(fromIU);
- if (comparison < 0) {
- plan.addInstallableUnit(toIU);
- toIdx++;
- } else if (comparison == 0) {
- toIdx++;
- fromIdx++;
- // System.out.println("same " + fromIU);
- } else {
- plan.removeInstallableUnit(fromIU);
- fromIdx++;
- }
- }
- if (fromIdx != from.size()) {
- for (int i = fromIdx; i < from.size(); i++) {
- plan.removeInstallableUnit(from.get(i));
- }
- }
- if (toIdx != to.size()) {
- for (int i = toIdx; i < to.size(); i++) {
- plan.addInstallableUnit(to.get(i));
- }
- }
- }
-
- private void generateUpdates(List<IInstallableUnit> from, List<IInstallableUnit> to) {
- if (to.isEmpty() || from.isEmpty())
- return;
-
- Set<IInstallableUnit> processed = new HashSet<IInstallableUnit>();
- Set<IInstallableUnit> removedFromTo = new HashSet<IInstallableUnit>();
-
- QueryableArray indexedFromElements = new QueryableArray(from.toArray(new IInstallableUnit[from.size()]));
- for (int toIdx = 0; toIdx < to.size(); toIdx++) {
- IInstallableUnit iuTo = to.get(toIdx);
- if (iuTo.getId().equals(next(to, toIdx).getId())) { //This handle the case where there are multiple versions of the same IU in the target. Eg we are trying to update from A 1.0.0 to A 1.1.1 and A 1.2.2
- toIdx = skip(to, iuTo, toIdx) - 1;
- //System.out.println("Can't update " + iuTo + " because another iu with same id is in the target state");
- continue;
- }
- if (iuTo.getUpdateDescriptor() == null)
- continue;
-
- //TODO we eventually need to handle the case where an IU is a merge of several others.
-
- IQuery<IInstallableUnit> updateQuery = QueryUtil.createMatchQuery(iuTo.getUpdateDescriptor().getIUsBeingUpdated().iterator().next(), new Object[0]);
- iuTo.getUpdateDescriptor().getIUsBeingUpdated();
- IQueryResult<IInstallableUnit> updates = indexedFromElements.query(updateQuery, null);
-
- if (updates.isEmpty()) { //Nothing to update from.
- continue;
- }
- Iterator<IInstallableUnit> updatesIterator = updates.iterator();
- IInstallableUnit iuFrom = updatesIterator.next();
- if (updatesIterator.hasNext()) { //There are multiple IUs to update from
- //System.out.println("Can't update " + iuTo + " because there are multiple IUs to update from (" + toString(iusFrom) + ')');
- continue;
- }
- if (iuTo.equals(iuFrom)) {
- from.remove(iuFrom);
- // fromIdIndexList.remove(iuFrom);
- removedFromTo.add(iuTo);
- continue;
- }
- plan.updateInstallableUnit(iuFrom, iuTo);
- from.remove(iuFrom);
- // fromIdIndexList.remove(iuFrom);
- processed.add(iuTo);
- }
- to.removeAll(processed);
- to.removeAll(removedFromTo);
- }
-
- private IInstallableUnit next(List<IInstallableUnit> l, int i) {
- i++;
- if (i >= l.size())
- return NULL_IU;
- return l.get(i);
- }
-
- private int skip(List<IInstallableUnit> c, IInstallableUnit id, int idx) {
- int i = idx;
- for (; i < c.size(); i++) {
- if (!id.getId().equals(c.get(i).getId()))
- return i;
- }
- return i;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PermissiveSlicer.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PermissiveSlicer.java
deleted file mode 100644
index 4d42093d5..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PermissiveSlicer.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-import org.eclipse.equinox.p2.query.IQueryable;
-
-public class PermissiveSlicer extends Slicer {
- private boolean includeOptionalDependencies; //Cause optional dependencies not be followed as part of the
- private boolean everythingGreedy;
- private boolean considerFilter;
- private boolean considerOnlyStrictDependency;
- private boolean evalFilterTo;
- private boolean onlyFilteredRequirements;
-
- public PermissiveSlicer(IQueryable<IInstallableUnit> input, Map<String, String> context, boolean includeOptionalDependencies, boolean everythingGreedy, boolean evalFilterTo, boolean considerOnlyStrictDependency, boolean onlyFilteredRequirements) {
- super(input, context, true);
- this.considerFilter = (context != null && context.size() > 1) ? true : false;
- this.includeOptionalDependencies = includeOptionalDependencies;
- this.everythingGreedy = everythingGreedy;
- this.evalFilterTo = evalFilterTo;
- this.considerOnlyStrictDependency = considerOnlyStrictDependency;
- this.onlyFilteredRequirements = onlyFilteredRequirements;
- }
-
- protected boolean isApplicable(IInstallableUnit iu) {
- if (considerFilter)
- return super.isApplicable(iu);
- if (iu.getFilter() == null)
- return true;
- return evalFilterTo;
- }
-
- protected boolean isApplicable(IRequirement req) {
- //Every filter in this method needs to continue except when the filter does not pass
- if (!includeOptionalDependencies)
- if (req.getMin() == 0)
- return false;
-
- if (considerOnlyStrictDependency) {
- if (!RequiredCapability.isVersionStrict(req.getMatches()))
- return false;
- }
-
- //deal with filters
- if (considerFilter) {
- if (onlyFilteredRequirements && req.getFilter() == null) {
- return false;
- }
- return super.isApplicable(req);
- }
- if (req.getFilter() == null) {
- if (onlyFilteredRequirements)
- return false;
- return true;
- }
- return evalFilterTo;
- }
-
- protected boolean isGreedy(IRequirement req) {
- if (everythingGreedy) {
- return true;
- }
- return super.isGreedy(req);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java
deleted file mode 100644
index 515e795fa..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/PlannerComponent.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-
-/**
- * A service factory that provides planner implementations
- */
-public class PlannerComponent implements IAgentServiceFactory {
-
- public Object createService(IProvisioningAgent agent) {
- return new SimplePlanner(agent);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
deleted file mode 100644
index 4621b5d74..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/ProfileChangeRequest.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-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.metadata.IRequirement;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-
-/**
- * @noreference This class was unintentionally left in the provisional API package and
- * is intended to be made internal in Eclipse 3.7. Clients should create and manipulate
- * profile change requests via the API {@link IPlanner#createChangeRequest(IProfile)}
- * and methods on {@link IProfileChangeRequest}.
- */
-public class ProfileChangeRequest implements Cloneable, IProfileChangeRequest {
-
- private final IProfile profile;
- private ArrayList<IInstallableUnit> iusToRemove = null; // list of ius to remove
- private ArrayList<IInstallableUnit> iusToAdd = null; // list of ius to add
- private ArrayList<String> propertiesToRemove = null; // list of keys for properties to be removed
- private HashMap<String, String> propertiesToAdd = null; // map of key->value for properties to be added
- private HashMap<IInstallableUnit, Map<String, String>> iuPropertiesToAdd = null; // map iu->map of key->value pairs for properties to be added for an iu
- private HashMap<IInstallableUnit, List<String>> iuPropertiesToRemove = null; // map of iu->list of property keys to be removed for an iu
- private ArrayList<IRequirement> additionalRequirements;
-
- public static ProfileChangeRequest createByProfileId(IProvisioningAgent agent, String profileId) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- throw new IllegalStateException(Messages.Planner_no_profile_registry);
- IProfile profile = profileRegistry.getProfile(profileId);
- if (profile == null)
- throw new IllegalArgumentException("Profile id " + profileId + " is not registered."); //$NON-NLS-1$//$NON-NLS-2$
- return new ProfileChangeRequest(profile);
- }
-
- 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$
- }
-
- public IProfile getProfile() {
- return profile;
- }
-
- public Map<String, String> getProfileProperties() {
- Map<String, String> result = new HashMap<String, String>(profile.getProperties());
- if (propertiesToRemove != null) {
- for (String key : propertiesToRemove) {
- result.remove(key);
- }
- }
- if (propertiesToAdd != null)
- result.putAll(propertiesToAdd);
-
- return result;
- }
-
- //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);
- }
-
- /* (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)
- add(iu);
- }
-
- public void addInstallableUnits(IInstallableUnit... toInstall) {
- for (int i = 0; i < toInstall.length; i++)
- add(toInstall[i]);
- }
-
- /* (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);
- }
-
- public void removeInstallableUnits(IInstallableUnit[] toUninstall) {
- for (int i = 0; i < toUninstall.length; i++)
- remove(toUninstall[i]);
- }
-
- /* (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)
- 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>>();
- Map<String, String> properties = iuPropertiesToAdd.get(iu);
- if (properties == null) {
- properties = new HashMap<String, String>();
- iuPropertiesToAdd.put(iu, properties);
- }
- 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>>();
- List<String> keys = iuPropertiesToRemove.get(iu);
- if (keys == null) {
- keys = new ArrayList<String>();
- iuPropertiesToRemove.put(iu, keys);
- }
- if (!keys.contains(key))
- keys.add(key);
- }
-
- public Collection<IInstallableUnit> getRemovals() {
- if (iusToRemove == null)
- return CollectionUtils.emptyList();
- return Collections.unmodifiableList(iusToRemove);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.director.IPCR#getAddedInstallableUnits()
- */
- public Collection<IInstallableUnit> getAdditions() {
- if (iusToAdd == null)
- return CollectionUtils.emptyList();
- return Collections.unmodifiableList(iusToAdd);
- }
-
- // String [key, key, key] names of properties to remove
- public String[] getPropertiesToRemove() {
- if (propertiesToRemove == null)
- return new String[0];
- return propertiesToRemove.toArray(new String[propertiesToRemove.size()]);
- }
-
- // map of key value pairs
- public Map<String, String> getPropertiesToAdd() {
- if (propertiesToAdd == null)
- return CollectionUtils.emptyMap();
- return propertiesToAdd;
- }
-
- // map of iu->list of property keys to be removed for an iu
- public Map<IInstallableUnit, List<String>> getInstallableUnitProfilePropertiesToRemove() {
- if (iuPropertiesToRemove == null)
- return CollectionUtils.emptyMap();
- return iuPropertiesToRemove;
- }
-
- // TODO This can be represented and returned in whatever way makes most sense for planner/engine
- // map iu->map of key->value pairs for properties to be added for an iu
- public Map<IInstallableUnit, Map<String, String>> getInstallableUnitProfilePropertiesToAdd() {
- if (iuPropertiesToAdd == null)
- return CollectionUtils.emptyMap();
- 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);
- }
-
- @SuppressWarnings("unchecked")
- public Object clone() {
- ProfileChangeRequest result = new ProfileChangeRequest(profile);
- result.iusToRemove = iusToRemove == null ? null : (ArrayList<IInstallableUnit>) iusToRemove.clone();
- result.iusToAdd = iusToAdd == null ? null : (ArrayList<IInstallableUnit>) iusToAdd.clone();
- result.propertiesToRemove = propertiesToRemove == null ? null : (ArrayList<String>) propertiesToRemove.clone();
- result.propertiesToAdd = propertiesToAdd == null ? null : (HashMap<String, String>) propertiesToAdd.clone();
- result.iuPropertiesToAdd = iuPropertiesToAdd == null ? null : (HashMap<IInstallableUnit, Map<String, String>>) iuPropertiesToAdd.clone();
- result.iuPropertiesToRemove = iuPropertiesToRemove == null ? null : (HashMap<IInstallableUnit, List<String>>) iuPropertiesToRemove.clone();
- result.additionalRequirements = additionalRequirements == null ? null : (ArrayList<IRequirement>) additionalRequirements.clone();
- return result;
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer(1000);
- result.append("==Profile change request for "); //$NON-NLS-1$
- result.append(profile.getProfileId());
- result.append('\n');
- if (iusToAdd != null) {
- result.append("==Additions=="); //$NON-NLS-1$
- result.append('\n');
- for (IInstallableUnit iu : iusToAdd) {
- result.append('\t');
- result.append(iu);
- result.append('\n');
- }
- }
- if (iusToRemove != null) {
- result.append("==Removals=="); //$NON-NLS-1$
- result.append('\n');
- for (IInstallableUnit iu : iusToRemove) {
- result.append('\t');
- result.append(iu);
- result.append('\n');
- }
- }
- return result.toString();
- }
-
- public void addExtraRequirements(Collection<IRequirement> requirements) {
- if (additionalRequirements == null)
- additionalRequirements = new ArrayList<IRequirement>(requirements.size());
- additionalRequirements.addAll(requirements);
- }
-
- public Collection<IRequirement> getExtraRequirements() {
- return additionalRequirements;
- }
-
- public void clearExtraRequirements() {
- additionalRequirements = null;
- }
-}
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
deleted file mode 100644
index 48c07561c..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Projector.java
+++ /dev/null
@@ -1,1197 +0,0 @@
-/*******************************************************************************
- * 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
- * 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;
-
-import java.math.BigInteger;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.director.Explanation.NotInstallableRoot;
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.osgi.util.NLS;
-import org.sat4j.pb.*;
-import org.sat4j.pb.tools.DependencyHelper;
-import org.sat4j.pb.tools.WeightedObject;
-import org.sat4j.specs.*;
-
-/**
- * This class is the interface between SAT4J and the planner. It produces a
- * boolean satisfiability problem, invokes the solver, and converts the solver result
- * back into information understandable by the planner.
- */
-public class Projector {
- static boolean DEBUG = Tracing.DEBUG_PLANNER_PROJECTOR;
- private static boolean DEBUG_ENCODING = false;
- private IQueryable<IInstallableUnit> picker;
- private QueryableArray patches;
-
- private Map<IInstallableUnit, AbstractVariable> noopVariables; //key IU, value AbstractVariable
- private List<AbstractVariable> abstractVariables;
-
- private Map<String, Map<Version, IInstallableUnit>> slice; //The IUs that have been considered to be part of the problem
-
- private IInstallableUnit selectionContext;
-
- DependencyHelper<Object, Explanation> dependencyHelper;
- private Collection<IInstallableUnit> solution;
- private Collection<Object> assumptions;
-
- private MultiStatus result;
-
- private Collection<IInstallableUnit> alreadyInstalledIUs;
- private IQueryable<IInstallableUnit> lastState;
-
- private boolean considerMetaRequirements;
- private IInstallableUnit entryPoint;
- private Map<IInstallableUnitFragment, Set<IInstallableUnit>> fragments = new HashMap<IInstallableUnitFragment, Set<IInstallableUnit>>();
-
- private int numberOfInstalledIUs;
-
- //Non greedy things
- private Set<IInstallableUnit> nonGreedyIUs; //All the IUs that would satisfy non greedy dependencies
- private Map<IInstallableUnit, AbstractVariable> nonGreedyVariables = new HashMap<IInstallableUnit, AbstractVariable>();
- private Map<AbstractVariable, List<Object>> nonGreedyProvider = new HashMap<AbstractVariable, List<Object>>(); //Keeps track of all the "object" that provide an IU that is non greedly requested
-
- static class AbstractVariable {
- // private String name;
-
- public AbstractVariable(String name) {
- // this.name = name;
- }
-
- public AbstractVariable() {
- // TODO Auto-generated constructor stub
- }
-
- public String toString() {
- return "AbstractVariable: " + hashCode(); //$NON-NLS-1$
- // return name == null ? "AbstractVariable: " + hashCode() : name; //$NON-NLS-1$
- }
- }
-
- /**
- * Job for computing SAT failure explanation in the background.
- */
- class ExplanationJob extends Job {
- private Set<Explanation> explanation;
-
- public ExplanationJob() {
- super(Messages.Planner_NoSolution);
- //explanations cannot be canceled directly, so don't show it to the user
- setSystem(true);
- }
-
- public boolean belongsTo(Object family) {
- return family == ExplanationJob.this;
- }
-
- protected void canceling() {
- super.canceling();
- dependencyHelper.stopExplanation();
- }
-
- public Set<Explanation> getExplanationResult() {
- return explanation;
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- long start = 0;
- if (DEBUG) {
- start = System.currentTimeMillis();
- Tracing.debug("Determining cause of failure: " + start); //$NON-NLS-1$
- }
- try {
- explanation = dependencyHelper.why();
- if (DEBUG) {
- long stop = System.currentTimeMillis();
- Tracing.debug("Explanation found: " + (stop - start)); //$NON-NLS-1$
- Tracing.debug("Explanation:"); //$NON-NLS-1$
- for (Explanation ex : explanation) {
- Tracing.debug(ex.toString());
- }
- }
- } catch (TimeoutException e) {
- if (DEBUG)
- Tracing.debug("Timeout while computing explanations"); //$NON-NLS-1$
- } finally {
- //must never have a null result, because caller is waiting on result to be non-null
- if (explanation == null)
- explanation = CollectionUtils.emptySet();
- }
- synchronized (this) {
- ExplanationJob.this.notify();
- }
- return Status.OK_STATUS;
- }
-
- }
-
- public Projector(IQueryable<IInstallableUnit> q, Map<String, String> context, Set<IInstallableUnit> nonGreedyIUs, boolean considerMetaRequirements) {
- picker = q;
- noopVariables = new HashMap<IInstallableUnit, AbstractVariable>();
- slice = new HashMap<String, Map<Version, IInstallableUnit>>();
- selectionContext = InstallableUnit.contextIU(context);
- abstractVariables = new ArrayList<AbstractVariable>();
- result = new MultiStatus(DirectorActivator.PI_DIRECTOR, IStatus.OK, Messages.Planner_Problems_resolving_plan, null);
- assumptions = new ArrayList<Object>();
- this.nonGreedyIUs = nonGreedyIUs;
- this.considerMetaRequirements = considerMetaRequirements;
- }
-
- protected boolean isInstalled(IInstallableUnit iu) {
- return !lastState.query(QueryUtil.createIUQuery(iu), null).isEmpty();
- }
-
- @SuppressWarnings("unchecked")
- public void encode(IInstallableUnit entryPointIU, IInstallableUnit[] alreadyExistingRoots, IQueryable<IInstallableUnit> installedIUs, Collection<IInstallableUnit> newRoots, IProgressMonitor monitor) {
- alreadyInstalledIUs = Arrays.asList(alreadyExistingRoots);
- numberOfInstalledIUs = sizeOf(installedIUs);
- lastState = installedIUs;
- this.entryPoint = entryPointIU;
- try {
- long start = 0;
- if (DEBUG) {
- start = System.currentTimeMillis();
- Tracing.debug("Start projection: " + start); //$NON-NLS-1$
- }
- IPBSolver solver;
- if (DEBUG_ENCODING) {
- solver = new UserFriendlyPBStringSolver<Object>();
- } else {
- solver = SolverFactory.newEclipseP2();
- }
- solver.setTimeoutOnConflicts(1000);
- IQueryResult<IInstallableUnit> queryResult = picker.query(QueryUtil.createIUAnyQuery(), null);
- if (DEBUG_ENCODING) {
- dependencyHelper = new DependencyHelper<Object, Explanation>(solver, false);
- ((UserFriendlyPBStringSolver<Object>) solver).setMapping(dependencyHelper.getMappingToDomain());
- } else {
- dependencyHelper = new DependencyHelper<Object, Explanation>(solver);
- }
- Iterator<IInstallableUnit> iusToEncode = queryResult.iterator();
- List<IInstallableUnit> iusToOrder = new ArrayList<IInstallableUnit>();
- while (iusToEncode.hasNext()) {
- iusToOrder.add(iusToEncode.next());
- }
- Collections.sort(iusToOrder);
- iusToEncode = iusToOrder.iterator();
- while (iusToEncode.hasNext()) {
- if (monitor.isCanceled()) {
- result.merge(Status.CANCEL_STATUS);
- throw new OperationCanceledException();
- }
- IInstallableUnit iuToEncode = iusToEncode.next();
- if (iuToEncode != entryPointIU) {
- processIU(iuToEncode, false);
- }
- }
- createMustHave(entryPointIU, alreadyExistingRoots);
-
- createConstraintsForSingleton();
-
- createConstraintsForNonGreedy();
-
- createOptimizationFunction(entryPointIU, newRoots);
- if (DEBUG) {
- long stop = System.currentTimeMillis();
- Tracing.debug("Projection complete: " + (stop - start)); //$NON-NLS-1$
- }
- if (DEBUG_ENCODING) {
- System.out.println(solver.toString());
- }
- } catch (IllegalStateException e) {
- result.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, e.getMessage(), e));
- } catch (ContradictionException e) {
- result.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_Unsatisfiable_problem));
- }
- }
-
- private void createConstraintsForNonGreedy() throws ContradictionException {
- for (IInstallableUnit iu : nonGreedyIUs) {
- AbstractVariable var = getNonGreedyVariable(iu);
- List<Object> providers = nonGreedyProvider.get(var);
- if (providers == null || providers.size() == 0) {
- dependencyHelper.setFalse(var, new Explanation.MissingGreedyIU(iu));
- } else {
- createImplication(var, providers, Explanation.OPTIONAL_REQUIREMENT);//FIXME
- }
- }
-
- }
-
- /**
- * Efficiently compute the size of a queryable
- */
- private int sizeOf(IQueryable<IInstallableUnit> installedIUs) {
- IQueryResult<IInstallableUnit> qr = installedIUs.query(QueryUtil.createIUAnyQuery(), null);
- if (qr instanceof Collector<?>)
- return ((Collector<?>) qr).size();
- return qr.toUnmodifiableSet().size();
- }
-
- //Create an optimization function favoring the highest version of each IU
- private void createOptimizationFunction(IInstallableUnit metaIu, Collection<IInstallableUnit> newRoots) {
-
- List<WeightedObject<? extends Object>> weightedObjects = new ArrayList<WeightedObject<? extends Object>>();
-
- Set<IInstallableUnit> transitiveClosure;
- if (newRoots.isEmpty()) {
- transitiveClosure = CollectionUtils.emptySet();
- } else {
- IQueryable<IInstallableUnit> queryable = new Slicer(picker, selectionContext, false).slice(newRoots.toArray(new IInstallableUnit[newRoots.size()]), new NullProgressMonitor());
- if (queryable == null) {
- transitiveClosure = CollectionUtils.emptySet();
- } else {
- transitiveClosure = queryable.query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).toSet();
- }
- }
-
- Set<Entry<String, Map<Version, IInstallableUnit>>> s = slice.entrySet();
- final BigInteger POWER = BigInteger.valueOf(numberOfInstalledIUs > 0 ? numberOfInstalledIUs + 1 : 2);
-
- BigInteger maxWeight = POWER;
- for (Entry<String, Map<Version, IInstallableUnit>> entry : s) {
- Map<Version, IInstallableUnit> conflictingEntries = entry.getValue();
-
- List<IInstallableUnit> toSort = new ArrayList<IInstallableUnit>(conflictingEntries.values());
- if (conflictingEntries.size() == 1) {
- IInstallableUnit iu = toSort.get(0);
- if (iu != metaIu) {
- weightedObjects.add(WeightedObject.newWO(iu, POWER));
- }
- continue;
- }
- Collections.sort(toSort, Collections.reverseOrder());
- BigInteger weight = POWER;
- int count = toSort.size();
- boolean installedIuMet = false;
- boolean rootedMet = false;
- for (int i = 0; i < count; i++) {
- IInstallableUnit iu = toSort.get(i);
- if (!rootedMet && isInstalled(iu) && !transitiveClosure.contains(iu)) {
- installedIuMet = true;
- weightedObjects.add(WeightedObject.newWO(iu, BigInteger.ONE));
- } else if (!installedIuMet && !rootedMet && isRoot(iu, newRoots)) {
- rootedMet = true;
- weightedObjects.add(WeightedObject.newWO(iu, BigInteger.ONE));
- } else {
- weightedObjects.add(WeightedObject.newWO(iu, weight));
- }
- weight = weight.multiply(POWER);
- }
- if (weight.compareTo(maxWeight) > 0)
- maxWeight = weight;
- }
-
- // no need to add one here, since maxWeight is strictly greater than the
- // maximal weight used so far.
- maxWeight = maxWeight.multiply(POWER).multiply(BigInteger.valueOf(s.size()));
-
- // Add the abstract variables
- BigInteger abstractWeight = maxWeight.negate();
- for (AbstractVariable var : abstractVariables) {
- weightedObjects.add(WeightedObject.newWO(var, abstractWeight));
- }
-
- maxWeight = maxWeight.multiply(POWER).add(BigInteger.ONE);
-
- BigInteger optionalWeight = maxWeight.negate();
- long countOptional = 1;
- List<IInstallableUnit> requestedPatches = new ArrayList<IInstallableUnit>();
- Collection<IRequirement> reqs = metaIu.getRequirements();
- for (IRequirement req : reqs) {
- if (req.getMin() > 0 || !req.isGreedy())
- continue;
- IQueryResult<IInstallableUnit> matches = picker.query(QueryUtil.createMatchQuery(req.getMatches()), null);
- for (Iterator<IInstallableUnit> iterator = matches.iterator(); iterator.hasNext();) {
- IInstallableUnit match = iterator.next();
- if (match instanceof IInstallableUnitPatch) {
- requestedPatches.add(match);
- countOptional = countOptional + 1;
- } else {
- weightedObjects.add(WeightedObject.newWO(match, optionalWeight));
- }
- }
- }
-
- BigInteger patchWeight = maxWeight.multiply(POWER).multiply(BigInteger.valueOf(countOptional)).negate();
- for (Iterator<IInstallableUnit> iterator = requestedPatches.iterator(); iterator.hasNext();) {
- weightedObjects.add(WeightedObject.newWO(iterator.next(), patchWeight));
- }
- if (!weightedObjects.isEmpty()) {
- createObjectiveFunction(weightedObjects);
- }
- }
-
- private boolean isRoot(IInstallableUnit iu, Collection<IInstallableUnit> newRoots) {
- return newRoots.contains(iu);
- }
-
- private void createObjectiveFunction(List<WeightedObject<? extends Object>> weightedObjects) {
- if (DEBUG) {
- StringBuffer b = new StringBuffer();
- for (WeightedObject<? extends Object> object : weightedObjects) {
- if (b.length() > 0)
- b.append(", "); //$NON-NLS-1$
- b.append(object.getWeight());
- b.append(' ');
- b.append(object.thing);
- }
- Tracing.debug("objective function: " + b); //$NON-NLS-1$
- }
- @SuppressWarnings("unchecked")
- WeightedObject<Object>[] array = (WeightedObject<Object>[]) weightedObjects.toArray(new WeightedObject<?>[weightedObjects.size()]);
- dependencyHelper.setObjectiveFunction(array);
- }
-
- private void createMustHave(IInstallableUnit iu, IInstallableUnit[] alreadyExistingRoots) throws ContradictionException {
- processIU(iu, true);
- if (DEBUG) {
- Tracing.debug(iu + "=1"); //$NON-NLS-1$
- }
- // dependencyHelper.setTrue(variable, new Explanation.IUToInstall(iu));
- assumptions.add(iu);
- }
-
- private void createNegation(IInstallableUnit iu, IRequirement req) throws ContradictionException {
- if (DEBUG) {
- Tracing.debug(iu + "=0"); //$NON-NLS-1$
- }
- dependencyHelper.setFalse(iu, new Explanation.MissingIU(iu, req, iu == this.entryPoint));
- }
-
- // Check whether the requirement is applicable
- private boolean isApplicable(IRequirement req) {
- IMatchExpression<IInstallableUnit> filter = req.getFilter();
- return filter == null || filter.isMatch(selectionContext);
- }
-
- private boolean isApplicable(IInstallableUnit iu) {
- IMatchExpression<IInstallableUnit> filter = iu.getFilter();
- return filter == null || filter.isMatch(selectionContext);
- }
-
- private void expandNegatedRequirement(IRequirement req, IInstallableUnit iu, List<AbstractVariable> optionalAbstractRequirements, boolean isRootIu) throws ContradictionException {
- if (!isApplicable(req))
- return;
- List<IInstallableUnit> matches = getApplicableMatches(req);
- if (matches.isEmpty()) {
- return;
- }
- Explanation explanation;
- if (isRootIu) {
- IInstallableUnit reqIu = matches.get(0);
- if (alreadyInstalledIUs.contains(reqIu)) {
- explanation = new Explanation.IUInstalled(reqIu);
- } else {
- explanation = new Explanation.IUToInstall(reqIu);
- }
- } else {
- explanation = new Explanation.HardRequirement(iu, req);
- }
- createNegationImplication(iu, matches, explanation);
- }
-
- private void determinePotentialHostsForFragment(IInstallableUnit iu) {
- // determine matching hosts only for fragments
- if (!(iu instanceof IInstallableUnitFragment))
- return;
-
- IInstallableUnitFragment fragment = (IInstallableUnitFragment) iu;
- // for each host requirement, find matches and remember them
- for (IRequirement req : fragment.getHost()) {
- List<IInstallableUnit> matches = getApplicableMatches(req);
- rememberHostMatches((IInstallableUnitFragment) iu, matches);
- }
- }
-
- private void expandRequirement(IRequirement req, IInstallableUnit iu, List<AbstractVariable> optionalAbstractRequirements, boolean isRootIu) throws ContradictionException {
- if (req.getMax() == 0) {
- expandNegatedRequirement(req, iu, optionalAbstractRequirements, isRootIu);
- return;
- }
- if (!isApplicable(req))
- return;
- List<IInstallableUnit> matches = getApplicableMatches(req);
- determinePotentialHostsForFragment(iu);
- if (req.getMin() > 0) {
- if (matches.isEmpty()) {
- if (iu == entryPoint && emptyBecauseFiltered) {
- dependencyHelper.setFalse(iu, new NotInstallableRoot(req));
- } else {
- missingRequirement(iu, req);
- }
- } else {
- if (req.isGreedy()) {
- IInstallableUnit reqIu = matches.get(0);
- Explanation explanation;
- if (isRootIu) {
- if (alreadyInstalledIUs.contains(reqIu)) {
- explanation = new Explanation.IUInstalled(reqIu);
- } else {
- explanation = new Explanation.IUToInstall(reqIu);
- }
- } else {
- explanation = new Explanation.HardRequirement(iu, req);
- }
- createImplication(iu, matches, explanation);
- IInstallableUnit current;
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- addNonGreedyProvider(getNonGreedyVariable(current), iu);
- }
- }
- } else {
- List<Object> newConstraint = new ArrayList<Object>(matches.size());
- IInstallableUnit current;
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- newConstraint.add(getNonGreedyVariable(current));
- }
- createImplication(new Object[] {iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
- }
- }
- } else {
- if (!matches.isEmpty()) {
- IInstallableUnit current;
- AbstractVariable abs;
- if (req.isGreedy()) {
- abs = getAbstractVariable(req);
- createImplication(new Object[] {abs, iu}, matches, Explanation.OPTIONAL_REQUIREMENT);
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- addNonGreedyProvider(getNonGreedyVariable(current), abs);
- }
- }
- } else {
- abs = getAbstractVariable(req, false);
- List<Object> newConstraint = new ArrayList<Object>();
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- newConstraint.add(getNonGreedyVariable(current));
- }
- createImplication(new Object[] {abs, iu}, newConstraint, Explanation.OPTIONAL_REQUIREMENT);
- }
- optionalAbstractRequirements.add(abs);
- }
- }
- }
-
- private void addNonGreedyProvider(AbstractVariable nonGreedyVariable, Object o) {
- List<Object> providers = nonGreedyProvider.get(nonGreedyVariable);
- if (providers == null) {
- providers = new ArrayList<Object>();
- nonGreedyProvider.put(nonGreedyVariable, providers);
- }
- providers.add(o);
- }
-
- private void expandRequirements(Collection<IRequirement> reqs, IInstallableUnit iu, boolean isRootIu) throws ContradictionException {
- if (reqs.isEmpty())
- return;
- List<AbstractVariable> optionalAbstractRequirements = new ArrayList<AbstractVariable>();
- for (IRequirement req : reqs) {
- expandRequirement(req, iu, optionalAbstractRequirements, isRootIu);
- }
- createOptionalityExpression(iu, optionalAbstractRequirements);
- }
-
- public void processIU(IInstallableUnit iu, boolean isRootIU) throws ContradictionException {
- iu = iu.unresolved();
- Map<Version, IInstallableUnit> iuSlice = slice.get(iu.getId());
- if (iuSlice == null) {
- iuSlice = new HashMap<Version, IInstallableUnit>();
- slice.put(iu.getId(), iuSlice);
- }
- iuSlice.put(iu.getVersion(), iu);
- if (!isApplicable(iu)) {
- createNegation(iu, null);
- return;
- }
-
- IQueryResult<IInstallableUnit> applicablePatches = getApplicablePatches(iu);
- expandLifeCycle(iu, isRootIU);
- //No patches apply, normal code path
- if (applicablePatches.isEmpty()) {
- expandRequirements(getRequiredCapabilities(iu), iu, isRootIU);
- } else {
- //Patches are applicable to the IU
- expandRequirementsWithPatches(iu, applicablePatches, isRootIU);
- }
- }
-
- private Collection<IRequirement> getRequiredCapabilities(IInstallableUnit iu) {
- boolean isFragment = iu instanceof IInstallableUnitFragment;
- //Short-circuit for the case of an IInstallableUnit
- if ((!isFragment) && iu.getMetaRequirements().size() == 0)
- return iu.getRequirements();
-
- ArrayList<IRequirement> aggregatedRequirements = new ArrayList<IRequirement>(iu.getRequirements().size() + iu.getMetaRequirements().size() + (isFragment ? ((IInstallableUnitFragment) iu).getHost().size() : 0));
- aggregatedRequirements.addAll(iu.getRequirements());
-
- if (iu instanceof IInstallableUnitFragment) {
- aggregatedRequirements.addAll(((IInstallableUnitFragment) iu).getHost());
- }
-
- if (considerMetaRequirements)
- aggregatedRequirements.addAll(iu.getMetaRequirements());
- return aggregatedRequirements;
- }
-
- static final class Pending {
- List<? super IInstallableUnitPatch> matches;
- Explanation explanation;
- Object left;
- }
-
- private void expandRequirementsWithPatches(IInstallableUnit iu, IQueryResult<IInstallableUnit> applicablePatches, boolean isRootIu) throws ContradictionException {
- //Unmodified dependencies
- Collection<IRequirement> iuRequirements = getRequiredCapabilities(iu);
- Map<IRequirement, List<IInstallableUnitPatch>> unchangedRequirements = new HashMap<IRequirement, List<IInstallableUnitPatch>>(iuRequirements.size());
- Map<IRequirement, Pending> nonPatchedRequirements = new HashMap<IRequirement, Pending>(iuRequirements.size());
- for (Iterator<IInstallableUnit> iterator = applicablePatches.iterator(); iterator.hasNext();) {
- IInstallableUnitPatch patch = (IInstallableUnitPatch) iterator.next();
- IRequirement[][] reqs = mergeRequirements(iu, patch);
- if (reqs.length == 0)
- return;
-
- // Optional requirements are encoded via:
- // ABS -> (match1(req) or match2(req) or ... or matchN(req))
- // noop(IU)-> ~ABS
- // IU -> (noop(IU) or ABS)
- // Therefore we only need one optional requirement statement per IU
- List<AbstractVariable> optionalAbstractRequirements = new ArrayList<AbstractVariable>();
- for (int i = 0; i < reqs.length; i++) {
- //The requirement is unchanged
- if (reqs[i][0] == reqs[i][1]) {
- if (reqs[i][0].getMax() == 0) {
- expandNegatedRequirement(reqs[i][0], iu, optionalAbstractRequirements, isRootIu);
- return;
- }
- if (!isApplicable(reqs[i][0]))
- continue;
-
- List<IInstallableUnitPatch> patchesAppliedElseWhere = unchangedRequirements.get(reqs[i][0]);
- if (patchesAppliedElseWhere == null) {
- patchesAppliedElseWhere = new ArrayList<IInstallableUnitPatch>();
- unchangedRequirements.put(reqs[i][0], patchesAppliedElseWhere);
- }
- patchesAppliedElseWhere.add(patch);
- continue;
- }
-
- //Generate dependency when the patch is applied
- //P1 -> (A -> D) equiv. (P1 & A) -> D
- if (isApplicable(reqs[i][1])) {
- IRequirement req = reqs[i][1];
- List<IInstallableUnit> matches = getApplicableMatches(req);
- determinePotentialHostsForFragment(iu);
- if (req.getMin() > 0) {
- if (matches.isEmpty()) {
- missingRequirement(patch, req);
- } else {
- IInstallableUnit current;
- if (req.isGreedy()) {
- IInstallableUnit reqIu = matches.get(0);
- Explanation explanation;
- if (isRootIu) {
- if (alreadyInstalledIUs.contains(reqIu)) {
- explanation = new Explanation.IUInstalled(reqIu);
- } else {
- explanation = new Explanation.IUToInstall(reqIu);
- }
- } else {
- explanation = new Explanation.PatchedHardRequirement(iu, req, patch);
- }
- createImplication(new Object[] {patch, iu}, matches, explanation);
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- addNonGreedyProvider(getNonGreedyVariable(current), iu);
- }
- }
- } else {
- List<Object> newConstraint = new ArrayList<Object>();
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- newConstraint.add(getNonGreedyVariable(current));
- }
- createImplication(new Object[] {iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
- }
- }
- } else {
- if (!matches.isEmpty()) {
- IInstallableUnit current;
- AbstractVariable abs;
- if (req.isGreedy()) {
- abs = getAbstractVariable(req);
- createImplication(new Object[] {patch, abs, iu}, matches, Explanation.OPTIONAL_REQUIREMENT);
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- addNonGreedyProvider(getNonGreedyVariable(current), abs);
- }
- }
- } else {
- abs = getAbstractVariable(req, false);
- List<Object> newConstraint = new ArrayList<Object>(matches.size());
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- newConstraint.add(getNonGreedyVariable(current));
- }
- createImplication(new Object[] {patch, abs, iu}, newConstraint, Explanation.OPTIONAL_REQUIREMENT);
- }
- optionalAbstractRequirements.add(abs);
- }
- }
- }
- //Generate dependency when the patch is not applied
- //-P1 -> (A -> B) ( equiv. A -> (P1 or B) )
- if (isApplicable(reqs[i][0])) {
- IRequirement req = reqs[i][0];
-
- // Fix: if multiple patches apply to the same IU-req, we need to make sure we list each
- // patch as an optional match
- Pending pending = nonPatchedRequirements.get(req);
- if (pending != null) {
- pending.matches.add(patch);
- continue;
- }
- pending = new Pending();
- pending.left = iu;
- List<IInstallableUnit> matches = getApplicableMatches(req);
- determinePotentialHostsForFragment(iu);
- if (req.getMin() > 0) {
- if (matches.isEmpty()) {
- matches.add(patch);
- pending.explanation = new Explanation.HardRequirement(iu, req);
- pending.matches = matches;
- } else {
- // manage non greedy IUs
- IInstallableUnit current;
- List<Object> nonGreedys = new ArrayList<Object>();
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- nonGreedys.add(getNonGreedyVariable(current));
- }
- }
- matches.add(patch);
- if (req.isGreedy()) {
- IInstallableUnit reqIu = matches.get(0);///(IInstallableUnit) picker.query(new CapabilityQuery(req), new Collector(), null).iterator().next();
- Explanation explanation;
- if (isRootIu) {
- if (alreadyInstalledIUs.contains(reqIu)) {
- explanation = new Explanation.IUInstalled(reqIu);
- } else {
- explanation = new Explanation.IUToInstall(reqIu);
- }
- } else {
- explanation = new Explanation.HardRequirement(iu, req);
- }
-
- // Fix: make sure we collect all patches that will impact this IU-req, not just one
- pending.explanation = explanation;
- pending.matches = matches;
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- addNonGreedyProvider(getNonGreedyVariable(current), iu);
- }
- }
- } else {
- List<Object> newConstraint = new ArrayList<Object>(matches.size());
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- newConstraint.add(getNonGreedyVariable(current));
- }
- pending.explanation = new Explanation.HardRequirement(iu, req);
- pending.matches = newConstraint;
- }
- nonPatchedRequirements.put(req, pending);
-
- }
- } else {
- if (!matches.isEmpty()) {
- IInstallableUnit current;
- AbstractVariable abs;
- matches.add(patch);
- pending = new Pending();
- pending.explanation = Explanation.OPTIONAL_REQUIREMENT;
-
- if (req.isGreedy()) {
- abs = getAbstractVariable(req);
- // Fix: make sure we collect all patches that will impact this IU-req, not just one
- pending.left = new Object[] {abs, iu};
- pending.matches = matches;
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- addNonGreedyProvider(getNonGreedyVariable(current), abs);
- }
- }
- } else {
- abs = getAbstractVariable(req, false);
- List<Object> newConstraint = new ArrayList<Object>(matches.size());
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- newConstraint.add(getNonGreedyVariable(current));
- }
- newConstraint.add(patch);
- pending.left = new Object[] {abs, iu};
- pending.matches = newConstraint;
- }
- nonPatchedRequirements.put(req, pending);
- optionalAbstractRequirements.add(abs);
- }
- }
- }
- }
- createOptionalityExpression(iu, optionalAbstractRequirements);
- }
-
- // Fix: now create the pending non-patch requirements based on the full set of patches
- for (Pending pending : nonPatchedRequirements.values()) {
- createImplication(pending.left, pending.matches, pending.explanation);
- }
-
- List<AbstractVariable> optionalAbstractRequirements = new ArrayList<AbstractVariable>();
- for (Entry<IRequirement, List<IInstallableUnitPatch>> entry : unchangedRequirements.entrySet()) {
- List<IInstallableUnitPatch> patchesApplied = entry.getValue();
- Iterator<IInstallableUnit> allPatches = applicablePatches.iterator();
- List<IInstallableUnitPatch> requiredPatches = new ArrayList<IInstallableUnitPatch>();
- while (allPatches.hasNext()) {
- IInstallableUnitPatch patch = (IInstallableUnitPatch) allPatches.next();
- if (!patchesApplied.contains(patch))
- requiredPatches.add(patch);
- }
- IRequirement req = entry.getKey();
- List<IInstallableUnit> matches = getApplicableMatches(req);
- determinePotentialHostsForFragment(iu);
- if (req.getMin() > 0) {
- if (matches.isEmpty()) {
- if (requiredPatches.isEmpty()) {
- missingRequirement(iu, req);
- } else {
- createImplication(iu, requiredPatches, new Explanation.HardRequirement(iu, req));
- }
- } else {
- // manage non greedy IUs
- IInstallableUnit current;
- List<Object> nonGreedys = new ArrayList<Object>(matches.size());
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- nonGreedys.add(getNonGreedyVariable(current));
- }
- }
- if (!requiredPatches.isEmpty())
- matches.addAll(requiredPatches);
- if (req.isGreedy()) {
- IInstallableUnit reqIu = matches.get(0);
- Explanation explanation;
- if (isRootIu) {
- if (alreadyInstalledIUs.contains(reqIu)) {
- explanation = new Explanation.IUInstalled(reqIu);
- } else {
- explanation = new Explanation.IUToInstall(reqIu);
- }
- } else {
- explanation = new Explanation.HardRequirement(iu, req);
- }
- createImplication(iu, matches, explanation);
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- addNonGreedyProvider(getNonGreedyVariable(current), iu);
- }
- }
- } else {
- List<Object> newConstraint = new ArrayList<Object>(matches.size());
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- newConstraint.add(getNonGreedyVariable(current));
- }
- createImplication(new Object[] {iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
- }
- }
- } else {
- if (!matches.isEmpty()) {
- IInstallableUnit current;
- if (!requiredPatches.isEmpty())
- matches.addAll(requiredPatches);
- AbstractVariable abs;
- if (req.isGreedy()) {
- abs = getAbstractVariable(req);
- createImplication(new Object[] {abs, iu}, matches, Explanation.OPTIONAL_REQUIREMENT);
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- if (nonGreedyIUs.contains(current)) {
- addNonGreedyProvider(getNonGreedyVariable(current), iu);
- }
- }
- } else {
- abs = getAbstractVariable(req, false);
- List<Object> newConstraint = new ArrayList<Object>(matches.size());
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- current = it.next();
- newConstraint.add(getNonGreedyVariable(current));
- }
- createImplication(new Object[] {abs, iu}, newConstraint, new Explanation.HardRequirement(iu, req)); // FIXME
- }
- optionalAbstractRequirements.add(abs);
- }
- }
- }
- createOptionalityExpression(iu, optionalAbstractRequirements);
- }
-
- private void expandLifeCycle(IInstallableUnit iu, boolean isRootIu) throws ContradictionException {
- if (!(iu instanceof IInstallableUnitPatch))
- return;
- IInstallableUnitPatch patch = (IInstallableUnitPatch) iu;
- IRequirement req = patch.getLifeCycle();
- if (req == null)
- return;
- expandRequirement(req, iu, CollectionUtils.<AbstractVariable> emptyList(), isRootIu);
- }
-
- private void missingRequirement(IInstallableUnit iu, IRequirement req) throws ContradictionException {
- result.add(new Status(IStatus.WARNING, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Planner_Unsatisfied_dependency, iu, req)));
- createNegation(iu, req);
- }
-
- private boolean emptyBecauseFiltered;
-
- /**
- * @param req
- * @return a list of mandatory requirements if any, an empty list if req.isOptional().
- */
- private List<IInstallableUnit> getApplicableMatches(IRequirement req) {
- List<IInstallableUnit> target = new ArrayList<IInstallableUnit>();
- IQueryResult<IInstallableUnit> matches = picker.query(QueryUtil.createMatchQuery(req.getMatches()), null);
- for (Iterator<IInstallableUnit> iterator = matches.iterator(); iterator.hasNext();) {
- IInstallableUnit match = iterator.next();
- if (isApplicable(match)) {
- target.add(match);
- }
- }
- emptyBecauseFiltered = !matches.isEmpty() && target.isEmpty();
- return target;
- }
-
- //Return a new array of requirements representing the application of the patch
- private IRequirement[][] mergeRequirements(IInstallableUnit iu, IInstallableUnitPatch patch) {
- if (patch == null)
- return null;
- List<IRequirementChange> changes = patch.getRequirementsChange();
- Collection<IRequirement> iuRequirements = iu.getRequirements();
- IRequirement[] originalRequirements = iuRequirements.toArray(new IRequirement[iuRequirements.size()]);
- List<IRequirement[]> rrr = new ArrayList<IRequirement[]>();
- boolean found = false;
- for (int i = 0; i < changes.size(); i++) {
- IRequirementChange change = changes.get(i);
- for (int j = 0; j < originalRequirements.length; j++) {
- if (originalRequirements[j] != null && change.matches((IRequiredCapability) originalRequirements[j])) {
- found = true;
- if (change.newValue() != null)
- rrr.add(new IRequirement[] {originalRequirements[j], change.newValue()});
- else
- // case where a requirement is removed
- rrr.add(new IRequirement[] {originalRequirements[j], null});
- originalRequirements[j] = null;
- }
- // break;
- }
- if (!found && change.applyOn() == null && change.newValue() != null) //Case where a new requirement is added
- rrr.add(new IRequirement[] {null, change.newValue()});
- }
- //Add all the unmodified requirements to the result
- for (int i = 0; i < originalRequirements.length; i++) {
- if (originalRequirements[i] != null)
- rrr.add(new IRequirement[] {originalRequirements[i], originalRequirements[i]});
- }
- return rrr.toArray(new IRequirement[rrr.size()][]);
- }
-
- /**
- * Optional requirements are encoded via:
- * ABS -> (match1(req) or match2(req) or ... or matchN(req))
- * noop(IU)-> ~ABS
- * IU -> (noop(IU) or ABS)
- * @param iu
- * @param optionalRequirements
- * @throws ContradictionException
- */
- private void createOptionalityExpression(IInstallableUnit iu, List<AbstractVariable> optionalRequirements) throws ContradictionException {
- if (optionalRequirements.isEmpty())
- return;
- AbstractVariable noop = getNoOperationVariable(iu);
- for (AbstractVariable abs : optionalRequirements) {
- createIncompatibleValues(abs, noop);
- }
- optionalRequirements.add(noop);
- createImplication(iu, optionalRequirements, Explanation.OPTIONAL_REQUIREMENT);
- }
-
- //This will create as many implication as there is element in the right argument
- private void createNegationImplication(Object left, List<?> right, Explanation name) throws ContradictionException {
- if (DEBUG) {
- Tracing.debug(name + ": " + left + "->" + right); //$NON-NLS-1$ //$NON-NLS-2$
- }
- for (Object r : right)
- dependencyHelper.implication(new Object[] {left}).impliesNot(r).named(name);
- }
-
- private void createImplication(Object left, List<?> right, Explanation name) throws ContradictionException {
- if (DEBUG) {
- Tracing.debug(name + ": " + left + "->" + right); //$NON-NLS-1$ //$NON-NLS-2$
- }
- dependencyHelper.implication(new Object[] {left}).implies(right.toArray()).named(name);
- }
-
- private void createImplication(Object[] left, List<?> right, Explanation name) throws ContradictionException {
- if (DEBUG) {
- Tracing.debug(name + ": " + Arrays.asList(left) + "->" + right); //$NON-NLS-1$ //$NON-NLS-2$
- }
- dependencyHelper.implication(left).implies(right.toArray()).named(name);
- }
-
- //Return IUPatches that are applicable for the given iu
- private IQueryResult<IInstallableUnit> getApplicablePatches(IInstallableUnit iu) {
- if (patches == null)
- patches = new QueryableArray(picker.query(QueryUtil.createIUPatchQuery(), null).toArray(IInstallableUnit.class));
-
- return patches.query(new ApplicablePatchQuery(iu), null);
- }
-
- //Create constraints to deal with singleton
- //When there is a mix of singleton and non singleton, several constraints are generated
- private void createConstraintsForSingleton() throws ContradictionException {
- Set<Entry<String, Map<Version, IInstallableUnit>>> s = slice.entrySet();
- for (Entry<String, Map<Version, IInstallableUnit>> entry : s) {
- Map<Version, IInstallableUnit> conflictingEntries = entry.getValue();
- if (conflictingEntries.size() < 2)
- continue;
-
- Collection<IInstallableUnit> conflictingVersions = conflictingEntries.values();
- List<IInstallableUnit> singletons = new ArrayList<IInstallableUnit>();
- List<IInstallableUnit> nonSingletons = new ArrayList<IInstallableUnit>();
- for (IInstallableUnit iu : conflictingVersions) {
- if (iu.isSingleton()) {
- singletons.add(iu);
- } else {
- nonSingletons.add(iu);
- }
- }
- if (singletons.isEmpty())
- continue;
-
- IInstallableUnit[] singletonArray;
- if (nonSingletons.isEmpty()) {
- singletonArray = singletons.toArray(new IInstallableUnit[singletons.size()]);
- createAtMostOne(singletonArray);
- } else {
- singletonArray = singletons.toArray(new IInstallableUnit[singletons.size() + 1]);
- for (IInstallableUnit nonSingleton : nonSingletons) {
- singletonArray[singletonArray.length - 1] = nonSingleton;
- createAtMostOne(singletonArray);
- }
- }
- }
- }
-
- private void createAtMostOne(IInstallableUnit[] ius) throws ContradictionException {
- if (DEBUG) {
- StringBuffer b = new StringBuffer();
- for (int i = 0; i < ius.length; i++) {
- b.append(ius[i].toString());
- }
- Tracing.debug("At most 1 of " + b); //$NON-NLS-1$
- }
- dependencyHelper.atMost(1, (Object[]) ius).named(new Explanation.Singleton(ius));
- }
-
- private void createIncompatibleValues(AbstractVariable v1, AbstractVariable v2) throws ContradictionException {
- AbstractVariable[] vars = {v1, v2};
- if (DEBUG) {
- StringBuffer b = new StringBuffer();
- for (int i = 0; i < vars.length; i++) {
- b.append(vars[i].toString());
- }
- Tracing.debug("At most 1 of " + b); //$NON-NLS-1$
- }
- dependencyHelper.atMost(1, (Object[]) vars).named(Explanation.OPTIONAL_REQUIREMENT);
- }
-
- private AbstractVariable getAbstractVariable(IRequirement req) {
- return getAbstractVariable(req, true);
- }
-
- private AbstractVariable getAbstractVariable(IRequirement req, boolean appearInOptFunction) {
- AbstractVariable abstractVariable = DEBUG_ENCODING ? new AbstractVariable("Abs_" + req.toString()) : new AbstractVariable(); //$NON-NLS-1$
- if (appearInOptFunction) {
- abstractVariables.add(abstractVariable);
- }
- return abstractVariable;
- }
-
- private AbstractVariable getNoOperationVariable(IInstallableUnit iu) {
- AbstractVariable v = noopVariables.get(iu);
- if (v == null) {
- v = DEBUG_ENCODING ? new AbstractVariable("Noop_" + iu.toString()) : new AbstractVariable(); //$NON-NLS-1$
- noopVariables.put(iu, v);
- }
- return v;
- }
-
- private AbstractVariable getNonGreedyVariable(IInstallableUnit iu) {
- AbstractVariable v = nonGreedyVariables.get(iu);
- if (v == null) {
- v = DEBUG_ENCODING ? new AbstractVariable("NG_" + iu.toString()) : new AbstractVariable(); //$NON-NLS-1$
- nonGreedyVariables.put(iu, v);
- }
- return v;
- }
-
- public IStatus invokeSolver(IProgressMonitor monitor) {
- if (result.getSeverity() == IStatus.ERROR)
- return result;
- // CNF filename is given on the command line
- long start = System.currentTimeMillis();
- if (DEBUG)
- Tracing.debug("Invoking solver: " + start); //$NON-NLS-1$
- try {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- if (dependencyHelper.hasASolution(assumptions)) {
- if (DEBUG) {
- Tracing.debug("Satisfiable !"); //$NON-NLS-1$
- }
- backToIU();
- long stop = System.currentTimeMillis();
- if (DEBUG)
- Tracing.debug("Solver solution found: " + (stop - start)); //$NON-NLS-1$
- } else {
- long stop = System.currentTimeMillis();
- if (DEBUG) {
- Tracing.debug("Unsatisfiable !"); //$NON-NLS-1$
- Tracing.debug("Solver solution NOT found: " + (stop - start)); //$NON-NLS-1$
- }
- result = new MultiStatus(DirectorActivator.PI_DIRECTOR, SimplePlanner.UNSATISFIABLE, result.getChildren(), Messages.Planner_Unsatisfiable_problem, null);
- result.merge(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, SimplePlanner.UNSATISFIABLE, Messages.Planner_Unsatisfiable_problem, null));
- }
- } catch (TimeoutException e) {
- result.merge(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_Timeout));
- } catch (Exception e) {
- result.merge(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_Unexpected_problem, e));
- }
- if (DEBUG)
- System.out.println();
- return result;
- }
-
- private void backToIU() {
- solution = new ArrayList<IInstallableUnit>();
- IVec<Object> sat4jSolution = dependencyHelper.getSolution();
- for (Iterator<Object> iter = sat4jSolution.iterator(); iter.hasNext();) {
- Object var = iter.next();
- if (var instanceof IInstallableUnit) {
- IInstallableUnit iu = (IInstallableUnit) var;
- if (iu == entryPoint)
- continue;
- solution.add(iu);
- }
- }
- }
-
- private void printSolution(Collection<IInstallableUnit> state) {
- ArrayList<IInstallableUnit> l = new ArrayList<IInstallableUnit>(state);
- Collections.sort(l);
- Tracing.debug("Solution:"); //$NON-NLS-1$
- Tracing.debug("Numbers of IUs selected: " + l.size()); //$NON-NLS-1$
- for (IInstallableUnit s : l) {
- Tracing.debug(s.toString());
- }
- }
-
- public Collection<IInstallableUnit> extractSolution() {
- if (DEBUG)
- printSolution(solution);
- return solution;
- }
-
- public Set<Explanation> getExplanation(IProgressMonitor monitor) {
- ExplanationJob job = new ExplanationJob();
- job.schedule();
- monitor.setTaskName(Messages.Planner_NoSolution);
- IProgressMonitor pm = new InfiniteProgress(monitor);
- pm.beginTask(Messages.Planner_NoSolution, 1000);
- try {
- synchronized (job) {
- while (job.getExplanationResult() == null && job.getState() != Job.NONE) {
- if (monitor.isCanceled()) {
- job.cancel();
- throw new OperationCanceledException();
- }
- pm.worked(1);
- try {
- job.wait(100);
- } catch (InterruptedException e) {
- if (DEBUG)
- Tracing.debug("Interrupted while computing explanations"); //$NON-NLS-1$
- }
- }
- }
- } finally {
- monitor.done();
- }
- return job.getExplanationResult();
- }
-
- public Map<IInstallableUnitFragment, List<IInstallableUnit>> getFragmentAssociation() {
- Map<IInstallableUnitFragment, List<IInstallableUnit>> resolvedFragments = new HashMap<IInstallableUnitFragment, List<IInstallableUnit>>(fragments.size());
- for (Entry<IInstallableUnitFragment, Set<IInstallableUnit>> fragment : fragments.entrySet()) {
- if (!dependencyHelper.getBooleanValueFor(fragment.getKey()))
- continue;
- Set<IInstallableUnit> potentialHosts = fragment.getValue();
- List<IInstallableUnit> resolvedHost = new ArrayList<IInstallableUnit>(potentialHosts.size());
- for (IInstallableUnit host : potentialHosts) {
- if (dependencyHelper.getBooleanValueFor(host))
- resolvedHost.add(host);
- }
- if (resolvedHost.size() != 0)
- resolvedFragments.put(fragment.getKey(), resolvedHost);
- }
- return resolvedFragments;
- }
-
- private void rememberHostMatches(IInstallableUnitFragment fragment, List<IInstallableUnit> matches) {
- Set<IInstallableUnit> existingMatches = fragments.get(fragment);
- if (existingMatches == null) {
- existingMatches = new HashSet<IInstallableUnit>();
- fragments.put(fragment, existingMatches);
- existingMatches.addAll(matches);
- }
- existingMatches.retainAll(matches);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java
deleted file mode 100644
index 671039c50..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/QueryableArray.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Cloudsmith Inc. - query indexes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
-import org.eclipse.equinox.internal.p2.metadata.index.CapabilityIndex;
-import org.eclipse.equinox.internal.p2.metadata.index.IndexProvider;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-
-public class QueryableArray extends IndexProvider<IInstallableUnit> {
- private final List<IInstallableUnit> dataSet;
- private IIndex<IInstallableUnit> capabilityIndex;
- private TranslationSupport translationSupport;
-
- public QueryableArray(IInstallableUnit[] ius) {
- dataSet = CollectionUtils.unmodifiableList(ius);
- }
-
- public Iterator<IInstallableUnit> everything() {
- return dataSet.iterator();
- }
-
- public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
- if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
- if (capabilityIndex == null)
- capabilityIndex = new CapabilityIndex(dataSet.iterator());
- return capabilityIndex;
- }
- return null;
- }
-
- public synchronized Object getManagedProperty(Object client, String memberName, Object key) {
- if (!(client instanceof IInstallableUnit))
- return null;
- IInstallableUnit iu = (IInstallableUnit) client;
- if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
- if (translationSupport == null)
- translationSupport = new TranslationSupport(this);
- return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
- }
- return null;
- }
-}
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
deleted file mode 100644
index adf0fd4a6..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimpleDirector.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.util.Collection;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.director.IDirector;
-import org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-import org.eclipse.osgi.util.NLS;
-
-public class SimpleDirector implements IDirector {
- static final int PlanWork = 10;
- static final int EngineWork = 100;
- private IEngine engine;
- private IPlanner planner;
-
- public SimpleDirector(IEngine engine, IPlanner planner) {
- if (engine == null)
- throw new IllegalStateException("Provisioning engine is not registered"); //$NON-NLS-1$
- this.engine = engine;
- if (planner == null)
- throw new IllegalStateException("Unable to find provisioning planner"); //$NON-NLS-1$
- this.planner = planner;
- }
-
- public IStatus revert(IProfile currentProfile, IProfile revertProfile, ProvisioningContext context, IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, Messages.Director_Task_Updating, PlanWork + EngineWork);
- try {
- IProvisioningPlan plan = planner.getDiffPlan(currentProfile, revertProfile, sub.newChild(PlanWork));
- return PlanExecutionHelper.executePlan(plan, engine, context, sub.newChild(EngineWork));
- } finally {
- sub.done();
- }
- }
-
- public IStatus provision(IProfileChangeRequest request, ProvisioningContext context, IProgressMonitor monitor) {
- String taskName = NLS.bind(Messages.Director_Task_Installing, ((ProfileChangeRequest) request).getProfile().getProperty(IProfile.PROP_INSTALL_FOLDER));
- SubMonitor sub = SubMonitor.convert(monitor, taskName, PlanWork + EngineWork);
- try {
- Collection<IInstallableUnit> installRoots = request.getAdditions();
- // mark the roots as such
- 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));
- } finally {
- sub.done();
- }
- }
-}
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
deleted file mode 100644
index e8d6be1e7..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java
+++ /dev/null
@@ -1,834 +0,0 @@
-/*******************************************************************************
- * 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
- * Genuitec - bug fixes
- * Sonatype, Inc. - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.director.Explanation.MissingIU;
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.p2.metadata.query.UpdateQuery;
-import org.eclipse.equinox.internal.p2.rollback.FormerState;
-import org.eclipse.equinox.internal.provisional.p2.director.*;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.planner.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.osgi.util.NLS;
-
-public class SimplePlanner implements IPlanner {
- private static boolean DEBUG = Tracing.DEBUG_PLANNER_OPERANDS;
-
- private static final int ExpandWork = 12;
- private static final String INCLUDE_PROFILE_IUS = "org.eclipse.equinox.p2.internal.profileius"; //$NON-NLS-1$
- public static final String INCLUSION_RULES = "org.eclipse.equinox.p2.internal.inclusion.rules"; //$NON-NLS-1$
- private static final String ID_IU_FOR_ACTIONS = "org.eclipse.equinox.p2.engine.actions.root"; //$NON-NLS-1$
- private static final String EXPLANATION = "org.eclipse.equinox.p2.director.explain"; //$NON-NLS-1$
- private static final String CONSIDER_METAREQUIREMENTS = "org.eclipse.equinox.p2.planner.resolveMetaRequirements"; //$NON-NLS-1$
-
- static final int UNSATISFIABLE = 1; //status code indicating that the problem is not satisfiable
-
- private final IProvisioningAgent agent;
- private final IProfileRegistry profileRegistry;
- private final IEngine engine;
-
- private IProvisioningPlan generateProvisioningPlan(Collection<IInstallableUnit> fromState, Collection<IInstallableUnit> toState, ProfileChangeRequest changeRequest, IProvisioningPlan installerPlan, ProvisioningContext context) {
- IProvisioningPlan plan = engine.createPlan(changeRequest.getProfile(), context);
- planIUOperations(plan, fromState, toState);
- planPropertyOperations(plan, changeRequest, toState);
-
- if (DEBUG) {
- Object[] operands = new Object[0];
- try {
- Method getOperands = plan.getClass().getMethod("getOperands", new Class[0]); //$NON-NLS-1$
- operands = (Object[]) getOperands.invoke(plan, new Object[0]);
- } catch (Throwable e) {
- // ignore
- }
- for (int i = 0; i < operands.length; i++) {
- Tracing.debug(operands[i].toString());
- }
- }
-
- Map<IInstallableUnit, RequestStatus>[] changes = computeActualChangeRequest(toState, changeRequest);
- Map<IInstallableUnit, RequestStatus> requestChanges = (changes == null) ? null : changes[0];
- Map<IInstallableUnit, RequestStatus> requestSideEffects = (changes == null) ? null : changes[1];
- QueryableArray plannedState = new QueryableArray(toState.toArray(new IInstallableUnit[toState.size()]));
- PlannerStatus plannerStatus = new PlannerStatus(Status.OK_STATUS, null, requestChanges, requestSideEffects, plannedState);
- plan.setStatus(plannerStatus);
- plan.setInstallerPlan(installerPlan);
- return plan;
- }
-
- private Map<IInstallableUnit, RequestStatus>[] buildDetailedErrors(ProfileChangeRequest changeRequest) {
- 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 (IInstallableUnit removed : requestedRemovals) {
- requestStatus.put(removed, new RequestStatus(removed, RequestStatus.REMOVED, IStatus.ERROR, null));
- }
- @SuppressWarnings("unchecked")
- Map<IInstallableUnit, RequestStatus>[] maps = new Map[] {requestStatus, null};
- return maps;
- }
-
- private Map<IInstallableUnit, RequestStatus>[] computeActualChangeRequest(Collection<IInstallableUnit> toState, ProfileChangeRequest changeRequest) {
- 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, new RequestStatus(added, RequestStatus.ADDED, IStatus.ERROR, null));
- }
-
- for (IInstallableUnit removed : requestedRemovals) {
- if (!toState.contains(removed))
- requestStatus.put(removed, new RequestStatus(removed, RequestStatus.REMOVED, IStatus.OK, null));
- else
- requestStatus.put(removed, new RequestStatus(removed, RequestStatus.REMOVED, IStatus.ERROR, null));
- }
-
- //Compute the side effect changes (e.g. things installed optionally going away)
- Iterator<IInstallableUnit> includedIUs = changeRequest.getProfile().query(new IUProfilePropertyQuery(INCLUSION_RULES, IUProfilePropertyQuery.ANY), null).iterator();
- Map<IInstallableUnit, RequestStatus> sideEffectStatus = new HashMap<IInstallableUnit, RequestStatus>();
- while (includedIUs.hasNext()) {
- IInstallableUnit removal = includedIUs.next();
- if (!toState.contains(removal) && !requestStatus.containsKey(removal)) {
- sideEffectStatus.put(removal, new RequestStatus(removal, RequestStatus.REMOVED, IStatus.INFO, null));
- }
- }
- @SuppressWarnings("unchecked")
- Map<IInstallableUnit, RequestStatus>[] maps = new Map[] {requestStatus, sideEffectStatus};
- return maps;
- }
-
- /**
- * Converts a set containing a list of resolver explanations into a human-readable status object.
- */
- private IStatus convertExplanationToStatus(Set<Explanation> explanations) {
- if (explanations == null)
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_Unsatisfied_Dependencies);
-
- // hack to create a useful message when a user installs something intended for a target platform into the IDE
- ArrayList<IStatus> forTargets = new ArrayList<IStatus>(0);
- for (Explanation next : explanations) {
- if (next instanceof Explanation.MissingIU) {
- Explanation.MissingIU missingIU = (MissingIU) next;
- if (missingIU.req instanceof IRequiredCapability && "A.PDE.Target.Platform".equals(((IRequiredCapability) missingIU.req).getNamespace())) //$NON-NLS-1$
- forTargets.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, missingIU.getUserReadableName(missingIU.iu)));
- }
- }
- if (forTargets.size() > 0) {
- // add a blurb about disabling 'include required software'. The following line could be removed if bug 309863 is fixed
- forTargets.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_For_Target_Unselect_Required));
- // return a multi status with all the IUs that require A.PDE.Target.Platform
- return new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, forTargets.toArray(new IStatus[forTargets.size()]), Messages.Director_For_Target, null);
- }
- MultiStatus root = new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, Messages.Director_Unsatisfied_Dependencies, null);
- //try to find a more specific root message if possible
- String specificMessage = null;
- for (Explanation next : explanations) {
- root.add(next.toStatus());
- if (specificMessage == null && next instanceof Explanation.MissingIU)
- specificMessage = Messages.Explanation_rootMissing;
- else if (specificMessage == null && next instanceof Explanation.Singleton)
- specificMessage = Messages.Explanation_rootSingleton;
- }
- //use a more specific root message if available
- if (specificMessage != null) {
- MultiStatus newRoot = new MultiStatus(DirectorActivator.PI_DIRECTOR, 1, specificMessage, null);
- newRoot.merge(root);
- root = newRoot;
- }
- return root;
- }
-
- private void planPropertyOperations(IProvisioningPlan plan, ProfileChangeRequest profileChangeRequest, Collection<IInstallableUnit> toState) {
-
- // First deal with profile properties to remove.
- String[] toRemove = profileChangeRequest.getPropertiesToRemove();
- for (int i = 0; i < toRemove.length; i++) {
- plan.setProfileProperty(toRemove[i], null);
- }
- // Now deal with profile property changes/additions
- Map<String, String> propertyChanges = profileChangeRequest.getPropertiesToAdd();
- for (Map.Entry<String, String> entry : propertyChanges.entrySet()) {
- plan.setProfileProperty(entry.getKey(), entry.getValue());
- }
-
- // Now deal with iu property changes/additions.
- Map<IInstallableUnit, Map<String, String>> allIUPropertyChanges = profileChangeRequest.getInstallableUnitProfilePropertiesToAdd();
- for (Map.Entry<IInstallableUnit, Map<String, String>> entry : allIUPropertyChanges.entrySet()) {
- IInstallableUnit iu = entry.getKey();
- if (!toState.contains(iu))
- continue;
- for (Map.Entry<String, String> entry2 : entry.getValue().entrySet()) {
- plan.setInstallableUnitProfileProperty(iu, entry2.getKey(), entry2.getValue());
- }
- }
- // Now deal with iu property removals.
- Map<IInstallableUnit, List<String>> allIUPropertyDeletions = profileChangeRequest.getInstallableUnitProfilePropertiesToRemove();
- for (Map.Entry<IInstallableUnit, List<String>> entry : allIUPropertyDeletions.entrySet()) {
- IInstallableUnit iu = entry.getKey();
- List<String> iuPropertyRemovals = entry.getValue();
- for (String key : iuPropertyRemovals) {
- plan.setInstallableUnitProfileProperty(iu, key, null);
- }
-
- }
- }
-
- private void planIUOperations(IProvisioningPlan plan, Collection<IInstallableUnit> fromState, Collection<IInstallableUnit> toState) {
- new OperationGenerator(plan).generateOperation(fromState, toState);
- }
-
- public IProvisioningPlan getDiffPlan(IProfile currentProfile, IProfile targetProfile, IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
- sub.setTaskName(Messages.Director_Task_Resolving_Dependencies);
- try {
- IProfileChangeRequest profileChangeRequest = FormerState.generateProfileDeltaChangeRequest(currentProfile, targetProfile);
- ProvisioningContext context = new ProvisioningContext(agent);
- if (context.getProperty(INCLUDE_PROFILE_IUS) == null)
- context.setProperty(INCLUDE_PROFILE_IUS, Boolean.FALSE.toString());
- context.setExtraInstallableUnits(Arrays.asList(targetProfile.available(QueryUtil.createIUAnyQuery(), null).toArray(IInstallableUnit.class)));
- return getProvisioningPlan(profileChangeRequest, context, sub.newChild(ExpandWork / 2));
- } finally {
- sub.done();
- }
- }
-
- public static Collection<IInstallableUnit> findPlannerMarkedIUs(final IProfile profile) {
- IQuery<IInstallableUnit> markerQuery = new IUProfilePropertyQuery(INCLUSION_RULES, IUProfilePropertyQuery.ANY);
- return profile.query(markerQuery, null).toUnmodifiableSet();
- }
-
- public static Map<String, String> createSelectionContext(Map<String, String> properties) {
- HashMap<String, String> result = new HashMap<String, String>(properties);
- String environments = properties.get(IProfile.PROP_ENVIRONMENTS);
- if (environments == null)
- return result;
- for (StringTokenizer tokenizer = new StringTokenizer(environments, ","); tokenizer.hasMoreElements();) { //$NON-NLS-1$
- String entry = tokenizer.nextToken();
- int i = entry.indexOf('=');
- String key = entry.substring(0, i).trim();
- String value = entry.substring(i + 1).trim();
- result.put(key, value);
- }
- return result;
- }
-
- private IInstallableUnit[] gatherAvailableInstallableUnits(IInstallableUnit[] additionalSource, ProvisioningContext context, IProgressMonitor monitor) {
- Map<String, IInstallableUnit> resultsMap = new HashMap<String, IInstallableUnit>();
- if (additionalSource != null) {
- for (int i = 0; i < additionalSource.length; i++) {
- String key = additionalSource[i].getId() + "_" + additionalSource[i].getVersion().toString(); //$NON-NLS-1$
- resultsMap.put(key, additionalSource[i]);
- }
- }
- if (context == null) {
- context = new ProvisioningContext(agent);
- } else {
- for (IInstallableUnit iu : context.getExtraInstallableUnits()) {
- String key = iu.getId() + '_' + iu.getVersion().toString();
- resultsMap.put(key, iu);
- }
- }
- SubMonitor sub = SubMonitor.convert(monitor, 1000);
- IQueryable<IInstallableUnit> queryable = context.getMetadata(sub.newChild(500));
- IQueryResult<IInstallableUnit> matches = queryable.query(QueryUtil.createIUQuery(null, VersionRange.emptyRange), sub.newChild(500));
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- IInstallableUnit iu = it.next();
- String key = iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
- IInstallableUnit currentIU = resultsMap.get(key);
- if (currentIU == null || hasHigherFidelity(iu, currentIU))
- resultsMap.put(key, iu);
- }
- sub.done();
- Collection<IInstallableUnit> results = resultsMap.values();
- return results.toArray(new IInstallableUnit[results.size()]);
- }
-
- private static boolean hasHigherFidelity(IInstallableUnit iu, IInstallableUnit currentIU) {
- if (Boolean.valueOf(currentIU.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue() && !Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue())
- return true;
- return false;
- }
-
- public SimplePlanner(IProvisioningAgent agent) {
- Assert.isNotNull(agent);
- this.agent = agent;
- this.engine = (IEngine) agent.getService(IEngine.SERVICE_NAME);
- this.profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- Assert.isNotNull(engine);
- Assert.isNotNull(profileRegistry);
- }
-
- private boolean satisfyMetaRequirements(Map<String, String> props) {
- if (props == null)
- return true;
- if (props.get(CONSIDER_METAREQUIREMENTS) == null || "true".equalsIgnoreCase(props.get(CONSIDER_METAREQUIREMENTS))) //$NON-NLS-1$
- return true;
- return false;
- }
-
- private boolean satisfyMetaRequirements(IProfile p) {
- return satisfyMetaRequirements(p.getProperties());
- }
-
- //Return the set of IUs representing the complete future state of the profile to satisfy the request or return a ProvisioningPlan when the request can not be satisfied
- private Object getSolutionFor(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
- sub.setTaskName(Messages.Director_Task_Resolving_Dependencies);
- try {
- IProfile profile = profileChangeRequest.getProfile();
-
- Object[] updatedPlan = updatePlannerInfo(profileChangeRequest, context);
-
- Map<String, String> newSelectionContext = createSelectionContext(profileChangeRequest.getProfileProperties());
-
- 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(QueryUtil.createIUAnyQuery(), null).iterator();
- while (itor.hasNext())
- extraIUs.add(itor.next());
- }
-
- IInstallableUnit[] availableIUs = gatherAvailableInstallableUnits(extraIUs.toArray(new IInstallableUnit[extraIUs.size()]), context, sub.newChild(ExpandWork / 4));
-
- Slicer slicer = new Slicer(new QueryableArray(availableIUs), newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties()));
- IQueryable<IInstallableUnit> slice = slicer.slice(new IInstallableUnit[] {(IInstallableUnit) updatedPlan[0]}, sub.newChild(ExpandWork / 4));
- if (slice == null) {
- IProvisioningPlan plan = engine.createPlan(profile, context);
- plan.setStatus(slicer.getStatus());
- return plan;
- }
- @SuppressWarnings("unchecked")
- final IQueryable<IInstallableUnit>[] queryables = new IQueryable[] {slice, new QueryableArray(profileChangeRequest.getAdditions().toArray(new IInstallableUnit[profileChangeRequest.getAdditions().size()]))};
- slice = new CompoundQueryable<IInstallableUnit>(queryables);
- Projector projector = new Projector(slice, newSelectionContext, slicer.getNonGreedyIUs(), satisfyMetaRequirements(profileChangeRequest.getProfileProperties()));
- 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) {
- IProvisioningPlan plan = engine.createPlan(profile, context);
- plan.setStatus(s);
- return plan;
- }
- if (s.getSeverity() == IStatus.ERROR) {
- sub.setTaskName(Messages.Planner_NoSolution);
- if (s.getCode() != UNSATISFIABLE || (context != null && !(context.getProperty(EXPLANATION) == null || Boolean.TRUE.toString().equalsIgnoreCase(context.getProperty(EXPLANATION))))) {
- IProvisioningPlan plan = engine.createPlan(profile, context);
- plan.setStatus(s);
- return plan;
- }
-
- //Extract the explanation
- Set<Explanation> explanation = projector.getExplanation(sub.newChild(ExpandWork / 4));
- IStatus explanationStatus = convertExplanationToStatus(explanation);
-
- Map<IInstallableUnit, RequestStatus>[] changes = buildDetailedErrors(profileChangeRequest);
- Map<IInstallableUnit, RequestStatus> requestChanges = (changes == null) ? null : changes[0];
- Map<IInstallableUnit, RequestStatus> requestSideEffects = (changes == null) ? null : changes[1];
- PlannerStatus plannerStatus = new PlannerStatus(explanationStatus, new RequestStatus(null, RequestStatus.REMOVED, IStatus.ERROR, explanation), requestChanges, requestSideEffects, null);
-
- IProvisioningPlan plan = engine.createPlan(profile, context);
- plan.setStatus(plannerStatus);
- return plan;
- }
- //The resolution succeeded. We can forget about the warnings since there is a solution.
- if (Tracing.DEBUG && s.getSeverity() != IStatus.OK)
- LogHelper.log(s);
- s = Status.OK_STATUS;
-
- return projector;
- } finally {
- sub.done();
- }
- }
-
- public IProvisioningPlan getProvisioningPlan(IProfileChangeRequest request, ProvisioningContext context, IProgressMonitor monitor) {
- ProfileChangeRequest pcr = (ProfileChangeRequest) request;
- SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
- sub.setTaskName(Messages.Director_Task_Resolving_Dependencies);
- try {
- //Get the solution for the initial request
- Object resolutionResult = getSolutionFor(pcr, context, sub.newChild(ExpandWork / 2));
- if (resolutionResult instanceof IProvisioningPlan)
- return (IProvisioningPlan) resolutionResult;
-
- Collection<IInstallableUnit> newState = ((Projector) resolutionResult).extractSolution();
- Collection<IInstallableUnit> fullState = new ArrayList<IInstallableUnit>();
- fullState.addAll(newState);
- newState = AttachmentHelper.attachFragments(newState.iterator(), ((Projector) resolutionResult).getFragmentAssociation());
-
- IProvisioningPlan temporaryPlan = generatePlan((Projector) resolutionResult, newState, pcr, context);
-
- //Create a plan for installing necessary pieces to complete the installation (e.g touchpoint actions)
- return createInstallerPlan(pcr.getProfile(), pcr, fullState, newState, temporaryPlan, context, sub.newChild(ExpandWork / 2));
- } catch (OperationCanceledException e) {
- IProvisioningPlan plan = engine.createPlan(pcr.getProfile(), context);
- plan.setStatus(Status.CANCEL_STATUS);
- return plan;
- } finally {
- sub.done();
- }
- }
-
- // private IProvisioningPlan generateAbsoluteProvisioningPlan(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor) {
- // Set<IInstallableUnit> toState = profileChangeRequest.getProfile().query(QueryUtil.createIUAnyQuery(), null).toSet();
- // HashSet<IInstallableUnit> fromState = new HashSet<IInstallableUnit>(toState);
- // toState.removeAll(profileChangeRequest.getRemovals());
- // toState.addAll(profileChangeRequest.getAdditions());
- //
- // IProvisioningPlan plan = engine.createPlan(profileChangeRequest.getProfile(), context);
- // planIUOperations(plan, fromState, toState);
- // planPropertyOperations(plan, profileChangeRequest);
- //
- // if (DEBUG) {
- // Object[] operands = new Object[0];
- // try {
- // Method getOperands = plan.getClass().getMethod("getOperands", new Class[0]); //$NON-NLS-1$
- // operands = (Object[]) getOperands.invoke(plan, new Object[0]);
- // } catch (Throwable e) {
- // // ignore
- // }
- // for (int i = 0; i < operands.length; i++) {
- // Tracing.debug(operands[i].toString());
- // }
- // }
- // Map<IInstallableUnit, RequestStatus>[] changes = computeActualChangeRequest(toState, profileChangeRequest);
- // Map<IInstallableUnit, RequestStatus> requestChanges = (changes == null) ? null : changes[0];
- // Map<IInstallableUnit, RequestStatus> requestSideEffects = (changes == null) ? null : changes[1];
- // QueryableArray plannedState = new QueryableArray(toState.toArray(new IInstallableUnit[toState.size()]));
- // PlannerStatus plannerStatus = new PlannerStatus(Status.OK_STATUS, null, requestChanges, requestSideEffects, plannedState);
- // plan.setStatus(plannerStatus);
- // return plan;
- // }
-
- //Verify that all the meta requirements necessary to perform the uninstallation (if necessary) and all t
- private Collection<IRequirement> areMetaRequirementsSatisfied(IProfile oldProfile, Collection<IInstallableUnit> newProfile, IProvisioningPlan initialPlan) {
- Collection<IRequirement> allMetaRequirements = extractMetaRequirements(newProfile, initialPlan);
- for (IRequirement requirement : allMetaRequirements) {
- if (oldProfile.query(QueryUtil.createLimitQuery(QueryUtil.createMatchQuery(requirement.getMatches()), 1), null).isEmpty())
- return allMetaRequirements;
- }
- return null;
- }
-
- //Return all the meta requirements for the list of IU specified and all the meta requirements listed necessary to satisfy the uninstallation
- private Collection<IRequirement> extractMetaRequirements(Collection<IInstallableUnit> ius, IProvisioningPlan plan) {
- Set<IRequirement> allMetaRequirements = new HashSet<IRequirement>();
- for (IInstallableUnit iu : ius) {
- allMetaRequirements.addAll(iu.getMetaRequirements());
- }
- IQueryResult<IInstallableUnit> queryResult = plan.getRemovals().query(QueryUtil.createIUAnyQuery(), null);
- for (Iterator<IInstallableUnit> iterator = queryResult.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- allMetaRequirements.addAll(iu.getMetaRequirements());
- }
- return allMetaRequirements;
- }
-
- private IProvisioningPlan createInstallerPlan(IProfile profile, ProfileChangeRequest initialRequest, Collection<IInstallableUnit> unattachedState, Collection<IInstallableUnit> expectedState, IProvisioningPlan initialPlan, ProvisioningContext initialContext, IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, ExpandWork);
-
- try {
- sub.setTaskName(Messages.Director_Task_installer_plan);
- if (profileRegistry == null) {
- IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
- plan.setStatus(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Planner_no_profile_registry));
- return plan;
- }
-
- //No installer agent set
- if (agent.getService(IProvisioningAgent.INSTALLER_AGENT) == null) {
- return initialPlan;
- }
-
- IProfile installerProfile = ((IProfileRegistry) ((IProvisioningAgent) agent.getService(IProvisioningAgent.INSTALLER_AGENT)).getService(IProfileRegistry.SERVICE_NAME)).getProfile((String) agent.getService(IProvisioningAgent.INSTALLER_PROFILEID));
- if (installerProfile == null)
- return initialPlan;
-
- //The target and the installer are in the same agent / profile registry
- if (haveSameLocation(agent, (IProvisioningAgent) agent.getService(IProvisioningAgent.INSTALLER_AGENT))) {
- //The target and the installer are the same profile (e.g. the eclipse SDK)
- if (profile.getProfileId().equals(installerProfile.getProfileId())) {
- if (profile.getTimestamp() != installerProfile.getTimestamp()) {
- IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
- plan.setStatus(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Planner_profile_out_of_sync, profile.getProfileId())));
- return plan;
- }
- return createInstallerPlanForCohostedCase(profile, initialRequest, initialPlan, unattachedState, expectedState, initialContext, sub);
- }
-
- }
-
- if (satisfyMetaRequirements(profile) && !profile.getProfileId().equals(installerProfile.getProfileId())) {
- return createInstallerPlanForCohostedCaseFromExternalInstaller(profile, initialRequest, initialPlan, expectedState, initialContext, installerProfile, sub);
- }
-
- return createInstallerPlanForExternalInstaller(profile, initialRequest, initialPlan, expectedState, initialContext, installerProfile, sub);
-
- } finally {
- sub.done();
- }
- }
-
- private boolean haveSameLocation(IProvisioningAgent agent1, IProvisioningAgent agent2) {
- if (agent1 == null || agent2 == null)
- return false;
- if (agent1 == agent2)
- return true;
- IAgentLocation thisLocation = (IAgentLocation) agent1.getService(IAgentLocation.SERVICE_NAME);
- IAgentLocation otherLocation = (IAgentLocation) agent2.getService(IAgentLocation.SERVICE_NAME);
- if (thisLocation == null || otherLocation == null || (thisLocation == null && otherLocation == null))
- return false;
- return thisLocation.getRootLocation().equals(otherLocation.getRootLocation());
- }
-
- private IProvisioningPlan createInstallerPlanForCohostedCaseFromExternalInstaller(IProfile profile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> newState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
- IProvisioningPlan planForProfile = generatePlan(null, newState, initialRequest, initialContext);
- return createInstallerPlanForExternalInstaller(profile, initialRequest, planForProfile, newState, initialContext, agentProfile, sub);
- }
-
- //Deal with the case where the agent profile is different than the one being provisioned
- private IProvisioningPlan createInstallerPlanForExternalInstaller(IProfile targetedProfile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> expectedState, ProvisioningContext initialContext, IProfile agentProfile, SubMonitor sub) {
- IProfileRegistry installerRegistry = (IProfileRegistry) ((IProvisioningAgent) agent.getService(IProvisioningAgent.INSTALLER_AGENT)).getService(IProfileRegistry.SERVICE_NAME);
- IProfile installerProfile = installerRegistry.getProfile((String) agent.getService(IProvisioningAgent.INSTALLER_PROFILEID));
-
- Collection<IRequirement> metaRequirements = areMetaRequirementsSatisfied(installerProfile, expectedState, initialPlan);
- if (metaRequirements == null)
- return initialPlan;
-
- IInstallableUnit actionsIU = createIUForMetaRequirements(targetedProfile, metaRequirements);
- IInstallableUnit previousActionsIU = getPreviousIUForMetaRequirements(installerProfile, getActionGatheringIUId(targetedProfile), sub);
-
- ProfileChangeRequest agentRequest = new ProfileChangeRequest(installerProfile);
- agentRequest.add(actionsIU);
- if (previousActionsIU != null)
- 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);
- externalInstallerStatus.add(((IProvisioningPlan) externalInstallerPlan).getStatus());
- IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
- plan.setStatus(externalInstallerStatus);
- IProvisioningPlan installerPlan = engine.createPlan(agentProfile, initialContext);
- installerPlan.setStatus(externalInstallerStatus);
- plan.setInstallerPlan(installerPlan);
- return plan;
- }
-
- initialPlan.setInstallerPlan(generatePlan((Projector) externalInstallerPlan, null, agentRequest, initialContext));
- return initialPlan;
- }
-
- //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 IProvisioningPlan createInstallerPlanForCohostedCase(IProfile profile, ProfileChangeRequest initialRequest, IProvisioningPlan initialPlan, Collection<IInstallableUnit> unattachedState, Collection<IInstallableUnit> expectedState, ProvisioningContext initialContext, SubMonitor monitor) {
- Collection<IRequirement> metaRequirements = initialRequest.getRemovals().size() == 0 ? areMetaRequirementsSatisfied(profile, expectedState, initialPlan) : extractMetaRequirements(expectedState, initialPlan);
- if (metaRequirements == null || metaRequirements.isEmpty())
- return initialPlan;
-
- //Let's compute a plan that satisfy all the metaRequirements. We limit ourselves to only the IUs that were part of the previous solution.
- IInstallableUnit metaRequirementIU = createIUForMetaRequirements(profile, metaRequirements);
- IInstallableUnit previousMetaRequirementIU = getPreviousIUForMetaRequirements(profile, getActionGatheringIUId(profile), monitor);
-
- //Create an agent request from the initial request
- ProfileChangeRequest agentRequest = new ProfileChangeRequest(profile);
- for (Map.Entry<String, String> entry : initialRequest.getPropertiesToAdd().entrySet()) {
- agentRequest.setProfileProperty(entry.getKey(), entry.getValue());
- }
- String[] removedProperties = initialRequest.getPropertiesToRemove();
- for (int i = 0; i < removedProperties.length; i++) {
- agentRequest.removeProfileProperty(removedProperties[i]);
- }
- Map<IInstallableUnit, List<String>> removedIUProperties = initialRequest.getInstallableUnitProfilePropertiesToRemove();
- for (Map.Entry<IInstallableUnit, List<String>> entry : removedIUProperties.entrySet()) {
- for (String propKey : entry.getValue()) {
- agentRequest.removeInstallableUnitProfileProperty(entry.getKey(), propKey);
- }
- }
-
- if (previousMetaRequirementIU != null)
- agentRequest.remove(previousMetaRequirementIU);
- agentRequest.add(metaRequirementIU);
-
- ProvisioningContext agentCtx = new ProvisioningContext(agent);
- agentCtx.setMetadataRepositories(new URI[0]);
- ArrayList<IInstallableUnit> extraIUs = new ArrayList<IInstallableUnit>(unattachedState);
- agentCtx.setExtraInstallableUnits(extraIUs);
- Object agentSolution = getSolutionFor(agentRequest, agentCtx, monitor.newChild(3));
- if (agentSolution instanceof IProvisioningPlan && ((IProvisioningPlan) agentSolution).getStatus().getSeverity() == IStatus.ERROR) {
- MultiStatus agentStatus = new MultiStatus(DirectorActivator.PI_DIRECTOR, 0, Messages.Planner_actions_and_software_incompatible, null);
- agentStatus.add(((IProvisioningPlan) agentSolution).getStatus());
- IProvisioningPlan plan = engine.createPlan(initialRequest.getProfile(), initialContext);
- plan.setStatus(agentStatus);
- IProvisioningPlan installerPlan = engine.createPlan(initialRequest.getProfile(), initialContext);
- installerPlan.setStatus(agentStatus);
- plan.setInstallerPlan(installerPlan);
- return plan;
- }
-
- //Compute the installer plan. It is the difference between what is currently in the profile and the solution we just computed
- Collection<IInstallableUnit> agentState = ((Projector) agentSolution).extractSolution();
- agentState.remove(metaRequirementIU); //Remove the fake IU
- agentState = AttachmentHelper.attachFragments(agentState.iterator(), ((Projector) agentSolution).getFragmentAssociation());
-
- ProvisioningContext noRepoContext = createNoRepoContext(initialRequest);
- //...This computes the attachment of what is currently in the profile
- Object initialSolution = getSolutionFor(new ProfileChangeRequest(new EverythingOptionalProfile(initialRequest.getProfile())), noRepoContext, new NullProgressMonitor());
- if (initialSolution instanceof IProvisioningPlan) {
- LogHelper.log(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, "The resolution of the previous state contained in profile " + initialRequest.getProfile().getProfileId() + " version " + initialRequest.getProfile().getTimestamp() + " failed.")); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- return (IProvisioningPlan) initialSolution;
- }
- Iterator<IInstallableUnit> profileState = initialRequest.getProfile().query(QueryUtil.createIUAnyQuery(), null).iterator();
- Collection<IInstallableUnit> initialState = AttachmentHelper.attachFragments(profileState, ((Projector) initialSolution).getFragmentAssociation());
-
- IProvisioningPlan agentPlan = generateProvisioningPlan(initialState, agentState, initialRequest, null, initialContext);
-
- //Compute the installation plan. It is the difference between the state after the installer plan has run and the expectedState.
- return generateProvisioningPlan(agentState, expectedState, initialRequest, agentPlan, initialContext);
- }
-
- //Compute the set of operands based on the solution obtained previously
- private IProvisioningPlan generatePlan(Projector newSolution, Collection<IInstallableUnit> newState, ProfileChangeRequest request, ProvisioningContext context) {
- //Compute the attachment of the new state if not provided
- if (newState == null) {
- newState = newSolution.extractSolution();
- newState = AttachmentHelper.attachFragments(newState.iterator(), newSolution.getFragmentAssociation());
- }
- ProvisioningContext noRepoContext = createNoRepoContext(request);
-
- //Compute the attachment of the previous state
- Object initialSolution = getSolutionFor(new ProfileChangeRequest(new EverythingOptionalProfile(request.getProfile())), noRepoContext, new NullProgressMonitor());
- if (initialSolution instanceof IProvisioningPlan) {
- LogHelper.log(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, "The resolution of the previous state contained in profile " + request.getProfile().getProfileId() + " version " + request.getProfile().getTimestamp() + " failed.")); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- return (IProvisioningPlan) initialSolution;
- }
- Iterator<IInstallableUnit> profileState = request.getProfile().query(QueryUtil.createIUAnyQuery(), null).iterator();
- Collection<IInstallableUnit> initialState = AttachmentHelper.attachFragments(profileState, ((Projector) initialSolution).getFragmentAssociation());
-
- //Generate the plan
- return generateProvisioningPlan(initialState, newState, request, null, context);
- }
-
- private ProvisioningContext createNoRepoContext(ProfileChangeRequest request) {
- ProvisioningContext noRepoContext = new ProvisioningContext(agent);
- noRepoContext.setMetadataRepositories(new URI[0]);
- noRepoContext.setArtifactRepositories(new URI[0]);
- noRepoContext.setProperty(INCLUDE_PROFILE_IUS, Boolean.FALSE.toString());
- noRepoContext.setExtraInstallableUnits(new ArrayList<IInstallableUnit>(request.getProfile().query(QueryUtil.createIUAnyQuery(), new NullProgressMonitor()).toUnmodifiableSet()));
- return noRepoContext;
- }
-
- private IInstallableUnit getPreviousIUForMetaRequirements(IProfile profile, String iuId, IProgressMonitor monitor) {
- IQueryResult<IInstallableUnit> c = profile.query(QueryUtil.createIUQuery(iuId), monitor);
- if (c.isEmpty())
- return null;
- return c.iterator().next();
- }
-
- private String getActionGatheringIUId(IProfile profile) {
- return ID_IU_FOR_ACTIONS + '.' + profile.getProfileId();
- }
-
- private IInstallableUnit createIUForMetaRequirements(IProfile profile, Collection<IRequirement> metaRequirements) {
- InstallableUnitDescription description = new InstallableUnitDescription();
- String id = getActionGatheringIUId(profile);
- description.setId(id);
- Version version = Version.createOSGi(1, 0, 0, Long.toString(profile.getTimestamp()));
- description.setVersion(version);
- description.addRequirements(metaRequirements);
-
- ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
- IProvidedCapability providedCapability = MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, id, version);
- providedCapabilities.add(providedCapability);
- description.addProvidedCapabilities(providedCapabilities);
-
- IInstallableUnit actionsIU = MetadataFactory.createInstallableUnit(description);
- return actionsIU;
- }
-
- private IInstallableUnit createIURepresentingTheProfile(Set<IRequirement> allRequirements) {
- InstallableUnitDescription iud = new MetadataFactory.InstallableUnitDescription();
- String time = Long.toString(System.currentTimeMillis());
- iud.setId(time);
- iud.setVersion(Version.createOSGi(0, 0, 0, time));
- iud.setRequirements(allRequirements.toArray(new IRequirement[allRequirements.size()]));
- return MetadataFactory.createInstallableUnit(iud);
- }
-
- //The planner uses installable unit properties to keep track of what it has been asked to install. This updates this information
- //It returns at index 0 a meta IU representing everything that needs to be installed
- //It returns at index 1 all the IUs that are in the profile after the removal have been done, but before the addition have been done
- private Object[] updatePlannerInfo(ProfileChangeRequest profileChangeRequest, ProvisioningContext context) {
- IQueryResult<IInstallableUnit> alreadyInstalled = profileChangeRequest.getProfile().query(new IUProfilePropertyQuery(INCLUSION_RULES, IUProfilePropertyQuery.ANY), null);
-
- Collection<IInstallableUnit> additionRequested = profileChangeRequest.getAdditions();
- Collection<IInstallableUnit> removalRequested = profileChangeRequest.getRemovals();
-
- for (Map.Entry<IInstallableUnit, List<String>> object : profileChangeRequest.getInstallableUnitProfilePropertiesToRemove().entrySet()) {
- if (object.getValue().contains(INCLUSION_RULES))
- profileChangeRequest.setInstallableUnitProfileProperty(object.getKey(), INCLUSION_RULES, ProfileInclusionRules.createStrictInclusionRule(object.getKey()));
- }
- //Remove the iu properties associated to the ius removed and the iu properties being removed as well
- if (removalRequested.size() != 0) {
- for (Iterator<IInstallableUnit> iterator = alreadyInstalled.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- for (IInstallableUnit removed : removalRequested) {
- if (iu.equals(removed)) {
- profileChangeRequest.removeInstallableUnitProfileProperty(removed, INCLUSION_RULES);
- iterator.remove();
- break;
- }
- }
- }
- }
- Set<IRequirement> gatheredRequirements = new HashSet<IRequirement>();
-
- //Process all the IUs being added
- Map<IInstallableUnit, Map<String, String>> iuPropertiesToAdd = profileChangeRequest.getInstallableUnitProfilePropertiesToAdd();
- for (IInstallableUnit added : additionRequested) {
- Map<String, String> propertiesForIU = iuPropertiesToAdd.get(added);
- IRequirement profileRequirement = null;
- if (propertiesForIU != null) {
- profileRequirement = createRequirement(added, propertiesForIU.get(INCLUSION_RULES));
- }
- if (profileRequirement == null) {
- profileChangeRequest.setInstallableUnitProfileProperty(added, INCLUSION_RULES, ProfileInclusionRules.createStrictInclusionRule(added));
- profileRequirement = createStrictRequirement(added);
- }
- gatheredRequirements.add(profileRequirement);
- }
-
- //Process the IUs that were already there
- for (Iterator<IInstallableUnit> iterator = alreadyInstalled.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- Map<String, String> propertiesForIU = iuPropertiesToAdd.get(iu);
- IRequirement profileRequirement = null;
- //Test if the value has changed
- if (propertiesForIU != null) {
- profileRequirement = createRequirement(iu, propertiesForIU.get(INCLUSION_RULES));
- }
- if (profileRequirement == null) {
- profileRequirement = createRequirement(iu, profileChangeRequest.getProfile().getInstallableUnitProperty(iu, INCLUSION_RULES));
- }
- gatheredRequirements.add(profileRequirement);
- }
-
- //Now add any other requirement that we need to see satisfied
- if (profileChangeRequest.getExtraRequirements() != null)
- gatheredRequirements.addAll(profileChangeRequest.getExtraRequirements());
- return new Object[] {createIURepresentingTheProfile(gatheredRequirements), alreadyInstalled.toArray(IInstallableUnit.class)};
- }
-
- private IRequirement createRequirement(IInstallableUnit iu, String rule) {
- if (rule == null)
- return null;
- if (rule.equals(ProfileInclusionRules.createStrictInclusionRule(iu))) {
- return createStrictRequirement(iu);
- }
- if (rule.equals(ProfileInclusionRules.createOptionalInclusionRule(iu))) {
- return createOptionalRequirement(iu);
- }
- return null;
- }
-
- private IRequirement createOptionalRequirement(IInstallableUnit iu) {
- return MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, iu.getVersion(), true), null, true, false, true);
- }
-
- private IRequirement createStrictRequirement(IInstallableUnit iu) {
- return MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, iu.getVersion(), true), null, false, false, true);
- }
-
- public IQueryResult<IInstallableUnit> updatesFor(IInstallableUnit toUpdate, ProvisioningContext context, IProgressMonitor monitor) {
- Map<String, IInstallableUnit> resultsMap = new HashMap<String, IInstallableUnit>();
-
- SubMonitor sub = SubMonitor.convert(monitor, 1000);
- IQueryable<IInstallableUnit> queryable = context.getMetadata(sub.newChild(500));
- IQueryResult<IInstallableUnit> matches = queryable.query(new UpdateQuery(toUpdate), sub.newChild(500));
- for (Iterator<IInstallableUnit> it = matches.iterator(); it.hasNext();) {
- IInstallableUnit iu = it.next();
- String key = iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
- IInstallableUnit currentIU = resultsMap.get(key);
- if (currentIU == null || hasHigherFidelity(iu, currentIU))
- resultsMap.put(key, iu);
- }
- sub.done();
- return new CollectionResult<IInstallableUnit>(resultsMap.values());
- }
-
- //helper class to trick the resolver to believe that everything is optional
- private static class EverythingOptionalProfile implements IProfile {
- private IProfile profile;
-
- public EverythingOptionalProfile(IProfile p) {
- profile = p;
- }
-
- public IQueryResult<IInstallableUnit> available(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return profile.available(query, monitor);
- }
-
- public Map<String, String> getInstallableUnitProperties(IInstallableUnit iu) {
- return profile.getInstallableUnitProperties(iu);
- }
-
- public String getInstallableUnitProperty(IInstallableUnit iu, String key) {
- if (INCLUSION_RULES.equals(key))
- return ProfileInclusionRules.createOptionalInclusionRule(iu);
- return profile.getInstallableUnitProperty(iu, key);
- }
-
- public String getProfileId() {
- return profile.getProfileId();
- }
-
- public Map<String, String> getProperties() {
- return profile.getProperties();
- }
-
- public String getProperty(String key) {
- return profile.getProperty(key);
- }
-
- public IProvisioningAgent getProvisioningAgent() {
- return profile.getProvisioningAgent();
- }
-
- public long getTimestamp() {
- return profile.getTimestamp();
- }
-
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return profile.query(query, monitor);
- }
- }
-
- public IProfileChangeRequest createChangeRequest(IProfile profileToChange) {
- return new ProfileChangeRequest(profileToChange);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Slicer.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Slicer.java
deleted file mode 100644
index b9544ac88..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Slicer.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.director;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnitPatch;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.osgi.util.NLS;
-
-public class Slicer {
- private static boolean DEBUG = false;
- private final IQueryable<IInstallableUnit> possibilites;
- private final boolean considerMetaRequirements;
- protected final IInstallableUnit selectionContext;
- private final Map<String, Map<Version, IInstallableUnit>> slice; //The IUs that have been considered to be part of the problem
- private final MultiStatus result;
-
- private LinkedList<IInstallableUnit> toProcess;
- private Set<IInstallableUnit> considered; //IUs to add to the slice
- private Set<IInstallableUnit> nonGreedyIUs = new HashSet<IInstallableUnit>(); //IUs that are brought in by non greedy dependencies
-
- public Slicer(IQueryable<IInstallableUnit> input, Map<String, String> context, boolean considerMetaRequirements) {
- this(input, InstallableUnit.contextIU(context), considerMetaRequirements);
- }
-
- public Slicer(IQueryable<IInstallableUnit> possibilites, IInstallableUnit selectionContext, boolean considerMetaRequirements) {
- this.possibilites = possibilites;
- this.selectionContext = selectionContext;
- this.considerMetaRequirements = considerMetaRequirements;
- slice = new HashMap<String, Map<Version, IInstallableUnit>>();
- result = new MultiStatus(DirectorActivator.PI_DIRECTOR, IStatus.OK, Messages.Planner_Problems_resolving_plan, null);
- }
-
- public IQueryable<IInstallableUnit> slice(IInstallableUnit[] ius, IProgressMonitor monitor) {
- try {
- long start = 0;
- if (DEBUG) {
- start = System.currentTimeMillis();
- System.out.println("Start slicing: " + start); //$NON-NLS-1$
- }
-
- validateInput(ius);
- considered = new HashSet<IInstallableUnit>(Arrays.asList(ius));
- toProcess = new LinkedList<IInstallableUnit>(considered);
- while (!toProcess.isEmpty()) {
- if (monitor.isCanceled()) {
- result.merge(Status.CANCEL_STATUS);
- throw new OperationCanceledException();
- }
- processIU(toProcess.removeFirst());
- }
- computeNonGreedyIUs();
- if (DEBUG) {
- long stop = System.currentTimeMillis();
- System.out.println("Slicing complete: " + (stop - start)); //$NON-NLS-1$
- }
- } catch (IllegalStateException e) {
- result.add(new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, e.getMessage(), e));
- }
- if (Tracing.DEBUG && result.getSeverity() != IStatus.OK)
- LogHelper.log(result);
- if (result.getSeverity() == IStatus.ERROR)
- return null;
- return new QueryableArray(considered.toArray(new IInstallableUnit[considered.size()]));
- }
-
- private void computeNonGreedyIUs() {
- IQueryable<IInstallableUnit> queryable = new QueryableArray(considered.toArray(new IInstallableUnit[considered.size()]));
- Iterator<IInstallableUnit> it = queryable.query(QueryUtil.ALL_UNITS, new NullProgressMonitor()).iterator();
- while (it.hasNext()) {
- Collection<IRequirement> reqs = getRequirements(it.next().unresolved());
- for (IRequirement req : reqs) {
- if (!isApplicable(req))
- continue;
-
- if (!isGreedy(req)) {
- nonGreedyIUs.addAll(queryable.query(QueryUtil.createMatchQuery(req.getMatches()), null).toUnmodifiableSet());
- }
- }
- }
- }
-
- public MultiStatus getStatus() {
- return result;
- }
-
- //This is a shortcut to simplify the error reporting when the filter of the ius we are being asked to install does not pass
- private void validateInput(IInstallableUnit[] ius) {
- for (int i = 0; i < ius.length; i++) {
- if (!isApplicable(ius[i]))
- throw new IllegalStateException(NLS.bind(Messages.Explanation_missingRootFilter, ius[i]));
- }
- }
-
- // Check whether the requirement is applicable
- protected boolean isApplicable(IRequirement req) {
- IMatchExpression<IInstallableUnit> filter = req.getFilter();
- return filter == null || filter.isMatch(selectionContext);
- }
-
- protected boolean isApplicable(IInstallableUnit iu) {
- IMatchExpression<IInstallableUnit> filter = iu.getFilter();
- return filter == null || filter.isMatch(selectionContext);
- }
-
- protected void processIU(IInstallableUnit iu) {
- iu = iu.unresolved();
-
- Map<Version, IInstallableUnit> iuSlice = slice.get(iu.getId());
- if (iuSlice == null) {
-
- iuSlice = new HashMap<Version, IInstallableUnit>();
- slice.put(iu.getId(), iuSlice);
- }
- iuSlice.put(iu.getVersion(), iu);
- if (!isApplicable(iu)) {
- return;
- }
-
- Collection<IRequirement> reqs = getRequirements(iu);
- if (reqs.isEmpty())
- return;
- for (IRequirement req : reqs) {
- if (!isApplicable(req))
- continue;
-
- if (!isGreedy(req)) {
- continue;
- }
-
- expandRequirement(iu, req);
- }
- }
-
- protected boolean isGreedy(IRequirement req) {
- return req.isGreedy();
- }
-
- private Collection<IRequirement> getRequirements(IInstallableUnit iu) {
- boolean isPatch = iu instanceof IInstallableUnitPatch;
- boolean isFragment = iu instanceof IInstallableUnitFragment;
- //Short-circuit for the case of an IInstallableUnit
- if ((!isFragment) && (!isPatch) && iu.getMetaRequirements().size() == 0)
- return iu.getRequirements();
-
- ArrayList<IRequirement> aggregatedRequirements = new ArrayList<IRequirement>(iu.getRequirements().size() + iu.getMetaRequirements().size() + (isFragment ? ((IInstallableUnitFragment) iu).getHost().size() : 0) + (isPatch ? ((IInstallableUnitPatch) iu).getRequirementsChange().size() : 0));
- aggregatedRequirements.addAll(iu.getRequirements());
-
- if (iu instanceof IInstallableUnitFragment) {
- aggregatedRequirements.addAll(((IInstallableUnitFragment) iu).getHost());
- }
-
- if (iu instanceof InstallableUnitPatch) {
- IInstallableUnitPatch patchIU = (IInstallableUnitPatch) iu;
- List<IRequirementChange> changes = patchIU.getRequirementsChange();
- for (int i = 0; i < changes.size(); i++)
- aggregatedRequirements.add(changes.get(i).newValue());
- }
-
- if (considerMetaRequirements)
- aggregatedRequirements.addAll(iu.getMetaRequirements());
- return aggregatedRequirements;
- }
-
- private void expandRequirement(IInstallableUnit iu, IRequirement req) {
- if (req.getMax() == 0)
- return;
- IQueryResult<IInstallableUnit> matches = possibilites.query(QueryUtil.createMatchQuery(req.getMatches()), null);
- int validMatches = 0;
- for (Iterator<IInstallableUnit> iterator = matches.iterator(); iterator.hasNext();) {
- IInstallableUnit match = iterator.next();
- if (!isApplicable(match))
- continue;
- validMatches++;
- Map<Version, IInstallableUnit> iuSlice = slice.get(match.getId());
- if (iuSlice == null || !iuSlice.containsKey(match.getVersion()))
- consider(match);
- }
-
- if (validMatches == 0) {
- if (req.getMin() == 0) {
- if (DEBUG)
- System.out.println("No IU found to satisfy optional dependency of " + iu + " on req " + req); //$NON-NLS-1$//$NON-NLS-2$
- } else {
- result.add(new Status(IStatus.WARNING, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.Planner_Unsatisfied_dependency, iu, req)));
- }
- }
- }
-
- private void consider(IInstallableUnit match) {
- if (considered.add(match))
- toProcess.addLast(match);
- }
-
- Set<IInstallableUnit> getNonGreedyIUs() {
- return nonGreedyIUs;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties
deleted file mode 100644
index a21c0d02a..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties
+++ /dev/null
@@ -1,51 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-
-Director_Task_installer_plan=Computing prerequisite plan
-Director_Task_Installing=Installing into {0}
-Director_Task_Updating=Updating
-Director_Task_Resolving_Dependencies=Calculating requirements and dependencies.
-Director_Unsatisfied_Dependencies=\
-Cannot complete the install because some dependencies are not satisfiable
-Director_error_applying_configuration=Unexpected failure applying configuration after for the installer plan execution.
-Director_For_Target = The following software cannot be installed because it is intended for use only in Plug-in Development Environment (PDE) target platforms. Please deselect these items and retry the operation.
-Director_For_Target_Unselect_Required = If provisioning a target platform then try disabling the option 'Include required software'
-
-Explanation_alreadyInstalled=Software currently installed: {0}
-Explanation_from=From: {0}
-Explanation_fromPatch=From Patch: {0}
-Explanation_hardDependency=Cannot satisfy dependency: {0} depends on: {1}
-Explanation_patchedHardDependency=Cannot satisfy patched ({0}) dependency: {1} depends on: {2}
-Explanation_missingRequired=Missing requirement: {0} requires ''{1}'' but it could not be found
-Explanation_missingRootRequired=You requested to install ''{0}'' but it could not be found
-Explanation_missingNonGreedyRequired=Missing non greedy requirement: ''{0}'' is required non greedily but it could not be found
-Explanation_missingRequiredFilter=Missing requirement for filter {0}: {1} requires ''{2}'' but it could not be found
-Explanation_missingRootFilter={0} cannot be installed in this environment because its filter is not applicable.
-Explanation_optionalDependency=Optional dependency
-Explanation_rootMissing=Cannot complete the install because one or more required items could not be found.
-Explanation_rootSingleton=Cannot complete the install because of a conflicting dependency.
-Explanation_singleton=Only one of the following can be installed at once: {0}
-Explanation_to=To: {0}
-Explanation_toInstall=Software being installed: {0}
-Explanation_unsatisfied=Cannot satisfy dependency:
-
-Planner_Timeout=The solver timed out on problem {0}.
-Planner_Problems_resolving_plan=Problems resolving provisioning plan.
-Planner_Unsatisfiable_problem=No solution found because the problem is unsatisfiable.
-Planner_Unsatisfied_dependency=Unable to satisfy dependency from {0} to {1}.
-Planner_NoSolution=Cannot complete the request. Generating details.
-Planner_Unexpected_problem=An unexpected error occurred while resolving.
-Planner_actions_and_software_incompatible=The actions required to successfully install the requested software are incompatible with the software to install.
-Planner_can_not_install_preq=The actions required to successfully install the requested software can not be installed.
-Planner_no_profile_registry=Profile Registry is not registered.
-Planner_profile_out_of_sync=The copies of profile {0} are not in sync.
-Planner_no_installer_agent=Problems resolving meta requirements while installing in profile {0}.
-RequestStatus_message=Plan status for {0}
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
deleted file mode 100644
index 72c86daab..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/rollback/FormerState.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.rollback;
-
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.p2.director.SimplePlanner;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-public class FormerState {
-
- public static IProfileChangeRequest generateProfileDeltaChangeRequest(IProfile current, IProfile target) {
- ProfileChangeRequest request = new ProfileChangeRequest(current);
-
- synchronizeProfileProperties(request, current, target);
- synchronizeMarkedIUs(request, current, target);
- synchronizeAllIUProperties(request, current, target);
-
- return request;
- }
-
- private static void synchronizeAllIUProperties(IProfileChangeRequest request, IProfile current, IProfile target) {
- Set<IInstallableUnit> currentIUset = current.query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet();
- Iterator<IInstallableUnit> targetIUs = target.query(QueryUtil.createIUAnyQuery(), null).iterator();
- List<IInstallableUnit> iusToAdd = new ArrayList<IInstallableUnit>();
- List<IInstallableUnit> iusToUpdate = new ArrayList<IInstallableUnit>();
- while (targetIUs.hasNext()) {
- IInstallableUnit nxt = targetIUs.next();
- if (currentIUset.contains(nxt))
- iusToUpdate.add(nxt);
- else
- iusToAdd.add(nxt);
- }
-
- //additions
- for (IInstallableUnit iu : iusToAdd) {
- for (Entry<String, String> entry : target.getInstallableUnitProperties(iu).entrySet()) {
- request.setInstallableUnitProfileProperty(iu, entry.getKey(), entry.getValue());
- }
- }
-
- // updates
- for (IInstallableUnit iu : iusToUpdate) {
- Map<String, String> propertiesToSet = new HashMap<String, String>(target.getInstallableUnitProperties(iu));
- for (Entry<String, String> entry : current.getInstallableUnitProperties(iu).entrySet()) {
- String key = entry.getKey();
- String newValue = propertiesToSet.get(key);
- if (newValue == null) {
- request.removeInstallableUnitProfileProperty(iu, key);
- } else if (newValue.equals(entry.getValue()))
- propertiesToSet.remove(key);
- }
-
- for (Entry<String, String> entry : propertiesToSet.entrySet()) {
- request.setInstallableUnitProfileProperty(iu, entry.getKey(), entry.getValue());
- }
- }
- }
-
- private static void synchronizeMarkedIUs(IProfileChangeRequest request, IProfile current, IProfile target) {
- Collection<IInstallableUnit> currentPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(current);
- Collection<IInstallableUnit> targetPlannerMarkedIUs = SimplePlanner.findPlannerMarkedIUs(target);
-
- //additions
- Collection<IInstallableUnit> markedIUsToAdd = new HashSet<IInstallableUnit>(targetPlannerMarkedIUs);
- markedIUsToAdd.removeAll(currentPlannerMarkedIUs);
- request.addAll(markedIUsToAdd);
-
- // removes
- Collection<IInstallableUnit> markedIUsToRemove = new HashSet<IInstallableUnit>(currentPlannerMarkedIUs);
- markedIUsToRemove.removeAll(targetPlannerMarkedIUs);
- request.removeAll(markedIUsToRemove);
- }
-
- 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();
-
- String newValue = profilePropertiesToSet.get(key);
- if (newValue == null) {
- request.removeProfileProperty(key);
- } else if (newValue.equals(entry.getValue()))
- profilePropertiesToSet.remove(key);
- }
-
- for (Entry<String, String> entry : profilePropertiesToSet.entrySet()) {
- request.setProfileProperty(entry.getKey(), entry.getValue());
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IDirector.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IDirector.java
deleted file mode 100644
index aaa13735a..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/IDirector.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.director;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-
-/**
- * Directors are responsible for determining what should be done to a given
- * profile to reshape it as requested. That is, given the current state of a
- * profile, a description of the desired end state of that profile and metadata
- * describing the available IUs, a director produces a list of provisioning
- * operations (e.g., install, update or uninstall) to perform on the related IUs.
- * Directors are also able to validate profiles and assist in the diagnosis of
- * configuration errors. Note that directors may range in complexity from
- * very simple (e.g., reading a list of bundles from a static file) to very complex.
- */
-public interface IDirector {
-
- /**
- * Service name constant for the director service.
- */
- public static final String SERVICE_NAME = IDirector.class.getName();
-
- /**
- * performs the change request with the given context.
- *
- * @param profileChangeRequest The change request
- * @param context The provisioning context used for finding resources
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- */
- public IStatus provision(IProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor);
-
- /**
- * Reverts the profile to a previous state described in the target revertProfile.
- *
- * @param profile The profile to revert
- * @param revertProfile The profile snapshot state to revert to
- * @param context The provisioning context used for finding resources
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- */
- public IStatus revert(IProfile profile, IProfile revertProfile, ProvisioningContext context, IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanExecutionHelper.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanExecutionHelper.java
deleted file mode 100644
index ed2d8e357..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlanExecutionHelper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.director;
-
-import java.io.IOException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.director.DirectorActivator;
-import org.eclipse.equinox.internal.p2.director.Messages;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.p2.engine.*;
-
-public class PlanExecutionHelper {
- public static IStatus executePlan(IProvisioningPlan result, IEngine engine, ProvisioningContext context, IProgressMonitor progress) {
- return executePlan(result, engine, PhaseSetFactory.createDefaultPhaseSet(), context, progress);
- }
-
- public static IStatus executePlan(IProvisioningPlan result, IEngine engine, IPhaseSet phaseSet, ProvisioningContext context, IProgressMonitor progress) {
- if (!result.getStatus().isOK())
- return result.getStatus();
-
- if (result.getInstallerPlan() != null) {
- IStatus installerPlanStatus = ((IEngine) result.getInstallerPlan().getProfile().getProvisioningAgent().getService(IEngine.SERVICE_NAME)).perform(result.getInstallerPlan(), phaseSet, progress);
- if (!installerPlanStatus.isOK())
- return installerPlanStatus;
- Configurator configChanger = (Configurator) ServiceHelper.getService(DirectorActivator.context, Configurator.class.getName());
- try {
- configChanger.applyConfiguration();
- } catch (IOException e) {
- return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, Messages.Director_error_applying_configuration, e);
- }
- }
- return engine.perform(result, phaseSet, progress);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java
deleted file mode 100644
index b4b83068d..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/PlannerStatus.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.eclipse.equinox.internal.provisional.p2.director;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.*;
-
-public class PlannerStatus implements IStatus {
-
- private final IStatus status;
- private final RequestStatus globalRequestStatus;
- private final Map<IInstallableUnit, RequestStatus> requestChanges;
- private final Map<IInstallableUnit, RequestStatus> requestSideEffects;
- private final IQueryable<IInstallableUnit> plannedState;
-
- private static final IQueryable<IInstallableUnit> EMPTY_IU_QUERYABLE = new IQueryable<IInstallableUnit>() {
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return Collector.emptyCollector();
- }
- };
-
- public PlannerStatus(IStatus status, RequestStatus globalRequestStatus, Map<IInstallableUnit, RequestStatus> requestChanges, Map<IInstallableUnit, RequestStatus> requestSideEffects, IQueryable<IInstallableUnit> plannedState) {
- this.status = status;
- this.globalRequestStatus = globalRequestStatus;
- this.requestChanges = requestChanges;
- this.requestSideEffects = requestSideEffects;
- this.plannedState = (plannedState == null) ? EMPTY_IU_QUERYABLE : plannedState;
- }
-
- /**
- * Returns a request status object containing additional global details on the planning of the request
- *
- * @return An IStatus object with global details on the planning process
- */
- public RequestStatus getRequestStatus() {
- return globalRequestStatus;
- }
-
- /**
- * Returns a map of the problems associated with changes to the given installable unit
- * in this plan. A status with severity {@link IStatus#OK} is returned if the unit
- * can be provisioned successfully
- *
- * @return A map of {@link IInstallableUnit} to {@link IStatus} of the requested
- * changes and their corresponding explanation.
- */
- public Map<IInstallableUnit, RequestStatus> getRequestChanges() {
- return requestChanges;
- }
-
- /**
- * Returns a map of side-effects that will occur as a result of the plan being executed.
- * Side-effects of an install may include:
- * <ul>
- * <li>Optional software being installed that will become satisfied once the plan
- * is executed.</li>
- * <li>Optional software currently in the profile that will be uninstalled as a result
- * of the plan being executed. This occurs when the optional software has dependencies
- * that are incompatible with the software being installed.
- * This includes additional software that will be installed as a result of the change,
- * or optional changes and their corresponding explanation.
- * @return A map of {@link IInstallableUnit} to {@link IStatus} of the additional side effect
- * status, or <code>null</code> if there are no side effects.
- */
- public Map<IInstallableUnit, RequestStatus> getRequestSideEffects() {
- return requestSideEffects;
- }
-
- /**
- * Returns the set of InstallableUnits that make up the expected planned state in terms
- * of additions and removals to the profile based on the planning process.
- *
- * @return An IQueryable of the InstallableUnits in the planned state.
- */
- public IQueryable<IInstallableUnit> getPlannedState() {
- return plannedState;
- }
-
- // Remaining Methods Delegate to wrapped Status
- public IStatus[] getChildren() {
- return status.getChildren();
- }
-
- public int getCode() {
- return status.getCode();
- }
-
- public Throwable getException() {
- return status.getException();
- }
-
- public String getMessage() {
- return status.getMessage();
- }
-
- public String getPlugin() {
- return status.getPlugin();
- }
-
- public int getSeverity() {
- return status.getSeverity();
- }
-
- public boolean isMultiStatus() {
- return status.isMultiStatus();
- }
-
- public boolean isOK() {
- return status.isOK();
- }
-
- public boolean matches(int severityMask) {
- return status.matches(severityMask);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/RequestStatus.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/RequestStatus.java
deleted file mode 100644
index b1f6796b7..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/provisional/p2/director/RequestStatus.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2009 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.director;
-
-import java.util.*;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.director.*;
-import org.eclipse.equinox.internal.p2.director.Explanation.IUInstalled;
-import org.eclipse.equinox.internal.p2.director.Explanation.IUToInstall;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class RequestStatus extends Status {
- public static final byte ADDED = 0;
- public static final byte REMOVED = 1;
-
- private byte initialRequestType;
- private IInstallableUnit iu;
- private Set<Explanation> explanation;
- private Explanation detailedExplanation;
- private Set<IInstallableUnit> conflictingRootIUs;
- private Set<IInstallableUnit> conflictingInstalledIUs;
-
- public RequestStatus(IInstallableUnit iu, byte initialRequesType, int severity, Set<Explanation> explanation) {
- super(severity, DirectorActivator.PI_DIRECTOR, NLS.bind(Messages.RequestStatus_message, iu));
- this.iu = iu;
- this.initialRequestType = initialRequesType;
- this.explanation = explanation;
- conflictingRootIUs = new HashSet<IInstallableUnit>();
- conflictingInstalledIUs = new HashSet<IInstallableUnit>();
- if (explanation != null) {
- Iterator<Explanation> iterator = explanation.iterator();
- Explanation o = null;
- while (iterator.hasNext() && ((o = iterator.next()) instanceof Explanation.IUToInstall)) {
- conflictingRootIUs.add(((IUToInstall) o).iu);
- }
- if (o instanceof Explanation.IUInstalled) {
- conflictingInstalledIUs.add(((IUInstalled) o).iu);
- while (iterator.hasNext() && ((o = iterator.next()) instanceof Explanation.IUInstalled)) {
- conflictingInstalledIUs.add(((IUInstalled) o).iu);
- }
- }
- detailedExplanation = o;
- }
- }
-
- public byte getInitialRequestType() {
- return initialRequestType;
- }
-
- public IInstallableUnit getIu() {
- return iu;
- }
-
- //Return the already installed roots with which this IU is in conflict
- //Return an empty set if there is no conflict
- public Set<IInstallableUnit> getConflictsWithInstalledRoots() {
- return conflictingRootIUs;
- }
-
- //Return the already installed roots with which this IU is in conflict
- //Return an empty set if there is no conflict
- public Set<IInstallableUnit> getConflictsWithAnyRoots() {
- return conflictingInstalledIUs;
- }
-
- //Return an explanation as to why this IU can not be resolved.
- public Set<Explanation> getExplanations() {
- //To start with, this does not have to return the most specific explanation. If it simply returns an global explanation it is good enough.
- return explanation;
- }
-
- public int getShortExplanation() {
- return detailedExplanation.shortAnswer();
- }
-
- public Explanation getExplanationDetails() {
- return detailedExplanation;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java
deleted file mode 100644
index d85277088..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IPlanner.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.planner;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-/**
- * Planners are responsible for determining what should be done to a given
- * profile to reshape it as requested. That is, given the current state of a
- * profile, a description of the desired changes to that profile and metadata
- * describing the available installable units, a planner produces a concrete plan that lists the
- * exact steps that the engine should perform.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IPlanner {
- /**
- * Service name constant for the planner service.
- */
- public static final String SERVICE_NAME = IPlanner.class.getName();
-
- /**
- * Returns a plan describing the set of changes that must be performed to
- * satisfy the given profile change request.
- *
- * @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);
-
- /**
- * @noreference This method is not intended to be referenced by clients.
- * You may want to consider using the org.eclipse.equinox.p2.operations.UpdateOperation class instead.
- */
- public IQueryResult<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
deleted file mode 100644
index ecb953e97..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/IProfileChangeRequest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Sonatype, Inc 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:
- * Sonatype, Inc. - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.planner;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-
-/**
- * A profile change request is a description of a set of changes that a client
- * would like to perform on a profile. The request is provided as input to an
- * {@link IPlanner}, which validates which of the requested changes can be
- * performed, and what other changes are required in order to make the profile
- * state consistent.
- *
- * It is important to note that a change request can only be submitted once to the planner.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-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 installable units to be added to the profile
- */
- public abstract void addAll(Collection<IInstallableUnit> toInstall);
-
- /**
- * Requests the removal of the specified installable unit
- *
- * @param toUninstall the installable units to be remove from the profile
- */
- public abstract void remove(IInstallableUnit toUninstall);
-
- /**
- * Requests the removal of all installable units in the provided collection
- * @param toUninstall the installable units to be remove from the profile
- */
- public abstract void removeAll(Collection<IInstallableUnit> toUninstall);
-
- /**
- * Add extra requirements that must be satisfied by the planner.
- *
- * @param requirements the additional requirements
- */
- public void addExtraRequirements(Collection<IRequirement> requirements);
-
- /**
- * Associate an inclusion rule with the installable unit. An inclusion rule will dictate how
- * the installable unit is treated when its dependencies are not satisfied.
- * <p>
- * The provided inclusion rule must be one of the values specified in {@link ProfileInclusionRules}.
- * </p>
- * @param iu the installable unit to set an inclusion rule for
- * @param inclusionRule The inclusion rule.
- */
- public abstract void setInstallableUnitInclusionRules(IInstallableUnit iu, String inclusionRule);
-
- /**
- * Removes all inclusion rules associated with the given installable unit
- *
- * @param iu the installable unit to remove inclusion rules for
- */
- public abstract void removeInstallableUnitInclusionRules(IInstallableUnit iu);
-
- /**
- * 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
- */
- public abstract void removeProfileProperty(String key);
-
- /**
- * Associate a property with a given installable unit.
- *
- * @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 installable unit.
- * @param iu The installable until to remove a property for
- * @param key key 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 to add
- */
- public abstract Collection<IInstallableUnit> getAdditions();
-
- /**
- * Provide the set of installable units that have been requested for removal
- * @return a collection of the installable units to remove
- */
- public abstract Collection<IInstallableUnit> getRemovals();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/ProfileInclusionRules.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/ProfileInclusionRules.java
deleted file mode 100644
index dda4a1519..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/ProfileInclusionRules.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Sonatype Inc - Refactoring
- *******************************************************************************/
-package org.eclipse.equinox.p2.planner;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * Helper method to decide on the way the installable units are being included.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class ProfileInclusionRules {
- private ProfileInclusionRules() {
- //Can't instantiate profile inclusion rules
- }
-
- /**
- * Returns an inclusion rule to strictly install the given installable unit. Strictly
- * installed installable units will never be uninstalled in order to satisfy a
- * later profile change request. That is, when there is a dependency conflict
- * between a strictly installed unit and a non-strict unit, the strictly installed
- * installable unit will take precedence.
- *
- * @param iu the installable unit to be installed.
- * @return an opaque token to be passed to the {@link IProfileChangeRequest#setInstallableUnitInclusionRules(IInstallableUnit, String)}
- */
- public static String createStrictInclusionRule(IInstallableUnit iu) {
- return "STRICT"; //$NON-NLS-1$
- }
-
- /**
- * Returns an inclusion rule to optionally install the given installable unit. An optionally
- * installed installable unit will automatically be removed from the profile if any of
- * its dependencies become unsatisfied.
- *
- * @param iu the installable unit to be installed.
- * @return an opaque token to be passed to the {@link IProfileChangeRequest#setInstallableUnitInclusionRules(IInstallableUnit, String)}
- */
- public static String createOptionalInclusionRule(IInstallableUnit iu) {
- return "OPTIONAL"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/package.html b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/package.html
deleted file mode 100644
index acb4d2275..000000000
--- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/p2/planner/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides core support for interacting with a dependency resolution mechanism.
-<h2>
-Package Specification</h2>
-<p>
-This package specifies an API for performing dependency resolution of the p2 metadata.
-</p>
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.classpath b/bundles/org.eclipse.equinox.p2.directorywatcher/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.directorywatcher/.cvsignore b/bundles/org.eclipse.equinox.p2.directorywatcher/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.project b/bundles/org.eclipse.equinox.p2.directorywatcher/.project
deleted file mode 100644
index 349eb7607..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.directorywatcher</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 925b1bff0..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Wed Dec 23 00:33:28 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 1546d829a..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,58 +0,0 @@
-#Tue Aug 21 11:27:48 CDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=99
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 6904bd96c..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Sat Aug 11 20:17:52 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
deleted file mode 100644
index e51d43c1e..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,32 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.directorywatcher;singleton:=true
-Bundle-Version: 1.0.300.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.provisional.p2.directorywatcher.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.provisional.p2.directorywatcher;x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.artifact.repository.simple,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata.expression,
- org.eclipse.equinox.internal.p2.update,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.publisher.actions,
- org.eclipse.equinox.p2.publisher.eclipse,
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.resolver;version="1.1.0",
- org.eclipse.osgi.util,
- org.osgi.framework;version="1.4.0",
- org.osgi.service.packageadmin;version="1.2.0"
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/about.html b/bundles/org.eclipse.equinox.p2.directorywatcher/about.html
deleted file mode 100644
index d62785d75..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/about.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
- <h3>Third Party Content</h3>
- <p>The Content includes items that have been sourced from third parties as set out below. If you
- did not receive this Content directly from the Eclipse Foundation, the following is provided
- for informational purposes only, and you should look to the Redistributor's license for
- terms and conditions of use.</p>
-
- <h4>FileInstall 1.0</h4>
- <p>The bundle includes derivative works of software originally developed by Peter Kriens (aQute).
- That original work was licensed under the EPL v1.0 and this derivative work is similarly licensed.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/build.properties b/bundles/org.eclipse.equinox.p2.directorywatcher/build.properties
deleted file mode 100644
index ca5030900..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties b/bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties
deleted file mode 100644
index d8a6f4e18..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Directory Watcher
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml b/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml
deleted file mode 100644
index aa29c9b7a..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.directorywatcher</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
deleted file mode 100644
index 05cd04b94..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Activator.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * Bundle activator for directory watcher bundle.
- */
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.directorywatcher"; //$NON-NLS-1$
-
- private static BundleContext context;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext aContext) throws Exception {
- context = aContext;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- context = null;
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager() {
- return (IArtifactRepositoryManager) ((IProvisioningAgent) ServiceHelper.getService(context, IProvisioningAgent.SERVICE_NAME)).getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- public static IMetadataRepositoryManager getMetadataRepositoryManager() {
- return (IMetadataRepositoryManager) ((IProvisioningAgent) ServiceHelper.getService(context, IProvisioningAgent.SERVICE_NAME)).getService(IMetadataRepositoryManager.SERVICE_NAME);
- }
-
- public static URI getDefaultRepositoryLocation(Object object, String repositoryName) {
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(context, PackageAdmin.class.getName());
- Bundle bundle = packageAdmin.getBundle(object.getClass());
- BundleContext context = bundle.getBundleContext();
- File base = context.getDataFile(""); //$NON-NLS-1$
- File result = new File(base, "listener_" + repositoryName.hashCode()); //$NON-NLS-1$
- result.mkdirs();
- return result.toURI();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
deleted file mode 100644
index 05720ff83..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-
-public class CachingArtifactRepository implements IArtifactRepository, IFileArtifactRepository {
-
- private static final String NULL = ""; //$NON-NLS-1$
- private IArtifactRepository innerRepo;
- private Set<IArtifactDescriptor> descriptorsToAdd = new HashSet<IArtifactDescriptor>();
- private Map<IArtifactKey, List<IArtifactDescriptor>> artifactMap = new HashMap<IArtifactKey, List<IArtifactDescriptor>>();
- private Set<IArtifactDescriptor> descriptorsToRemove = new HashSet<IArtifactDescriptor>();
- private Map<String, String> propertyChanges = new HashMap<String, String>();
-
- protected CachingArtifactRepository(IArtifactRepository innerRepo) {
- this.innerRepo = innerRepo;
- }
-
- public void save() {
- innerRepo.executeBatch(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- savePropertyChanges();
- saveAdditions();
- saveRemovals();
- }
- }, null);
- }
-
- void saveRemovals() {
- for (IArtifactDescriptor desc : descriptorsToRemove)
- innerRepo.removeDescriptor(desc);
- descriptorsToRemove.clear();
- }
-
- void saveAdditions() {
- if (descriptorsToAdd.isEmpty())
- return;
- innerRepo.addDescriptors(descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]));
- descriptorsToAdd.clear();
- artifactMap.clear();
- }
-
- void savePropertyChanges() {
- for (String key : propertyChanges.keySet()) {
- String value = propertyChanges.get(key);
- innerRepo.setProperty(key, value == NULL ? null : value);
- }
- propertyChanges.clear();
- }
-
- private void mapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- List<IArtifactDescriptor> descriptors = artifactMap.get(key);
- if (descriptors == null) {
- descriptors = new ArrayList<IArtifactDescriptor>();
- artifactMap.put(key, descriptors);
- }
- descriptors.add(descriptor);
- }
-
- private void unmapDescriptor(IArtifactDescriptor descriptor) {
- IArtifactKey key = descriptor.getArtifactKey();
- List<IArtifactDescriptor> descriptors = artifactMap.get(key);
- if (descriptors == null) {
- // we do not have the descriptor locally so remember it to be removed from
- // the inner repo on save.
- descriptorsToRemove.add(descriptor);
- return;
- }
-
- descriptors.remove(descriptor);
- if (descriptors.isEmpty())
- artifactMap.remove(key);
- }
-
- public synchronized void addDescriptors(IArtifactDescriptor[] descriptors) {
- for (int i = 0; i < descriptors.length; i++) {
- ((ArtifactDescriptor) descriptors[i]).setRepository(this);
- descriptorsToAdd.add(descriptors[i]);
- mapDescriptor(descriptors[i]);
- }
- }
-
- public synchronized void addDescriptor(IArtifactDescriptor toAdd) {
- ((ArtifactDescriptor) toAdd).setRepository(this);
- descriptorsToAdd.add(toAdd);
- mapDescriptor(toAdd);
- }
-
- public synchronized IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- List<IArtifactDescriptor> result = artifactMap.get(key);
- if (result == null)
- return innerRepo.getArtifactDescriptors(key);
- result = new ArrayList<IArtifactDescriptor>(result);
- result.addAll(Arrays.asList(innerRepo.getArtifactDescriptors(key)));
- return result.toArray(new IArtifactDescriptor[result.size()]);
- }
-
- public synchronized boolean contains(IArtifactDescriptor descriptor) {
- return descriptorsToAdd.contains(descriptor) || innerRepo.contains(descriptor);
- }
-
- public synchronized boolean contains(IArtifactKey key) {
- return artifactMap.containsKey(key) || innerRepo.contains(key);
- }
-
- public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- return innerRepo.getArtifact(descriptor, destination, monitor);
- }
-
- public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- return innerRepo.getRawArtifact(descriptor, destination, monitor);
- }
-
- public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
- return Status.OK_STATUS;
- }
-
- public OutputStream getOutputStream(IArtifactDescriptor descriptor) {
- return null;
- }
-
- public synchronized void removeAll() {
- IArtifactDescriptor[] toRemove = descriptorsToAdd.toArray(new IArtifactDescriptor[descriptorsToAdd.size()]);
- for (int i = 0; i < toRemove.length; i++)
- doRemoveArtifact(toRemove[i]);
- }
-
- public synchronized void removeDescriptor(IArtifactDescriptor descriptor) {
- doRemoveArtifact(descriptor);
- }
-
- public synchronized void removeDescriptor(IArtifactKey key) {
- IArtifactDescriptor[] toRemove = getArtifactDescriptors(key);
- for (int i = 0; i < toRemove.length; i++)
- doRemoveArtifact(toRemove[i]);
- }
-
- public synchronized void removeDescriptors(IArtifactDescriptor[] descriptors) {
- for (IArtifactDescriptor descriptor : descriptors)
- doRemoveArtifact(descriptor);
- }
-
- public synchronized void removeDescriptors(IArtifactKey[] keys) {
- for (IArtifactKey key : keys)
- removeDescriptor(key);
- }
-
- /**
- * Removes the given descriptor and returns <code>true</code> if and only if the
- * descriptor existed in the repository, and was successfully removed.
- */
- private boolean doRemoveArtifact(IArtifactDescriptor descriptor) {
- // if the descriptor is already in the pending additoins, remove it
- boolean result = descriptorsToAdd.remove(descriptor);
- if (result)
- unmapDescriptor(descriptor);
- // either way, note this as a descriptor to remove from the inner repo
- descriptorsToRemove.add(descriptor);
- return result;
- }
-
- public String getDescription() {
- return innerRepo.getDescription();
- }
-
- public URI getLocation() {
- return innerRepo.getLocation();
- }
-
- public String getName() {
- return innerRepo.getName();
- }
-
- public Map<String, String> getProperties() {
- // TODO need to combine the local and inner properties
- return innerRepo.getProperties();
- }
-
- public String getProperty(String key) {
- return innerRepo.getProperty(key);
- }
-
- public String getProvider() {
- return innerRepo.getProvider();
- }
-
- public IProvisioningAgent getProvisioningAgent() {
- return innerRepo.getProvisioningAgent();
- }
-
- public String getType() {
- return innerRepo.getType();
- }
-
- public String getVersion() {
- return innerRepo.getVersion();
- }
-
- public boolean isModifiable() {
- return innerRepo.isModifiable();
- }
-
- public String setProperty(String key, String value) {
- String result = getProperties().get(key);
- propertyChanges.put(key, value == null ? NULL : value);
- return result;
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- return innerRepo.getAdapter(adapter);
- }
-
- public File getArtifactFile(IArtifactKey key) {
- if (innerRepo instanceof IFileArtifactRepository)
- return ((IFileArtifactRepository) innerRepo).getArtifactFile(key);
- return null;
- }
-
- public File getArtifactFile(IArtifactDescriptor descriptor) {
- if (innerRepo instanceof IFileArtifactRepository)
- return ((IFileArtifactRepository) innerRepo).getArtifactFile(descriptor);
- return null;
- }
-
- public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
- return innerRepo.createArtifactDescriptor(key);
- }
-
- public IArtifactKey createArtifactKey(String classifier, String id, Version version) {
- return innerRepo.createArtifactKey(classifier, id, version);
- }
-
- public IQueryable<IArtifactDescriptor> descriptorQueryable() {
- final Collection<List<IArtifactDescriptor>> descs = artifactMap.values();
- IQueryable<IArtifactDescriptor> cached = new IQueryable<IArtifactDescriptor>() {
- public IQueryResult<IArtifactDescriptor> query(IQuery<IArtifactDescriptor> query, IProgressMonitor monitor) {
- return query.perform(new CompoundIterator<IArtifactDescriptor>(descs.iterator()));
- }
- };
-
- return QueryUtil.compoundQueryable(cached, innerRepo.descriptorQueryable());
- }
-
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
- final Iterator<IArtifactKey> keyIterator = artifactMap.keySet().iterator();
- IQueryable<IArtifactKey> cached = new IQueryable<IArtifactKey>() {
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> q, IProgressMonitor mon) {
- return q.perform(keyIterator);
- }
- };
-
- IQueryable<IArtifactKey> compound = QueryUtil.compoundQueryable(cached, innerRepo);
- return compound.query(query, monitor);
- }
-
- public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- try {
- runnable.run(monitor);
- } catch (OperationCanceledException oce) {
- return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
- } catch (Exception e) {
- return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
- }
- return Status.OK_STATUS;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryChangeListener.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryChangeListener.java
deleted file mode 100644
index 515e19d29..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryChangeListener.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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 implementation and ideas
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-
-/*
- * Abstract class which contains stub methods. Sub-classes to over-ride
- * methods which they are interested in.
- */
-public abstract class DirectoryChangeListener {
-
- public void startPoll() {
- // do nothing
- }
-
- public void stopPoll() {
- // do nothing
- }
-
- public boolean isInterested(File file) {
- return false;
- }
-
- public boolean added(File file) {
- return false;
- }
-
- public boolean removed(File file) {
- return false;
- }
-
- public boolean changed(File file) {
- return false;
- }
-
- //TODO this method name needs to be more descriptive. getLastModified?
- public Long getSeenFile(File file) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
deleted file mode 100644
index c47d07603..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/DirectoryWatcher.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 aQute 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:
- * aQute - initial implementation and ideas
- * IBM Corporation - initial adaptation to Equinox provisioning use
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-
-public class DirectoryWatcher {
- private static final String DEL_EXT = ".del"; //$NON-NLS-1$
-
- public class WatcherThread extends Thread {
-
- private final long pollFrequency;
- private boolean done = false;
-
- public WatcherThread(long pollFrequency) {
- super("Directory Watcher"); //$NON-NLS-1$
- this.pollFrequency = pollFrequency;
- }
-
- public void run() {
- do {
- try {
- poll();
- synchronized (this) {
- wait(pollFrequency);
- }
- } catch (InterruptedException e) {
- // ignore
- } catch (Throwable e) {
- log(Messages.error_main_loop, e);
- done = true;
- }
- } while (!done);
- }
-
- public synchronized void done() {
- done = true;
- notify();
- }
- }
-
- public final static String POLL = "eclipse.p2.directory.watcher.poll"; //$NON-NLS-1$
- public final static String DIR = "eclipse.p2.directory.watcher.dir"; //$NON-NLS-1$
- private static final long DEFAULT_POLL_FREQUENCY = 2000;
-
- public static void log(String string, Throwable e) {
- System.err.println(string + ": " + e); //$NON-NLS-1$
- }
-
- final File[] directories;
-
- long poll = 2000;
- private Set<DirectoryChangeListener> listeners = new HashSet<DirectoryChangeListener>();
- private HashSet<File> scannedFiles = new HashSet<File>();
- private HashSet<File> removals;
- private Set<File> pendingDeletions;
- private WatcherThread watcher;
-
- public DirectoryWatcher(Map<String, String> properties, BundleContext context) {
- String dir = properties.get(DIR);
- if (dir == null)
- dir = "./load"; //$NON-NLS-1$
-
- File targetDirectory = new File(dir);
- targetDirectory.mkdirs();
- directories = new File[] {targetDirectory};
- }
-
- public DirectoryWatcher(File directory) {
- if (directory == null)
- throw new IllegalArgumentException(Messages.null_folder);
-
- this.directories = new File[] {directory};
- }
-
- public DirectoryWatcher(File[] directories) {
- if (directories == null)
- throw new IllegalArgumentException(Messages.null_folder);
- this.directories = directories;
- }
-
- public synchronized void addListener(DirectoryChangeListener listener) {
- listeners.add(listener);
- }
-
- public synchronized void removeListener(DirectoryChangeListener listener) {
- listeners.remove(listener);
- }
-
- public void start() {
- start(DEFAULT_POLL_FREQUENCY);
- }
-
- public synchronized void poll() {
- startPoll();
- scanDirectories();
- stopPoll();
- }
-
- public synchronized void start(final long pollFrequency) {
- if (watcher != null)
- throw new IllegalStateException(Messages.thread_started);
-
- watcher = new WatcherThread(pollFrequency);
- watcher.start();
- }
-
- public synchronized void stop() {
- if (watcher == null)
- throw new IllegalStateException(Messages.thread_not_started);
-
- watcher.done();
- watcher = null;
- }
-
- public File[] getDirectories() {
- return directories;
- }
-
- private void startPoll() {
- removals = scannedFiles;
- scannedFiles = new HashSet<File>();
- pendingDeletions = new HashSet<File>();
- for (DirectoryChangeListener listener : listeners)
- listener.startPoll();
- }
-
- private void scanDirectories() {
- for (int index = 0; index < directories.length; index++) {
- File directory = directories[index];
- File list[] = directory.listFiles();
- if (list == null)
- continue;
- for (int i = 0; i < list.length; i++) {
- File file = list[i];
- // if this is a deletion marker then add to the list of pending deletions.
- if (list[i].getPath().endsWith(DEL_EXT)) {
- File target = new File(file.getPath().substring(0, file.getPath().length() - 4));
- removals.add(target);
- pendingDeletions.add(target);
- } else {
- // else remember that we saw the file and remove it from this list of files to be
- // removed at the end. Then notify all the listeners as needed.
- scannedFiles.add(file);
- removals.remove(file);
- for (DirectoryChangeListener listener : listeners) {
- if (isInterested(listener, file))
- processFile(file, listener);
- }
- }
- }
- }
- }
-
- private void stopPoll() {
- notifyRemovals();
- removals = scannedFiles;
- for (DirectoryChangeListener listener : listeners)
- listener.stopPoll();
- processPendingDeletions();
- }
-
- private boolean isInterested(DirectoryChangeListener listener, File file) {
- return listener.isInterested(file);
- }
-
- /**
- * Notify the listeners of the files that have been deleted or marked for deletion.
- */
- private void notifyRemovals() {
- Set<File> removed = removals;
- for (DirectoryChangeListener listener : listeners) {
- for (File file : removed) {
- if (isInterested(listener, file))
- listener.removed(file);
- }
- }
- }
-
- private void processFile(File file, DirectoryChangeListener listener) {
- try {
- Long oldTimestamp = listener.getSeenFile(file);
- if (oldTimestamp == null) {
- // The file is new
- listener.added(file);
- } else {
- // The file is not new but may have changed
- long lastModified = file.lastModified();
- if (oldTimestamp.longValue() != lastModified)
- listener.changed(file);
- }
- } catch (Exception e) {
- log(NLS.bind(Messages.error_processing, listener), e);
- }
- }
-
- /**
- * Try to remove the files that have been marked for deletion.
- */
- private void processPendingDeletions() {
- for (Iterator<File> iterator = pendingDeletions.iterator(); iterator.hasNext();) {
- File file = iterator.next();
- if (!file.exists() || file.delete())
- iterator.remove();
- new File(file.getPath() + DEL_EXT).delete();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java
deleted file mode 100644
index 00b12b749..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/EntryAdvice.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-import java.io.File;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.actions.IPropertyAdvice;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-
-/**
- * Entry advice captures the name, location, modified time, shape etc of something
- * discovered by the repository listener. It is a simplified structure intended to represent
- * only one entry at a time and that entry is the the only entry being published.
- */
-public class EntryAdvice implements IPropertyAdvice {
- private Map<String, String> metadataProps = new HashMap<String, String>();
- private Map<String, String> artifactProps = new HashMap<String, String>();
-
- public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version) {
- return true;
- }
-
- void setProperties(File location, long timestamp, URI reference) {
- setProperties(location, timestamp, reference, null);
- }
-
- void setProperties(File location, long timestamp, URI reference, String linkFile) {
- if (reference == null)
- artifactProps.remove(RepositoryListener.ARTIFACT_REFERENCE);
- else
- artifactProps.put(RepositoryListener.ARTIFACT_REFERENCE, reference.toString());
- if (location.isDirectory())
- artifactProps.put(RepositoryListener.ARTIFACT_FOLDER, Boolean.TRUE.toString());
- else
- artifactProps.remove(RepositoryListener.ARTIFACT_FOLDER);
- artifactProps.put(RepositoryListener.FILE_NAME, location.getAbsolutePath());
- metadataProps.put(RepositoryListener.FILE_NAME, location.getAbsolutePath());
- metadataProps.put(RepositoryListener.FILE_LAST_MODIFIED, Long.toString(timestamp));
- if (linkFile != null)
- metadataProps.put(Site.PROP_LINK_FILE, linkFile);
- }
-
- public Map<String, String> getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
- return artifactProps;
- }
-
- public Map<String, String> getInstallableUnitProperties(InstallableUnitDescription iu) {
- return metadataProps;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Messages.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Messages.java
deleted file mode 100644
index 74d19b6aa..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/Messages.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.provisional.p2.directorywatcher.messages"; //$NON-NLS-1$
- public static String artifact_repo_manager_not_registered;
- public static String error_main_loop;
- public static String error_processing;
- public static String failed_create_artifact_repo;
- public static String failed_create_metadata_repo;
- public static String filename_missing;
- public static String metadata_repo_manager_not_registered;
- public static String null_folder;
- public static String thread_not_started;
- public static String thread_started;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- //
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
deleted file mode 100644
index 132e5f410..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * 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 implementation and ideas
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-
-import java.io.File;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
-import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.eclipse.osgi.util.NLS;
-
-public class RepositoryListener extends DirectoryChangeListener {
- public static final String ARTIFACT_FOLDER = "artifact.folder"; //$NON-NLS-1$
- public static final String ARTIFACT_REFERENCE = "artifact.reference"; //$NON-NLS-1$
- public static final String FILE_LAST_MODIFIED = "file.lastModified"; //$NON-NLS-1$
- public static final String FILE_NAME = "file.name"; //$NON-NLS-1$
- private final IMetadataRepository metadataRepository;
- private final CachingArtifactRepository artifactRepository;
- // at any point in time currentFiles is the list of files/dirs that the watcher has seen and
- // believes to be on disk.
- private final Map<File, Long> currentFiles = new HashMap<File, Long>();
- private final Collection<File> polledSeenFiles = new HashSet<File>();
-
- private EntryAdvice advice = new EntryAdvice();
- private PublisherInfo info;
- private IPublisherResult iusToAdd;
- private IPublisherResult iusToChange;
-
- /**
- * Create a repository listener that watches the specified folder and generates repositories
- * for its content.
- * @param repositoryName the repository name to use for the repository
- * @param properties the map of repository properties or <code>null</code>
- */
- public RepositoryListener(String repositoryName, Map<String, String> properties) {
- URI location = Activator.getDefaultRepositoryLocation(this, repositoryName);
- metadataRepository = initializeMetadataRepository(repositoryName, location, properties);
- artifactRepository = initializeArtifactRepository(repositoryName, location, properties);
- initializePublisher();
- }
-
- public RepositoryListener(IMetadataRepository metadataRepository, IArtifactRepository artifactRepository) {
- this.artifactRepository = new CachingArtifactRepository(artifactRepository);
- this.metadataRepository = metadataRepository;
- initializePublisher();
- }
-
- private void initializePublisher() {
- info = new PublisherInfo();
- info.setArtifactRepository(artifactRepository);
- info.setMetadataRepository(metadataRepository);
- info.addAdvice(advice);
- info.setArtifactOptions(IPublisherInfo.A_INDEX | IPublisherInfo.A_NO_MD5);
- }
-
- protected CachingArtifactRepository initializeArtifactRepository(String name, URI repositoryLocation, Map<String, String> properties) {
- IArtifactRepositoryManager manager = Activator.getArtifactRepositoryManager();
- if (manager == null)
- throw new IllegalStateException(Messages.artifact_repo_manager_not_registered);
-
- try {
- IArtifactRepository result = manager.loadRepository(repositoryLocation, null);
- return result == null ? null : new CachingArtifactRepository(result);
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
- try {
- IArtifactRepository result = manager.createRepository(repositoryLocation, name, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- return result == null ? null : new CachingArtifactRepository(result);
- } catch (ProvisionException e) {
- LogHelper.log(e);
- throw new IllegalStateException(NLS.bind(Messages.failed_create_artifact_repo, repositoryLocation));
- }
- }
-
- protected IMetadataRepository initializeMetadataRepository(String name, URI repositoryLocation, Map<String, String> properties) {
- IMetadataRepositoryManager manager = Activator.getMetadataRepositoryManager();
- if (manager == null)
- throw new IllegalStateException(Messages.metadata_repo_manager_not_registered);
-
- try {
- return manager.loadRepository(repositoryLocation, null);
- } catch (ProvisionException e) {
- //fall through and create new repository
- }
- try {
- return manager.createRepository(repositoryLocation, name, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- } catch (ProvisionException e) {
- LogHelper.log(e);
- throw new IllegalStateException(NLS.bind(Messages.failed_create_metadata_repo, repositoryLocation));
- }
- }
-
- public boolean added(File file) {
- return process(file, true);
- }
-
- public boolean changed(File file) {
- return process(file, false);
- }
-
- public boolean removed(File file) {
- // the IUs and artifacts associated with this file will get removed in stopPoll
- return currentFiles.containsKey(file);
- }
-
- private boolean process(File file, boolean isAddition) {
- boolean isDirectory = file.isDirectory();
- // is it a feature ?
- if (isDirectory && file.getParentFile() != null && file.getParentFile().getName().equals("features") && new File(file, "feature.xml").exists()) //$NON-NLS-1$ //$NON-NLS-2$)
- return processFeature(file, isAddition);
- // could it be a bundle ?
- if (isDirectory || file.getName().endsWith(".jar")) //$NON-NLS-1$
- return processBundle(file, isDirectory, isAddition);
- return false;
- }
-
- private boolean processBundle(File file, boolean isDirectory, boolean isAddition) {
- BundleDescription bundleDescription = BundlesAction.createBundleDescription(file);
- if (bundleDescription == null)
- return false;
-
- advice.setProperties(file, file.lastModified(), file.toURI());
- return publish(new BundlesAction(new BundleDescription[] {bundleDescription}), isAddition);
- // TODO see bug 222370
- // we only want to return the bundle IU so must exclude all fragment IUs
- // not sure if this is still relevant but we should investigate.
- }
-
- private boolean processFeature(File file, boolean isAddition) {
- String link = metadataRepository.getProperties().get(Site.PROP_LINK_FILE);
- advice.setProperties(file, file.lastModified(), file.toURI(), link);
- return publish(new FeaturesAction(new File[] {file}), isAddition);
- }
-
- private boolean publish(IPublisherAction action, boolean isAddition) {
- IPublisherResult result = isAddition ? iusToAdd : iusToChange;
- return action.perform(info, result, new NullProgressMonitor()).isOK();
- }
-
- public boolean isInterested(File file) {
- return true;
- }
-
- public Long getSeenFile(File file) {
- Long lastSeen = currentFiles.get(file);
- if (lastSeen != null)
- polledSeenFiles.add(file);
- return lastSeen;
- }
-
- public void startPoll() {
- iusToAdd = new PublisherResult();
- iusToChange = new PublisherResult();
- synchronizeCurrentFiles();
- }
-
- public void stopPoll() {
- final Set<File> filesToRemove = new HashSet<File>(currentFiles.keySet());
- filesToRemove.removeAll(polledSeenFiles);
- polledSeenFiles.clear();
-
- synchronizeMetadataRepository(filesToRemove);
- synchronizeArtifactRepository(filesToRemove);
- iusToAdd = null;
- iusToChange = null;
- }
-
- /**
- * Flush all the pending changes to the metadata repository.
- */
- private void synchronizeMetadataRepository(final Collection<File> removedFiles) {
- if (metadataRepository == null)
- return;
- final Collection<IInstallableUnit> changes = iusToChange.getIUs(null, null);
- // first remove any IUs that have changed or that are associated with removed files
- if (!removedFiles.isEmpty() || !changes.isEmpty()) {
- metadataRepository.removeInstallableUnits(changes);
-
- // create a query that will identify all ius related to removed files.
- // We convert the java.io.File objects to Strings before doing the comparison
- // because when we have large numbers of files, the performance is much better.
- // See bug 324353.
- Collection<String> paths = new HashSet<String>(removedFiles.size());
- for (File file : removedFiles)
- paths.add(file.getAbsolutePath());
- IQuery<IInstallableUnit> removeQuery = QueryUtil.createMatchQuery( //
- "$1.exists(x | properties[$0] == x)", FILE_NAME, paths); //$NON-NLS-1$
- IQueryResult<IInstallableUnit> toRemove = metadataRepository.query(removeQuery, null);
- metadataRepository.removeInstallableUnits(toRemove.toUnmodifiableSet());
- }
- // Then add all the new IUs as well as the new copies of the ones that have changed
- Collection<IInstallableUnit> additions = iusToAdd.getIUs(null, null);
- additions.addAll(changes);
- if (!additions.isEmpty())
- metadataRepository.addInstallableUnits(additions);
- }
-
- /**
- * Here the artifacts have all been added to the artifact repo. Remove the
- * descriptors related to any file that has been removed and flush the repo
- * to ensure that all the additions and removals have been completed.
- */
- private void synchronizeArtifactRepository(final Collection<File> removedFiles) {
- if (artifactRepository == null)
- return;
- if (!removedFiles.isEmpty()) {
- IArtifactDescriptor[] descriptors = artifactRepository.descriptorQueryable().query(ArtifactDescriptorQuery.ALL_DESCRIPTORS, null).toArray(IArtifactDescriptor.class);
- for (IArtifactDescriptor d : descriptors) {
- SimpleArtifactDescriptor descriptor = (SimpleArtifactDescriptor) d;
- String filename = descriptor.getRepositoryProperty(FILE_NAME);
- if (filename == null) {
- if (Tracing.DEBUG) {
- String message = NLS.bind(Messages.filename_missing, "artifact", descriptor.getArtifactKey()); //$NON-NLS-1$
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, null));
- }
- } else {
- File artifactFile = new File(filename);
- if (removedFiles.contains(artifactFile))
- artifactRepository.removeDescriptor(descriptor);
- }
- }
- }
- artifactRepository.save();
- }
-
- /**
- * Prime the list of current files that the listener knows about. This traverses the
- * repos and looks for the related filename and modified timestamp information.
- */
- private void synchronizeCurrentFiles() {
- currentFiles.clear();
- if (metadataRepository != null) {
- IQueryResult<IInstallableUnit> ius = metadataRepository.query(QueryUtil.createIUAnyQuery(), null);
- for (Iterator<IInstallableUnit> it = ius.iterator(); it.hasNext();) {
- IInstallableUnit iu = it.next();
- String filename = iu.getProperty(FILE_NAME);
- if (filename == null) {
- if (Tracing.DEBUG) {
- String message = NLS.bind(Messages.filename_missing, "installable unit", iu.getId()); //$NON-NLS-1$
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, null));
- }
- } else {
- File iuFile = new File(filename);
- Long iuLastModified = new Long(iu.getProperty(FILE_LAST_MODIFIED));
- currentFiles.put(iuFile, iuLastModified);
- }
- }
- }
- //
- // // TODO should we be doing this for the artifact repo? the metadata repo should
- // // be the main driver here.
- // if (artifactRepository != null) {
- // final List keys = new ArrayList(Arrays.asList(artifactRepository.getArtifactKeys()));
- // for (Iterator it = keys.iterator(); it.hasNext();) {
- // IArtifactKey key = (IArtifactKey) it.next();
- // IArtifactDescriptor[] descriptors = artifactRepository.getArtifactDescriptors(key);
- // for (int i = 0; i < descriptors.length; i++) {
- // ArtifactDescriptor descriptor = (ArtifactDescriptor) descriptors[i];
- // File artifactFile = new File(descriptor.getRepositoryProperty(FILE_NAME));
- // Long artifactLastModified = new Long(descriptor.getRepositoryProperty(FILE_LAST_MODIFIED));
- // currentFiles.put(artifactFile, artifactLastModified);
- // }
- // }
- // }
- }
-
- public IMetadataRepository getMetadataRepository() {
- return metadataRepository;
- }
-
- public IArtifactRepository getArtifactRepository() {
- return artifactRepository;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/messages.properties b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/messages.properties
deleted file mode 100644
index 428b09538..000000000
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/messages.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-artifact_repo_manager_not_registered=ArtifactRepositoryManager not registered.
-error_main_loop=Error in watcher thread main loop.
-error_processing=Error Processing: {0}
-failed_create_artifact_repo=Could not create artifact repository for: {0}
-failed_create_metadata_repo=Could not create metadata repository for: {0}
-filename_missing=The {0} {1} is missing the filename property.
-metadata_repo_manager_not_registered=MetadataRepositoryManager not registered.
-null_folder=Folder must not be null
-thread_not_started=Watcher thread not Started
-thread_started=Watcher thread already Started
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.classpath b/bundles/org.eclipse.equinox.p2.discovery/.classpath
deleted file mode 100644
index 93640193e..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/equinox/internal/p2/core/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.cvsignore b/bundles/org.eclipse.equinox.p2.discovery/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.gitignore b/bundles/org.eclipse.equinox.p2.discovery/.gitignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.project b/bundles/org.eclipse.equinox.p2.discovery/.project
deleted file mode 100644
index 997b422bf..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.discovery</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c65423da1..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,349 +0,0 @@
-#Wed Feb 17 14:07:15 PST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-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=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.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=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 8f3db4a0a..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Wed Feb 17 14:07:15 PST 2010
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index ec06d1d86..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.ltk.core.refactoring.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Feb 16 15:42:45 PST 2010
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs b/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 25 03:02:37 GMT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.team.ui.prefs b/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
deleted file mode 100644
index 1935f1ab0..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Feb 16 15:42:45 PST 2010
-commit.comment.template=${connector.task.prefix} ${task.key} - ${task.description}
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 5937a85ac..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,24 +0,0 @@
-#Tue May 20 17:39:22 PDT 2008
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=2
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-bundle-classpath-entries=1
-compilers.p.missing-packages=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=0
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF
deleted file mode 100644
index ba0bd327d..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.equinox.p2.discovery;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Vendor: %Bundle-Vendor
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.3.0",
- org.eclipse.equinox.p2.core;bundle-version="2.0.0"
-Export-Package: org.eclipse.equinox.internal.p2.discovery;x-friends:="org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.discovery.repository",
- org.eclipse.equinox.internal.p2.discovery.model;x-friends:="org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.discovery.repository",
- org.eclipse.equinox.internal.p2.discovery.util;x-friends:="org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.discovery.repository"
-Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.equinox.p2.discovery/about.html b/bundles/org.eclipse.equinox.p2.discovery/about.html
deleted file mode 100644
index bc6e2b493..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>July 3, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
-
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.discovery/build.properties b/bundles/org.eclipse.equinox.p2.discovery/build.properties
deleted file mode 100644
index 40577979b..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.discovery/plugin.properties b/bundles/org.eclipse.equinox.p2.discovery/plugin.properties
deleted file mode 100644
index 38b4c3f0d..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-extension-point.name = Connector Discovery
-Bundle-Vendor = Eclipse.org - Equinox
-Bundle-Name = Equinox Provisioning Discovery \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.discovery/pom.xml b/bundles/org.eclipse.equinox.p2.discovery/pom.xml
deleted file mode 100644
index e306864d2..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.discovery</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractCatalogSource.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractCatalogSource.java
deleted file mode 100644
index 44f20661b..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractCatalogSource.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery;
-
-import java.net.URL;
-
-/**
- * @author David Green
- */
-public abstract class AbstractCatalogSource {
-
- private Policy policy = Policy.defaultPolicy();
-
- /**
- * an identifier that can be used to determine the origin of the source, typically for logging purposes.
- */
- public abstract Object getId();
-
- /**
- * get a resource by an URL relative to the root of the source.
- *
- * @param resourceName
- * the relative resource name
- * @return an URL to the resource, or null if it is known that the resource does not exist.
- */
- public abstract URL getResource(String resourceName);
-
- public Policy getPolicy() {
- return policy;
- }
-
- public void setPolicy(Policy policy) {
- this.policy = policy;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractDiscoveryStrategy.java
deleted file mode 100644
index e45cf868f..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/AbstractDiscoveryStrategy.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery;
-
-import java.util.List;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.discovery.model.*;
-
-/**
- * An abstraction of a strategy for discovering connectors and categories. Strategy design pattern. Note that strategies
- * are not reusable and must be disposed.
- *
- * @author David Green
- * @author Steffen Pingel
- */
-public abstract class AbstractDiscoveryStrategy {
-
- protected List<CatalogCategory> categories;
-
- protected List<Certification> certifications;
-
- protected List<CatalogItem> items;
-
- protected List<Tag> tags;
-
- public void dispose() {
- // ignore
- }
-
- public List<CatalogCategory> getCategories() {
- return categories;
- }
-
- public List<Certification> getCertifications() {
- return certifications;
- }
-
- public List<CatalogItem> getItems() {
- return items;
- }
-
- public List<Tag> getTags() {
- return tags;
- }
-
- /**
- * Perform discovery and add discovered items to {@link #getCategories() categories} and {@link #getItems()}.
- */
- public abstract void performDiscovery(IProgressMonitor monitor) throws CoreException;
-
- public void setCategories(List<CatalogCategory> categories) {
- this.categories = categories;
- }
-
- public void setCertifications(List<Certification> certifications) {
- this.certifications = certifications;
- }
-
- public void setItems(List<CatalogItem> connectors) {
- this.items = connectors;
- }
-
- public void setTags(List<Tag> itemKinds) {
- this.tags = itemKinds;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
deleted file mode 100644
index e25b43792..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.discovery.model.*;
-import org.eclipse.osgi.service.resolver.VersionRange;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-
-/**
- * A means of discovering connectors.
- *
- * @author David Green
- */
-public class Catalog {
-
- private List<CatalogItem> items = Collections.emptyList();
-
- private List<CatalogCategory> categories = Collections.emptyList();
-
- private List<Certification> certifications = Collections.emptyList();
-
- private List<CatalogItem> filteredItems = Collections.emptyList();
-
- private final List<AbstractDiscoveryStrategy> discoveryStrategies = new ArrayList<AbstractDiscoveryStrategy>();
-
- private List<Tag> tags = Collections.emptyList();
-
- private Dictionary<Object, Object> environment = System.getProperties();
-
- private boolean verifyUpdateSiteAvailability = false;
-
- private Map<String, Version> featureToVersion = null;
-
- public Catalog() {
- // constructor
- }
-
- /**
- * get the discovery strategies to use.
- */
- public List<AbstractDiscoveryStrategy> getDiscoveryStrategies() {
- return discoveryStrategies;
- }
-
- /**
- * Initialize this by performing discovery. Discovery may take a long time as it involves network access.
- * PRECONDITION: must add at least one {@link #getDiscoveryStrategies() discovery strategy} prior to calling.
- */
- public IStatus performDiscovery(IProgressMonitor monitor) {
- MultiStatus status = new MultiStatus(DiscoveryCore.ID_PLUGIN, 0, Messages.Catalog_Failed_to_discovery_all_Error, null);
- if (discoveryStrategies.isEmpty()) {
- throw new IllegalStateException();
- }
- List<CatalogItem> newItems = new ArrayList<CatalogItem>();
- List<CatalogCategory> newCategories = new ArrayList<CatalogCategory>();
- List<Certification> newCertifications = new ArrayList<Certification>();
- List<Tag> newTags = new ArrayList<Tag>();
-
- final int totalTicks = 100000;
- final int discoveryTicks = totalTicks - (totalTicks / 10);
- monitor.beginTask(Messages.Catalog_task_discovering_connectors, totalTicks);
- try {
- for (AbstractDiscoveryStrategy discoveryStrategy : discoveryStrategies) {
- if (monitor.isCanceled()) {
- status.add(Status.CANCEL_STATUS);
- break;
- }
- discoveryStrategy.setCategories(newCategories);
- discoveryStrategy.setItems(newItems);
- discoveryStrategy.setCertifications(newCertifications);
- discoveryStrategy.setTags(newTags);
- try {
- discoveryStrategy.performDiscovery(new SubProgressMonitor(monitor, discoveryTicks / discoveryStrategies.size()));
- } catch (CoreException e) {
- status.add(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.Catalog_Strategy_failed_Error, discoveryStrategy.getClass().getSimpleName()), e));
- }
- }
-
- update(newCategories, newItems, newCertifications, newTags);
- } finally {
- monitor.done();
- }
- return status;
- }
-
- protected void update(List<CatalogCategory> newCategories, List<CatalogItem> newItems, List<Certification> newCertifications, List<Tag> newTags) {
- this.categories = newCategories;
- this.items = newItems;
- this.certifications = newCertifications;
- this.tags = newTags;
- this.filteredItems = new ArrayList<CatalogItem>();
-
- filterDescriptors();
- connectCategoriesToDescriptors();
- connectCertificationsToDescriptors();
- }
-
- /**
- * get the top-level categories
- *
- * @return the categories, or an empty list if there are none.
- */
- public List<CatalogCategory> getCategories() {
- return categories;
- }
-
- /**
- * get the connectors that were discovered and not filtered
- *
- * @return the connectors, or an empty list if there are none.
- */
- public List<CatalogItem> getItems() {
- return items;
- }
-
- public List<Tag> getTags() {
- return tags;
- }
-
- /**
- * get the connectors that were discovered but filtered
- *
- * @return the filtered connectors, or an empty list if there were none.
- */
- public List<CatalogItem> getFilteredItems() {
- return filteredItems;
- }
-
- /**
- * get a list of known certifications
- *
- * @return the certifications, or an empty list if there are none.
- */
- public List<Certification> getCertifications() {
- return certifications;
- }
-
- /**
- * The environment used to resolve {@link CatalogItem#getPlatformFilter() platform filters}. Defaults to the
- * current environment.
- */
- public Dictionary<Object, Object> getEnvironment() {
- return environment;
- }
-
- /**
- * The environment used to resolve {@link CatalogItem#getPlatformFilter() platform filters}. Defaults to the
- * current environment.
- */
- public void setEnvironment(Dictionary<Object, Object> environment) {
- if (environment == null) {
- throw new IllegalArgumentException();
- }
- this.environment = environment;
- }
-
- /**
- * indicate if update site availability should be verified. The default is false.
- *
- * @see CatalogItem#getAvailable()
- * @see #setVerifyUpdateSiteAvailability(boolean)
- */
- public boolean isVerifyUpdateSiteAvailability() {
- return verifyUpdateSiteAvailability;
- }
-
- /**
- * indicate if update site availability should be verified. The default is false.
- *
- * @see CatalogItem#getAvailable()
- * @see #isVerifyUpdateSiteAvailability()
- */
- public void setVerifyUpdateSiteAvailability(boolean verifyUpdateSiteAvailability) {
- this.verifyUpdateSiteAvailability = verifyUpdateSiteAvailability;
- }
-
- /**
- * <em>not for general use: public for testing purposes only</em> A map of installed features to their version. Used
- * to resolve {@link CatalogItem#getFeatureFilter() feature filters}.
- */
- public Map<String, Version> getFeatureToVersion() {
- return featureToVersion;
- }
-
- /**
- * <em>not for general use: public for testing purposes only</em> A map of installed features to their version. Used
- * to resolve {@link CatalogItem#getFeatureFilter() feature filters}.
- */
- public void setFeatureToVersion(Map<String, Version> featureToVersion) {
- this.featureToVersion = featureToVersion;
- }
-
- private void connectCertificationsToDescriptors() {
- Map<String, Certification> idToCertification = new HashMap<String, Certification>();
- for (Certification certification : certifications) {
- Certification previous = idToCertification.put(certification.getId(), certification);
- if (previous != null) {
- LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind("Duplicate certification id ''{0}'': declaring sources: {1}, {2}", //$NON-NLS-1$
- new Object[] {certification.getId(), certification.getSource().getId(), previous.getSource().getId()})));
- }
- }
-
- for (CatalogItem connector : items) {
- if (connector.getCertificationId() != null) {
- Certification certification = idToCertification.get(connector.getCertificationId());
- if (certification != null) {
- connector.setCertification(certification);
- } else {
- LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind("Unknown category ''{0}'' referenced by connector ''{1}'' declared in {2}", new Object[] { //$NON-NLS-1$
- connector.getCertificationId(), connector.getId(), connector.getSource().getId()})));
- }
- }
- }
- }
-
- private void connectCategoriesToDescriptors() {
- Map<String, CatalogCategory> idToCategory = new HashMap<String, CatalogCategory>();
- for (CatalogCategory category : categories) {
- CatalogCategory previous = idToCategory.put(category.getId(), category);
- if (previous != null) {
- LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.Catalog_duplicate_category_id, new Object[] {category.getId(), category.getSource().getId(), previous.getSource().getId()})));
- }
- }
-
- for (CatalogItem connector : items) {
- CatalogCategory category = idToCategory.get(connector.getCategoryId());
- if (category != null) {
- category.getItems().add(connector);
- connector.setCategory(category);
- } else {
- LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.Catalog_bundle_references_unknown_category, new Object[] {connector.getCategoryId(), connector.getId(), connector.getSource().getId()})));
- }
- }
- }
-
- /**
- * eliminate any connectors whose {@link CatalogItem#getPlatformFilter() platform filters} don't match
- */
- private void filterDescriptors() {
- for (CatalogItem connector : new ArrayList<CatalogItem>(items)) {
- if (connector.getPlatformFilter() != null && connector.getPlatformFilter().trim().length() > 0) {
- boolean match = false;
- try {
- Filter filter = FrameworkUtil.createFilter(connector.getPlatformFilter());
- // TODO Doing raw conversion here for simplicity; could convert to Dictionary<String, ?>
- // but the filter impl must still handle cases where non String keys are used.
- match = filter.match((Dictionary) environment);
- } catch (InvalidSyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.Catalog_illegal_filter_syntax, new Object[] {connector.getPlatformFilter(), connector.getId(), connector.getSource().getId()})));
- }
- if (!match) {
- items.remove(connector);
- filteredItems.add(connector);
- }
- }
- for (FeatureFilter featureFilter : connector.getFeatureFilter()) {
- if (featureToVersion == null) {
- featureToVersion = computeFeatureToVersion();
- }
- boolean match = false;
- Version version = featureToVersion.get(featureFilter.getFeatureId());
- if (version != null) {
- VersionRange versionRange = new VersionRange(featureFilter.getVersion());
- if (versionRange.isIncluded(version)) {
- match = true;
- }
- }
- if (!match) {
- items.remove(connector);
- filteredItems.add(connector);
- break;
- }
- }
- }
- }
-
- private Map<String, Version> computeFeatureToVersion() {
- Map<String, Version> map = new HashMap<String, Version>();
- for (IBundleGroupProvider provider : Platform.getBundleGroupProviders()) {
- for (IBundleGroup bundleGroup : provider.getBundleGroups()) {
- for (Bundle bundle : bundleGroup.getBundles()) {
- map.put(bundle.getSymbolicName(), bundle.getVersion());
- }
- }
- }
- return map;
- }
-
- public void dispose() {
- for (final AbstractDiscoveryStrategy strategy : discoveryStrategies) {
- SafeRunner.run(new ISafeRunnable() {
-
- public void run() throws Exception {
- strategy.dispose();
- }
-
- public void handleException(Throwable exception) {
- LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, Messages.Catalog_exception_disposing + strategy.getClass().getName(), exception));
- }
- });
- }
- }
-
- public void setTags(List<Tag> tags) {
- this.tags = new ArrayList<Tag>(tags);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java
deleted file mode 100644
index 4f0207417..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.core.runtime.IProduct;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * @author David Green
- */
-public abstract class DiscoveryCore {
-
- public static final String ID_PLUGIN = "org.eclipse.equinox.p2.discovery"; //$NON-NLS-1$
-
- private DiscoveryCore() {
- }
-
- public static Dictionary<Object, Object> createEnvironment() {
- Dictionary<Object, Object> environment = new Hashtable<Object, Object>(System.getProperties());
- // add the installed Mylyn version to the environment so that we can
- // have
- // connectors that are filtered based on version of Mylyn
- IProduct product = Platform.getProduct();
- if (product != null) {
- environment.put("org.eclipse.product.id", product.getId()); //$NON-NLS-1$
- }
- return environment;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Messages.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Messages.java
deleted file mode 100644
index a6bbe4fa4..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Messages.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.discovery;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author David Green
- */
-class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.discovery.messages"; //$NON-NLS-1$
-
- public static String Catalog_bundle_references_unknown_category;
-
- public static String Catalog_duplicate_category_id;
-
- public static String Catalog_exception_disposing;
-
- public static String Catalog_Failed_to_discovery_all_Error;
-
- public static String Catalog_illegal_filter_syntax;
-
- public static String Catalog_Strategy_failed_Error;
-
- public static String Catalog_task_discovering_connectors;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Policy.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Policy.java
deleted file mode 100644
index 63b3d64b1..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Policy.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.discovery;
-
-/**
- * A policy defines what is permitted.
- *
- * @author David Green
- */
-public class Policy {
-
- /**
- * Define system property <code>org.eclipse.mylyn.internal.discovery.core.model.Policy.permissive=true</code> to
- * allow for categories to be permitted by anyone. For testing purposes.
- */
- private static final boolean PERMISSIVE = Boolean.getBoolean(Policy.class.getName() + ".permissive"); //$NON-NLS-1$
-
- private static final Policy DEFAULT = new Policy(false);
-
- private final boolean permitCategories;
-
- public Policy(boolean permitCategories) {
- this.permitCategories = permitCategories;
- }
-
- public boolean isPermitCategories() {
- return permitCategories || PERMISSIVE;
- }
-
- public static Policy defaultPolicy() {
- return DEFAULT;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/messages.properties b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/messages.properties
deleted file mode 100644
index c0f5d077a..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/messages.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-Catalog_bundle_references_unknown_category=Unknown category ''{0}'' referenced by connector ''{1}'' declared in {2}
-Catalog_duplicate_category_id=Duplicate category id ''{0}'': declaring sources: {1}, {2}
-Catalog_exception_disposing=exception disposing
-Catalog_Failed_to_discovery_all_Error=Failed to discover all connectors.
-Catalog_illegal_filter_syntax=Illegal filter syntax ''{0}'' in connector ''{1}'' declared in {2}
-Catalog_Strategy_failed_Error={0} failed with an error
-Catalog_task_discovering_connectors=Retrieving listing
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/AbstractCatalogItem.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/AbstractCatalogItem.java
deleted file mode 100644
index f70a962ad..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/AbstractCatalogItem.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-/**
- * @author Steffen Pingel
- */
-public class AbstractCatalogItem {
-
- private Object data;
-
- public Object getData() {
- return data;
- }
-
- public void setData(Object data) {
- this.data = data;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java
deleted file mode 100644
index bb1b636e1..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-
-/**
- * @author David Green
- */
-public class CatalogCategory extends AbstractCatalogItem {
-
- private AbstractCatalogSource source;
-
- private final List<CatalogItem> items = new ArrayList<CatalogItem>();
-
- protected String id;
-
- protected String name;
-
- protected String description;
-
- protected String relevance;
-
- protected Icon icon;
-
- protected Overview overview;
-
- protected java.util.List<Group> group = new java.util.ArrayList<Group>();
-
- public List<CatalogItem> getItems() {
- return items;
- }
-
- public AbstractCatalogSource getSource() {
- return source;
- }
-
- public void setSource(AbstractCatalogSource source) {
- this.source = source;
- }
-
- /**
- * an id that uniquely identifies the category
- */
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * the name of the category, as it is displayed in the ui.
- */
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * A description of the category
- */
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * A relevance, which is a number from 0 to 100. Categories with higher relevance are displayed with preference in
- * the UI.
- */
- public String getRelevance() {
- return relevance;
- }
-
- public void setRelevance(String relevance) {
- this.relevance = relevance;
- }
-
- public Icon getIcon() {
- return icon;
- }
-
- public void setIcon(Icon icon) {
- this.icon = icon;
- }
-
- public Overview getOverview() {
- return overview;
- }
-
- public void setOverview(Overview overview) {
- this.overview = overview;
- }
-
- public java.util.List<Group> getGroup() {
- return group;
- }
-
- public void setGroup(java.util.List<Group> group) {
- this.group = group;
- }
-
- public void validate() throws ValidationException {
- if (id == null || id.length() == 0) {
- throw new ValidationException(Messages.CatalogCategory_must_specify_CatalogCategory_id);
- }
- if (name == null || name.length() == 0) {
- throw new ValidationException(Messages.CatalogCategory_must_specify_CatalogCategory_name);
- }
- if (description == null || description.length() == 0) {
- throw new ValidationException("Must specify connectorCategory/@description"); //$NON-NLS-1$
- }
- if (icon != null) {
- icon.validate();
- }
- if (relevance != null) {
- try {
- int r = Integer.parseInt(relevance, 10);
- if (r < 0 || r > 100) {
- throw new NumberFormatException();
- }
- } catch (NumberFormatException e) {
- throw new ValidationException(Messages.CatalogCategory_CatalogCategory_relevance_invalid);
- }
- }
- if (overview != null) {
- overview.validate();
- }
- for (Group groupItem : group) {
- groupItem.validate();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java
deleted file mode 100644
index 0359f65c1..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.net.MalformedURLException;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-
-/**
- * @author David Green
- */
-public class CatalogItem extends AbstractCatalogItem {
-
- private AbstractCatalogSource source;
-
- private CatalogCategory category;
-
- private boolean selected;
-
- private Boolean available;
-
- private Certification certification;
-
- private final PropertyChangeSupport changeSupport;
-
- private boolean installed;
-
- private Set<Tag> tags;
-
- protected String name;
-
- protected String provider;
-
- protected String license;
-
- protected String description;
-
- protected String siteUrl;
-
- protected String id;
-
- protected String categoryId;
-
- protected String platformFilter;
-
- protected String groupId;
-
- protected java.util.List<FeatureFilter> featureFilter = new java.util.ArrayList<FeatureFilter>();
-
- protected java.util.List<String> installableUnits = new java.util.ArrayList<String>();
-
- protected Icon icon;
-
- protected Overview overview;
-
- protected String certificationId;
-
- public CatalogItem() {
- changeSupport = new PropertyChangeSupport(this);
- }
-
- public CatalogCategory getCategory() {
- return category;
- }
-
- public void setCategory(CatalogCategory category) {
- this.category = category;
- }
-
- public AbstractCatalogSource getSource() {
- return source;
- }
-
- public void setSource(AbstractCatalogSource source) {
- this.source = source;
- }
-
- public Certification getCertification() {
- return certification;
- }
-
- public void setCertification(Certification certification) {
- this.certification = certification;
- }
-
- /**
- * support selection
- *
- * @return true if the item is selected, otherwise false
- */
- public boolean isSelected() {
- return selected;
- }
-
- /**
- * support selection
- *
- * @param selected
- * true if the item is selected, otherwise false
- */
- public void setSelected(boolean selected) {
- this.selected = selected;
- }
-
- /**
- * indicate if this connector is available
- *
- * @return true if available, false if not, or null if availability is unknown
- */
- public Boolean getAvailable() {
- return available;
- }
-
- /**
- * indicate if this connector is available
- *
- * @param available
- * true if available, false if not, or null if availability is unknown
- */
- public void setAvailable(Boolean available) {
- if (available != this.available || (available != null && !available.equals(this.available))) {
- Boolean previous = this.available;
- this.available = available;
- changeSupport.firePropertyChange("available", previous, this.available); //$NON-NLS-1$
- }
- }
-
- public void addPropertyChangeListener(PropertyChangeListener listener) {
- changeSupport.addPropertyChangeListener(listener);
- }
-
- public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- changeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public void removePropertyChangeListener(PropertyChangeListener listener) {
- changeSupport.removePropertyChangeListener(listener);
- }
-
- public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- changeSupport.removePropertyChangeListener(propertyName, listener);
- }
-
- /**
- * the name of the connector including the name of the organization that produces the repository if appropriate, for
- * example 'Mozilla Bugzilla'.
- */
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * The name of the organization that supplies the connector.
- */
- public String getProvider() {
- return provider;
- }
-
- public void setProvider(String provider) {
- this.provider = provider;
- }
-
- /**
- * The short name of the license, for example 'EPL 1.0', 'GPL 2.0', or 'Commercial'.
- */
- public String getLicense() {
- return license;
- }
-
- public void setLicense(String license) {
- this.license = license;
- }
-
- /**
- * A description of the connector. Plug-ins should provide a description, especially if the description is not
- * self-evident from the @name and
- *
- * @organization.
- */
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * The URL of the update site containing the connector.
- */
- public String getSiteUrl() {
- return siteUrl;
- }
-
- public void setSiteUrl(String siteUrl) {
- this.siteUrl = siteUrl;
- }
-
- /**
- * The id of the feature that installs this connector
- */
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * the id of the connectorCategory in which this connector belongs
- */
- public String getCategoryId() {
- return categoryId;
- }
-
- public void setCategoryId(String categoryId) {
- this.categoryId = categoryId;
- }
-
- public String getCertificationId() {
- return certificationId;
- }
-
- public void setCertificationId(String certificationId) {
- this.certificationId = certificationId;
- }
-
- /**
- * E.g., "(& (osgi.os=macosx) (osgi.ws=carbon))"
- */
- public String getPlatformFilter() {
- return platformFilter;
- }
-
- public void setPlatformFilter(String platformFilter) {
- this.platformFilter = platformFilter;
- }
-
- /**
- * The id of the connectorCategory group. See group/@id for more details.
- */
- public String getGroupId() {
- return groupId;
- }
-
- public void setGroupId(String groupId) {
- this.groupId = groupId;
- }
-
- public java.util.List<FeatureFilter> getFeatureFilter() {
- return featureFilter;
- }
-
- public void setFeatureFilter(java.util.List<FeatureFilter> featureFilter) {
- this.featureFilter = featureFilter;
- }
-
- public Icon getIcon() {
- return icon;
- }
-
- public void setIcon(Icon icon) {
- this.icon = icon;
- }
-
- public Overview getOverview() {
- return overview;
- }
-
- public void setOverview(Overview overview) {
- this.overview = overview;
- }
-
- public void validate() throws ValidationException {
- if (name == null || name.length() == 0) {
- throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_name);
- }
- if (provider == null || provider.length() == 0) {
- throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_provider);
- }
- if (license == null || license.length() == 0) {
- throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_license);
- }
- if (siteUrl == null || siteUrl.length() == 0) {
- throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_siteUrl);
- }
- try {
- new java.net.URL(siteUrl);
- } catch (MalformedURLException e) {
- throw new ValidationException(Messages.CatalogItem_invalid_CatalogItem_siteUrl);
- }
- if (id == null || id.length() == 0) {
- throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_id);
- }
- if (categoryId == null || categoryId.length() == 0) {
- throw new ValidationException(Messages.CatalogItem_must_specify_CatalogItem_categoryId);
- }
- for (FeatureFilter featureFilterItem : featureFilter) {
- featureFilterItem.validate();
- }
- if (icon != null) {
- icon.validate();
- }
- if (overview != null) {
- overview.validate();
- }
- }
-
- public java.util.List<String> getInstallableUnits() {
- return installableUnits;
- }
-
- public void setInstallableUnits(java.util.List<String> installableUnits) {
- this.installableUnits = installableUnits;
- }
-
- public boolean isInstalled() {
- return installed;
- }
-
- public void setInstalled(boolean installed) {
- this.installed = installed;
- }
-
- public Set<Tag> getTags() {
- if (tags == null) {
- return Collections.emptySet();
- } else {
- return Collections.unmodifiableSet(tags);
- }
- }
-
- public boolean hasTag(Tag tag) {
- return tags == null ? false : tags.contains(tag);
- }
-
- public void addTag(Tag tag) {
- if (tags == null) {
- tags = new HashSet<Tag>();
- }
- tags.add(tag);
- }
-
- public boolean removeTag(Tag tag) {
- if (tags == null) {
- return false;
- }
- return tags.remove(tag);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Certification.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Certification.java
deleted file mode 100644
index 4122aa824..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Certification.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-
-/**
- * @author Steffen Pingel
- */
-public class Certification {
-
- private AbstractCatalogSource source;
-
- protected String id;
-
- protected String name;
-
- protected String description;
-
- protected Icon icon;
-
- protected String url;
-
- public AbstractCatalogSource getSource() {
- return source;
- }
-
- public void setSource(AbstractCatalogSource source) {
- this.source = source;
- }
-
- /**
- * an id that uniquely identifies the category
- */
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * the name of the category, as it is displayed in the ui.
- */
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * A description of the category
- */
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Icon getIcon() {
- return icon;
- }
-
- public void setIcon(Icon icon) {
- this.icon = icon;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public void validate() throws ValidationException {
- if (id == null || id.length() == 0) {
- throw new ValidationException(Messages.CatalogCategory_must_specify_CatalogCategory_id);
- }
- if (name == null || name.length() == 0) {
- throw new ValidationException(Messages.CatalogCategory_must_specify_CatalogCategory_name);
- }
- if (icon != null) {
- icon.validate();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/FeatureFilter.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/FeatureFilter.java
deleted file mode 100644
index 4e9d50b05..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/FeatureFilter.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-/**
- * A means of specifying that a feature must be present in order for the connectorDescriptor to be presented to the
- * user.
- *
- * @author David Green
- */
-public class FeatureFilter {
-
- protected String featureId;
-
- protected String version;
-
- protected CatalogItem item;
-
- public FeatureFilter() {
- }
-
- /**
- * The id of the feature to test
- */
- public String getFeatureId() {
- return featureId;
- }
-
- public void setFeatureId(String featureId) {
- this.featureId = featureId;
- }
-
- /**
- * A version specifier, specified in the same manner as version dependencies are specified in an OSGi manifest. For
- * example: "[3.0,4.0)"
- */
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public CatalogItem getItem() {
- return item;
- }
-
- public void setItem(CatalogItem catalogItem) {
- this.item = catalogItem;
- }
-
- public void validate() throws ValidationException {
- if (featureId == null || featureId.length() == 0) {
- throw new ValidationException(Messages.FeatureFilter_must_specify_featureFilter_featureId);
- }
- if (version == null || version.length() == 0) {
- throw new ValidationException(Messages.FeatureFilter_must_specify_featureFilter_version);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Group.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Group.java
deleted file mode 100644
index d59aa8e38..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Group.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Task top Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-/**
- * groups provide a way to anchor connectors in a grouping with other like entries.
- *
- * @author David Green
- */
-public class Group {
-
- protected String id;
-
- protected CatalogCategory category;
-
- public Group() {
- }
-
- /**
- * An identifier that identifies the group. Must be unique for a particular connectorCategory.
- */
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public CatalogCategory getCategory() {
- return category;
- }
-
- public void setCategory(CatalogCategory category) {
- this.category = category;
- }
-
- public void validate() throws ValidationException {
- if (id == null || id.length() == 0) {
- throw new ValidationException(Messages.Group_must_specify_group_id);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Icon.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Icon.java
deleted file mode 100644
index dc3edb6ff..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Icon.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-/**
- * @author David Green
- */
-public class Icon {
-
- protected String image16;
-
- protected String image32;
-
- protected String image48;
-
- protected String image64;
-
- protected String image128;
-
- public Icon() {
- }
-
- public String getImage16() {
- return image16;
- }
-
- public void setImage16(String image16) {
- this.image16 = image16;
- }
-
- public String getImage32() {
- return image32;
- }
-
- public void setImage32(String image32) {
- this.image32 = image32;
- }
-
- public String getImage48() {
- return image48;
- }
-
- public void setImage48(String image48) {
- this.image48 = image48;
- }
-
- public String getImage64() {
- return image64;
- }
-
- public void setImage64(String image64) {
- this.image64 = image64;
- }
-
- public String getImage128() {
- return image128;
- }
-
- public void setImage128(String image128) {
- this.image128 = image128;
- }
-
- public void validate() throws ValidationException {
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Messages.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Messages.java
deleted file mode 100644
index 3446f4e04..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Messages.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author David Green
- */
-class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.discovery.model.messages"; //$NON-NLS-1$
-
- public static String CatalogCategory_CatalogCategory_relevance_invalid;
-
- public static String CatalogCategory_must_specify_CatalogCategory_id;
-
- public static String CatalogCategory_must_specify_CatalogCategory_name;
-
- public static String CatalogItem_invalid_CatalogItem_siteUrl;
-
- public static String CatalogItem_must_specify_CatalogItem_categoryId;
-
- public static String CatalogItem_must_specify_CatalogItem_id;
-
- public static String CatalogItem_must_specify_CatalogItem_license;
-
- public static String CatalogItem_must_specify_CatalogItem_name;
-
- public static String CatalogItem_must_specify_CatalogItem_provider;
-
- public static String CatalogItem_must_specify_CatalogItem_siteUrl;
-
- public static String FeatureFilter_must_specify_featureFilter_featureId;
-
- public static String FeatureFilter_must_specify_featureFilter_version;
-
- public static String Group_must_specify_group_id;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Overview.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Overview.java
deleted file mode 100644
index f1ab32c04..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Overview.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-/**
- * @author David Green
- */
-public class Overview {
-
- protected String summary;
-
- protected String url;
-
- protected String screenshot;
-
- protected CatalogItem item;
-
- protected CatalogCategory category;
-
- public Overview() {
- }
-
- /**
- * A description providing detailed information about the item. Newlines can be used to format the text into
- * multiple paragraphs if necessary. Text must fit into an area 320x240, otherwise it will be truncated in the UI.
- * More lengthy descriptions can be provided on a web page if required, see @url.
- */
- public String getSummary() {
- return summary;
- }
-
- public void setSummary(String summary) {
- this.summary = summary;
- }
-
- /**
- * An URL that points to a web page with more information relevant to the connector or category.
- */
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- /**
- * 320x240 PNG, JPEG or GIF
- */
- public String getScreenshot() {
- return screenshot;
- }
-
- public void setScreenshot(String screenshot) {
- this.screenshot = screenshot;
- }
-
- public CatalogItem getItem() {
- return item;
- }
-
- public void setItem(CatalogItem item) {
- this.item = item;
- }
-
- public CatalogCategory getCategory() {
- return category;
- }
-
- public void setCategory(CatalogCategory category) {
- this.category = category;
- }
-
- public void validate() throws ValidationException {
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Tag.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Tag.java
deleted file mode 100644
index f4f1f8bc2..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/Tag.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-/**
- * Provides means to tag items in the catalog.
- *
- * @author David Green
- * @author Steffen Pingel
- */
-public class Tag extends AbstractCatalogItem {
-
- private final Object classifier;
-
- private final String value;
-
- private final String label;
-
- public Tag(String value, String label) {
- this(null, value, label);
- }
-
- public Tag(Object tagClassifier, String value, String label) {
- this.classifier = tagClassifier;
- this.value = value;
- this.label = label;
- }
-
- /**
- * the classifier, which places the tag in a logical category
- *
- * @return the classifier or null if this tag is not in any category
- */
- public Object getTagClassifier() {
- return classifier;
- }
-
- /**
- * Returns the value of the tag, not intended for display.
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Returns a short user-visible value that is used by the user to identify the tag.
- */
- public String getLabel() {
- return label;
- }
-
- @Override
- public String toString() {
- return "Tag [classifier=" + classifier + ", value=" + value + ", label=" + label + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-
- @Override
- public int hashCode() {
- // we don't include the label here
- final int prime = 31;
- int result = 1;
- result = prime * result + ((classifier == null) ? 0 : classifier.hashCode());
- result = prime * result + ((value == null) ? 0 : value.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- // we don't consider the label when comparing equality
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- Tag other = (Tag) obj;
- if (classifier == null) {
- if (other.classifier != null) {
- return false;
- }
- } else if (!classifier.equals(other.classifier)) {
- return false;
- }
- if (value == null) {
- if (other.value != null) {
- return false;
- }
- } else if (!value.equals(other.value)) {
- return false;
- }
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/ValidationException.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/ValidationException.java
deleted file mode 100644
index 2035d2250..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/ValidationException.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery.model;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
-
-/**
- * Indicate that a validation has occurred on the model.
- *
- * @author David Green
- */
-public class ValidationException extends CoreException {
-
- private static final long serialVersionUID = -7542361242327905294L;
-
- public ValidationException(String message) {
- super(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, message));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/messages.properties b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/messages.properties
deleted file mode 100644
index 8b0f42857..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/messages.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-CatalogCategory_CatalogCategory_relevance_invalid=connectorCategory/@relevance must be an integer >= 0 and <= 100
-CatalogCategory_must_specify_CatalogCategory_id=Must specify connectorCategory/@id
-CatalogCategory_must_specify_CatalogCategory_name=Must specify connectorCategory/@name
-CatalogItem_invalid_CatalogItem_siteUrl=Invalid connectorDescriptor/@siteUrl
-CatalogItem_must_specify_CatalogItem_categoryId=Must specify connectorDescriptor/@categoryId
-CatalogItem_must_specify_CatalogItem_id=Must specify connectorDescriptor/@id
-CatalogItem_must_specify_CatalogItem_license=Must specify connectorDescriptor/@license
-CatalogItem_must_specify_CatalogItem_name=Must specify connectorDescriptor/@name
-CatalogItem_must_specify_CatalogItem_provider=Must specify connectorDescriptor/@provider
-CatalogItem_must_specify_CatalogItem_siteUrl=Must specify connectorDescriptor/@siteUrl
-FeatureFilter_must_specify_featureFilter_featureId=Must specify featureFilter/@featureId
-FeatureFilter_must_specify_featureFilter_version=Must specify featureFilter/@version
-Group_must_specify_group_id=Must specify group/@id
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java
deleted file mode 100644
index 80e2fc3c3..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogCategoryComparator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.discovery.util;
-
-import java.util.Comparator;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
-
-/**
- * A comparator that orders categories by relevance and name.
- *
- * @author David Green
- * @author Steffen Pingel
- */
-public class CatalogCategoryComparator implements Comparator<CatalogCategory> {
-
- public int compare(CatalogCategory o1, CatalogCategory o2) {
- if (o1 == o2) {
- return 0;
- }
- String r1 = o1.getRelevance();
- String r2 = o2.getRelevance();
- int i = 0;
- if (r1 != null && r2 != null) {
- // don't have to worry about format, since they were already validated
- // note that higher relevance appears first, thus the reverse order of
- // the comparison.
- i = new Integer(r2).compareTo(new Integer(r1));
- } else if (r1 == null && r2 != null) {
- return 1;
- } else if (r2 == null && r1 != null) {
- return -1;
- }
- if (i == 0) {
- i = o1.getName().compareToIgnoreCase(o2.getName());
- if (i == 0) {
- i = o1.getId().compareTo(o2.getId());
- }
- }
- return i;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogItemComparator.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogItemComparator.java
deleted file mode 100644
index 116e3d948..000000000
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/util/CatalogItemComparator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.discovery.util;
-
-import java.util.Comparator;
-import org.eclipse.equinox.internal.p2.discovery.model.*;
-
-/**
- * A comparator that orders connectors by group and alphabetically by their name.
- *
- * @author David Green
- */
-public class CatalogItemComparator implements Comparator<CatalogItem> {
-
- /**
- * compute the index of the group id
- *
- * @param groupId
- * the group id or null
- * @return the index, or -1 if not found
- */
- private int computeGroupIndex(CatalogCategory category, String groupId) {
- if (groupId != null) {
- int index = -1;
- for (Group group : category.getGroup()) {
- ++index;
- if (group.getId().equals(groupId)) {
- return index;
- }
- }
- }
- return -1;
- }
-
- public int compare(CatalogItem o1, CatalogItem o2) {
- if (o1.getCategory() != o2.getCategory()) {
- throw new IllegalArgumentException();
- }
- if (o1 == o2) {
- return 0;
- }
- int g1 = computeGroupIndex(o1.getCategory(), o1.getGroupId());
- int g2 = computeGroupIndex(o2.getCategory(), o2.getGroupId());
- int i;
- if (g1 != g2) {
- if (g1 == -1) {
- i = 1;
- } else if (g2 == -1) {
- i = -1;
- } else {
- i = g1 - g2;
- }
- } else {
- i = o1.getName().compareToIgnoreCase(o2.getName());
- if (i == 0) {
- i = o1.getId().compareTo(o2.getId());
- }
- }
- return i;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/.classpath b/bundles/org.eclipse.equinox.p2.engine/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.engine/.cvsignore b/bundles/org.eclipse.equinox.p2.engine/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.engine/.options b/bundles/org.eclipse.equinox.p2.engine/.options
deleted file mode 100644
index 0792967be..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/.options
+++ /dev/null
@@ -1,3 +0,0 @@
-org.eclipse.equinox.p2.engine/profileregistry/debug = false
-org.eclipse.equinox.p2.engine/engine/debug = false
-org.eclipse.equinox.p2.engine/enginesession/debug = false
diff --git a/bundles/org.eclipse.equinox.p2.engine/.project b/bundles/org.eclipse.equinox.p2.engine/.project
deleted file mode 100644
index 80984bcd4..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.engine</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0c5749676..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,330 +0,0 @@
-#Mon Dec 21 23:51:30 CET 2009
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 56bcc3e9b..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:07 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
deleted file mode 100644
index cd65e5503..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,58 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.engine;singleton:=true
-Bundle-Version: 2.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.engine.EngineActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.engine;
- x-friends:="org.eclipse.equinox.p2.garbagecollector,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.touchpoint.natives,
- org.eclipse.equinox.p2.ui.sdk.scheduler,
- org.eclipse.pde.build",
- org.eclipse.equinox.internal.p2.engine.phases;x-friends:="org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.ui.sdk.scheduler",
- org.eclipse.equinox.p2.engine;version="2.0.0",
- org.eclipse.equinox.p2.engine.query;version="2.0.0",
- org.eclipse.equinox.p2.engine.spi;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.registry,
- org.eclipse.core.jobs;bundle-version="[3.4.0,4.0.0)"
-Eclipse-RegisterBuddy: org.eclipse.equinox.p2.metadata.repository
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Service-Component: OSGI-INF/profileRegistry.xml, OSGI-INF/engine.xml
-Import-Package: javax.xml.parsers,
- org.eclipse.core.internal.preferences,
- org.eclipse.core.runtime.preferences,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.index,
- org.eclipse.equinox.internal.p2.metadata.repository.io,
- org.eclipse.equinox.internal.p2.persistence,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.index;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.spi;version="2.0.0",
- org.eclipse.equinox.security.storage;version="1.0.0",
- org.eclipse.osgi.service.datalocation;version="1.0.0",
- org.eclipse.osgi.service.debug;version="1.1.0",
- org.eclipse.osgi.service.security;version="1.0.0",
- org.eclipse.osgi.signedcontent;version="1.0.0",
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.6.0",
- org.osgi.service.prefs,
- org.osgi.util.tracker;version="1.4.0",
- org.xml.sax
diff --git a/bundles/org.eclipse.equinox.p2.engine/OSGI-INF/engine.xml b/bundles/org.eclipse.equinox.p2.engine/OSGI-INF/engine.xml
deleted file mode 100644
index e656d3628..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/OSGI-INF/engine.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.engine">
- <implementation class="org.eclipse.equinox.internal.p2.engine.EngineComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.engine.IEngine"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/OSGI-INF/profileRegistry.xml b/bundles/org.eclipse.equinox.p2.engine/OSGI-INF/profileRegistry.xml
deleted file mode 100644
index 3d4ac8384..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/OSGI-INF/profileRegistry.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.engine.registry">
- <implementation class="org.eclipse.equinox.internal.p2.engine.ProfileRegistryComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.engine.IProfileRegistry"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/about.html b/bundles/org.eclipse.equinox.p2.engine/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/build.properties b/bundles/org.eclipse.equinox.p2.engine/build.properties
deleted file mode 100644
index c83017ced..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/build.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-output.. = bin/
-bin.includes = META-INF/,\
- OSGI-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties,\
- .options
-src.includes = about.html,\
- schema/
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.engine/plugin.properties b/bundles/org.eclipse.equinox.p2.engine/plugin.properties
deleted file mode 100644
index 34875fdc9..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Engine
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.engine/plugin.xml b/bundles/org.eclipse.equinox.p2.engine/plugin.xml
deleted file mode 100644
index 3d469f492..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
-<extension-point id="touchpoints" name="Touchpoints" schema="schema/touchpoints.exsd"/>
-
-<extension-point id="actions" name="Actions" schema="schema/actions.exsd"/>
- <extension
- id="metadataRepository"
- point="org.eclipse.equinox.p2.metadata.repository.metadataRepositories">
- <factory
- class="org.eclipse.equinox.internal.p2.engine.ProfileMetadataRepositoryFactory">
- </factory>
- <filter
- suffix="profile">
- </filter>
- </extension>
-
- <extension id="preferences" point="org.eclipse.equinox.preferences.preferences" name="%preferencesExtPtName">
- <scope name="profile" class="org.eclipse.equinox.internal.p2.engine.ProfilePreferences"/>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.engine/pom.xml b/bundles/org.eclipse.equinox.p2.engine/pom.xml
deleted file mode 100644
index e1e8b1367..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.engine</artifactId>
- <version>2.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.engine/schema/actions.exsd b/bundles/org.eclipse.equinox.p2.engine/schema/actions.exsd
deleted file mode 100644
index d1069d52e..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/schema/actions.exsd
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.equinox.p2.engine" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.equinox.p2.engine" id="actions" name="Actions"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="action"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="action">
- <complexType>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="version" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.engine.spi.ProvisioningAction:"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="touchpointType" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="touchpointVersion" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiinfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
diff --git a/bundles/org.eclipse.equinox.p2.engine/schema/touchpoints.exsd b/bundles/org.eclipse.equinox.p2.engine/schema/touchpoints.exsd
deleted file mode 100644
index 6635c9790..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/schema/touchpoints.exsd
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.equinox.p2.engine" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.equinox.p2.engine" id="touchpoints" name="Touchpoints"/>
- </appInfo>
- <documentation>
- Touchpoints are the provisioning system&apos;s interface to some part of the environment in which installable units are being installed. Defining a new touchpoint allows you to &quot;teach&quot; the provisioning system how to interact with some aspect of the environment (an operating system, another native application, etc).
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="touchpoint" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="touchpoint">
- <complexType>
- <attribute name="type" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="version" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.engine.spi.Touchpoint:"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- @since org.eclipse.equinox.p2.engine 1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;p&gt;
- &lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.equinox.p2.engine.touchpoints&quot; id=&quot;eclipse&quot; name=&quot;My Touchpoint&quot;&gt;
- &lt;installAdaptor
- type=&quot;eclipse&quot;
- class=&quot;com.xyz.MyTouchpoint&quot;
- version=&quot;1.0.0&quot;/&gt;
- &lt;/extension&gt;
- &lt;/pre&gt;
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- Touchpoint implementations must extend org.eclipse.equinox.internal.provisional.p2.engine.Touchpoint.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- The platform provides touchpoint implementations for interacting with the operating system (org.eclipse.equinox.p2.native) and the OSGi framework (org.eclipse.equinox.p2.osgi).
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2008, 2009 IBM Corporation and others.&lt;br&gt;
-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
-&lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ActionManager.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ActionManager.java
deleted file mode 100644
index acbca8436..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ActionManager.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-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.VersionRange;
-import org.eclipse.osgi.util.NLS;
-
-public class ActionManager implements IRegistryChangeListener {
-
- private static final String PT_ACTIONS = "actions"; //$NON-NLS-1$
- private static final String ELEMENT_ACTION = "action"; //$NON-NLS-1$
- private static final String ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$
- private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
- private static final String TOUCHPOINT_TYPE = "touchpointType"; //$NON-NLS-1$
- private static final String TOUCHPOINT_VERSION = "touchpointVersion"; //$NON-NLS-1$
- /**
- * Service name constant for the action manager service. This service is used internally
- * by the engine implementation and should not be referenced directly by clients.
- */
- public static final String SERVICE_NAME = ActionManager.class.getName();
-
- private HashMap<String, IConfigurationElement> actionMap;
- private TouchpointManager touchpointManager;
-
- public ActionManager() {
- this.touchpointManager = new TouchpointManager();
- RegistryFactory.getRegistry().addRegistryChangeListener(this, EngineActivator.ID);
- }
-
- public Touchpoint getTouchpointPoint(ITouchpointType type) {
- if (type == null || type == ITouchpointType.NONE)
- return null;
- return touchpointManager.getTouchpoint(type);
- }
-
- public String getTouchpointQualifiedActionId(String actionId, ITouchpointType type) {
- if (actionId.indexOf('.') == -1) {
- if (type == null || type == ITouchpointType.NONE)
- return actionId;
-
- Touchpoint touchpoint = touchpointManager.getTouchpoint(type);
- if (touchpoint == null)
- throw new IllegalArgumentException(NLS.bind(Messages.ActionManager_Required_Touchpoint_Not_Found, type.toString(), actionId));
- actionId = touchpoint.qualifyAction(actionId);
- }
- return actionId;
- }
-
- public ProvisioningAction getAction(String actionId, VersionRange versionRange) {
- IConfigurationElement actionElement = getActionMap().get(actionId);
- if (actionElement != null && actionElement.isValid()) {
- try {
- ProvisioningAction action = (ProvisioningAction) actionElement.createExecutableExtension(ATTRIBUTE_CLASS);
-
- String touchpointType = actionElement.getAttribute(TOUCHPOINT_TYPE);
- if (touchpointType != null) {
- String touchpointVersion = actionElement.getAttribute(TOUCHPOINT_VERSION);
- Touchpoint touchpoint = touchpointManager.getTouchpoint(touchpointType, touchpointVersion);
- if (touchpoint == null)
- throw new IllegalArgumentException(NLS.bind(Messages.ActionManager_Required_Touchpoint_Not_Found, touchpointType, actionId));
- action.setTouchpoint(touchpoint);
- }
- return action;
- } catch (InvalidRegistryObjectException e) {
- // skip
- } catch (CoreException e) {
- throw new IllegalArgumentException(NLS.bind(Messages.ActionManager_Exception_Creating_Action_Extension, actionId));
- }
- }
- return null;
- }
-
- private synchronized Map<String, IConfigurationElement> getActionMap() {
- if (actionMap != null)
- return actionMap;
- IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(EngineActivator.ID, PT_ACTIONS);
- IExtension[] extensions = point.getExtensions();
- actionMap = new HashMap<String, IConfigurationElement>(extensions.length);
- for (int i = 0; i < extensions.length; i++) {
- try {
- IConfigurationElement[] elements = extensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- IConfigurationElement actionElement = elements[j];
- if (!actionElement.getName().equals(ELEMENT_ACTION))
- continue;
-
- String actionId = actionElement.getAttribute(ATTRIBUTE_NAME);
- if (actionId == null)
- continue;
-
- if (actionId.indexOf('.') == -1)
- actionId = actionElement.getNamespaceIdentifier() + "." + actionId; //$NON-NLS-1$
-
- actionMap.put(actionId, actionElement);
- }
- } catch (InvalidRegistryObjectException e) {
- // skip
- }
- }
- return actionMap;
- }
-
- public synchronized void registryChanged(IRegistryChangeEvent event) {
- actionMap = null;
- }
-
- static void reportError(String errorMsg) {
- Status errorStatus = new Status(IStatus.ERROR, EngineActivator.ID, 1, errorMsg, null);
- LogHelper.log(errorStatus);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/BeginOperationEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/BeginOperationEvent.java
deleted file mode 100644
index e22bff6a9..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/BeginOperationEvent.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.p2.engine.IEngine;
-import org.eclipse.equinox.p2.engine.IProfile;
-
-
-/**
- * @since 2.0
- */
-public class BeginOperationEvent extends TransactionEvent {
-
- private static final long serialVersionUID = 6389318375739324865L;
-
- public BeginOperationEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine) {
- super(profile, phaseSet, operands, engine);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/CommitOperationEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/CommitOperationEvent.java
deleted file mode 100644
index deb496fbf..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/CommitOperationEvent.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.p2.engine.IEngine;
-import org.eclipse.equinox.p2.engine.IProfile;
-
-
-/**
- * @since 2.0
- */
-public class CommitOperationEvent extends TransactionEvent {
- private static final long serialVersionUID = -523967775426133720L;
-
- public CommitOperationEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine) {
- super(profile, phaseSet, operands, engine);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java
deleted file mode 100644
index 437b20013..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DebugHelper.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.io.File;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.service.debug.DebugOptions;
-
-public class DebugHelper {
- public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
-
- public static final boolean DEBUG_PROFILE_REGISTRY;
- public static final boolean DEBUG_ENGINE;
- public static final boolean DEBUG_ENGINE_SESSION;
-
- static {
- DebugOptions options = (DebugOptions) ServiceHelper.getService(EngineActivator.getContext(), DebugOptions.class.getName());
- if (options != null) {
- DEBUG_PROFILE_REGISTRY = options.getBooleanOption(EngineActivator.ID + "/profileregistry/debug", false); //$NON-NLS-1$
- DEBUG_ENGINE = options.getBooleanOption(EngineActivator.ID + "/engine/debug", false); //$NON-NLS-1$
- DEBUG_ENGINE_SESSION = options.getBooleanOption(EngineActivator.ID + "/enginesession/debug", false); //$NON-NLS-1$
- } else {
- DEBUG_PROFILE_REGISTRY = false;
- DEBUG_ENGINE = false;
- DEBUG_ENGINE_SESSION = false;
- }
- }
-
- public static void debug(String name, String message) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("["); //$NON-NLS-1$
- buffer.append(EngineActivator.ID + "-" + name); //$NON-NLS-1$
- buffer.append("] "); //$NON-NLS-1$
- buffer.append(new Date(System.currentTimeMillis()));
- buffer.append(" - ["); //$NON-NLS-1$
- buffer.append(Thread.currentThread().getName());
- buffer.append("] " + LINE_SEPARATOR); //$NON-NLS-1$
- buffer.append(message);
- System.out.println(buffer.toString());
- }
-
- public static String formatArray(Collection<? extends Object> array, boolean toString, boolean newLines) {
- if (array == null || array.size() == 0)
- return "[]"; //$NON-NLS-1$
-
- StringBuffer buffer = new StringBuffer();
- buffer.append('[');
- boolean first = true;
- for (Object elem : array) {
- if (first)
- first = false;
- else
- buffer.append(',');
-
- if (toString)
- buffer.append(elem.toString());
- else
- buffer.append(elem.getClass().getName());
- if (newLines)
- buffer.append(DebugHelper.LINE_SEPARATOR);
- else
- buffer.append(' ');
- }
- buffer.append(']');
- return buffer.toString();
- }
-
- public static String formatOperation(PhaseSet phaseSet, Operand[] operands, ProvisioningContext context) {
- StringBuffer buffer = new StringBuffer();
- buffer.append("phaseSet=" + formatPhaseSet(phaseSet)); //$NON-NLS-1$
- buffer.append(","); //$NON-NLS-1$
- buffer.append(DebugHelper.LINE_SEPARATOR);
- buffer.append("operands=" + formatOperands(operands)); //$NON-NLS-1$
- buffer.append(","); //$NON-NLS-1$
- buffer.append(DebugHelper.LINE_SEPARATOR);
- buffer.append("context=" + formatContext(context)); //$NON-NLS-1$
- return buffer.toString();
- }
-
- public static String formatOperands(Operand[] operands) {
- String[] operandStrings = new String[operands.length];
- for (int i = 0; i < operands.length; i++) {
- if (operands[i] instanceof InstallableUnitOperand) {
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) operands[i];
- operandStrings[i] = formatInstallableUnitOperand(iuOperand);
- } else {
- operandStrings[i] = operands[i].toString();
- }
- }
- return DebugHelper.formatArray(Arrays.asList(operandStrings), true, true);
- }
-
- public static String formatInstallableUnitOperand(InstallableUnitOperand iuOperand) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(iuOperand.first());
- if (iuOperand.first() != null && iuOperand.first().getFragments() != null)
- buffer.append(DebugHelper.formatArray(iuOperand.first().getFragments(), true, false));
- buffer.append(" --> "); //$NON-NLS-1$
- buffer.append(iuOperand.second());
- if (iuOperand.second() != null && iuOperand.second().getFragments() != null)
- buffer.append(DebugHelper.formatArray(iuOperand.second().getFragments(), true, false));
- return buffer.toString();
- }
-
- public static String formatPhaseSet(PhaseSet phaseSet) {
- StringBuffer buffer = new StringBuffer(phaseSet.getClass().getName());
- buffer.append(DebugHelper.formatArray(Arrays.asList(phaseSet.getPhases()), false, false));
- return buffer.toString();
- }
-
- public static String formatContext(ProvisioningContext context) {
- return context.toString();
- }
-
- public static String formatAction(ProvisioningAction action, Map<String, Object> parameters) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(action.getClass().getName());
- if (action instanceof ParameterizedProvisioningAction) {
- ParameterizedProvisioningAction parameterizedAction = (ParameterizedProvisioningAction) action;
- buffer.append("{action=" + parameterizedAction.getAction().getClass().getName()); //$NON-NLS-1$
- buffer.append(", actionText=" + parameterizedAction.getActionText() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- buffer.append(DebugHelper.LINE_SEPARATOR);
- buffer.append("parameters=" + formatParameters(parameters)); //$NON-NLS-1$
- return buffer.toString();
- }
-
- public static String formatParameters(Map<String, ? extends Object> parameters) {
- Iterator<? extends Entry<String, ? extends Object>> it = parameters.entrySet().iterator();
- if (!it.hasNext())
- return "{}"; //$NON-NLS-1$
-
- StringBuffer buffer = new StringBuffer();
- buffer.append('{');
- for (;;) {
- Entry<String, ? extends Object> e = it.next();
- String key = e.getKey();
- buffer.append(key);
- buffer.append('=');
- Object value = e.getValue();
- if (value instanceof String || value instanceof File || value instanceof Operand || value instanceof IArtifactKey || value instanceof IInstallableUnit)
- buffer.append(value);
- else if (value instanceof IProfile)
- buffer.append(((IProfile) value).getProfileId());
- else
- buffer.append(value.getClass().getName());
- if (!it.hasNext()) {
- buffer.append('}');
- break;
- }
- buffer.append(',');
- buffer.append(DebugHelper.LINE_SEPARATOR);
- buffer.append(' ');
- }
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DownloadManager.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DownloadManager.java
deleted file mode 100644
index 833aad80d..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/DownloadManager.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.phases.Collect;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
-
-public class DownloadManager {
- private ProvisioningContext provContext = null;
- ArrayList<IArtifactRequest> requestsToProcess = new ArrayList<IArtifactRequest>();
- private IProvisioningAgent agent = null;
-
- public DownloadManager(ProvisioningContext context, IProvisioningAgent agent) {
- provContext = context;
- this.agent = agent;
- }
-
- /*
- * Add the given artifact to the download queue. When it
- * is downloaded, put it in the specified location.
- */
- public void add(IArtifactRequest toAdd) {
- Assert.isNotNull(toAdd);
- requestsToProcess.add(toAdd);
- }
-
- public void add(IArtifactRequest[] toAdd) {
- Assert.isNotNull(toAdd);
- for (int i = 0; i < toAdd.length; i++) {
- add(toAdd[i]);
- }
- }
-
- private void filterUnfetched() {
- for (Iterator<IArtifactRequest> iterator = requestsToProcess.iterator(); iterator.hasNext();) {
- IArtifactRequest request = iterator.next();
- if (request.getResult() != null && request.getResult().isOK()) {
- iterator.remove();
- }
- }
- }
-
- /*
- * Start the downloads. Return a status message indicating success or failure of the overall operation
- */
- public IStatus start(IProgressMonitor monitor) {
- SubMonitor subMonitor = SubMonitor.convert(monitor, Messages.download_artifact, 1000);
- try {
- if (requestsToProcess.isEmpty())
- return Status.OK_STATUS;
-
- if (provContext == null)
- provContext = new ProvisioningContext(agent);
-
- IQueryable<IArtifactRepository> repoQueryable = provContext.getArtifactRepositories(subMonitor.newChild(250));
- IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
- IArtifactRepository[] repositories = repoQueryable.query(all, subMonitor.newChild(250)).toArray(IArtifactRepository.class);
- if (repositories.length == 0)
- return new Status(IStatus.ERROR, EngineActivator.ID, Messages.download_no_repository, new Exception(Collect.NO_ARTIFACT_REPOSITORIES_AVAILABLE));
- fetch(repositories, subMonitor.newChild(500));
- return overallStatus(monitor);
- } finally {
- subMonitor.done();
- }
- }
-
- private void fetch(IArtifactRepository[] repositories, IProgressMonitor mon) {
- SubMonitor monitor = SubMonitor.convert(mon, requestsToProcess.size());
- for (int i = 0; i < repositories.length && !requestsToProcess.isEmpty() && !monitor.isCanceled(); i++) {
- IArtifactRequest[] requests = getRequestsForRepository(repositories[i]);
- IStatus dlStatus = repositories[i].getArtifacts(requests, monitor.newChild(requests.length));
- if (dlStatus.getSeverity() == IStatus.CANCEL)
- return;
- filterUnfetched();
- monitor.setWorkRemaining(requestsToProcess.size());
- }
- }
-
- private IArtifactRequest[] getRequestsForRepository(IArtifactRepository repository) {
- ArrayList<IArtifactRequest> applicable = new ArrayList<IArtifactRequest>();
- for (IArtifactRequest request : requestsToProcess) {
- if (repository.contains(request.getArtifactKey()))
- applicable.add(request);
- }
- return applicable.toArray(new IArtifactRequest[applicable.size()]);
- }
-
- // private void notifyFetched() {
- // ProvisioningEventBus bus = (ProvisioningEventBus) ServiceHelper.getService(DownloadActivator.context, ProvisioningEventBus.class);
- // bus.publishEvent();
- // }
-
- private IStatus overallStatus(IProgressMonitor monitor) {
- if (monitor != null && monitor.isCanceled())
- return Status.CANCEL_STATUS;
-
- if (requestsToProcess.size() == 0)
- return Status.OK_STATUS;
-
- MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
- for (IArtifactRequest request : requestsToProcess) {
- IStatus failed = request.getResult();
- if (failed != null && !failed.isOK())
- result.add(failed);
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java
deleted file mode 100644
index 0b28237de..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Engine.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.*;
-
-/**
- * Concrete implementation of the {@link IEngine} API.
- */
-public class Engine implements IEngine {
-
- private static final String ENGINE = "engine"; //$NON-NLS-1$
- private IProvisioningAgent agent;
-
- public Engine(IProvisioningAgent agent) {
- this.agent = agent;
- agent.registerService(ActionManager.SERVICE_NAME, new ActionManager());
- }
-
- private void checkArguments(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
- if (iprofile == null)
- throw new IllegalArgumentException(Messages.null_profile);
-
- if (phaseSet == null)
- throw new IllegalArgumentException(Messages.null_phaseset);
-
- if (operands == null)
- throw new IllegalArgumentException(Messages.null_operands);
- }
-
- public IStatus perform(IProvisioningPlan plan, IPhaseSet phaseSet, IProgressMonitor monitor) {
- return perform(plan.getProfile(), phaseSet, ((ProvisioningPlan) plan).getOperands(), plan.getContext(), monitor);
- }
-
- public IStatus perform(IProvisioningPlan plan, IProgressMonitor monitor) {
- return perform(plan, PhaseSetFactory.createDefaultPhaseSet(), monitor);
- }
-
- public IStatus perform(IProfile iprofile, IPhaseSet phases, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
- PhaseSet phaseSet = (PhaseSet) phases;
- checkArguments(iprofile, phaseSet, operands, context, monitor);
- if (operands.length == 0)
- return Status.OK_STATUS;
- SimpleProfileRegistry profileRegistry = (SimpleProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
-
- if (context == null)
- context = new ProvisioningContext(agent);
-
- if (monitor == null)
- monitor = new NullProgressMonitor();
-
- Profile profile = profileRegistry.validate(iprofile);
-
- profileRegistry.lockProfile(profile);
- try {
- eventBus.publishEvent(new BeginOperationEvent(profile, phaseSet, operands, this));
- if (DebugHelper.DEBUG_ENGINE)
- DebugHelper.debug(ENGINE, "Beginning engine operation for profile=" + profile.getProfileId() + " [" + profile.getTimestamp() + "]:" + DebugHelper.LINE_SEPARATOR + DebugHelper.formatOperation(phaseSet, operands, context)); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-
- EngineSession session = new EngineSession(agent, profile, context);
-
- MultiStatus result = phaseSet.perform(session, operands, monitor);
- if (result.isOK() || result.matches(IStatus.INFO | IStatus.WARNING)) {
- if (DebugHelper.DEBUG_ENGINE)
- DebugHelper.debug(ENGINE, "Preparing to commit engine operation for profile=" + profile.getProfileId()); //$NON-NLS-1$
- result.merge(session.prepare(monitor));
- }
- if (result.matches(IStatus.ERROR | IStatus.CANCEL)) {
- if (DebugHelper.DEBUG_ENGINE)
- DebugHelper.debug(ENGINE, "Rolling back engine operation for profile=" + profile.getProfileId() + ". Reason was: " + result.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- IStatus status = session.rollback(monitor, result.getSeverity());
- if (status.matches(IStatus.ERROR))
- LogHelper.log(status);
- eventBus.publishEvent(new RollbackOperationEvent(profile, phaseSet, operands, this, result));
- } else {
- if (DebugHelper.DEBUG_ENGINE)
- DebugHelper.debug(ENGINE, "Committing engine operation for profile=" + profile.getProfileId()); //$NON-NLS-1$
- if (profile.isChanged())
- profileRegistry.updateProfile(profile);
- IStatus status = session.commit(monitor);
- if (status.matches(IStatus.ERROR))
- LogHelper.log(status);
- eventBus.publishEvent(new CommitOperationEvent(profile, phaseSet, operands, this));
- }
- //if there is only one child status, return that status instead because it will have more context
- IStatus[] children = result.getChildren();
- return children.length == 1 ? children[0] : result;
- } finally {
- profileRegistry.unlockProfile(profile);
- profile.setChanged(false);
- }
- }
-
- protected IStatus validate(IProfile iprofile, PhaseSet phaseSet, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
- checkArguments(iprofile, phaseSet, operands, context, monitor);
-
- if (context == null)
- context = new ProvisioningContext(agent);
-
- if (monitor == null)
- monitor = new NullProgressMonitor();
-
- ActionManager actionManager = (ActionManager) agent.getService(ActionManager.SERVICE_NAME);
- return phaseSet.validate(actionManager, iprofile, operands, context, monitor);
- }
-
- public IProvisioningPlan createPlan(IProfile profile, ProvisioningContext context) {
- return new ProvisioningPlan(profile, null, context);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java
deleted file mode 100644
index 6aa9710ff..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineActivator.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class EngineActivator implements BundleActivator {
- private static BundleContext context;
- public static final String ID = "org.eclipse.equinox.p2.engine"; //$NON-NLS-1$
-
- /**
- * System property describing the profile registry file format
- */
- public static final String PROP_PROFILE_FORMAT = "eclipse.p2.profileFormat"; //$NON-NLS-1$
-
- /**
- * Value for the PROP_PROFILE_FORMAT system property specifying raw XML file
- * format (used in p2 until and including 3.5.0 release).
- */
- public static final String PROFILE_FORMAT_UNCOMPRESSED = "uncompressed"; //$NON-NLS-1$
-
- /**
- * System property specifying how the engine should handle unsigned artifacts.
- * If this property is undefined, the default value is assumed to be "prompt".
- */
- public static final String PROP_UNSIGNED_POLICY = "eclipse.p2.unsignedPolicy"; //$NON-NLS-1$
-
- /**
- * System property value specifying that the engine should prompt for confirmation
- * when installing unsigned artifacts.
- */
- public static final String UNSIGNED_PROMPT = "prompt"; //$NON-NLS-1$
-
- /**
- * System property value specifying that the engine should fail when an attempt
- * is made to install unsigned artifacts.
- */
- public static final String UNSIGNED_FAIL = "fail"; //$NON-NLS-1$
-
- /**
- * System property value specifying that the engine should silently allow unsigned
- * artifacts to be installed.
- */
- public static final String UNSIGNED_ALLOW = "allow"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext aContext) throws Exception {
- EngineActivator.context = aContext;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- EngineActivator.context = null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineComponent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineComponent.java
deleted file mode 100644
index e303c4eb5..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineComponent.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-import org.eclipse.equinox.p2.engine.IEngine;
-
-/**
- * Component that provides a factory that can create and initialize
- * {@link IEngine} instances.
- */
-public class EngineComponent implements IAgentServiceFactory {
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentServiceFactory#createService(org.eclipse.equinox.p2.core.IProvisioningAgent)
- */
- public Object createService(IProvisioningAgent agent) {
- //ensure there is a garbage collector created for this agent if available
- agent.getService("org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector"); //$NON-NLS-1$
- //various parts of the engine may need an open-ended set of services, so we pass the agent to the engine directly
- return new Engine(agent);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineSession.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineSession.java
deleted file mode 100644
index a5ffc7383..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/EngineSession.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * TODO: not API
- */
-public class EngineSession {
- private static final String ENGINE_SESSION = "enginesession"; //$NON-NLS-1$
-
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-
- private static class ActionsRecord {
- Operand operand;
- List<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
-
- ActionsRecord(Operand operand) {
- this.operand = operand;
- }
- }
-
- private List<Object[]> phaseActionRecordsPairs = new ArrayList<Object[]>();
-
- private Phase currentPhase;
- boolean currentPhaseActive;
-
- private List<ActionsRecord> currentActionRecords;
- private ActionsRecord currentRecord;
-
- private IProfile profile;
-
- private ProvisioningContext context;
-
- private final HashMap<String, Object> sessionServices = new HashMap<String, Object>();
-
- private Set<Touchpoint> touchpoints = new HashSet<Touchpoint>();
-
- private final IProvisioningAgent agent;
-
- public EngineSession(IProvisioningAgent agent, IProfile profile, ProvisioningContext context) {
- super();
- this.agent = agent;
- this.profile = profile;
- this.context = context;
- }
-
- public IProfile getProfile() {
- return profile;
- }
-
- public IProvisioningAgent getAgent() {
- return agent;
- }
-
- public ProvisioningContext getProvisioningContext() {
- return context;
- }
-
- public File getProfileDataDirectory() {
- SimpleProfileRegistry profileRegistry = (SimpleProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- return profileRegistry.getProfileDataDirectory(profile.getProfileId());
- }
-
- /**
- * This is the interface through which parts of the engine obtain the services they need
- * @param serviceName The name of the service to obtain
- * @return The service instance, or <code>null</code> if no such service is available
- */
- public Object getxService(String serviceName) {
- Object result = sessionServices.get(serviceName);
- if (result != null)
- return result;
- return agent.getService(serviceName);
- }
-
- IStatus prepare(IProgressMonitor monitor) {
- monitor.subTask(Messages.preparing);
- MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
- for (Touchpoint touchpoint : touchpoints) {
- try {
- status.add(touchpoint.prepare(profile));
- } catch (RuntimeException e) {
- // "touchpoint.prepare" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_prepare_error, touchpoint.getClass().getName()), e));
- } catch (LinkageError e) {
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_prepare_error, touchpoint.getClass().getName()), e));
- }
- }
-
- if (status.matches(IStatus.ERROR)) {
- MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, NLS.bind(Messages.session_prepare_error, profile.getProfileId()), null);
- result.merge(status);
- return result;
- }
- return status;
- }
-
- IStatus commit(IProgressMonitor monitor) {
- monitor.subTask(Messages.committing);
- MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
- phaseActionRecordsPairs.clear();
- for (Touchpoint touchpoint : touchpoints) {
- try {
- IStatus result = touchpoint.commit(profile);
- if (!result.isOK())
- status.add(result);
- } catch (RuntimeException e) {
- // "touchpoint.commit" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_commit_error, touchpoint.getClass().getName()), e));
- } catch (LinkageError e) {
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_commit_error, touchpoint.getClass().getName()), e));
- }
- }
-
- if (status.matches(IStatus.ERROR)) {
- MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, NLS.bind(Messages.session_commit_error, profile.getProfileId()), null);
- result.merge(status);
- return result;
- }
- return status;
- }
-
- IStatus rollback(IProgressMonitor monitor, int severity) {
- if (severity == IStatus.CANCEL)
- monitor.subTask(Messages.rollingback_cancel);
-
- if (severity == IStatus.ERROR)
- monitor.subTask(Messages.rollingback_error);
-
- MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
-
- if (currentPhaseActive) {
- try {
- IStatus result = rollBackPhase(currentPhase, currentActionRecords);
- if (!result.isOK())
- status.add(result);
- } catch (RuntimeException e) {
- // "phase.prePerform and phase.postPerform" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, currentPhase.getClass().getName()), e));
- } catch (LinkageError e) {
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, currentPhase.getClass().getName()), e));
- }
- currentPhaseActive = false;
- currentActionRecords = null;
- currentRecord = null;
- }
- currentPhase = null;
-
- for (ListIterator<Object[]> it = phaseActionRecordsPairs.listIterator(phaseActionRecordsPairs.size()); it.hasPrevious();) {
- Object[] pair = it.previous();
- Phase phase = (Phase) pair[0];
- @SuppressWarnings("unchecked")
- List<ActionsRecord> actionRecords = (List<ActionsRecord>) pair[1];
- try {
- final IStatus result = rollBackPhase(phase, actionRecords);
- if (!result.isOK())
- status.add(result);
- } catch (RuntimeException e) {
- // "phase.prePerform and phase.postPerform" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, phase.getClass().getName()), e));
- } catch (LinkageError e) {
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_error, phase.getClass().getName()), e));
- }
- }
-
- phaseActionRecordsPairs.clear();
- for (Touchpoint touchpoint : touchpoints) {
- try {
- IStatus result = touchpoint.rollback(profile);
- if (!result.isOK())
- status.add(result);
- } catch (RuntimeException e) {
- // "touchpoint.rollback" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_rollback_error, touchpoint.getClass().getName()), e));
- } catch (LinkageError e) {
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.touchpoint_rollback_error, touchpoint.getClass().getName()), e));
- }
- }
-
- if (status.matches(IStatus.ERROR)) {
- MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, NLS.bind(Messages.session_commit_error, profile.getProfileId()), null);
- result.merge(status);
- return result;
- }
- return status;
- }
-
- private IStatus rollBackPhase(Phase phase, List<ActionsRecord> actionRecords) {
- MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
- try {
- phase.actionManager = (ActionManager) agent.getService(ActionManager.SERVICE_NAME);
-
- if (!currentPhaseActive)
- phase.prePerform(result, this, new NullProgressMonitor());
-
- for (ListIterator<ActionsRecord> it = actionRecords.listIterator(actionRecords.size()); it.hasPrevious();) {
- ActionsRecord record = it.previous();
- List<ProvisioningAction> reversedActions = new ArrayList<ProvisioningAction>(record.actions);
- Collections.reverse(reversedActions);
- ProvisioningAction[] actions = reversedActions.toArray(new ProvisioningAction[record.actions.size()]);
- try {
- phase.undo(result, this, profile, record.operand, actions, context);
- } catch (RuntimeException e) {
- // "phase.undo" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- result.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_operand_error, phase.getClass().getName(), record.operand), e));
- } catch (LinkageError e) {
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- result.add(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.phase_undo_operand_error, phase.getClass().getName(), record.operand), e));
- }
- }
- phase.postPerform(result, this, new NullProgressMonitor());
- } finally {
- phase.actionManager = null;
- }
- return result;
- }
-
- void recordPhaseEnter(Phase phase) {
- if (phase == null)
- throw new IllegalArgumentException(Messages.null_phase);
-
- if (currentPhase != null)
- throw new IllegalStateException(Messages.phase_started);
-
- currentPhase = phase;
-
- if (DebugHelper.DEBUG_ENGINE_SESSION)
- debugPhaseEnter(phase);
- }
-
- void recordPhaseStart(Phase phase) {
- if (phase == null)
- throw new IllegalArgumentException(Messages.null_phase);
-
- if (currentPhase != phase)
- throw new IllegalArgumentException(Messages.not_current_phase);
-
- currentPhaseActive = true;
- currentActionRecords = new ArrayList<ActionsRecord>();
- }
-
- void recordPhaseEnd(Phase phase) {
- if (currentPhase == null)
- throw new IllegalStateException(Messages.phase_not_started);
-
- if (currentPhase != phase)
- throw new IllegalArgumentException(Messages.not_current_phase);
-
- phaseActionRecordsPairs.add(new Object[] {currentPhase, currentActionRecords});
- currentActionRecords = null;
- currentPhaseActive = false;
- }
-
- void recordPhaseExit(Phase phase) {
- if (currentPhase == null)
- throw new IllegalStateException(Messages.phase_not_started);
-
- if (currentPhase != phase)
- throw new IllegalArgumentException(Messages.not_current_phase);
-
- currentPhase = null;
- if (DebugHelper.DEBUG_ENGINE_SESSION)
- debugPhaseExit(phase);
- }
-
- void recordOperandStart(Operand operand) {
- if (operand == null)
- throw new IllegalArgumentException(Messages.null_operand);
-
- if (currentRecord != null)
- throw new IllegalStateException(Messages.operand_started);
-
- currentRecord = new ActionsRecord(operand);
- currentActionRecords.add(currentRecord);
-
- if (DebugHelper.DEBUG_ENGINE_SESSION)
- debugOperandStart(operand);
- }
-
- void recordOperandEnd(Operand operand) {
- if (currentRecord == null)
- throw new IllegalStateException(Messages.operand_not_started);
-
- if (currentRecord.operand != operand)
- throw new IllegalArgumentException(Messages.not_current_operand);
-
- currentRecord = null;
-
- if (DebugHelper.DEBUG_ENGINE_SESSION)
- debugOperandEnd(operand);
- }
-
- void recordActionExecute(ProvisioningAction action, Map<String, Object> parameters) {
- if (action == null)
- throw new IllegalArgumentException(Messages.null_action);
-
- currentRecord.actions.add(action);
-
- Touchpoint touchpoint = action.getTouchpoint();
- if (touchpoint != null)
- touchpoints.add(touchpoint);
-
- if (DebugHelper.DEBUG_ENGINE_SESSION)
- debugActionExecute(action, parameters);
- }
-
- public void recordActionUndo(ProvisioningAction action, Map<String, Object> parameters) {
- if (DebugHelper.DEBUG_ENGINE_SESSION)
- debugActionUndo(action, parameters);
- }
-
- public String getContextString(Phase phase, Operand operand, ProvisioningAction action) {
- if (action instanceof ParameterizedProvisioningAction) {
- ParameterizedProvisioningAction parameterizedAction = (ParameterizedProvisioningAction) action;
- action = parameterizedAction.getAction();
- }
- String message = NLS.bind(Messages.session_context, new Object[] {profile.getProfileId(), phase.getClass().getName(), operand.toString(), getCurrentActionId()});
- return message;
- }
-
- public String getContextString() {
- String message = NLS.bind(Messages.session_context, new Object[] {profile.getProfileId(), getCurrentPhaseId(), getCurrentOperandId(), getCurrentActionId()});
- return message;
- }
-
- private Object getCurrentActionId() {
- if (currentRecord == null || currentRecord.actions.isEmpty())
- return EMPTY_STRING;
-
- Object currentAction = currentRecord.actions.get(currentRecord.actions.size() - 1);
- if (currentAction instanceof ParameterizedProvisioningAction) {
- ParameterizedProvisioningAction parameterizedAction = (ParameterizedProvisioningAction) currentAction;
- currentAction = parameterizedAction.getAction();
- }
- return currentAction.getClass().getName();
- }
-
- private String getCurrentPhaseId() {
- if (currentPhase == null)
- return EMPTY_STRING;
- return currentPhase.getClass().getName();
- }
-
- private String getCurrentOperandId() {
- if (currentRecord == null)
- return EMPTY_STRING;
- return currentRecord.operand.toString();
- }
-
- private static void debugPhaseEnter(Phase phase) {
- DebugHelper.debug(ENGINE_SESSION, "Entering phase: " + phase.getClass().getName()); //$NON-NLS-1$
- }
-
- private static void debugPhaseExit(Phase phase) {
- DebugHelper.debug(ENGINE_SESSION, "Exiting phase: " + phase.getClass().getName()); //$NON-NLS-1$
- }
-
- private static void debugOperandStart(Operand operand) {
- DebugHelper.debug(ENGINE_SESSION, "Starting processing of operand: " + operand.toString()); //$NON-NLS-1$
- }
-
- private static void debugOperandEnd(Operand operand) {
- DebugHelper.debug(ENGINE_SESSION, "Ending processing of operand: " + operand.toString()); //$NON-NLS-1$
- }
-
- private static void debugActionExecute(ProvisioningAction action, Map<String, Object> parameters) {
- DebugHelper.debug(ENGINE_SESSION, "Executing action: " + DebugHelper.formatAction(action, parameters)); //$NON-NLS-1$
- }
-
- private static void debugActionUndo(ProvisioningAction action, Map<String, Object> parameters) {
- DebugHelper.debug(ENGINE_SESSION, "Undoing action: " + DebugHelper.formatAction(action, parameters)); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ISurrogateProfileHandler.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ISurrogateProfileHandler.java
deleted file mode 100644
index e3c55af08..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ISurrogateProfileHandler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.p2.engine.IProfile;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-/**
- * @since 2.0
- */
-public interface ISurrogateProfileHandler {
-
- public abstract IProfile createProfile(String id);
-
- public abstract boolean isSurrogate(IProfile profile);
-
- public abstract IQueryResult<IInstallableUnit> queryProfile(IProfile profile, IQuery<IInstallableUnit> query, IProgressMonitor monitor);
-
- public abstract boolean updateProfile(IProfile selfProfile);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitEvent.java
deleted file mode 100644
index 2488c5ca3..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitEvent.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.p2.engine.IProfile;
-
-import java.util.EventObject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * @since 2.0
- */
-public class InstallableUnitEvent extends EventObject {
- public static final int UNINSTALL = 0;
- public static final int INSTALL = 1;
- private static final long serialVersionUID = 3318712818811459886L;
-
- private String phaseId;
- private boolean prePhase;
-
- private IProfile profile;
- private IInstallableUnit iu;
- private Touchpoint touchpoint;
- private IStatus result;
- private int type;
-
- public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, IInstallableUnit iu, int type, Touchpoint touchpoint) {
- this(phaseId, prePhase, profile, iu, type, touchpoint, null);
- }
-
- public InstallableUnitEvent(String phaseId, boolean prePhase, IProfile profile, IInstallableUnit iu, int type, Touchpoint touchpoint, IStatus result) {
- super(profile);
- this.phaseId = phaseId;
- this.prePhase = prePhase;
- this.profile = profile;
- this.iu = iu;
- if (type != UNINSTALL && type != INSTALL)
- throw new IllegalArgumentException(Messages.InstallableUnitEvent_type_not_install_or_uninstall);
- this.type = type;
- this.result = result;
- this.touchpoint = touchpoint;
-
- }
-
- public Touchpoint getTouchpoint() {
- return touchpoint;
- }
-
- public IProfile getProfile() {
- return profile;
- }
-
- public IInstallableUnit getInstallableUnit() {
- return iu;
- }
-
- public String getPhase() {
- return phaseId;
- }
-
- public boolean isPre() {
- return prePhase;
- }
-
- public boolean isPost() {
- return !prePhase;
- }
-
- public IStatus getResult() {
- return (result != null ? result : Status.OK_STATUS);
- }
-
- public boolean isInstall() {
- return type == INSTALL;
- }
-
- public boolean isUninstall() {
- return type == UNINSTALL;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java
deleted file mode 100644
index 25fa41b50..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitOperand.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * @since 2.0
- */
-public class InstallableUnitOperand extends Operand {
- private final IInstallableUnit first;
- private final IInstallableUnit second;
-
- /**
- * Creates a new operand that represents replacing an installable unit
- * with another. At least one of the provided installable units must be
- * non-null.
- *
- * @param first The installable unit being removed, or <code>null</code>
- * @param second The installable unit being added, or <code>null</code>
- */
- public InstallableUnitOperand(IInstallableUnit first, IInstallableUnit second) {
- //the operand must have at least one non-null units
- Assert.isTrue(first != null || second != null);
- this.first = first;
- this.second = second;
- }
-
- public IInstallableUnit first() {
- return first;
- }
-
- public IInstallableUnit second() {
- return second;
- }
-
- public String toString() {
- return first + " --> " + second; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java
deleted file mode 100644
index 3cdb6a7e1..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPhase.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.equinox.p2.metadata.*;
-
-public abstract class InstallableUnitPhase extends Phase {
- public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
- public static final String PARM_IU = "iu"; //$NON-NLS-1$
- public static final String PARM_INSTALL_FOLDER = "installFolder"; //$NON-NLS-1$
-
- protected InstallableUnitPhase(String phaseId, int weight, boolean forced) {
- super(phaseId, weight, forced);
- }
-
- protected InstallableUnitPhase(String phaseId, int weight) {
- this(phaseId, weight, false);
- }
-
- protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- parameters.put(PARM_INSTALL_FOLDER, profile.getProperty(IProfile.PROP_INSTALL_FOLDER));
- return super.initializePhase(monitor, profile, parameters);
- }
-
- protected IStatus initializeOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
- MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
- mergeStatus(status, initializeOperand(profile, iuOperand, parameters, monitor));
- IInstallableUnit unit = (IInstallableUnit) parameters.get(PARM_IU);
- if (unit != null) {
- Touchpoint touchpoint = getActionManager().getTouchpointPoint(unit.getTouchpointType());
- if (touchpoint != null) {
- parameters.put(PARM_TOUCHPOINT, touchpoint);
- }
- }
- mergeStatus(status, super.initializeOperand(profile, operand, parameters, monitor));
- return status;
- }
-
- protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- return Status.OK_STATUS;
- }
-
- protected IStatus completeOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
-
- MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
- mergeStatus(status, super.completeOperand(profile, iuOperand, parameters, monitor));
- mergeStatus(status, completeOperand(profile, iuOperand, parameters, monitor));
- return status;
- }
-
- protected IStatus completeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- return Status.OK_STATUS;
- }
-
- final protected List<ProvisioningAction> getActions(Operand operand) {
- if (!(operand instanceof InstallableUnitOperand))
- return null;
-
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
- return getActions(iuOperand);
- }
-
- protected abstract List<ProvisioningAction> getActions(InstallableUnitOperand operand);
-
- final public boolean isApplicable(Operand operand) {
- if (!(operand instanceof InstallableUnitOperand))
- return false;
-
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
- return isApplicable(iuOperand);
- }
-
- protected boolean isApplicable(InstallableUnitOperand operand) {
- return true;
- }
-
- protected final List<ProvisioningAction> getActions(IInstallableUnit unit, String key) {
- List<ITouchpointInstruction> instructions = getInstructions(unit, key);
- int instrSize = instructions.size();
- if (instrSize == 0)
- return null;
-
- List<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
- InstructionParser instructionParser = new InstructionParser(getActionManager());
- for (int i = 0; i < instrSize; i++) {
- actions.addAll(instructionParser.parseActions(instructions.get(i), unit.getTouchpointType()));
- }
- return actions;
- }
-
- private final static List<ITouchpointInstruction> getInstructions(IInstallableUnit unit, String key) {
- Collection<ITouchpointData> data = unit.getTouchpointData();
- int dataSize = data.size();
- if (dataSize == 0)
- return CollectionUtils.emptyList();
-
- ArrayList<ITouchpointInstruction> matches = new ArrayList<ITouchpointInstruction>(dataSize);
- for (ITouchpointData td : data) {
- ITouchpointInstruction instructions = td.getInstruction(key);
- if (instructions != null)
- matches.add(instructions);
- }
- return matches;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java
deleted file mode 100644
index 39d1bb5c4..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstallableUnitPropertyOperand.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * @since 2.0
- */
-public class InstallableUnitPropertyOperand extends PropertyOperand {
- private final IInstallableUnit iu;
-
- /**
- * Creates a new operand that represents replacing a property value associated
- * with an IU with another. At least one of the provided property values must be
- * non-null.
- *
- * @param iu The IInstallableUnit with which the property is associated
- * @param key The key of the property being modified
- * @param first The property value being removed, or <code>null</code>
- * @param second The property value being added, or <code>null</code>
- */
- public InstallableUnitPropertyOperand(IInstallableUnit iu, String key, Object first, Object second) {
- super(key, first, second);
- //the iu must be specified.
- Assert.isTrue(iu != null);
- this.iu = iu;
- }
-
- public IInstallableUnit getInstallableUnit() {
- return iu;
- }
-
- public String toString() {
- return "[IInstallableUnit property for " + iu.toString() + "] " + super.toString(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java
deleted file mode 100644
index ae44c39b6..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/InstructionParser.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.*;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.osgi.util.NLS;
-
-public class InstructionParser {
-
- public class ActionEntry {
-
- protected final VersionRange versionRange;
- protected final String actionId;
-
- public ActionEntry(String actionId, VersionRange versionRange) {
- this.actionId = actionId;
- this.versionRange = versionRange;
- }
- }
-
- private static final String VERSION_EQUALS = "version="; //$NON-NLS-1$
- private ActionManager actionManager;
-
- public InstructionParser(ActionManager actionManager) {
- Assert.isNotNull(actionManager);
- this.actionManager = actionManager;
- }
-
- public List<ProvisioningAction> parseActions(ITouchpointInstruction instruction, ITouchpointType touchpointType) {
- List<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
- Map<String, ActionEntry> importMap = parseImportAttribute(instruction.getImportAttribute());
- StringTokenizer tokenizer = new StringTokenizer(instruction.getBody(), ";"); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- actions.add(parseAction(tokenizer.nextToken(), importMap, touchpointType));
- }
- return actions;
- }
-
- private Map<String, ActionEntry> parseImportAttribute(String importAttribute) {
- if (importAttribute == null)
- return CollectionUtils.emptyMap();
-
- Map<String, ActionEntry> result = new HashMap<String, ActionEntry>();
- StringTokenizer tokenizer = new StringTokenizer(importAttribute, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- StringTokenizer actionTokenizer = new StringTokenizer(tokenizer.nextToken(), ";"); //$NON-NLS-1$
- String actionId = actionTokenizer.nextToken().trim();
- int lastDot = actionId.lastIndexOf('.');
- String actionKey = (lastDot == -1) ? actionId : actionId.substring(lastDot + 1);
- VersionRange actionVersionRange = null;
- while (actionTokenizer.hasMoreTokens()) {
- String actionAttribute = actionTokenizer.nextToken().trim();
- if (actionAttribute.startsWith(VERSION_EQUALS))
- actionVersionRange = new VersionRange(actionAttribute.substring(VERSION_EQUALS.length() + 1));
- }
- result.put(actionKey, new ActionEntry(actionId, actionVersionRange));
- result.put(actionId, new ActionEntry(actionId, actionVersionRange));
- }
- return result;
- }
-
- private ProvisioningAction parseAction(String statement, Map<String, ActionEntry> qualifier, ITouchpointType touchpointType) {
- int openBracket = statement.indexOf('(');
- int closeBracket = statement.lastIndexOf(')');
- if (openBracket == -1 || closeBracket == -1 || openBracket > closeBracket)
- throw new IllegalArgumentException(NLS.bind(Messages.action_syntax_error, statement));
- String actionName = statement.substring(0, openBracket).trim();
- ProvisioningAction action = lookupAction(actionName, qualifier, touchpointType);
- if (action instanceof MissingAction)
- return action;
-
- String nameValuePairs = statement.substring(openBracket + 1, closeBracket);
- if (nameValuePairs.length() == 0)
- return new ParameterizedProvisioningAction(action, CollectionUtils.<String, String> emptyMap(), statement);
-
- StringTokenizer tokenizer = new StringTokenizer(nameValuePairs, ","); //$NON-NLS-1$
- Map<String, String> parameters = new HashMap<String, String>();
- while (tokenizer.hasMoreTokens()) {
- String nameValuePair = tokenizer.nextToken();
- int colonIndex = nameValuePair.indexOf(":"); //$NON-NLS-1$
- if (colonIndex == -1)
- throw new IllegalArgumentException(NLS.bind(Messages.action_syntax_error, statement));
- String name = nameValuePair.substring(0, colonIndex).trim();
- String value = nameValuePair.substring(colonIndex + 1).trim();
- parameters.put(name, value);
- }
- return new ParameterizedProvisioningAction(action, parameters, statement);
- }
-
- private ProvisioningAction lookupAction(String actionId, Map<String, ActionEntry> importMap, ITouchpointType touchpointType) {
- VersionRange versionRange = null;
- ActionEntry actionEntry = importMap.get(actionId);
- if (actionEntry != null) {
- actionId = actionEntry.actionId;
- versionRange = actionEntry.versionRange;
- }
-
- actionId = actionManager.getTouchpointQualifiedActionId(actionId, touchpointType);
- ProvisioningAction action = actionManager.getAction(actionId, versionRange);
- if (action == null)
- action = new MissingAction(actionId, versionRange);
-
- return action;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java
deleted file mode 100644
index 94b91b9c9..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Messages.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- public static String action_not_found;
-
- public static String action_syntax_error;
- public static String action_undo_error;
-
- public static String ActionManager_Exception_Creating_Action_Extension;
- public static String ActionManager_Required_Touchpoint_Not_Found;
-
- public static String actions_not_found;
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.engine.messages"; //$NON-NLS-1$
-
- public static String CertificateChecker_CertificateError;
- public static String CertificateChecker_CertificateRejected;
- public static String CertificateChecker_KeystoreConnectionError;
-
- public static String CertificateChecker_SignedContentError;
- public static String CertificateChecker_SignedContentIOError;
- public static String CertificateChecker_UnsignedNotAllowed;
-
- public static String committing;
- public static String download_artifact;
- public static String download_no_repository;
- public static String Engine_Operation_Canceled_By_User;
- public static String error_parsing_profile;
- public static String error_persisting_profile;
- public static String forced_action_execute_error;
- public static String InstallableUnitEvent_type_not_install_or_uninstall;
- public static String io_FailedRead;
- public static String io_NotFound;
- public static String not_current_operand;
- public static String not_current_phase;
- public static String null_action;
-
- public static String null_operand;
- public static String null_operands;
- public static String null_phase;
- public static String null_phases;
- public static String null_phaseset;
- public static String null_profile;
- public static String operand_not_started;
-
- public static String operand_started;
-
- public static String ParameterizedProvisioningAction_action_or_parameters_null;
- public static String phase_error;
- public static String phase_not_started;
- public static String phase_started;
- public static String phase_undo_error;
- public static String phase_undo_operand_error;
-
- public static String Phase_Collect_Error;
- public static String Phase_Install_Error;
- public static String Phase_Configure_Error;
- public static String Phase_Configure_Task;
- public static String Phase_Install_Task;
- public static String Phase_Sizing_Error;
- public static String Phase_Sizing_Warning;
- public static String Phase_Unconfigure_Error;
- public static String Phase_Uninstall_Error;
-
- public static String phaseid_not_positive;
- public static String phaseid_not_set;
- public static String preparing;
- public static String profile_does_not_exist;
- public static String Profile_Duplicate_Root_Profile_Id;
- public static String profile_lock_not_reentrant;
- public static String profile_not_current;
- public static String profile_changed;
- public static String profile_not_registered;
- public static String Profile_Null_Profile_Id;
- public static String Profile_Parent_Not_Found;
- public static String ProfilePreferences_saving;
- public static String reg_dir_not_available;
- public static String rollingback_cancel;
- public static String rollingback_error;
- public static String session_commit_error;
- public static String session_context;
- public static String session_prepare_error;
- public static String shared_profile_not_found;
- public static String Shared_Profile;
-
- public static String SimpleProfileRegistry_Bad_profile_location;
- public static String SimpleProfileRegistry_CannotRemoveCurrentSnapshot;
- public static String SimpleProfileRegistry_Parser_Error_Parsing_Registry;
- public static String SimpleProfileRegistry_Parser_Has_Incompatible_Version;
- public static String SimpleProfileRegistry_Profile_in_use;
- public static String SimpleProfileRegistry_Profile_not_locked;
- public static String SimpleProfileRegistry_Profile_not_locked_due_to_exception;
-
- public static String thread_not_owner;
- public static String touchpoint_commit_error;
- public static String touchpoint_prepare_error;
- public static String touchpoint_rollback_error;
-
- public static String TouchpointManager_Attribute_Not_Specified;
- public static String TouchpointManager_Conflicting_Touchpoint_Types;
- public static String TouchpointManager_Exception_Creating_Touchpoint_Extension;
- public static String TouchpointManager_Incorrectly_Named_Extension;
- public static String TouchpointManager_Null_Creating_Touchpoint_Extension;
- public static String TouchpointManager_Null_Touchpoint_Type_Argument;
-
- static {
- // initialize resource bundles
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingAction.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingAction.java
deleted file mode 100644
index 2df1952f6..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @since 2.0
- */
-public class MissingAction extends ProvisioningAction {
-
- private String actionId;
- private VersionRange versionRange;
-
- public MissingAction(String actionId, VersionRange versionRange) {
- this.actionId = actionId;
- this.versionRange = versionRange;
- }
-
- public String getActionId() {
- return actionId;
- }
-
- public VersionRange getVersionRange() {
- return versionRange;
- }
-
- public IStatus execute(Map<String, Object> parameters) {
- throw new IllegalArgumentException(NLS.bind(Messages.action_not_found, actionId + (versionRange == null ? "" : "/" + versionRange.toString()))); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- // do nothing as we want this action to undo successfully
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingActionsException.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingActionsException.java
deleted file mode 100644
index a8ecbd5ac..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/MissingActionsException.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @since 2.0
- */
-public class MissingActionsException extends ProvisionException {
-
- private static final long serialVersionUID = 8617693596359747490L;
- private final MissingAction[] missingActions;
-
- public MissingActionsException(MissingAction[] missingActions) {
- super(getMissingActionsMessage(missingActions));
- this.missingActions = missingActions;
- }
-
- private static String getMissingActionsMessage(MissingAction[] missingActions) {
-
- if (missingActions.length == 0)
- throw new IllegalArgumentException("Bad exception: No missing actions"); //$NON-NLS-1$
-
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < missingActions.length; i++) {
- MissingAction missingAction = missingActions[i];
- buffer.append(missingAction.getActionId());
- if (missingAction.getVersionRange() != null) {
- buffer.append("/"); //$NON-NLS-1$
- buffer.append(missingAction.getVersionRange().toString());
- }
- if (i + 1 != missingActions.length)
- buffer.append(", "); //$NON-NLS-1$
- }
-
- return NLS.bind(Messages.actions_not_found, buffer.toString());
- }
-
- public MissingAction[] getMissingActions() {
- return missingActions;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java
deleted file mode 100644
index 1d0d5a18a..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Operand.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-
-/**
- * The common base class for engine operands.
- *
- * @since 2.0
- */
-public class Operand {
- // marker class
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java
deleted file mode 100644
index 0b73128fa..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ParameterizedProvisioningAction.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-
-public class ParameterizedProvisioningAction extends ProvisioningAction {
-
- private ProvisioningAction action;
- private Map<String, String> actionParameters;
- private String actionText;
-
- public ParameterizedProvisioningAction(ProvisioningAction action, Map<String, String> actionParameters, String actionText) {
- if (action == null || actionParameters == null)
- throw new IllegalArgumentException(Messages.ParameterizedProvisioningAction_action_or_parameters_null);
- this.action = action;
- this.actionParameters = actionParameters;
- this.actionText = actionText;
- }
-
- public IStatus execute(Map<String, Object> parameters) {
- parameters = processActionParameters(parameters);
- return action.execute(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- parameters = processActionParameters(parameters);
- return action.undo(parameters);
- }
-
- private Map<String, Object> processActionParameters(Map<String, Object> parameters) {
- Map<String, Object> result = new HashMap<String, Object>(parameters);
- for (Entry<String, String> entry : actionParameters.entrySet()) {
- String name = entry.getKey();
- String value = processVariables(entry.getValue(), parameters);
- result.put(name, value);
- }
- return Collections.unmodifiableMap(result);
- }
-
- private String processVariables(String parameterValue, Map<String, Object> parameters) {
-
- int variableBeginIndex = parameterValue.indexOf("${"); //$NON-NLS-1$
- if (variableBeginIndex == -1)
- return parameterValue;
-
- int variableEndIndex = parameterValue.indexOf('}', variableBeginIndex + 2);
- if (variableEndIndex == -1)
- return parameterValue;
-
- String preVariable = parameterValue.substring(0, variableBeginIndex);
- String variableName = parameterValue.substring(variableBeginIndex + 2, variableEndIndex);
- Object value = parameters.get(variableName);
-
- // try to replace this parameter with a character
- if (value == null && variableName.charAt(0) == '#') {
- try {
- int code = Integer.parseInt(variableName.substring(1));
- if (code >= 0 && code < 65536)
- value = Character.toString((char) code);
- } catch (Throwable t) {
- // ignore and leave value as null
- }
- }
-
- String variableValue = value == null ? "" : value.toString(); //$NON-NLS-1$
- String postVariable = processVariables(parameterValue.substring(variableEndIndex + 1), parameters);
- return preVariable + variableValue + postVariable;
- }
-
- public ProvisioningAction getAction() {
- return action;
- }
-
- public Map<String, String> getParameters() {
- return actionParameters;
- }
-
- public String getActionText() {
- return actionText;
- }
-
- public Touchpoint getTouchpoint() {
- return action.getTouchpoint();
- }
-
- public void setTouchpoint(Touchpoint touchpoint) {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java
deleted file mode 100644
index 99046dad5..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Phase.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.osgi.util.NLS;
-
-public abstract class Phase {
- protected static final String PARM_OPERAND = "operand"; //$NON-NLS-1$
- protected static final String PARM_PHASE_ID = "phaseId"; //$NON-NLS-1$
- protected static final String PARM_PROFILE = "profile"; //$NON-NLS-1$
- protected static final String PARM_PROFILE_DATA_DIRECTORY = "profileDataDirectory"; //$NON-NLS-1$
- protected static final String PARM_CONTEXT = "context"; //$NON-NLS-1$
- /**
- * Internal property.
- */
- protected static final String PARM_AGENT = "agent"; //$NON-NLS-1$
- protected static final String PARM_FORCED = "forced"; //$NON-NLS-1$
- protected static final String PARM_TOUCHPOINT = "touchpoint"; //$NON-NLS-1$
-
- protected final String phaseId;
- protected final int weight;
- protected final boolean forced;
- protected int prePerformWork = 1000;
- protected int mainPerformWork = 10000;
- protected int postPerformWork = 1000;
- private Map<String, Object> operandParameters = null;
- private Map<String, Object> phaseParameters = new HashMap<String, Object>();
- private Map<Touchpoint, Map<String, Object>> touchpointToTouchpointPhaseParameters = new HashMap<Touchpoint, Map<String, Object>>();
- private Map<Touchpoint, Map<String, Object>> touchpointToTouchpointOperandParameters = new HashMap<Touchpoint, Map<String, Object>>();
- ActionManager actionManager; // injected from phaseset
-
- protected Phase(String phaseId, int weight, boolean forced) {
- if (phaseId == null || phaseId.length() == 0)
- throw new IllegalArgumentException(Messages.phaseid_not_set);
- if (weight <= 0)
- throw new IllegalArgumentException(Messages.phaseid_not_positive);
- this.weight = weight;
- this.phaseId = phaseId;
- this.forced = forced;
- }
-
- protected Phase(String phaseId, int weight) {
- this(phaseId, weight, false);
- }
-
- final protected ActionManager getActionManager() {
- return actionManager;
- }
-
- public String toString() {
- return getClass().getName() + " - " + this.weight; //$NON-NLS-1$
- }
-
- void perform(MultiStatus status, EngineSession session, Operand[] operands, IProgressMonitor monitor) {
- SubMonitor subMonitor = SubMonitor.convert(monitor, prePerformWork + mainPerformWork + postPerformWork);
- session.recordPhaseEnter(this);
- prePerform(status, session, subMonitor.newChild(prePerformWork));
- if (status.matches(IStatus.ERROR | IStatus.CANCEL))
- return;
- session.recordPhaseStart(this);
-
- subMonitor.setWorkRemaining(mainPerformWork + postPerformWork);
- mainPerform(status, session, operands, subMonitor.newChild(mainPerformWork));
- if (status.matches(IStatus.ERROR | IStatus.CANCEL))
- return;
-
- session.recordPhaseEnd(this);
- subMonitor.setWorkRemaining(postPerformWork);
- postPerform(status, session, subMonitor.newChild(postPerformWork));
- phaseParameters.clear();
- if (status.matches(IStatus.ERROR | IStatus.CANCEL))
- return;
- session.recordPhaseExit(this);
- subMonitor.done();
- }
-
- void prePerform(MultiStatus status, EngineSession session, IProgressMonitor monitor) {
- IProfile profile = session.getProfile();
- phaseParameters.put(PARM_PROFILE, profile);
- phaseParameters.put(PARM_PROFILE_DATA_DIRECTORY, session.getProfileDataDirectory());
- phaseParameters.put(PARM_CONTEXT, session.getProvisioningContext());
- phaseParameters.put(PARM_PHASE_ID, phaseId);
- phaseParameters.put(PARM_FORCED, Boolean.toString(forced));
- phaseParameters.put(PARM_AGENT, session.getAgent());
- mergeStatus(status, initializePhase(monitor, profile, phaseParameters));
- }
-
- private void mainPerform(MultiStatus status, EngineSession session, Operand[] operands, SubMonitor subMonitor) {
- IProfile profile = session.getProfile();
- subMonitor.beginTask(null, operands.length);
- for (int i = 0; i < operands.length; i++) {
- subMonitor.setWorkRemaining(operands.length - i);
- if (subMonitor.isCanceled())
- throw new OperationCanceledException();
- Operand operand = operands[i];
- if (!isApplicable(operand))
- continue;
-
- session.recordOperandStart(operand);
- List<ProvisioningAction> actions = getActions(operand);
- operandParameters = new HashMap<String, Object>(phaseParameters);
- operandParameters.put(PARM_OPERAND, operand);
- mergeStatus(status, initializeOperand(profile, operand, operandParameters, subMonitor));
- if (status.matches(IStatus.ERROR | IStatus.CANCEL)) {
- operandParameters = null;
- return;
- }
-
- Touchpoint operandTouchpoint = (Touchpoint) operandParameters.get(PARM_TOUCHPOINT);
- if (operandTouchpoint != null) {
- mergeStatus(status, initializeTouchpointParameters(profile, operand, operandTouchpoint, subMonitor));
- if (status.matches(IStatus.ERROR | IStatus.CANCEL))
- return;
-
- operandParameters = touchpointToTouchpointOperandParameters.get(operandTouchpoint);
- }
-
- operandParameters = Collections.unmodifiableMap(operandParameters);
- if (actions != null) {
- for (int j = 0; j < actions.size(); j++) {
- ProvisioningAction action = actions.get(j);
- Map<String, Object> parameters = operandParameters;
- Touchpoint touchpoint = action.getTouchpoint();
- if (touchpoint != null) {
- mergeStatus(status, initializeTouchpointParameters(profile, operand, touchpoint, subMonitor));
- if (status.matches(IStatus.ERROR | IStatus.CANCEL))
- return;
-
- parameters = touchpointToTouchpointOperandParameters.get(touchpoint);
- }
- IStatus actionStatus = null;
- try {
- session.recordActionExecute(action, parameters);
- actionStatus = action.execute(parameters);
- } catch (RuntimeException e) {
- if (!forced)
- throw e;
- // "action.execute" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.forced_action_execute_error, action.getClass().getName()), e);
- } catch (LinkageError e) {
- if (!forced)
- throw e;
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.forced_action_execute_error, action.getClass().getName()), e);
- }
- if (forced && actionStatus != null && actionStatus.matches(IStatus.ERROR)) {
- MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, getProblemMessage(), null);
- result.add(new Status(IStatus.ERROR, EngineActivator.ID, session.getContextString(this, operand, action), null));
- LogHelper.log(result);
- actionStatus = Status.OK_STATUS;
- }
- mergeStatus(status, actionStatus);
- if (status.matches(IStatus.ERROR | IStatus.CANCEL))
- return;
- }
- }
- mergeStatus(status, touchpointCompleteOperand(profile, operand, operandParameters, subMonitor));
- mergeStatus(status, completeOperand(profile, operand, operandParameters, subMonitor));
- if (status.matches(IStatus.ERROR | IStatus.CANCEL))
- return;
- operandParameters = null;
- session.recordOperandEnd(operand);
- subMonitor.worked(1);
- }
- }
-
- private IStatus initializeTouchpointParameters(IProfile profile, Operand operand, Touchpoint touchpoint, IProgressMonitor monitor) {
- if (touchpointToTouchpointOperandParameters.containsKey(touchpoint))
- return Status.OK_STATUS;
-
- Map<String, Object> touchpointPhaseParameters = touchpointToTouchpointPhaseParameters.get(touchpoint);
- if (touchpointPhaseParameters == null) {
- touchpointPhaseParameters = new HashMap<String, Object>(phaseParameters);
- IStatus status = touchpoint.initializePhase(monitor, profile, phaseId, touchpointPhaseParameters);
- if (status != null && status.matches(IStatus.ERROR | IStatus.CANCEL))
- return status;
- touchpointToTouchpointPhaseParameters.put(touchpoint, touchpointPhaseParameters);
- }
-
- Map<String, Object> touchpointOperandParameters = new HashMap<String, Object>(touchpointPhaseParameters);
- touchpointOperandParameters.putAll(operandParameters);
- IStatus status = touchpoint.initializeOperand(profile, touchpointOperandParameters);
- if (status != null && status.matches(IStatus.ERROR | IStatus.CANCEL))
- return status;
- touchpointToTouchpointOperandParameters.put(touchpoint, touchpointOperandParameters);
- return Status.OK_STATUS;
- }
-
- /**
- * Merges a given IStatus into a MultiStatus
- */
- protected static void mergeStatus(MultiStatus multi, IStatus status) {
- if (status != null && !status.isOK())
- multi.merge(status);
- }
-
- void postPerform(MultiStatus status, EngineSession session, IProgressMonitor monitor) {
- IProfile profile = session.getProfile();
- mergeStatus(status, touchpointCompletePhase(monitor, profile, phaseParameters));
- mergeStatus(status, completePhase(monitor, profile, phaseParameters));
- }
-
- void undo(MultiStatus status, EngineSession session, IProfile profile, Operand operand, ProvisioningAction[] actions, ProvisioningContext context) {
- if (operandParameters == null) {
- operandParameters = new HashMap<String, Object>(phaseParameters);
- operandParameters.put(PARM_OPERAND, operand);
- mergeStatus(status, initializeOperand(profile, operand, operandParameters, new NullProgressMonitor()));
- Touchpoint operandTouchpoint = (Touchpoint) operandParameters.get(PARM_TOUCHPOINT);
- if (operandTouchpoint != null) {
- mergeStatus(status, initializeTouchpointParameters(profile, operand, operandTouchpoint, new NullProgressMonitor()));
- if (status.matches(IStatus.ERROR | IStatus.CANCEL))
- return;
-
- operandParameters = touchpointToTouchpointOperandParameters.get(operandTouchpoint);
- }
- operandParameters = Collections.unmodifiableMap(operandParameters);
- }
- for (int j = 0; j < actions.length; j++) {
- ProvisioningAction action = actions[j];
- Map<String, Object> parameters = operandParameters;
- Touchpoint touchpoint = action.getTouchpoint();
- if (touchpoint != null) {
- mergeStatus(status, initializeTouchpointParameters(profile, operand, touchpoint, new NullProgressMonitor()));
- if (status.matches(IStatus.ERROR))
- return;
-
- parameters = touchpointToTouchpointOperandParameters.get(touchpoint);
- }
- IStatus actionStatus = null;
- try {
- session.recordActionUndo(action, parameters);
- actionStatus = action.undo(parameters);
- } catch (RuntimeException e) {
- // "action.undo" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.action_undo_error, action.getClass().getName()), e);
- } catch (LinkageError e) {
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- actionStatus = new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.action_undo_error, action.getClass().getName()), e);
- }
- if (actionStatus != null && actionStatus.matches(IStatus.ERROR)) {
- MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, getProblemMessage(), null);
- result.add(new Status(IStatus.ERROR, EngineActivator.ID, session.getContextString(this, operand, action), null));
- result.merge(actionStatus);
- }
- }
- mergeStatus(status, touchpointCompleteOperand(profile, operand, operandParameters, new NullProgressMonitor()));
- mergeStatus(status, completeOperand(profile, operand, operandParameters, new NullProgressMonitor()));
- operandParameters = null;
- }
-
- public boolean isApplicable(Operand operand) {
- return true;
- }
-
- protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- return Status.OK_STATUS;
- }
-
- protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- return Status.OK_STATUS;
- }
-
- IStatus touchpointCompletePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- if (touchpointToTouchpointPhaseParameters.isEmpty())
- return Status.OK_STATUS;
-
- MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
- for (Map.Entry<Touchpoint, Map<String, Object>> entry : touchpointToTouchpointPhaseParameters.entrySet()) {
- Touchpoint touchpoint = entry.getKey();
- Map<String, Object> touchpointParameters = entry.getValue();
- mergeStatus(status, touchpoint.completePhase(monitor, profile, phaseId, touchpointParameters));
- }
- touchpointToTouchpointPhaseParameters.clear();
- return status;
- }
-
- protected IStatus completeOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- return Status.OK_STATUS;
- }
-
- IStatus touchpointCompleteOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- if (touchpointToTouchpointOperandParameters.isEmpty())
- return Status.OK_STATUS;
-
- MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
- for (Map.Entry<Touchpoint, Map<String, Object>> entry : touchpointToTouchpointOperandParameters.entrySet()) {
- Touchpoint touchpoint = entry.getKey();
- Map<String, Object> touchpointParameters = entry.getValue();
- mergeStatus(status, touchpoint.completeOperand(profile, touchpointParameters));
- }
- touchpointToTouchpointOperandParameters.clear();
- return status;
- }
-
- protected IStatus initializeOperand(IProfile profile, Operand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- return Status.OK_STATUS;
- }
-
- protected abstract List<ProvisioningAction> getActions(Operand operand);
-
- /**
- * Returns a human-readable message to be displayed in case of an error performing
- * this phase. Subclasses should override.
- */
- protected String getProblemMessage() {
- return NLS.bind(Messages.phase_error, getClass().getName());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PhaseSet.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PhaseSet.java
deleted file mode 100644
index 0f7ec63aa..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PhaseSet.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class PhaseSet implements IPhaseSet {
-
- private final Phase[] phases;
-
- public PhaseSet(Phase[] phases) {
- if (phases == null)
- throw new IllegalArgumentException(Messages.null_phases);
-
- this.phases = phases;
- }
-
- public final MultiStatus perform(EngineSession session, Operand[] operands, IProgressMonitor monitor) {
- MultiStatus status = new MultiStatus(EngineActivator.ID, IStatus.OK, null, null);
- int[] weights = getProgressWeights(operands);
- int totalWork = getTotalWork(weights);
- SubMonitor pm = SubMonitor.convert(monitor, totalWork);
- try {
- for (int i = 0; i < phases.length; i++) {
- if (pm.isCanceled()) {
- status.add(Status.CANCEL_STATUS);
- return status;
- }
- Phase phase = phases[i];
- phase.actionManager = (ActionManager) session.getAgent().getService(ActionManager.SERVICE_NAME);
- try {
- phase.perform(status, session, operands, pm.newChild(weights[i]));
- } catch (OperationCanceledException e) {
- // propagate operation cancellation
- status.add(new Status(IStatus.CANCEL, EngineActivator.ID, e.getMessage(), e));
- } catch (RuntimeException e) {
- // "perform" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage(), e));
- } catch (LinkageError e) {
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- status.add(new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage(), e));
- } finally {
- phase.actionManager = null;
- }
- if (status.matches(IStatus.CANCEL)) {
- MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.CANCEL, Messages.Engine_Operation_Canceled_By_User, null);
- result.merge(status);
- return result;
- } else if (status.matches(IStatus.ERROR)) {
- MultiStatus result = new MultiStatus(EngineActivator.ID, IStatus.ERROR, phase.getProblemMessage(), null);
- result.add(new Status(IStatus.ERROR, EngineActivator.ID, session.getContextString(), null));
- result.merge(status);
- return result;
- }
- }
- } finally {
- pm.done();
- }
- return status;
- }
-
- public final IStatus validate(ActionManager actionManager, IProfile profile, Operand[] operands, ProvisioningContext context, IProgressMonitor monitor) {
- Set<MissingAction> missingActions = new HashSet<MissingAction>();
- for (int i = 0; i < phases.length; i++) {
- Phase phase = phases[i];
- phase.actionManager = actionManager;
- try {
- for (int j = 0; j < operands.length; j++) {
- Operand operand = operands[j];
- try {
- if (!phase.isApplicable(operand))
- continue;
-
- List<ProvisioningAction> actions = phase.getActions(operand);
- if (actions == null)
- continue;
- for (int k = 0; k < actions.size(); k++) {
- ProvisioningAction action = actions.get(k);
- if (action instanceof MissingAction)
- missingActions.add((MissingAction) action);
- }
- } catch (RuntimeException e) {
- // "perform" calls user code and might throw an unchecked exception
- // we catch the error here to gather information on where the problem occurred.
- return new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage() + " " + getContextString(profile, phase, operand), e); //$NON-NLS-1$
- } catch (LinkageError e) {
- // Catch linkage errors as these are generally recoverable but let other Errors propagate (see bug 222001)
- return new Status(IStatus.ERROR, EngineActivator.ID, e.getMessage() + " " + getContextString(profile, phase, operand), e); //$NON-NLS-1$
- }
- }
- } finally {
- phase.actionManager = null;
- }
- }
- if (!missingActions.isEmpty()) {
- MissingAction[] missingActionsArray = missingActions.toArray(new MissingAction[missingActions.size()]);
- MissingActionsException exception = new MissingActionsException(missingActionsArray);
- return (new Status(IStatus.ERROR, EngineActivator.ID, exception.getMessage(), exception));
- }
- return Status.OK_STATUS;
- }
-
- private String getContextString(IProfile profile, Phase phase, Operand operand) {
- return NLS.bind(Messages.session_context, new Object[] {profile.getProfileId(), phase.getClass().getName(), operand.toString(), ""}); //$NON-NLS-1$
- }
-
- private int getTotalWork(int[] weights) {
- int sum = 0;
- for (int i = 0; i < weights.length; i++)
- sum += weights[i];
- return sum;
- }
-
- private int[] getProgressWeights(Operand[] operands) {
- int[] weights = new int[phases.length];
- for (int i = 0; i < phases.length; i += 1) {
- if (operands.length > 0)
- //alter weights according to the number of operands applicable to that phase
- weights[i] = (phases[i].weight * countApplicable(phases[i], operands) / operands.length);
- else
- weights[i] = phases[i].weight;
- }
- return weights;
- }
-
- private int countApplicable(Phase phase, Operand[] operands) {
- int count = 0;
- for (int i = 0; i < operands.length; i++) {
- if (phase.isApplicable(operands[i]))
- count++;
- }
- return count;
- }
-
- public String[] getPhaseIds() {
- String[] ids = new String[phases.length];
- for (int i = 0; i < ids.length; i++) {
- ids[i] = phases[i].phaseId;
- }
- return ids;
- }
-
- public Phase[] getPhases() {
- return phases;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java
deleted file mode 100644
index a5c19951f..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/Profile.java
+++ /dev/null
@@ -1,428 +0,0 @@
-/*******************************************************************************
- * 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
- * Cloudsmith Inc. - query indexes
- *
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.p2.metadata.index.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.osgi.util.NLS;
-
-public class Profile extends IndexProvider<IInstallableUnit> implements IProfile {
-
- /**
- * An index that limits the candidates to those units that has profile properties
- */
- class ProfilePropertyIndex implements IIndex<IInstallableUnit> {
- public Iterator<IInstallableUnit> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- return iuProperties.keySet().iterator();
- }
- }
-
- private final IProvisioningAgent agent;
- //Internal id of the profile
- private final String profileId;
-
- private Profile parentProfile;
-
- private IIndex<IInstallableUnit> idIndex;
-
- private IIndex<IInstallableUnit> propertiesIndex;
-
- private IIndex<IInstallableUnit> capabilityIndex;
-
- private TranslationSupport translationSupport;
-
- /**
- * A collection of child profiles.
- */
- private List<String> subProfileIds; // child profile ids
-
- /**
- * This storage is to be used by the touchpoints to store data.
- */
- private OrderedProperties storage = new OrderedProperties();
-
- private IUMap ius = new IUMap();
- final Map<IInstallableUnit, OrderedProperties> iuProperties = new HashMap<IInstallableUnit, OrderedProperties>();
- private boolean changed = false;
-
- private long timestamp;
- private ISurrogateProfileHandler surrogateProfileHandler;
-
- public Profile(IProvisioningAgent agent, String profileId, Profile parent, Map<String, String> properties) {
- this.agent = agent;
- if (profileId == null || profileId.length() == 0) {
- throw new IllegalArgumentException(NLS.bind(Messages.Profile_Null_Profile_Id, null));
- }
- this.profileId = profileId;
- setParent(parent);
- if (properties != null)
- storage.putAll(properties);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getProfileId()
- */
- public String getProfileId() {
- return profileId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getParentProfile()
- */
- public IProfile getParentProfile() {
- return parentProfile;
- }
-
- public void setParent(Profile profile) {
- if (profile == parentProfile)
- return;
-
- if (parentProfile != null)
- parentProfile.removeSubProfile(profileId);
-
- parentProfile = profile;
- if (parentProfile != null)
- parentProfile.addSubProfile(profileId);
- }
-
- /*
- * A profile is a root profile if it is not a sub-profile
- * of another profile.
- */
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#isRootProfile()
- */
- public boolean isRootProfile() {
- return parentProfile == null;
- }
-
- public void addSubProfile(String subProfileId) throws IllegalArgumentException {
- if (subProfileIds == null)
- subProfileIds = new ArrayList<String>();
-
- if (!subProfileIds.contains(subProfileId))
- subProfileIds.add(subProfileId);
-
- // if (!subProfileIds.add(subProfileId))
- // throw new IllegalArgumentException(NLS.bind(Messages.Profile_Duplicate_Child_Profile_Id, new String[] {subProfileId, this.getProfileId()}));
- }
-
- public void removeSubProfile(String subProfileId) throws IllegalArgumentException {
- if (subProfileIds != null)
- subProfileIds.remove(subProfileId);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#hasSubProfiles()
- */
- public boolean hasSubProfiles() {
- return subProfileIds != null && !subProfileIds.isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getSubProfileIds()
- */
- public List<String> getSubProfileIds() {
- if (subProfileIds == null)
- return CollectionUtils.emptyList();
- return Collections.unmodifiableList(subProfileIds);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getProperty(java.lang.String)
- */
- public String getProperty(String key) {
- String value = getLocalProperty(key);
- if (value == null && parentProfile != null) {
- value = parentProfile.getProperty(key);
- }
- return value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getLocalProperty(java.lang.String)
- */
- public String getLocalProperty(String key) {
- return storage.getProperty(key);
- }
-
- /**
- * Associate the given value with the given key
- * in the local storage of this profile.
- */
- public void setProperty(String key, String value) {
- storage.setProperty(key, value);
- changed = true;
- }
-
- public void removeProperty(String key) {
- storage.remove(key);
- changed = true;
- }
-
- public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
- if (InstallableUnit.MEMBER_ID.equals(memberName)) {
- if (idIndex == null)
- idIndex = new IdIndex(ius);
- return idIndex;
- }
-
- if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
- if (capabilityIndex == null)
- capabilityIndex = new CapabilityIndex(ius.iterator());
- return capabilityIndex;
- }
-
- if (InstallableUnit.MEMBER_PROFILE_PROPERTIES.equals(memberName)) {
- if (propertiesIndex == null)
- propertiesIndex = new ProfilePropertyIndex();
- return propertiesIndex;
- }
- return null;
- }
-
- public Iterator<IInstallableUnit> everything() {
- return ius.iterator();
- }
-
- public Object getManagedProperty(Object client, String memberName, Object key) {
- if (!(client instanceof IInstallableUnit))
- return null;
- IInstallableUnit iu = (IInstallableUnit) client;
- if (InstallableUnit.MEMBER_PROFILE_PROPERTIES.equals(memberName) && key instanceof String)
- return getInstallableUnitProperty(iu, (String) key);
- if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
- synchronized (this) {
- if (translationSupport == null)
- translationSupport = new TranslationSupport(this);
- return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
- }
- }
- return null;
- }
-
- public IQueryResult<IInstallableUnit> available(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- if (surrogateProfileHandler != null)
- return surrogateProfileHandler.queryProfile(this, query, monitor);
- return query(query, new NullProgressMonitor());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getInstallableUnitProperty(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit, java.lang.String)
- */
- public String getInstallableUnitProperty(IInstallableUnit iu, String key) {
- OrderedProperties properties = iuProperties.get(iu);
- if (properties == null)
- return null;
-
- return properties.getProperty(key);
- }
-
- public String setInstallableUnitProperty(IInstallableUnit iu, String key, String value) {
- // String iuKey = createIUKey(iu);
- OrderedProperties properties = iuProperties.get(iu);
- if (properties == null) {
- properties = new OrderedProperties();
- iuProperties.put(iu, properties);
- }
-
- changed = true;
- return (String) properties.setProperty(key, value);
- }
-
- public String removeInstallableUnitProperty(IInstallableUnit iu, String key) {
- // String iuKey = createIUKey(iu);
- OrderedProperties properties = iuProperties.get(iu);
- if (properties == null)
- return null;
-
- String oldValue = properties.remove(key);
- if (properties.isEmpty())
- iuProperties.remove(iu);
-
- changed = true;
- return oldValue;
- }
-
- // private static String createIUKey(IInstallableUnit iu) {
- // return iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
- // }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getLocalProperties()
- */
- public Map<String, String> getLocalProperties() {
- return OrderedProperties.unmodifiableProperties(storage);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getProperties()
- */
- public Map<String, String> getProperties() {
- if (parentProfile == null)
- return getLocalProperties();
-
- Map<String, String> properties = new HashMap<String, String>(parentProfile.getProperties());
- properties.putAll(storage);
- return OrderedProperties.unmodifiableProperties(properties);
- }
-
- public IProvisioningAgent getProvisioningAgent() {
- return agent;
- }
-
- /**
- * Add all the properties in the map to the local properties
- * of the profile.
- */
- public void addProperties(Map<String, String> properties) {
- storage.putAll(properties);
- changed = true;
- }
-
- public void addInstallableUnit(IInstallableUnit iu) {
- iu = iu.unresolved();
- if (ius.contains(iu))
- return;
-
- ius.add(iu);
- changed = true;
- }
-
- public void removeInstallableUnit(IInstallableUnit iu) {
- iu = iu.unresolved();
- ius.remove(iu);
- changed = true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfile#getInstallableUnitProperties(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit)
- */
- public Map<String, String> getInstallableUnitProperties(IInstallableUnit iu) {
- OrderedProperties properties = iuProperties.get(iu);
- if (properties == null)
- properties = new OrderedProperties();
-
- return OrderedProperties.unmodifiableProperties(properties);
- }
-
- public void clearLocalProperties() {
- storage.clear();
- changed = true;
- }
-
- public boolean isChanged() {
- return changed;
- }
-
- public void setChanged(boolean isChanged) {
- changed = isChanged;
- }
-
- public void clearInstallableUnits() {
- ius.clear();
- iuProperties.clear();
- changed = true;
- }
-
- public Profile snapshot() {
- Profile parentSnapshot = null;
- if (parentProfile != null)
- parentSnapshot = parentProfile.snapshot();
-
- Profile snapshot = new Profile(agent, profileId, parentSnapshot, storage);
- if (surrogateProfileHandler != null)
- snapshot.setSurrogateProfileHandler(surrogateProfileHandler);
- snapshot.setTimestamp(timestamp);
-
- if (subProfileIds != null) {
- for (String subProfileId : subProfileIds) {
- snapshot.addSubProfile(subProfileId);
- }
- }
-
- for (Iterator<IInstallableUnit> iter = ius.iterator(); iter.hasNext();) {
- IInstallableUnit iu = iter.next();
- snapshot.addInstallableUnit(iu);
- Map<String, String> properties = getInstallableUnitProperties(iu);
- if (properties != null)
- snapshot.addInstallableUnitProperties(iu, properties);
- }
- snapshot.setChanged(false);
- return snapshot;
- }
-
- public void addInstallableUnitProperties(IInstallableUnit iu, Map<String, String> properties) {
- for (Entry<String, String> entry : properties.entrySet()) {
- setInstallableUnitProperty(iu, entry.getKey(), entry.getValue());
- }
- }
-
- public void clearInstallableUnitProperties(IInstallableUnit iu) {
- iuProperties.remove(iu);
- changed = true;
- }
-
- public void clearOrphanedInstallableUnitProperties() {
- Set<IInstallableUnit> keys = iuProperties.keySet();
- // Set orphans = new HashSet();
- Collection<IInstallableUnit> toRemove = new ArrayList<IInstallableUnit>();
- for (IInstallableUnit iu : keys) {
- if (!ius.contains(iu))
- toRemove.add(iu);
- }
-
- for (IInstallableUnit iu : toRemove) {
- iuProperties.remove(iu);
- }
- // List iuKeys = new ArrayList();
- // for (Iterator it = ius.iterator(); it.hasNext();)
- // iuKeys.add((IInstallableUnit) it.next());
- //
- // iuProperties.keySet().retainAll(iuKeys);
- }
-
- public long getTimestamp() {
- return timestamp;
- }
-
- public void setTimestamp(long millis) {
- timestamp = millis;
- }
-
- public void setSurrogateProfileHandler(ISurrogateProfileHandler surrogateProfileHandler) {
- this.surrogateProfileHandler = surrogateProfileHandler;
- }
-
- /**
- * Prints a string representation for debugging purposes only.
- */
- public String toString() {
- return "Profile(" + getProfileId() + ')'; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileEvent.java
deleted file mode 100644
index c81fd933f..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileEvent.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.EventObject;
-import org.eclipse.equinox.p2.engine.IProfileEvent;
-
-/**
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class ProfileEvent extends EventObject implements IProfileEvent {
- private static final long serialVersionUID = 3082402920617281765L;
-
- private int reason;
-
- public ProfileEvent(String profileId, int reason) {
- super(profileId);
- this.reason = reason;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProfileEvent#getReason()
- */
- public int getReason() {
- return reason;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProfileEvent#getProfileId()
- */
- public String getProfileId() {
- return (String) getSource();
- }
-
- /*
- * (non-Javadoc)
- * @see java.util.EventObject#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("ProfileEvent["); //$NON-NLS-1$
- buffer.append(getProfileId());
- buffer.append("-->"); //$NON-NLS-1$
- switch (reason) {
- case IProfileEvent.ADDED :
- buffer.append("ADDED"); //$NON-NLS-1$
- break;
- case IProfileEvent.REMOVED :
- buffer.append("REMOVED"); //$NON-NLS-1$
- break;
- case IProfileEvent.CHANGED :
- buffer.append("CHANGED"); //$NON-NLS-1$
- break;
- }
- buffer.append("] "); //$NON-NLS-1$
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileLock.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileLock.java
deleted file mode 100644
index 96d94f274..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileLock.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The purpose of this class is to enable cross process locking.
- * See 257654 for more details.
- */
-public class ProfileLock {
- private static final String LOCK_FILENAME = ".lock"; //$NON-NLS-1$
-
- private final Location location;
- private final Object lock;
- private Thread lockHolder;
- private int waiting;
-
- public ProfileLock(Object lock, File profileDirectory) {
- this.lock = lock;
- location = createLockLocation(profileDirectory);
- }
-
- private static Location createLockLocation(File parent) {
- Location anyLoc = (Location) ServiceHelper.getService(EngineActivator.getContext(), Location.class.getName());
- try {
- final URL url = parent.toURL();
- Location location = anyLoc.createLocation(null, url, false);
- location.set(url, false, LOCK_FILENAME);
- return location;
- } catch (MalformedURLException e) {
- throw new IllegalArgumentException(NLS.bind(Messages.SimpleProfileRegistry_Bad_profile_location, e.getLocalizedMessage()));
- } catch (IllegalStateException e) {
- throw e;
- } catch (IOException e) {
- throw new IllegalStateException(e.getLocalizedMessage());
- }
- }
-
- /**
- * Asserts that this thread currently holds the profile lock.
- * @throws IllegalStateException If this thread does not currently hold the profile lock
- */
- public void checkLocked() {
- synchronized (lock) {
- if (lockHolder == null)
- throw new IllegalStateException(Messages.SimpleProfileRegistry_Profile_not_locked);
-
- Thread current = Thread.currentThread();
- if (lockHolder != current)
- throw new IllegalStateException(Messages.thread_not_owner);
- }
- }
-
- /**
- * Attempts to obtain an exclusive write lock on a profile. The profile lock must be
- * owned by any process and thread that wants to modify a profile. If the lock
- * is currently held by another thread in this process, this method will block until
- * the lock becomes available. If the lock is currently held by another process,
- * this method returns <code>false</code>. Re-entrant attempts to acquire the
- * same profile lock multiple times in the same thread is not allowed.
- *
- * @return <code>true</code> if the lock was successfully obtained by this thread,
- * and <code>false</code> if another process is currently holding the lock.
- */
- public boolean lock() {
- synchronized (lock) {
- Thread current = Thread.currentThread();
- if (lockHolder == current)
- throw new IllegalStateException(Messages.profile_lock_not_reentrant);
-
- boolean locationLocked = (waiting != 0);
- while (lockHolder != null) {
- locationLocked = true;
- waiting++;
- boolean interrupted = false;
- try {
- lock.wait();
- } catch (InterruptedException e) {
- interrupted = true;
- } finally {
- waiting--;
- // if interrupted restore interrupt to thread state
- if (interrupted)
- current.interrupt();
- }
- }
- try {
- if (!locationLocked && !location.lock())
- return false;
-
- lockHolder = current;
- } catch (IOException e) {
- throw new IllegalStateException(NLS.bind(Messages.SimpleProfileRegistry_Profile_not_locked_due_to_exception, e.getLocalizedMessage()));
- }
- return true;
- }
- }
-
- /**
- * Releases the exclusive write lock on a profile. This method must only be called
- * by a thread that currently owns the lock.
- */
- public void unlock() {
- synchronized (lock) {
- if (lockHolder == null)
- throw new IllegalStateException(Messages.SimpleProfileRegistry_Profile_not_locked);
-
- Thread current = Thread.currentThread();
- if (lockHolder != current)
- throw new IllegalStateException(Messages.thread_not_owner);
-
- lockHolder = null;
- if (waiting == 0)
- location.release();
- else
- lock.notify();
- }
- }
-
- /**
- * Returns whether a thread in this process currently holds the profile lock.
- *
- * @return <code>true</code> if a thread in this process owns the profile lock,
- * and <code>false</code> otherwise
- */
- public boolean processHoldsLock() {
- synchronized (lock) {
- return lockHolder != null;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java
deleted file mode 100644
index 6017fc801..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepository.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
-import org.eclipse.osgi.util.NLS;
-
-public class ProfileMetadataRepository extends AbstractMetadataRepository {
-
- private static final String DEFAULT_ARTIFACT_REPO_DIRECTORY = "org.eclipse.equinox.p2.core/cache"; //$NON-NLS-1$
- private static final String ARTIFACTS_XML = "artifacts.xml"; //$NON-NLS-1$
- private static final String FILE_SCHEME = "file"; //$NON-NLS-1$
- private static final String DOT_PROFILE = ".profile"; //$NON-NLS-1$
- public static final String TYPE = "org.eclipse.equinox.p2.engine.repo.metadataRepository"; //$NON-NLS-1$
- public static final Integer VERSION = new Integer(1);
- private IProfile profile;
- private HashSet<IRepositoryReference> repositories = new HashSet<IRepositoryReference>();
-
- public ProfileMetadataRepository(IProvisioningAgent agent, URI location, IProgressMonitor monitor) throws ProvisionException {
- super(agent, location.toString(), TYPE, VERSION.toString(), location, null, null, null);
-
- try {
- profile = getProfile(agent, location);
- } catch (RuntimeException e) {
- throw new ProvisionException(new Status(IStatus.ERROR, EngineActivator.ID, ProvisionException.REPOSITORY_FAILED_READ, e.getMessage(), e));
- }
- publishArtifactRepos();
- }
-
- private void publishArtifactRepos() {
- List<URI> artifactRepos = findArtifactRepos();
-
- IProvisioningEventBus bus = (IProvisioningEventBus) getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
- if (bus == null)
- return;
- for (URI repo : artifactRepos) {
- repositories.add(new RepositoryReference(repo, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED));
- bus.publishEvent(new RepositoryEvent(repo, IRepository.TYPE_ARTIFACT, RepositoryEvent.DISCOVERED, true));
- }
- }
-
- private List<URI> findArtifactRepos() {
- List<URI> artifactRepos = new ArrayList<URI>();
- File p2Directory = findP2Directory();
-
- // Add the profile registry's default agent artifact repository.
- // Currently this is used by the Native Touchpoint to store artifacts however
- // other touchpoints might use this as well.
- File agentArtifactRepository = findAgentArtifactRepositoryDirectory(p2Directory);
- if (agentArtifactRepository != null)
- artifactRepos.add(agentArtifactRepository.toURI());
-
- // bundle pool
- String bundlePool = profile.getProperty(IProfile.PROP_CACHE);
- if (bundlePool != null) {
- File bundlePoolFile = new File(bundlePool);
- if (bundlePoolFile.exists())
- artifactRepos.add(bundlePoolFile.toURI());
- else if (Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue()) {
- // the profile has not been used yet but is a roaming profile
- // best effort to add "just" the default bundle pool
- bundlePoolFile = findDefaultBundlePool(p2Directory);
- if (bundlePoolFile != null)
- artifactRepos.add(bundlePoolFile.toURI());
- return artifactRepos;
- }
- }
-
- // shared bundle pool
- String sharedBundlePool = profile.getProperty(IProfile.PROP_SHARED_CACHE);
- if (sharedBundlePool != null)
- artifactRepos.add(new File(sharedBundlePool).toURI());
-
- // cache extensions
- // Currently set exclusively by dropins
- String dropinRepositories = profile.getProperty("org.eclipse.equinox.p2.cache.extensions"); //$NON-NLS-1$
- if (dropinRepositories != null) {
- StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, "|"); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- String repoLocation = ""; //$NON-NLS-1$
- try {
- repoLocation = tokenizer.nextToken();
- artifactRepos.add(new URI(repoLocation));
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.WARNING, EngineActivator.ID, "invalid repo reference with location: " + repoLocation, e)); //$NON-NLS-1$
- }
- }
- }
- return artifactRepos;
- }
-
- private File findAgentArtifactRepositoryDirectory(File p2Directory) {
- if (p2Directory == null)
- return null;
-
- File agentArtifactRepositoryDirectory = new File(p2Directory, DEFAULT_ARTIFACT_REPO_DIRECTORY);
- if (!agentArtifactRepositoryDirectory.isDirectory())
- return null;
-
- return agentArtifactRepositoryDirectory;
- }
-
- private File findDefaultBundlePool(File p2Directory) {
- if (p2Directory == null)
- return null;
-
- File productDirectory = p2Directory.getParentFile();
- if (productDirectory == null || !(new File(productDirectory, ARTIFACTS_XML).exists()))
- return null;
-
- return productDirectory;
- }
-
- private File findP2Directory() {
- File target = new File(getLocation());
- if (target.isFile())
- target = target.getParentFile();
-
- // by default the profile registry is in {product}/p2/org.eclipse.equinox.p2.engine/profileRegistry
- // the default bundle pool is in the {product} folder
- File profileRegistryDirectory = target.getParentFile();
- if (profileRegistryDirectory == null)
- return null;
-
- File p2EngineDirectory = profileRegistryDirectory.getParentFile();
- if (p2EngineDirectory == null)
- return null;
-
- return p2EngineDirectory.getParentFile();
- }
-
- public Collection<IRepositoryReference> getReferences() {
- return Collections.unmodifiableCollection(repositories);
- }
-
- public void initialize(RepositoryState state) {
- // nothing to do
- }
-
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return profile.query(query, monitor);
- }
-
- private static IProfile getProfile(IProvisioningAgent agent, URI location) throws ProvisionException {
- if (!FILE_SCHEME.equalsIgnoreCase(location.getScheme()))
- fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
-
- File target = new File(location);
- if (!target.exists())
- fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
-
- long timestamp = -1;
- int index = target.getName().lastIndexOf(DOT_PROFILE);
- if (index == -1)
- fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
- String profileId = target.getName().substring(0, index);
- if (target.isFile()) {
- try {
- timestamp = Long.parseLong(profileId);
- } catch (NumberFormatException e) {
- fail(location, ProvisionException.REPOSITORY_FAILED_READ);
- }
- target = target.getParentFile();
- if (target == null)
- fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
- index = target.getName().lastIndexOf(DOT_PROFILE);
- profileId = target.getName().substring(0, index);
- }
- profileId = SimpleProfileRegistry.unescape(profileId);
-
- File registryDirectory = target.getParentFile();
- if (registryDirectory == null)
- fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
- SimpleProfileRegistry profileRegistry = new SimpleProfileRegistry(agent, registryDirectory, null, false);
- if (timestamp == -1) {
- long[] timestamps = profileRegistry.listProfileTimestamps(profileId);
- timestamp = timestamps[timestamps.length - 1];
- }
- IProfile profile = profileRegistry.getProfile(profileId, timestamp);
- if (profile == null)
- fail(location, ProvisionException.REPOSITORY_NOT_FOUND);
-
- return profile;
- }
-
- private static void fail(URI location, int code) throws ProvisionException {
- switch (code) {
- case ProvisionException.REPOSITORY_NOT_FOUND :
- String msg = NLS.bind(Messages.io_NotFound, location);
- throw new ProvisionException(new Status(IStatus.ERROR, EngineActivator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
- case ProvisionException.REPOSITORY_FAILED_READ :
- msg = NLS.bind(Messages.io_FailedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, EngineActivator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepositoryFactory.java
deleted file mode 100644
index 5d4cd1644..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
-
-public class ProfileMetadataRepositoryFactory extends MetadataRepositoryFactory {
-
- /**
- * @throws ProvisionException
- * documenting to avoid warning
- */
- public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
- return null;
- }
-
- public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- //return null if the caller wanted a modifiable repo
- if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
- return null;
- }
- return new ProfileMetadataRepository(getAgent(), location, monitor);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java
deleted file mode 100644
index 0a6becaf6..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileParser.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataParser;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.osgi.framework.BundleContext;
-import org.xml.sax.Attributes;
-
-/**
- * An abstract XML parser class for parsing profiles as written by the ProfileWriter.
- */
-public abstract class ProfileParser extends MetadataParser implements ProfileXMLConstants {
-
- public ProfileParser(BundleContext context, String bundleId) {
- super(context, bundleId);
- }
-
- protected class ProfileHandler extends RootHandler {
-
- private final String[] required = new String[] {ID_ATTRIBUTE};
-
- private String profileId;
- private String parentId;
- private String timestamp;
- private PropertiesHandler propertiesHandler;
- private InstallableUnitsHandler unitsHandler;
- private IUsPropertiesHandler iusPropertiesHandler;
-
- public ProfileHandler() {
- // default
- }
-
- protected ProfileHandler(String profileId) {
- this.profileId = profileId;
- }
-
- protected void handleRootAttributes(Attributes attributes) {
- profileId = parseRequiredAttributes(attributes, required)[0];
- parentId = parseOptionalAttribute(attributes, PARENT_ID_ATTRIBUTE);
- timestamp = parseOptionalAttribute(attributes, TIMESTAMP_ATTRIBUTE);
-
- }
-
- public void startElement(String name, Attributes attributes) {
- if (PROPERTIES_ELEMENT.equals(name)) {
- if (propertiesHandler == null) {
- propertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (INSTALLABLE_UNITS_ELEMENT.equals(name)) {
- if (unitsHandler == null) {
- unitsHandler = new InstallableUnitsHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (IUS_PROPERTIES_ELEMENT.equals(name)) {
- if (iusPropertiesHandler == null) {
- iusPropertiesHandler = new IUsPropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else {
- invalidElement(name, attributes);
- }
- }
-
- public String getProfileId() {
- return profileId;
- }
-
- public String getParentId() {
- return parentId;
- }
-
- public long getTimestamp() {
- if (timestamp != null) {
- try {
- return Long.parseLong(timestamp);
- } catch (NumberFormatException e) {
- // TODO: log
- }
- }
- return 0;
- }
-
- public Map<String, String> getProperties() {
- if (propertiesHandler == null)
- return null;
- return propertiesHandler.getProperties();
- }
-
- public IInstallableUnit[] getInstallableUnits() {
- if (unitsHandler == null)
- return null;
- return unitsHandler.getUnits();
- }
-
- public Map<String, String> getIUProperties(IInstallableUnit iu) {
- if (iusPropertiesHandler == null)
- return null;
-
- Map<String, Map<String, String>> iusPropertiesMap = iusPropertiesHandler.getIUsPropertiesMap();
- if (iusPropertiesMap == null)
- return null;
-
- String iuIdentity = iu.getId() + "_" + iu.getVersion().toString(); //$NON-NLS-1$
- return iusPropertiesMap.get(iuIdentity);
- }
- }
-
- protected class IUPropertiesHandler extends AbstractHandler {
-
- private final String[] required = new String[] {ID_ATTRIBUTE, VERSION_ATTRIBUTE};
-
- private String iuIdentity;
- private Map<String, Map<String, String>> iusPropertiesMap;
- private PropertiesHandler propertiesHandler;
-
- public IUPropertiesHandler(AbstractHandler parentHandler, Attributes attributes, Map<String, Map<String, String>> iusPropertiesMap) {
- super(parentHandler, IU_PROPERTIES_ELEMENT);
- this.iusPropertiesMap = iusPropertiesMap;
-
- String values[] = parseRequiredAttributes(attributes, required);
- String id = values[0];
- Version version = checkVersion(IU_PROPERTIES_ELEMENT, VERSION_ATTRIBUTE, values[1]);
- iuIdentity = id + "_" + version.toString(); //$NON-NLS-1$
- }
-
- protected void finished() {
- if (isValidXML() && iuIdentity != null && propertiesHandler != null) {
- iusPropertiesMap.put(iuIdentity, propertiesHandler.getProperties());
- }
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(PROPERTIES_ELEMENT)) {
- propertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class IUsPropertiesHandler extends AbstractHandler {
-
- private Map<String, Map<String, String>> iusPropertiesMap;
-
- public IUsPropertiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, IUS_PROPERTIES_ELEMENT);
- String sizeStr = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- int size = (sizeStr != null ? new Integer(sizeStr).intValue() : 4);
- iusPropertiesMap = new LinkedHashMap<String, Map<String, String>>(size);
- }
-
- public Map<String, Map<String, String>> getIUsPropertiesMap() {
- return iusPropertiesMap;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(IU_PROPERTIES_ELEMENT)) {
- new IUPropertiesHandler(this, attributes, iusPropertiesMap);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java
deleted file mode 100644
index dceeffa69..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.internal.preferences.EclipsePreferences;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.security.storage.EncodingUtils;
-import org.osgi.framework.*;
-import org.osgi.service.prefs.BackingStoreException;
-
-/**
- * A preference implementation that stores preferences in the engine's profile
- * data area. There is one preference file per profile, with an additional file
- * that is used when there is no currently running profile.
- */
-public class ProfilePreferences extends EclipsePreferences {
- private class SaveJob extends Job {
- IProvisioningAgent agent;
-
- SaveJob(IProvisioningAgent agent) {
- super(Messages.ProfilePreferences_saving);
- setSystem(true);
- this.agent = agent;
- }
-
- public boolean belongsTo(Object family) {
- return family == PROFILE_SAVE_JOB_FAMILY;
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- try {
- doSave(agent);
- } catch (IllegalStateException e) {
- if (Tracing.DEBUG_PROFILE_PREFERENCES) {
- Tracing.debug("Attempt to save preferences after agent has been stopped"); //$NON-NLS-1$
- e.printStackTrace();
- }
- //ignore - this means the provisioning agent has already been stopped, and since
- //this job is joined during agent stop, it means this job has been scheduled after the
- //agent stopped and therefore can't have any interesting changes to save
- } catch (BackingStoreException e) {
- LogHelper.log(new Status(IStatus.WARNING, EngineActivator.ID, "Exception saving profile preferences", e)); //$NON-NLS-1$
- } catch (RuntimeException e) {
- LogHelper.log(new Status(IStatus.WARNING, EngineActivator.ID, "Exception saving profile preferences", e)); //$NON-NLS-1$
- }
- return Status.OK_STATUS;
- }
- }
-
- // cache which nodes have been loaded from disk
- private static Set<String> loadedNodes = Collections.synchronizedSet(new HashSet<String>());
-
- public static final Object PROFILE_SAVE_JOB_FAMILY = new Object();
-
- private static final long SAVE_SCHEDULE_DELAY = 500;
-
- //private IPath location;
- private IEclipsePreferences loadLevel;
- private Object profileLock;
- private String qualifier;
-
- private SaveJob saveJob;
- private int segmentCount;
-
- public ProfilePreferences() {
- this(null, null);
- }
-
- public ProfilePreferences(EclipsePreferences nodeParent, String nodeName) {
- super(nodeParent, nodeName);
-
- //path is /profile/{agent location}/{profile id}/qualifier
-
- // cache the segment count
- String path = absolutePath();
- segmentCount = getSegmentCount(path);
-
- if (segmentCount <= 2)
- return;
-
- if (segmentCount == 3)
- profileLock = new Object();
-
- if (segmentCount < 4)
- return;
- // cache the qualifier
- qualifier = getSegment(path, 3);
- }
-
- private boolean containsProfile(IProfileRegistry profileRegistry, String profileId) {
- if (profileId == null || profileRegistry == null)
- return false;
- return profileRegistry.containsProfile(profileId);
- }
-
- /*
- * (non-Javadoc)
- * Create an Engine phase to save profile preferences
- */
- protected void doSave(IProvisioningAgent agent) throws BackingStoreException {
- synchronized (((ProfilePreferences) parent).profileLock) {
- String profileId = getSegment(absolutePath(), 2);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- //can't save anything without a profile registry
- if (registry == null)
- return;
- if (!containsProfile(registry, profileId)) {
- //use the default location for the self profile, otherwise just do nothing and return
- if (IProfileRegistry.SELF.equals(profileId)) {
- IPath location = getDefaultLocation(agent);
- if (location != null) {
- super.save(location);
- return;
- }
- }
- if (Tracing.DEBUG_PROFILE_PREFERENCES)
- Tracing.debug("Not saving preferences since there is no file for node: " + absolutePath()); //$NON-NLS-1$
- return;
- }
- super.save(getProfileLocation(registry, profileId));
- }
- }
-
- /**
- * Returns a reference to the agent service corresponding to the given encoded
- * agent location. Never returns null; throws an exception if the agent could not be found.
- */
- private ServiceReference<IProvisioningAgent> getAgent(String segment) throws BackingStoreException {
- String locationString = EncodingUtils.decodeSlashes(segment);
- Exception failure = null;
- try {
- String filter = "(locationURI=" + encodeForFilter(locationString) + ')'; //$NON-NLS-1$
- final BundleContext context = EngineActivator.getContext();
- if (context != null) {
- Collection<ServiceReference<IProvisioningAgent>> refs = context.getServiceReferences(IProvisioningAgent.class, filter);
- if (!refs.isEmpty())
- return refs.iterator().next();
- }
- } catch (InvalidSyntaxException e) {
- failure = e;
- }
- throw new BackingStoreException("Unable to determine provisioning agent from location: " + segment, failure); //$NON-NLS-1$
- }
-
- /**
- * Encodes a string so that it is suitable for use as a value for a filter property.
- * Any reserved filter characters are escaped.
- */
- private String encodeForFilter(String string) {
- StringBuffer result = new StringBuffer(string.length());
- char[] input = string.toCharArray();
- for (int i = 0; i < input.length; i++) {
- switch (input[i]) {
- case '(' :
- case ')' :
- case '*' :
- case '\\' :
- result.append('\\');
- //fall through
- default :
- result.append(input[i]);
- }
- }
- return result.toString();
- }
-
- /**
- * Returns the preference file to use when there is no active profile.
- */
- private IPath getDefaultLocation(IProvisioningAgent agent) {
- //use engine agent location for preferences if there is no self profile
- IAgentLocation location = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- if (location == null) {
- LogHelper.log(new Status(IStatus.WARNING, EngineActivator.ID, "Agent location service not available", new RuntimeException())); //$NON-NLS-1$
- return null;
- }
- IPath dataArea = new Path(URIUtil.toFile(location.getDataArea(EngineActivator.ID)).getAbsolutePath());
- return computeLocation(dataArea, qualifier);
- }
-
- protected IEclipsePreferences getLoadLevel() {
- if (loadLevel == null) {
- if (qualifier == null)
- return null;
- // Make it relative to this node rather than navigating to it from the root.
- // Walk backwards up the tree starting at this node.
- // This is important to avoid a chicken/egg thing on startup.
- IEclipsePreferences node = this;
- for (int i = 4; i < segmentCount; i++)
- node = (EclipsePreferences) node.parent();
- loadLevel = node;
- }
- return loadLevel;
- }
-
- /**
- * Returns the location of the preference file for the given profile.
- */
- private IPath getProfileLocation(IProfileRegistry registry, String profileId) {
- SimpleProfileRegistry profileRegistry = (SimpleProfileRegistry) registry;
- File profileDataDirectory = profileRegistry.getProfileDataDirectory(profileId);
- return computeLocation(new Path(profileDataDirectory.getAbsolutePath()), qualifier);
- }
-
- protected EclipsePreferences internalCreate(EclipsePreferences nodeParent, String nodeName, Object context) {
- return new ProfilePreferences(nodeParent, nodeName);
- }
-
- protected boolean isAlreadyLoaded(IEclipsePreferences node) {
- return loadedNodes.contains(node.absolutePath());
- }
-
- protected boolean isAlreadyLoaded(String path) {
- return loadedNodes.contains(path);
- }
-
- /*
- * (non-Javadoc)
- * Create an Engine phase to load profile preferences
- */
- protected void load() throws BackingStoreException {
- synchronized (((ProfilePreferences) parent).profileLock) {
- ServiceReference<IProvisioningAgent> agentRef = getAgent(getSegment(absolutePath(), 1));
- IProvisioningAgent agent = EngineActivator.getContext().getService(agentRef);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- try {
- String profileId = getSegment(absolutePath(), 2);
- if (!containsProfile(registry, profileId)) {
- //use the default location for the self profile, otherwise just do nothing and return
- if (IProfileRegistry.SELF.equals(profileId)) {
- IPath location = getDefaultLocation(agent);
- if (location != null) {
- load(location);
- return;
- }
- }
- if (Tracing.DEBUG_PROFILE_PREFERENCES)
- Tracing.debug("Not loading preferences since there is no file for node: " + absolutePath()); //$NON-NLS-1$
- return;
- }
- load(getProfileLocation(registry, profileId));
- } finally {
- EngineActivator.getContext().ungetService(agentRef);
- }
- }
- }
-
- protected void loaded() {
- loadedNodes.add(name());
- }
-
- public void removeNode() throws BackingStoreException {
- super.removeNode();
- loadedNodes.remove(this.absolutePath());
- }
-
- /**
- * Schedules the save job. This method is synchronized to protect lazily initialization
- * of the save job instance.
- */
- protected synchronized void save() throws BackingStoreException {
- try {
- ServiceReference<IProvisioningAgent> agentRef = getAgent(getSegment(absolutePath(), 1));
- IProvisioningAgent agent = EngineActivator.getContext().getService(agentRef);
- if (saveJob == null || saveJob.agent != agent)
- saveJob = new SaveJob(agent);
- EngineActivator.getContext().ungetService(agentRef);
- } catch (BackingStoreException e) {
- if (Tracing.DEBUG_PROFILE_PREFERENCES)
- e.printStackTrace();
- //get agent has already gone away so we can't save preferences
- //TODO see bug 300450
- }
- //only schedule a save if the engine bundle is still running
- BundleContext context = EngineActivator.getContext();
- if (context == null || saveJob == null)
- return;
- try {
- if (context.getBundle().getState() == Bundle.ACTIVE)
- saveJob.schedule(SAVE_SCHEDULE_DELAY);
- } catch (IllegalStateException e) {
- //bundle has been stopped concurrently, so don't save
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileRegistryComponent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileRegistryComponent.java
deleted file mode 100644
index 7c3bb0239..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileRegistryComponent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-
-/**
- * Instantiates default instances of {@link IProfileRegistry}.
- */
-public class ProfileRegistryComponent implements IAgentServiceFactory {
-
- public Object createService(IProvisioningAgent agent) {
- IAgentLocation location = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- SimpleProfileRegistry registry = new SimpleProfileRegistry(agent, SimpleProfileRegistry.getDefaultRegistryDirectory(location));
- registry.setEventBus((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME));
- return registry;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileWriter.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileWriter.java
deleted file mode 100644
index 6562cf591..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileWriter.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataWriter;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-public class ProfileWriter extends MetadataWriter implements ProfileXMLConstants {
-
- public ProfileWriter(OutputStream output, ProcessingInstruction[] processingInstructions) throws IOException {
- super(output, processingInstructions);
- }
-
- public void writeProfile(IProfile profile) {
- start(PROFILE_ELEMENT);
- attribute(ID_ATTRIBUTE, profile.getProfileId());
- attribute(TIMESTAMP_ATTRIBUTE, Long.toString(profile.getTimestamp()));
- writeProperties(profile.getProperties());
- ArrayList<IInstallableUnit> ius = new ArrayList<IInstallableUnit>(profile.query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet());
- Collections.sort(ius, new Comparator<IInstallableUnit>() {
- public int compare(IInstallableUnit iu1, IInstallableUnit iu2) {
- int IdCompare = iu1.getId().compareTo(iu2.getId());
- if (IdCompare != 0)
- return IdCompare;
-
- return iu1.getVersion().compareTo(iu2.getVersion());
- }
- });
- writeInstallableUnits(ius.iterator(), ius.size());
- writeInstallableUnitsProperties(ius.iterator(), ius.size(), profile);
- end(PROFILE_ELEMENT);
- flush();
- }
-
- private void writeInstallableUnitsProperties(Iterator<IInstallableUnit> it, int size, IProfile profile) {
- if (size == 0)
- return;
- start(IUS_PROPERTIES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, size);
- while (it.hasNext()) {
- IInstallableUnit iu = it.next();
- Map<String, String> properties = profile.getInstallableUnitProperties(iu);
- if (properties.isEmpty())
- continue;
-
- start(IU_PROPERTIES_ELEMENT);
- attribute(ID_ATTRIBUTE, iu.getId());
- attribute(VERSION_ATTRIBUTE, iu.getVersion().toString());
- writeProperties(properties);
- end(IU_PROPERTIES_ELEMENT);
- }
- end(IUS_PROPERTIES_ELEMENT);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileXMLConstants.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileXMLConstants.java
deleted file mode 100644
index f28e9e0b0..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfileXMLConstants.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.internal.p2.persistence.XMLConstants;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
-/**
- * Constants defining the structure of the XML for a Profile
- */
-public interface ProfileXMLConstants extends XMLConstants {
-
- // A format version number for profile XML.
- public static final Version CURRENT_VERSION = Version.createOSGi(1, 0, 0);
- public static final Version COMPATIBLE_VERSION = Version.createOSGi(0, 0, 1);
- public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
-
- // Constants for profile elements
-
- public static final String PROFILE_ELEMENT = "profile"; //$NON-NLS-1$
- public static final String TIMESTAMP_ATTRIBUTE = "timestamp"; //$NON-NLS-1$
- public static final String IUS_PROPERTIES_ELEMENT = "iusProperties"; //$NON-NLS-1$
- public static final String IU_PROPERTIES_ELEMENT = "iuProperties"; //$NON-NLS-1$
- public static final String PROFILE_TARGET = "profile"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java
deleted file mode 100644
index 8125ee5e2..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/PropertyOperand.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.core.runtime.Assert;
-
-/**
- * @since 2.0
- */
-public class PropertyOperand extends Operand {
- private final Object first;
- private final Object second;
- private final String key;
-
- /**
- * Creates a new operand that represents replacing a property value
- * with another. At least one of the provided property values must be
- * non-null.
- *
- * @param key The key of the property being modified
- * @param first The property value being removed, or <code>null</code>
- * @param second The property value being added, or <code>null</code>
- */
- public PropertyOperand(String key, Object first, Object second) {
- //the operand must specify have a key and have at least one non-null value
- Assert.isTrue(key != null && (first != null || second != null));
- this.first = first;
- this.second = second;
- this.key = key;
- }
-
- public Object first() {
- return first;
- }
-
- public Object second() {
- return second;
- }
-
- public String getKey() {
- return key;
- }
-
- public String toString() {
- return key + " = " + first + " --> " + second; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
deleted file mode 100644
index 72f1ade0b..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProvisioningPlan.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * @since 2.0
- */
-public class ProvisioningPlan implements IProvisioningPlan {
-
- final IProfile profile;
- final List<Operand> operands = new ArrayList<Operand>();
- final ProvisioningContext context;
- IStatus status;
- private IProvisioningPlan installerPlan;
-
- public ProvisioningPlan(IProfile profile, Operand[] operands, ProvisioningContext context) {
- this(Status.OK_STATUS, profile, operands, context, null);
- }
-
- public ProvisioningPlan(IStatus status, IProfile profile, ProvisioningContext context, IProvisioningPlan installerPlan) {
- this(status, profile, null, context, installerPlan);
- }
-
- public ProvisioningPlan(IStatus status, IProfile profile, Operand[] operands, ProvisioningContext context, IProvisioningPlan installerPlan) {
- Assert.isNotNull(profile);
- this.status = status;
- this.profile = profile;
- if (operands != null)
- this.operands.addAll(Arrays.asList(operands));
- this.context = (context == null) ? new ProvisioningContext(profile.getProvisioningAgent()) : context;
- this.installerPlan = installerPlan;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getStatus()
- */
- public IStatus getStatus() {
- return status;
- }
-
- public void setStatus(IStatus status) {
- this.status = status;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getProfile()
- */
- public IProfile getProfile() {
- return profile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getOperands()
- */
- public Operand[] getOperands() {
- return operands.toArray(new Operand[operands.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getRemovals()
- */
- public IQueryable<IInstallableUnit> getRemovals() {
- return new QueryablePlan(false);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getAdditions()
- */
- public IQueryable<IInstallableUnit> getAdditions() {
- return new QueryablePlan(true);
- }
-
- private class QueryablePlan implements IQueryable<IInstallableUnit> {
- private boolean addition;
-
- public QueryablePlan(boolean add) {
- this.addition = add;
- }
-
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- if (operands == null || status.getSeverity() == IStatus.ERROR)
- return Collector.emptyCollector();
- Collection<IInstallableUnit> list = new ArrayList<IInstallableUnit>();
- for (Operand operand : operands) {
- if (!(operand instanceof InstallableUnitOperand))
- continue;
- InstallableUnitOperand op = ((InstallableUnitOperand) operand);
- IInstallableUnit iu = addition ? op.second() : op.first();
- if (iu != null)
- list.add(iu);
- }
- return query.perform(list.iterator());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProvisioningPlan#getInstallerPlan()
- */
- public IProvisioningPlan getInstallerPlan() {
- return installerPlan;
- }
-
- public ProvisioningContext getContext() {
- return context;
- }
-
- public void setInstallerPlan(IProvisioningPlan p) {
- installerPlan = p;
- }
-
- public void addInstallableUnit(IInstallableUnit iu) {
- operands.add(new InstallableUnitOperand(null, iu));
- }
-
- public void removeInstallableUnit(IInstallableUnit iu) {
- operands.add(new InstallableUnitOperand(iu, null));
- }
-
- public void updateInstallableUnit(IInstallableUnit iu1, IInstallableUnit iu2) {
- operands.add(new InstallableUnitOperand(iu1, iu2));
- }
-
- public void setProfileProperty(String name, String value) {
- String currentValue = profile.getProperty(name);
- if (value == null && currentValue == null)
- return;
- operands.add(new PropertyOperand(name, currentValue, value));
- }
-
- public void setInstallableUnitProfileProperty(IInstallableUnit iu, String name, String value) {
- String currentValue = profile.getInstallableUnitProperty(iu, name);
- if (value == null && currentValue == null)
- return;
- operands.add(new InstallableUnitPropertyOperand(iu, name, currentValue, value));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/RollbackOperationEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/RollbackOperationEvent.java
deleted file mode 100644
index 50ef2e167..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/RollbackOperationEvent.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.p2.engine.IEngine;
-import org.eclipse.equinox.p2.engine.IProfile;
-
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * @since 2.0
- */
-public class RollbackOperationEvent extends TransactionEvent {
-
- private static final long serialVersionUID = -2076492953949691215L;
- private IStatus cause;
-
- public RollbackOperationEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine, IStatus cause) {
- super(profile, phaseSet, operands, engine);
- this.cause = cause;
- }
-
- public IStatus getStatus() {
- return cause;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
deleted file mode 100644
index 9d16c83ba..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
+++ /dev/null
@@ -1,859 +0,0 @@
-/*******************************************************************************
- * 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.io.*;
-import java.lang.ref.SoftReference;
-import java.net.URI;
-import java.util.*;
-import java.util.Map.Entry;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-import javax.xml.parsers.ParserConfigurationException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.core.spi.IAgentService;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
-
- private static final String PROFILE_REGISTRY = "profile registry"; //$NON-NLS-1$
-
- private static final String PROFILE_EXT = ".profile"; //$NON-NLS-1$
- private static final String PROFILE_GZ_EXT = ".profile.gz"; //$NON-NLS-1$
- public static final String DEFAULT_STORAGE_DIR = "profileRegistry"; //$NON-NLS-1$
- private static final String DATA_EXT = ".data"; //$NON-NLS-1$
-
- protected final IProvisioningAgent agent;
-
- /**
- * Reference to Map of String(Profile id)->Profile.
- */
- private SoftReference<Map<String, Profile>> profiles;
- private Map<String, ProfileLock> profileLocks = new HashMap<String, ProfileLock>();
-
- private String self;
-
- //Whether the registry should update the self profile when the registry is restored
- private boolean updateSelfProfile;
-
- private File store;
-
- ISurrogateProfileHandler surrogateProfileHandler;
-
- private IProvisioningEventBus eventBus;
-
- public SimpleProfileRegistry(IProvisioningAgent agent, File registryDirectory) {
- this(agent, registryDirectory, new SurrogateProfileHandler(agent), true);
- }
-
- public SimpleProfileRegistry(IProvisioningAgent agent, File registryDirectory, ISurrogateProfileHandler handler, boolean updateSelfProfile) {
- this.agent = agent;
- store = registryDirectory;
- surrogateProfileHandler = handler;
- Assert.isNotNull(store, "Profile registry requires a directory"); //$NON-NLS-1$
- findSelf();
- this.updateSelfProfile = updateSelfProfile;
- }
-
- /**
- * Determine the id of the "self" profile. This is only applicable for the registry
- * of the currently running system.
- */
- private void findSelf() {
- //the location for the currently running system is registered as a service
- final BundleContext context = EngineActivator.getContext();
- if (context == null)
- return;
- ServiceReference<IAgentLocation> ref = context.getServiceReference(IAgentLocation.class);
- if (ref == null)
- return;
- IAgentLocation location = context.getService(ref);
- if (location == null)
- return;
- if (store.equals(getDefaultRegistryDirectory(location))) {
- //we are the registry for the currently running system
- self = context.getProperty("eclipse.p2.profile"); //$NON-NLS-1$
- }
- context.ungetService(ref);
- }
-
- public static File getDefaultRegistryDirectory(IAgentLocation agent) {
- File registryDirectory = null;
- if (agent == null)
- throw new IllegalStateException("Profile Registry inialization failed: Agent Location is not available"); //$NON-NLS-1$
- final URI engineDataArea = agent.getDataArea(EngineActivator.ID);
- URI registryURL = URIUtil.append(engineDataArea, DEFAULT_STORAGE_DIR);
- registryDirectory = new File(registryURL);
- registryDirectory.mkdirs();
- return registryDirectory;
- }
-
- /**
- * If the current profile for self is marked as a roaming profile, we need
- * to update its install and bundle pool locations.
- */
- private void updateSelfProfile(Map<String, Profile> profileMap) {
- if (profileMap == null)
- return;
- Profile selfProfile = profileMap.get(self);
- if (selfProfile == null)
- return;
-
- //register default locale provider where metadata translations are found
- //TODO ideally this should not be hard-coded to the current profile
- TranslationSupport.getInstance().setTranslationSource(selfProfile);
-
- if (DebugHelper.DEBUG_PROFILE_REGISTRY)
- DebugHelper.debug(PROFILE_REGISTRY, "SimpleProfileRegistry.updateSelfProfile"); //$NON-NLS-1$
- boolean changed = false;
- //only update if self is a roaming profile
- if (Boolean.valueOf(selfProfile.getProperty(IProfile.PROP_ROAMING)).booleanValue())
- changed = updateRoamingProfile(selfProfile);
-
- if (surrogateProfileHandler != null && surrogateProfileHandler.isSurrogate(selfProfile))
- changed = changed || surrogateProfileHandler.updateProfile(selfProfile);
-
- if (changed)
- saveProfile(selfProfile);
- }
-
- private boolean updateRoamingProfile(Profile selfProfile) {
- if (DebugHelper.DEBUG_PROFILE_REGISTRY)
- DebugHelper.debug(PROFILE_REGISTRY, "SimpleProfileRegistry.updateRoamingProfile"); //$NON-NLS-1$
- Location installLocation = (Location) ServiceHelper.getService(EngineActivator.getContext(), Location.class.getName(), Location.INSTALL_FILTER);
- File location = new File(installLocation.getURL().getPath());
- boolean changed = false;
- if (!location.equals(new File(selfProfile.getProperty(IProfile.PROP_INSTALL_FOLDER)))) {
- selfProfile.setProperty(IProfile.PROP_INSTALL_FOLDER, location.getAbsolutePath());
- changed = true;
- }
- String propCache = selfProfile.getProperty(IProfile.PROP_CACHE);
- if (propCache != null && !location.equals(new File(propCache))) {
- selfProfile.setProperty(IProfile.PROP_CACHE, location.getAbsolutePath());
- changed = true;
- }
- if (DebugHelper.DEBUG_PROFILE_REGISTRY)
- DebugHelper.debug(PROFILE_REGISTRY, "SimpleProfileRegistry.updateRoamingProfile(changed=" + changed + ')'); //$NON-NLS-1$
- return changed;
- }
-
- public synchronized String toString() {
- return getProfileMap().toString();
- }
-
- public synchronized IProfile getProfile(String id) {
- Profile profile = internalGetProfile(id);
- if (profile == null)
- return null;
- return profile.snapshot();
- }
-
- public synchronized IProfile getProfile(String id, long timestamp) {
- if (SELF.equals(id))
- id = self;
-
- if (profiles != null) {
- IProfile profile = getProfile(id);
- if (profile != null && profile.getTimestamp() == timestamp)
- return profile;
- }
-
- File profileDirectory = new File(store, escape(id) + PROFILE_EXT);
- if (!profileDirectory.isDirectory())
- return null;
-
- File profileFile = new File(profileDirectory, Long.toString(timestamp) + PROFILE_GZ_EXT);
- if (!profileFile.exists()) {
- profileFile = new File(profileDirectory, Long.toString(timestamp) + PROFILE_EXT);
- if (!profileFile.exists())
- return null;
- }
-
- Parser parser = new Parser(EngineActivator.getContext(), EngineActivator.ID);
- try {
- parser.parse(profileFile);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.error_parsing_profile, profileFile), e));
- }
- return parser.getProfileMap().get(id);
- }
-
- public synchronized long[] listProfileTimestamps(String id) {
- if (SELF.equals(id))
- id = self;
- //guard against null self profile
- if (id == null)
- return new long[0];
-
- File profileDirectory = new File(store, escape(id) + PROFILE_EXT);
- if (!profileDirectory.isDirectory())
- return new long[0];
-
- File[] profileFiles = profileDirectory.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return (pathname.getName().endsWith(PROFILE_EXT) || pathname.getName().endsWith(PROFILE_GZ_EXT)) && pathname.isFile();
- }
- });
-
- long[] timestamps = new long[profileFiles.length];
- for (int i = 0; i < profileFiles.length; i++) {
- String filename = profileFiles[i].getName();
- int extensionIndex = filename.lastIndexOf(PROFILE_EXT);
- try {
- timestamps[i] = Long.parseLong(filename.substring(0, extensionIndex));
- } catch (NumberFormatException e) {
- throw new IllegalStateException("Incompatible profile file name. Expected format is {timestamp}" + PROFILE_GZ_EXT + " (or {timestamp}" + PROFILE_EXT + ") but was " + filename + "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- }
- Arrays.sort(timestamps);
- return timestamps;
- }
-
- private Profile internalGetProfile(String id) {
- if (SELF.equals(id))
- id = self;
- Profile profile = getProfileMap().get(id);
- if (profile == null && self != null && self.equals(id))
- profile = createSurrogateProfile(id);
-
- return profile;
- }
-
- private Profile createSurrogateProfile(String id) {
- if (surrogateProfileHandler == null)
- return null;
-
- Profile profile = (Profile) surrogateProfileHandler.createProfile(id);
- if (profile == null)
- return null;
-
- saveProfile(profile);
- resetProfiles();
- return getProfileMap().get(id);
- }
-
- public synchronized IProfile[] getProfiles() {
- Map<String, Profile> profileMap = getProfileMap();
- Profile[] result = new Profile[profileMap.size()];
- int i = 0;
- for (Profile profile : profileMap.values()) {
- result[i++] = profile.snapshot();
- }
- return result;
- }
-
- /**
- * Returns an initialized map of String(Profile id)->Profile.
- */
- protected Map<String, Profile> getProfileMap() {
- if (profiles != null) {
- Map<String, Profile> result = profiles.get();
- if (result != null)
- return result;
- }
- Map<String, Profile> result = restore();
- if (result == null)
- result = new LinkedHashMap<String, Profile>(8);
- profiles = new SoftReference<Map<String, Profile>>(result);
- if (updateSelfProfile) {
- //update self profile on first load
- updateSelfProfile(result);
- }
- return result;
- }
-
- public synchronized void updateProfile(Profile profile) {
- String id = profile.getProfileId();
- Profile current = internalGetProfile(id);
- if (current == null)
- throw new IllegalArgumentException(NLS.bind(Messages.profile_does_not_exist, id));
-
- ProfileLock lock = profileLocks.get(id);
- lock.checkLocked();
-
- current.clearLocalProperties();
- current.clearInstallableUnits();
-
- current.addProperties(profile.getLocalProperties());
- IQueryResult<IInstallableUnit> queryResult = profile.query(QueryUtil.createIUAnyQuery(), null);
- for (Iterator<IInstallableUnit> queryResultIt = queryResult.iterator(); queryResultIt.hasNext();) {
- IInstallableUnit iu = queryResultIt.next();
- current.addInstallableUnit(iu);
- Map<String, String> iuProperties = profile.getInstallableUnitProperties(iu);
- if (iuProperties != null)
- current.addInstallableUnitProperties(iu, iuProperties);
- }
- saveProfile(current);
- profile.clearOrphanedInstallableUnitProperties();
- profile.setTimestamp(current.getTimestamp());
- broadcastChangeEvent(id, IProfileEvent.CHANGED);
- }
-
- public IProfile addProfile(String id) throws ProvisionException {
- return addProfile(id, null, null);
- }
-
- public IProfile addProfile(String id, Map<String, String> profileProperties) throws ProvisionException {
- return addProfile(id, profileProperties, null);
- }
-
- public synchronized IProfile addProfile(String id, Map<String, String> profileProperties, String parentId) throws ProvisionException {
- if (SELF.equals(id))
- id = self;
- Map<String, Profile> profileMap = getProfileMap();
- if (profileMap.get(id) != null)
- throw new ProvisionException(NLS.bind(Messages.Profile_Duplicate_Root_Profile_Id, id));
-
- Profile parent = null;
- if (parentId != null) {
- if (SELF.equals(parentId))
- parentId = self;
- parent = profileMap.get(parentId);
- if (parent == null)
- throw new ProvisionException(NLS.bind(Messages.Profile_Parent_Not_Found, parentId));
- }
-
- Profile profile = new Profile(agent, id, parent, profileProperties);
- if (surrogateProfileHandler != null && surrogateProfileHandler.isSurrogate(profile))
- profile.setSurrogateProfileHandler(surrogateProfileHandler);
- profileMap.put(id, profile);
- saveProfile(profile);
- broadcastChangeEvent(id, IProfileEvent.ADDED);
- return profile.snapshot();
- }
-
- public synchronized void removeProfile(String profileId) {
- if (SELF.equals(profileId))
- profileId = self;
- //note we need to maintain a reference to the profile map until it is persisted to prevent gc
- Map<String, Profile> profileMap = getProfileMap();
- Profile profile = profileMap.get(profileId);
- if (profile == null)
- return;
-
- List<String> subProfileIds = profile.getSubProfileIds();
- for (int i = 0; i < subProfileIds.size(); i++) {
- removeProfile(subProfileIds.get(i));
- }
- internalLockProfile(profile);
- // The above call recursively locked the parent(s). So save it away to rewind the locking process.
- IProfile savedParent = profile.getParentProfile();
- try {
- profile.setParent(null);
- } finally {
- internalUnlockProfile(profile);
- // The above call will not recurse since parent is now null. So do it explicitly.
- if (savedParent != null) {
- internalUnlockProfile(savedParent);
- }
- }
- profileMap.remove(profileId);
- profileLocks.remove(profileId);
- deleteProfile(profileId);
- broadcastChangeEvent(profileId, IProfileEvent.REMOVED);
- }
-
- public synchronized void removeProfile(String id, long timestamp) throws ProvisionException {
- if (SELF.equals(id))
- id = self;
-
- if (profiles != null) {
- IProfile profile = getProfile(id);
- if (profile != null && profile.getTimestamp() == timestamp)
- throw new ProvisionException(Messages.SimpleProfileRegistry_CannotRemoveCurrentSnapshot);
- }
-
- File profileDirectory = new File(store, escape(id) + PROFILE_EXT);
- if (!profileDirectory.isDirectory())
- return;
-
- File profileFile = new File(profileDirectory, Long.toString(timestamp) + PROFILE_GZ_EXT);
- if (!profileFile.exists()) {
- profileFile = new File(profileDirectory, Long.toString(timestamp) + PROFILE_EXT);
- if (!profileFile.exists())
- return;
- }
- FileUtils.deleteAll(profileFile);
- }
-
- private void broadcastChangeEvent(String profileId, int reason) {
- if (eventBus != null)
- eventBus.publishEvent(new ProfileEvent(profileId, reason));
- }
-
- /**
- * Restores the profile registry from disk, and returns the loaded profile map.
- * Returns <code>null</code> if unable to read the registry.
- */
- private Map<String, Profile> restore() {
- if (store == null || !store.isDirectory())
- throw new IllegalStateException(NLS.bind(Messages.reg_dir_not_available, store));
-
- Parser parser = new Parser(EngineActivator.getContext(), EngineActivator.ID);
- File[] profileDirectories = store.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.getName().endsWith(PROFILE_EXT) && pathname.isDirectory();
- }
- });
- for (int i = 0; i < profileDirectories.length; i++) {
- String directoryName = profileDirectories[i].getName();
- String profileId = unescape(directoryName.substring(0, directoryName.lastIndexOf(PROFILE_EXT)));
- ProfileLock lock = profileLocks.get(profileId);
- if (lock == null) {
- lock = new ProfileLock(this, profileDirectories[i]);
- profileLocks.put(profileId, lock);
- }
-
- boolean locked = false;
- if (lock.processHoldsLock() || (locked = lock.lock())) {
- try {
- File profileFile = findLatestProfileFile(profileDirectories[i]);
- if (profileFile != null) {
- try {
- parser.parse(profileFile);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.error_parsing_profile, profileFile), e));
- }
- }
- } finally {
- if (locked)
- lock.unlock();
- }
- } else {
- // could not lock the profile, so add a place holder
- parser.addProfilePlaceHolder(profileId);
- }
- }
- return parser.getProfileMap();
- }
-
- private File findLatestProfileFile(File profileDirectory) {
- File latest = null;
- long latestTimestamp = 0;
- File[] profileFiles = profileDirectory.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return (pathname.getName().endsWith(PROFILE_GZ_EXT) || pathname.getName().endsWith(PROFILE_EXT)) && !pathname.isDirectory();
- }
- });
- for (int i = 0; i < profileFiles.length; i++) {
- File profileFile = profileFiles[i];
- String fileName = profileFile.getName();
- try {
- long timestamp = Long.parseLong(fileName.substring(0, fileName.indexOf(PROFILE_EXT)));
- if (timestamp > latestTimestamp) {
- latestTimestamp = timestamp;
- latest = profileFile;
- }
- } catch (NumberFormatException e) {
- // ignore
- }
- }
- return latest;
- }
-
- private void saveProfile(Profile profile) {
- File profileDirectory = new File(store, escape(profile.getProfileId()) + PROFILE_EXT);
- profileDirectory.mkdir();
-
- long previousTimestamp = profile.getTimestamp();
- long currentTimestamp = System.currentTimeMillis();
- if (currentTimestamp <= previousTimestamp)
- currentTimestamp = previousTimestamp + 1;
- boolean shouldGzipFile = shouldGzipFile(profile);
- File profileFile = new File(profileDirectory, Long.toString(currentTimestamp) + (shouldGzipFile ? PROFILE_GZ_EXT : PROFILE_EXT));
-
- // Log a stack trace to see who is writing the profile.
- if (DebugHelper.DEBUG_PROFILE_REGISTRY)
- DebugHelper.debug(PROFILE_REGISTRY, "Saving profile to: " + profileFile.getAbsolutePath()); //$NON-NLS-1$
-
- profile.setTimestamp(currentTimestamp);
- profile.setChanged(false);
- OutputStream os = null;
- try {
- if (shouldGzipFile)
- os = new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(profileFile)));
- else
- os = new BufferedOutputStream(new FileOutputStream(profileFile));
- Writer writer = new Writer(os);
- writer.writeProfile(profile);
- } catch (IOException e) {
- profile.setTimestamp(previousTimestamp);
- profileFile.delete();
- LogHelper.log(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.error_persisting_profile, profile.getProfileId()), e));
- } finally {
- try {
- if (os != null)
- os.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- public void setEventBus(IProvisioningEventBus bus) {
- this.eventBus = bus;
- }
-
- /**
- * Returns whether the profile file for the given profile should be written in gzip format.
- */
- private boolean shouldGzipFile(Profile profile) {
- //check system property controlling compression
- String format = EngineActivator.getContext().getProperty(EngineActivator.PROP_PROFILE_FORMAT);
- if (format != null && format.equals(EngineActivator.PROFILE_FORMAT_UNCOMPRESSED))
- return false;
-
- //check whether the profile contains the p2 engine from 3.5.0 or earlier
- return profile.available(QueryUtil.createIUQuery("org.eclipse.equinox.p2.engine", new VersionRange("[0.0.0, 1.0.101)")), null).isEmpty(); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- private void deleteProfile(String profileId) {
- File profileDirectory = new File(store, escape(profileId) + PROFILE_EXT);
- FileUtils.deleteAll(profileDirectory);
- }
-
- /**
- * Converts a profile id into a string that can be used as a file name in any file system.
- */
- public static String escape(String toEscape) {
- StringBuffer buffer = new StringBuffer();
- int length = toEscape.length();
- for (int i = 0; i < length; ++i) {
- char ch = toEscape.charAt(i);
- switch (ch) {
- case '\\' :
- case '/' :
- case ':' :
- case '*' :
- case '?' :
- case '"' :
- case '<' :
- case '>' :
- case '|' :
- case '%' :
- buffer.append("%" + (int) ch + ";"); //$NON-NLS-1$ //$NON-NLS-2$
- break;
- default :
- buffer.append(ch);
- }
- }
- return buffer.toString();
- }
-
- public static String unescape(String text) {
- if (text.indexOf('%') == -1)
- return text;
-
- StringBuffer buffer = new StringBuffer();
- int length = text.length();
- for (int i = 0; i < length; ++i) {
- char ch = text.charAt(i);
- if (ch == '%') {
- int colon = text.indexOf(';', i);
- if (colon == -1)
- throw new IllegalStateException("error unescaping the sequence at character (" + i + ") for " + text + ". Expected %{int};."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ch = (char) Integer.parseInt(text.substring(i + 1, colon));
- i = colon;
- }
- buffer.append(ch);
- }
- return buffer.toString();
- }
-
- static class Writer extends ProfileWriter {
-
- public Writer(OutputStream output) throws IOException {
- super(output, new ProcessingInstruction[] {ProcessingInstruction.makeTargetVersionInstruction(PROFILE_TARGET, ProfileXMLConstants.CURRENT_VERSION)});
- }
- }
-
- /*
- * Parser for the contents of a SimpleProfileRegistry,
- * as written by the Writer class.
- */
- class Parser extends ProfileParser {
- private final Map<String, ProfileHandler> profileHandlers = new HashMap<String, ProfileHandler>();
-
- public Parser(BundleContext context, String bundleId) {
- super(context, bundleId);
- }
-
- public void addProfilePlaceHolder(String profileId) {
- profileHandlers.put(profileId, new ProfileHandler(profileId));
- }
-
- public void parse(File file) throws IOException {
- InputStream is;
- if (file.getName().endsWith(PROFILE_GZ_EXT)) {
- is = new BufferedInputStream(new GZIPInputStream(new FileInputStream(file)));
- } else { // backward compatibility. SimpleProfileRegistry doesn't write non-gzipped profiles any more.
- is = new BufferedInputStream(new FileInputStream(file));
- }
- parse(is);
- }
-
- public synchronized void parse(InputStream stream) throws IOException {
- this.status = null;
- try {
- // TODO: currently not caching the parser since we make no assumptions
- // or restrictions on concurrent parsing
- getParser();
- ProfileHandler profileHandler = new ProfileHandler();
- xmlReader.setContentHandler(new ProfileDocHandler(PROFILE_ELEMENT, profileHandler));
- xmlReader.parse(new InputSource(stream));
- profileHandlers.put(profileHandler.getProfileId(), profileHandler);
- } catch (SAXException e) {
- throw new IOException(e.getMessage());
- } catch (ParserConfigurationException e) {
- throw new IOException(e.getMessage());
- } finally {
- stream.close();
- }
- }
-
- protected Object getRootObject() {
- return this;
- }
-
- public Map<String, Profile> getProfileMap() {
- Map<String, Profile> profileMap = new HashMap<String, Profile>();
- for (String profileId : profileHandlers.keySet()) {
- addProfile(profileId, profileMap);
- }
- return profileMap;
- }
-
- private void addProfile(String profileId, Map<String, Profile> profileMap) {
- if (profileMap.containsKey(profileId))
- return;
-
- ProfileHandler profileHandler = profileHandlers.get(profileId);
- Profile parentProfile = null;
-
- String parentId = profileHandler.getParentId();
- if (parentId != null) {
- addProfile(parentId, profileMap);
- parentProfile = profileMap.get(parentId);
- }
-
- Profile profile = new Profile(agent, profileId, parentProfile, profileHandler.getProperties());
- if (surrogateProfileHandler != null && surrogateProfileHandler.isSurrogate(profile))
- profile.setSurrogateProfileHandler(surrogateProfileHandler);
-
- profile.setTimestamp(profileHandler.getTimestamp());
-
- IInstallableUnit[] ius = profileHandler.getInstallableUnits();
- if (ius != null) {
- for (int i = 0; i < ius.length; i++) {
- IInstallableUnit iu = ius[i];
- profile.addInstallableUnit(iu);
- Map<String, String> iuProperties = profileHandler.getIUProperties(iu);
- if (iuProperties != null) {
- for (Entry<String, String> entry : iuProperties.entrySet()) {
- profile.setInstallableUnitProperty(iu, entry.getKey(), entry.getValue());
- }
- }
- }
- }
- profile.setChanged(false);
- profileMap.put(profileId, profile);
- }
-
- private final class ProfileDocHandler extends DocHandler {
-
- public ProfileDocHandler(String rootName, RootHandler rootHandler) {
- super(rootName, rootHandler);
- }
-
- public void processingInstruction(String target, String data) throws SAXException {
- if (ProfileXMLConstants.PROFILE_TARGET.equals(target)) {
- Version repositoryVersion = extractPIVersion(target, data);
- if (!ProfileXMLConstants.XML_TOLERANCE.isIncluded(repositoryVersion)) {
- throw new SAXException(NLS.bind(Messages.SimpleProfileRegistry_Parser_Has_Incompatible_Version, repositoryVersion, ProfileXMLConstants.XML_TOLERANCE));
- }
- }
- }
- }
-
- protected String getErrorMessage() {
- return Messages.SimpleProfileRegistry_Parser_Error_Parsing_Registry;
- }
-
- public String toString() {
- // TODO:
- return null;
- }
-
- }
-
- public synchronized boolean isCurrent(IProfile profile) {
- Profile internalProfile = internalGetProfile(profile.getProfileId());
- if (internalProfile == null)
- throw new IllegalArgumentException(NLS.bind(Messages.profile_not_registered, profile.getProfileId()));
-
- if (!internalLockProfile(internalProfile))
- throw new IllegalStateException(Messages.SimpleProfileRegistry_Profile_in_use);
-
- try {
- return (!((Profile) profile).isChanged() && checkTimestamps(profile, internalProfile));
- } finally {
- internalUnlockProfile(internalProfile);
- }
- }
-
- public synchronized void lockProfile(Profile profile) {
- Profile internalProfile = internalGetProfile(profile.getProfileId());
- if (internalProfile == null)
- throw new IllegalArgumentException(NLS.bind(Messages.profile_not_registered, profile.getProfileId()));
-
- if (!internalLockProfile(internalProfile))
- throw new IllegalStateException(Messages.SimpleProfileRegistry_Profile_in_use);
-
- boolean isCurrent = false;
- try {
- if (profile.isChanged()) {
- if (DebugHelper.DEBUG_PROFILE_REGISTRY)
- DebugHelper.debug(PROFILE_REGISTRY, "Profile is marked as changed."); //$NON-NLS-1$
- throw new IllegalStateException(NLS.bind(Messages.profile_changed, profile.getProfileId()));
- }
- if (!checkTimestamps(profile, internalProfile)) {
- if (DebugHelper.DEBUG_PROFILE_REGISTRY)
- DebugHelper.debug(PROFILE_REGISTRY, "Unexpected timestamp difference in profile."); //$NON-NLS-1$
- throw new IllegalStateException(NLS.bind(Messages.profile_not_current, new String[] {profile.getProfileId(), Long.toString(internalProfile.getTimestamp()), Long.toString(profile.getTimestamp())}));
- }
- isCurrent = true;
- } finally {
- // this check is done here to ensure we unlock even if a runtime exception is thrown
- if (!isCurrent)
- internalUnlockProfile(internalProfile);
- }
- }
-
- private boolean internalLockProfile(IProfile profile) {
- ProfileLock lock = profileLocks.get(profile.getProfileId());
- if (lock == null) {
- lock = new ProfileLock(this, new File(store, escape(profile.getProfileId()) + PROFILE_EXT));
- profileLocks.put(profile.getProfileId(), lock);
- }
- return lock.lock();
- }
-
- private boolean checkTimestamps(IProfile profile, IProfile internalProfile) {
- long[] timestamps = listProfileTimestamps(profile.getProfileId());
- if (timestamps.length == 0) {
- if (DebugHelper.DEBUG_PROFILE_REGISTRY)
- DebugHelper.debug(PROFILE_REGISTRY, "check timestamp: expected " + profile.getTimestamp() + " but no profiles were found"); //$NON-NLS-1$ //$NON-NLS-2$
- resetProfiles();
- return false;
- }
-
- long currentTimestamp = (timestamps.length == 0) ? -1 : timestamps[timestamps.length - 1];
- if (profile.getTimestamp() != currentTimestamp) {
- if (DebugHelper.DEBUG_PROFILE_REGISTRY)
- DebugHelper.debug(PROFILE_REGISTRY, "check timestamp: expected " + profile.getTimestamp() + " but was " + currentTimestamp); //$NON-NLS-1$ //$NON-NLS-2$
- if (internalProfile.getTimestamp() != currentTimestamp)
- resetProfiles();
- return false;
- }
-
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry#containsProfile(java.lang.String)
- */
- public synchronized boolean containsProfile(String id) {
- if (SELF.equals(id))
- id = self;
- //null check done after self check, because self can be null
- if (id == null)
- return false;
-
- // check profiles to avoid restoring the profile registry
- if (profiles != null)
- if (getProfile(id) != null)
- return true;
-
- File profileDirectory = new File(store, escape(id) + PROFILE_EXT);
- if (!profileDirectory.isDirectory())
- return false;
- File[] profileFiles = profileDirectory.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return (pathname.getName().endsWith(PROFILE_GZ_EXT) || pathname.getName().endsWith(PROFILE_EXT)) && pathname.isFile();
- }
- });
- return profileFiles.length > 0;
- }
-
- public synchronized void resetProfiles() {
- profiles = null;
- }
-
- public synchronized void unlockProfile(IProfile profile) {
- Profile internalProfile = internalGetProfile(profile.getProfileId());
- if (internalProfile == null)
- throw new IllegalArgumentException(NLS.bind(Messages.profile_not_registered, profile.getProfileId()));
- internalUnlockProfile(internalProfile);
- }
-
- private void internalUnlockProfile(IProfile profile) {
- ProfileLock lock = profileLocks.get(profile.getProfileId());
- lock.unlock();
- }
-
- public Profile validate(IProfile candidate) {
- if (candidate instanceof Profile)
- return (Profile) candidate;
-
- throw new IllegalArgumentException("Profile incompatible: expected " + Profile.class.getName() + " but was " + ((candidate != null) ? candidate.getClass().getName() : "null") + "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-
- public synchronized File getProfileDataDirectory(String id) {
- if (SELF.equals(id))
- id = self;
- File profileDirectory = new File(store, escape(id) + PROFILE_EXT);
- File profileDataArea = new File(profileDirectory, DATA_EXT);
- if (!profileDataArea.isDirectory() && !profileDataArea.mkdir())
- throw new IllegalStateException("Could not create profile data area " + profileDataArea.getAbsolutePath() + "for: " + id); //$NON-NLS-1$ //$NON-NLS-2$
- return profileDataArea;
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentService#start()
- */
- public void start() {
- //nothing to do
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentService#stop()
- */
- public void stop() {
- try {
- //ensure there are no more profile preference save jobs running
- Job.getJobManager().join(ProfilePreferences.PROFILE_SAVE_JOB_FAMILY, null);
- } catch (InterruptedException e) {
- //ignore
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SizingPhaseSet.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SizingPhaseSet.java
deleted file mode 100644
index b82a208b3..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SizingPhaseSet.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.internal.p2.engine.phases.Sizing;
-import org.eclipse.equinox.p2.engine.ISizingPhaseSet;
-
-public class SizingPhaseSet extends PhaseSet implements ISizingPhaseSet {
-
- private static Sizing sizing;
-
- public SizingPhaseSet() {
- super(new Phase[] {sizing = new Sizing(100)});
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.ISizingPhaseSet#getDiskSize()
- */
- public long getDiskSize() {
- return sizing.getDiskSize();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.ISizingPhaseSet#getDownloadSize()
- */
- public long getDownloadSize() {
- return sizing.getDownloadSize();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
deleted file mode 100644
index 37ab89e44..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.io.File;
-import java.lang.ref.SoftReference;
-import java.net.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.util.NLS;
-
-public class SurrogateProfileHandler implements ISurrogateProfileHandler {
-
- private static final String NATIVE_TOUCHPOINT_TYPE = "org.eclipse.equinox.p2.native"; //$NON-NLS-1$
- private static final String P2_ENGINE_DIR = "p2/" + EngineActivator.ID + "/"; //$NON-NLS-1$//$NON-NLS-2$
- private static final String OSGI_INSTALL_AREA = "osgi.install.area"; //$NON-NLS-1$
- private static final String ECLIPSE_INI_IGNORED = "eclipse.ini.ignored"; //$NON-NLS-1$
- private static final String IU_LOCKED = Integer.toString(IProfile.LOCK_UNINSTALL | IProfile.LOCK_UPDATE);
- private static final String PROP_SURROGATE = "org.eclipse.equinox.p2.surrogate"; //$NON-NLS-1$
- private static final String PROP_SHARED_TIMESTAMP = "org.eclipse.equinox.p2.shared.timestamp"; //$NON-NLS-1$
- private static final String PROP_BASE = "org.eclipse.equinox.p2.base"; //$NON-NLS-1$
- private static final String PROP_RESOLVE = "org.eclipse.equinox.p2.resolve"; //$NON-NLS-1$
- private static final String OPTIONAL = "OPTIONAL"; //$NON-NLS-1$
- private static final String STRICT = "STRICT"; //$NON-NLS-1$
- private static final String PROP_INCLUSION_RULES = "org.eclipse.equinox.p2.internal.inclusion.rules"; //$NON-NLS-1$
-
- private final IProvisioningAgent agent;
-
- private SimpleProfileRegistry profileRegistry;
-
- private SoftReference<IProfile> cachedProfile;
-
- private static void addSharedProfileBaseIUs(final IProfile sharedProfile, final Profile userProfile) {
- IQuery<IInstallableUnit> rootIUQuery = QueryUtil.createMatchQuery( //
- "profileProperties[$0] == 'true' || (touchpointType != null && touchpointType.id == $1)",//$NON-NLS-1$
- IProfile.PROP_PROFILE_ROOT_IU, NATIVE_TOUCHPOINT_TYPE);
- IQueryResult<IInstallableUnit> rootIUs = sharedProfile.query(rootIUQuery, null);
- for (Iterator<IInstallableUnit> iterator = rootIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- userProfile.addInstallableUnit(iu);
- userProfile.addInstallableUnitProperties(iu, sharedProfile.getInstallableUnitProperties(iu));
- userProfile.setInstallableUnitProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, IU_LOCKED);
- userProfile.setInstallableUnitProperty(iu, PROP_BASE, Boolean.TRUE.toString());
- }
-
- IInstallableUnit sharedProfileIU = createSharedProfileIU(sharedProfile);
- userProfile.addInstallableUnit(sharedProfileIU);
- userProfile.setInstallableUnitProperty(sharedProfileIU, PROP_INCLUSION_RULES, STRICT);
- userProfile.setInstallableUnitProperty(sharedProfileIU, PROP_BASE, Boolean.TRUE.toString());
- }
-
- private static IInstallableUnit createSharedProfileIU(final IProfile sharedProfile) {
- InstallableUnitDescription iuDescription = new InstallableUnitDescription();
- iuDescription.setId("SharedProfile_" + sharedProfile.getProfileId()); //$NON-NLS-1$
- iuDescription.setVersion(Version.createOSGi(1, 0, 0, Long.toString(sharedProfile.getTimestamp())));
-
- ArrayList<IProvidedCapability> iuCapabilities = new ArrayList<IProvidedCapability>();
- IProvidedCapability selfCapability = MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, iuDescription.getId(), iuDescription.getVersion());
- iuCapabilities.add(selfCapability);
- iuDescription.addProvidedCapabilities(iuCapabilities);
-
- ArrayList<IRequirement> iuRequirements = new ArrayList<IRequirement>();
- IQueryResult<IInstallableUnit> allIUs = sharedProfile.query(QueryUtil.createIUAnyQuery(), null);
- for (Iterator<IInstallableUnit> iterator = allIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- IRequirement iuRequirement = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), new VersionRange(iu.getVersion(), true, iu.getVersion(), true), null, false, false, true);
- iuRequirements.add(iuRequirement);
- }
- iuDescription.addRequirements(iuRequirements);
- iuDescription.setProperty(IInstallableUnit.PROP_NAME, NLS.bind(Messages.Shared_Profile, null));
-
- IInstallableUnit sharedProfileIU = MetadataFactory.createInstallableUnit(iuDescription);
- return sharedProfileIU;
- }
-
- private static void removeUserProfileBaseIUs(final Profile userProfile) {
- IQuery<IInstallableUnit> baseIUQuery = new IUProfilePropertyQuery(PROP_BASE, Boolean.TRUE.toString());
- IQueryResult<IInstallableUnit> rootIUs = userProfile.query(baseIUQuery, null);
- for (Iterator<IInstallableUnit> iterator = rootIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- userProfile.removeInstallableUnit(iu);
- }
- }
-
- private static void markRootsOptional(final Profile userProfile) {
- IQueryResult<IInstallableUnit> rootIUs = userProfile.query(new UserVisibleRootQuery(), null);
- for (Iterator<IInstallableUnit> iterator = rootIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- userProfile.setInstallableUnitProperty(iu, PROP_INCLUSION_RULES, OPTIONAL);
- }
- }
-
- private static void updateProperties(final IProfile sharedProfile, Profile userProfile) {
- userProfile.setProperty(PROP_SHARED_TIMESTAMP, Long.toString(sharedProfile.getTimestamp()));
- Location installLocation = (Location) ServiceHelper.getService(EngineActivator.getContext(), Location.class.getName(), Location.INSTALL_FILTER);
- File installFolder = new File(installLocation.getURL().getPath());
-
- if (Boolean.valueOf(sharedProfile.getProperty(IProfile.PROP_ROAMING)).booleanValue()) {
- userProfile.setProperty(IProfile.PROP_INSTALL_FOLDER, installFolder.getAbsolutePath());
- userProfile.setProperty(IProfile.PROP_SHARED_CACHE, installFolder.getAbsolutePath());
- userProfile.setProperty(IProfile.PROP_ROAMING, Boolean.FALSE.toString());
- } else {
- String cache = sharedProfile.getProperty(IProfile.PROP_CACHE);
- if (cache != null)
- userProfile.setProperty(IProfile.PROP_SHARED_CACHE, cache);
- }
-
- Location configurationLocation = (Location) ServiceHelper.getService(EngineActivator.getContext(), Location.class.getName(), Location.CONFIGURATION_FILTER);
- File configurationFolder = new File(configurationLocation.getURL().getPath());
- userProfile.setProperty(IProfile.PROP_CONFIGURATION_FOLDER, configurationFolder.getAbsolutePath());
-
- // We need to check that the configuration folder is not a file system root.
- // some of the profiles resources are stored as siblings to the configuration folder.
- // also see bug 230384
- if (configurationFolder.getParentFile() == null)
- throw new IllegalArgumentException("Configuration folder must not be a file system root."); //$NON-NLS-1$
-
- userProfile.setProperty(IProfile.PROP_CACHE, configurationFolder.getParentFile().getAbsolutePath());
-
- File launcherConfigFile = new File(configurationFolder, ECLIPSE_INI_IGNORED);
- userProfile.setProperty(IProfile.PROP_LAUNCHER_CONFIGURATION, launcherConfigFile.getAbsolutePath());
- }
-
- public SurrogateProfileHandler(IProvisioningAgent agent) {
- this.agent = agent;
- }
-
- private synchronized SimpleProfileRegistry getProfileRegistry() {
- if (profileRegistry == null) {
- String installArea = EngineActivator.getContext().getProperty(OSGI_INSTALL_AREA);
- try {
- URL registryURL = new URL(installArea + P2_ENGINE_DIR + SimpleProfileRegistry.DEFAULT_STORAGE_DIR);
- File sharedRegistryDirectory = URIUtil.toFile(URIUtil.toURI(registryURL));
- profileRegistry = new SimpleProfileRegistry(agent, sharedRegistryDirectory, null, false);
- } catch (MalformedURLException e) {
- //this is not possible because we know the above URL is valid
- } catch (URISyntaxException e) {
- //this is not possible because we know the above URL is valid
- }
- }
- return profileRegistry;
- }
-
- // this method must not try to lock the profile registry
- private IProfile getSharedProfile(String id) {
- SimpleProfileRegistry registry = getProfileRegistry();
- long[] timestamps = registry.listProfileTimestamps(id);
- if (timestamps.length == 0)
- return null;
-
- long currentTimestamp = timestamps[timestamps.length - 1];
-
- //see if we have a cached profile
- if (cachedProfile != null) {
- IProfile profile = cachedProfile.get();
- if (profile != null && profile.getProfileId().equals(id) && profile.getTimestamp() == currentTimestamp)
- return profile;
- }
-
- final IProfile profile = registry.getProfile(id, currentTimestamp);
- if (profile != null)
- cachedProfile = new SoftReference<IProfile>(profile);
- return profile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.engine.ISurrogateProfileHandler#createProfile(java.lang.String)
- */
- public IProfile createProfile(String id) {
- final IProfile sharedProfile = getSharedProfile(id);
- if (sharedProfile == null)
- return null;
-
- Profile userProfile = new Profile(agent, id, null, sharedProfile.getProperties());
- userProfile.setProperty(PROP_SURROGATE, Boolean.TRUE.toString());
- userProfile.setSurrogateProfileHandler(this);
- updateProperties(sharedProfile, userProfile);
- addSharedProfileBaseIUs(sharedProfile, userProfile);
- return userProfile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.engine.ISurrogateProfileHandler#isSurrogate(org.eclipse.equinox.internal.provisional.p2.engine.IProfile)
- */
- public boolean isSurrogate(IProfile profile) {
- return Boolean.valueOf(profile.getProperty(PROP_SURROGATE)).booleanValue();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.engine.ISurrogateProfileHandler#queryProfile(org.eclipse.equinox.internal.provisional.p2.engine.IProfile, org.eclipse.equinox.internal.provisional.p2.query.Query, org.eclipse.equinox.internal.provisional.p2.query.Collector, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IQueryResult<IInstallableUnit> queryProfile(IProfile profile, IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- IProfile sharedProfile = getSharedProfile(profile.getProfileId());
- if (sharedProfile == null)
- return profile.query(query, monitor);
-
- // TODO: Should consider using a sequenced iterator here instead of collecting
- Collector<IInstallableUnit> result = new Collector<IInstallableUnit>();
- result.addAll(sharedProfile.query(query, monitor));
- result.addAll(profile.query(query, monitor));
- return result;
- }
-
- public boolean updateProfile(IProfile userProfile) {
- final IProfile sharedProfile = getSharedProfile(userProfile.getProfileId());
- if (sharedProfile == null)
- throw new IllegalStateException(NLS.bind(Messages.shared_profile_not_found, userProfile.getProfileId()));
-
- String sharedTimeStamp = Long.toString(sharedProfile.getTimestamp());
- String userSharedTimeStamp = userProfile.getProperty(PROP_SHARED_TIMESTAMP);
-
- if (userSharedTimeStamp != null && userSharedTimeStamp.equals(sharedTimeStamp))
- return false;
-
- Profile writableUserProfile = (Profile) userProfile;
- updateProperties(sharedProfile, writableUserProfile);
- removeUserProfileBaseIUs(writableUserProfile);
- if (!userProfile.query(QueryUtil.createIUAnyQuery(), null).isEmpty()) {
- writableUserProfile.setProperty(PROP_RESOLVE, Boolean.TRUE.toString());
- markRootsOptional(writableUserProfile);
- }
- addSharedProfileBaseIUs(sharedProfile, writableUserProfile);
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TouchpointManager.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TouchpointManager.java
deleted file mode 100644
index fb5e4dfff..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TouchpointManager.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.osgi.util.NLS;
-
-//TODO This needs to support multiple version of each touchpoint and have a lookup that supports version semantics
-public class TouchpointManager implements IRegistryChangeListener {
-
- private static final String PT_TOUCHPOINTS = "touchpoints"; //$NON-NLS-1$
- private static final String ELEMENT_TOUCHPOINT = "touchpoint"; //$NON-NLS-1$
- private static final String ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$
- private static final String ATTRIBUTE_TYPE = "type"; //$NON-NLS-1$
- private static final String ATTRIBUTE_VERSION = "version"; //$NON-NLS-1$
-
- private class TouchpointEntry {
-
- private IConfigurationElement element;
- private boolean createdExtension = false;
- private Touchpoint touchpoint = null;
-
- public TouchpointEntry(IConfigurationElement element) {
- this.element = element;
- }
-
- public Touchpoint getTouchpoint() {
- if (!createdExtension) {
- String id = getType();
- try {
- Touchpoint touchpointInstance = (Touchpoint) element.createExecutableExtension(ATTRIBUTE_CLASS);
- if (touchpointInstance != null) {
- this.touchpoint = touchpointInstance;
- } else {
- String errorMsg = NLS.bind(Messages.TouchpointManager_Null_Creating_Touchpoint_Extension, id);
- throw new CoreException(new Status(IStatus.ERROR, EngineActivator.ID, 1, errorMsg, null));
- }
- } catch (CoreException cexcpt) {
- LogHelper.log(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.TouchpointManager_Exception_Creating_Touchpoint_Extension, id), cexcpt));
- } catch (ClassCastException ccexcpt) {
- LogHelper.log(new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.TouchpointManager_Exception_Creating_Touchpoint_Extension, id), ccexcpt));
- }
- // Mark as created even in error cases,
- // so exceptions are not logged multiple times
- createdExtension = true;
- }
- return this.touchpoint;
- }
-
- public Version getVersion() {
- try {
- return Version.create(element.getAttribute(ATTRIBUTE_VERSION));
- } catch (InvalidRegistryObjectException e) {
- return null;
- }
- }
-
- public String getType() {
- try {
- return element.getAttribute(ATTRIBUTE_TYPE);
- } catch (InvalidRegistryObjectException e) {
- return null;
- }
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer(element.toString());
- if (createdExtension) {
- String touchpointString = touchpoint != null ? touchpoint.toString() : "not created"; //$NON-NLS-1$
- result.append(" => " + touchpointString); //$NON-NLS-1$
- }
- return result.toString();
- }
- }
-
- // TODO: Do we really want to store the touchpoints? The danger is
- // that if two installations are performed simultaneously, then...
- // TODO: Figure out locking, concurrency requirements for touchpoints.
- private Map<String, TouchpointEntry> touchpointEntries;
-
- public TouchpointManager() {
- RegistryFactory.getRegistry().addRegistryChangeListener(this, EngineActivator.ID);
- }
-
- /*
- * Return the touchpoint which is registered for the given type,
- * or <code>null</code> if none are registered.
- */
- public synchronized Touchpoint getTouchpoint(ITouchpointType type) {
- if (type == null)
- throw new IllegalArgumentException(Messages.TouchpointManager_Null_Touchpoint_Type_Argument);
- return getTouchpoint(type.getId(), type.getVersion().toString());
- }
-
- /*
- * Return the touchpoint which is registered for the given type and optionally version,
- * or <code>null</code> if none are registered.
- */
- public Touchpoint getTouchpoint(String typeId, String versionRange) {
- if (typeId == null || typeId.length() == 0)
- throw new IllegalArgumentException(Messages.TouchpointManager_Null_Touchpoint_Type_Argument);
-
- TouchpointEntry entry = getTouchpointEntries().get(typeId);
- if (entry == null)
- return null;
- if (versionRange != null) {
- VersionRange range = new VersionRange(versionRange);
- if (!range.isIncluded(entry.getVersion()))
- return null;
- }
-
- return entry.getTouchpoint();
- }
-
- /*
- * Construct a map of the extensions that implement the touchpoints extension point.
- */
- private synchronized Map<String, TouchpointEntry> getTouchpointEntries() {
- if (touchpointEntries != null)
- return touchpointEntries;
-
- IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(EngineActivator.ID, PT_TOUCHPOINTS);
- IExtension[] extensions = point.getExtensions();
- touchpointEntries = new HashMap<String, TouchpointEntry>(extensions.length);
- for (int i = 0; i < extensions.length; i++) {
- try {
- IConfigurationElement[] elements = extensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- String elementName = elements[j].getName();
- if (!ELEMENT_TOUCHPOINT.equalsIgnoreCase(elementName)) {
- reportError(NLS.bind(Messages.TouchpointManager_Incorrectly_Named_Extension, elements[j].getName(), ELEMENT_TOUCHPOINT));
- continue;
- }
- String id = elements[j].getAttribute(ATTRIBUTE_TYPE);
- if (id == null) {
- reportError(NLS.bind(Messages.TouchpointManager_Attribute_Not_Specified, ATTRIBUTE_TYPE));
- continue;
- }
- if (touchpointEntries.get(id) == null) {
- touchpointEntries.put(id, new TouchpointEntry(elements[j]));
- } else {
- reportError(NLS.bind(Messages.TouchpointManager_Conflicting_Touchpoint_Types, id));
- }
- }
- } catch (InvalidRegistryObjectException e) {
- //skip this extension
- }
- }
- return touchpointEntries;
- }
-
- static void reportError(String errorMsg) {
- Status errorStatus = new Status(IStatus.ERROR, EngineActivator.ID, 1, errorMsg, null);
- LogHelper.log(errorStatus);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.IRegistryChangeListener#registryChanged(org.eclipse.core.runtime.IRegistryChangeEvent)
- */
- public synchronized void registryChanged(IRegistryChangeEvent event) {
- // just flush the cache when something changed. It will be recomputed on demand.
- touchpointEntries = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TransactionEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TransactionEvent.java
deleted file mode 100644
index 63ba08002..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/TransactionEvent.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine;
-
-import org.eclipse.equinox.p2.engine.IEngine;
-import org.eclipse.equinox.p2.engine.IProfile;
-
-import java.util.EventObject;
-
-/**
- * @since 2.0
- */
-public abstract class TransactionEvent extends EventObject {
- private static final long serialVersionUID = 6278706971855493984L;
- protected IProfile profile;
- protected PhaseSet phaseSet;
- protected Operand[] operands;
-
- public TransactionEvent(IProfile profile, PhaseSet phaseSet, Operand[] operands, IEngine engine) {
- super(engine);
- this.profile = profile;
- this.phaseSet = phaseSet;
- this.operands = operands;
- }
-
- public IProfile getProfile() {
- return profile;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties
deleted file mode 100644
index 13784b3cb..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/messages.properties
+++ /dev/null
@@ -1,106 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-
-ActionManager_Exception_Creating_Action_Extension=Error creating action with id: {0}.
-ActionManager_Required_Touchpoint_Not_Found=The required {0} touchpoint for the {1} action is not included in the installation manager configuration.
-action_syntax_error=Invalid action syntax: {0}.
-download_artifact=Downloading artifacts
-download_no_repository=No artifact repository available.
-
-error_parsing_profile=Error parsing profile {0}.
-error_persisting_profile=Error persisting profile {0}.
-io_FailedRead=Failed to read profile repository at {0}
-io_NotFound=No repository found at {0}
-
-TouchpointManager_Null_Touchpoint_Type_Argument=A null or empty string was passed as the type of a touchpoint.
-TouchpointManager_Incorrectly_Named_Extension=A touchpoint extension is incorrectly named {0} instead of {1}.
-TouchpointManager_Attribute_Not_Specified=The required attribute {0} is not specified for the touchpoints extension point.
-TouchpointManager_Conflicting_Touchpoint_Types=Two or more touchpoint extensions of type {0} are defined.
-TouchpointManager_Exception_Creating_Touchpoint_Extension=An exception was thrown and caught when creating the extension point instance for the {0} touchpoint.
-TouchpointManager_Null_Creating_Touchpoint_Extension=A null object was returned when creating the extension point instance for the {0} touchpoint.
-
-ParameterizedProvisioningAction_action_or_parameters_null=Both action and action parameters must not be null.
-Profile_Null_Profile_Id=A profile must have an non-empty id.
-Profile_Duplicate_Root_Profile_Id=Adding a profile with duplicate id: {0}.
-Profile_Parent_Not_Found=Parent profile not found: {0}.
-
-SimpleProfileRegistry_Parser_Error_Parsing_Registry=\
- Error parsing the profile registry.
-SimpleProfileRegistry_Parser_Has_Incompatible_Version=\
- The profile registry has incompatible version {0}; expected {1}.
-SimpleProfileRegistry_Profile_in_use=The profile is currently in use.
-SimpleProfileRegistry_Profile_not_locked=The profile is not locked.
-SimpleProfileRegistry_Profile_not_locked_due_to_exception=Profile not locked due to exception: {0}
-SimpleProfileRegistry_Bad_profile_location=Bad profile location: {0}
-SimpleProfileRegistry_CannotRemoveCurrentSnapshot=Cannot remove the current profile timestamp
-profile_does_not_exist=Profile to be updated does not exist: {0}.
-profile_not_current=Profile {0} is not current. Expected timestamp {1} but was {2}.
-profile_changed=Profile {0} is marked as changed.
-profile_not_registered=Profile {0} not registered.
-reg_dir_not_available=Registry Directory not available: {0}.
-thread_not_owner=Thread not lock owner.
-profile_lock_not_reentrant=Lock failed. Profile does not permit reentrant locking.
-Shared_Profile=Shared profile
-shared_profile_not_found=Shared profile {0} not found.
-
-ProfilePreferences_saving=Saving profile preferences
-phase_error=An error occurred during the {0} phase.
-action_undo_error=An error occurred while rolling back the engine operation while undoing the {0} action.
-forced_action_execute_error=An error occurred while performing the engine operation while executing the {0} action in forced mode. The operation will continue.
-phaseid_not_positive=Phase weight must be positive.
-phaseid_not_set=Phase id must be set.
-action_not_found=No action found for: {0}.
-actions_not_found=No actions found for: {0}.
-not_current_phase=Current phase does not match argument.
-null_operands=Operands must not be null.
-null_phase=Phase must not be null.
-null_phases=Phases must not be null
-null_phaseset=PhaseSet must not be null.
-null_profile=Profile must not be null.
-touchpoint_prepare_error=An error occurred while preparing the engine operation for the {0} touchpoint.
-touchpoint_commit_error=An error occurred while committing the engine operation for the {0} touchpoint.
-touchpoint_rollback_error=An error occurred while rolling back the engine operation for the {0} touchpoint.
-phase_undo_error=An error occurred while undoing the {0} phase.
-phase_undo_operand_error=An error occurred while undoing the {0} phase for operand {1}.
-phase_not_started=There is no phase to end.
-phase_started=A phase is already started.
-
-session_prepare_error=An error occurred while preparing the engine session for profile: {0}.
-session_commit_error=An error occurred while committing the engine session for profile: {0}.
-null_operand=Operand must not be null.
-operand_started=An operand is already started.
-operand_not_started=There is no operand to end.
-not_current_operand=Current operand does not match argument.
-null_action=Action must not be null
-session_context=session context was:(profile={0}, phase={1}, operand={2}, action={3}).
-preparing=Preparing to commit the provisioning operation.
-committing=Committing the provisioning operation.
-rollingback_error=An error was detected while performing the engine operation and the changes are being rolled back. See the log for details.
-rollingback_cancel=The engine operation was cancelled and the changes are being rolled back.
-
-Engine_Operation_Canceled_By_User=Operation canceled by the user.
-InstallableUnitEvent_type_not_install_or_uninstall=type must be either UNINSTALL(0) or INSTALL(1)
-CertificateChecker_CertificateError=An invalid certificate was found.
-CertificateChecker_CertificateRejected=One or more certificates rejected. Cannot proceed with installation.
-CertificateChecker_KeystoreConnectionError=Cannot connect to keystore.
-CertificateChecker_SignedContentError=Error with signed content.
-CertificateChecker_SignedContentIOError=Error reading signed content.
-CertificateChecker_UnsignedNotAllowed=Installing unsigned artifacts is not permitted: {0}
-
-Phase_Collect_Error=An error occurred while collecting items to be installed
-Phase_Configure_Error=An error occurred while configuring the installed items
-Phase_Configure_Task=Configuring {0}
-Phase_Install_Error=An error occurred while installing the items
-Phase_Install_Task=Installing {0}
-Phase_Sizing_Error=Error computing the size. Some of the items to be installed could not be found.
-Phase_Sizing_Warning=The size may not be accurate. Some of the items did not report a size.
-Phase_Unconfigure_Error=An error occurred while unconfiguring the items to uninstall
-Phase_Uninstall_Error=An error occurred while uninstalling
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
deleted file mode 100644
index 397cd6da9..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CertificateChecker.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine.phases;
-
-import java.io.File;
-import java.io.IOException;
-import java.security.GeneralSecurityException;
-import java.security.cert.Certificate;
-import java.util.ArrayList;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.engine.EngineActivator;
-import org.eclipse.equinox.internal.p2.engine.Messages;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.core.UIServices.TrustInfo;
-import org.eclipse.osgi.service.security.TrustEngine;
-import org.eclipse.osgi.signedcontent.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class CertificateChecker {
- private ArrayList<File> artifacts;
- private final IProvisioningAgent agent;
-
- public CertificateChecker() {
- this(null);
- }
-
- public CertificateChecker(IProvisioningAgent agent) {
- this.agent = agent;
- artifacts = new ArrayList<File>();
- }
-
- public IStatus start() {
- final BundleContext context = EngineActivator.getContext();
- ServiceReference<SignedContentFactory> contentFactoryRef = context.getServiceReference(SignedContentFactory.class);
- SignedContentFactory verifierFactory = context.getService(contentFactoryRef);
- try {
- return checkCertificates(verifierFactory);
- } finally {
- context.ungetService(contentFactoryRef);
- }
- }
-
- private IStatus checkCertificates(SignedContentFactory verifierFactory) {
- UIServices serviceUI = (UIServices) agent.getService(UIServices.SERVICE_NAME);
- SignedContent content = null;
- SignerInfo[] signerInfo = null;
- ArrayList<Certificate> untrusted = new ArrayList<Certificate>();
- ArrayList<File> unsigned = new ArrayList<File>();
- ArrayList<Certificate[]> untrustedChain = new ArrayList<Certificate[]>();
- IStatus status = Status.OK_STATUS;
- if (artifacts.size() == 0 || serviceUI == null)
- return status;
- for (File artifact : artifacts) {
- try {
- content = verifierFactory.getSignedContent(artifact);
- if (!content.isSigned()) {
- unsigned.add(artifact);
- continue;
- }
- signerInfo = content.getSignerInfos();
- } catch (GeneralSecurityException e) {
- return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_SignedContentError, e);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, EngineActivator.ID, Messages.CertificateChecker_SignedContentIOError, e);
- }
- for (int i = 0; i < signerInfo.length; i++) {
- if (!signerInfo[i].isTrusted()) {
- Certificate[] certificateChain = signerInfo[i].getCertificateChain();
- if (!untrusted.contains(certificateChain[0])) {
- untrusted.add(certificateChain[0]);
- untrustedChain.add(certificateChain);
- }
- }
- }
- }
- String policy = getUnsignedContentPolicy();
- //if there is unsigned content and we should never allow it, then fail without further checking certificates
- if (!unsigned.isEmpty() && EngineActivator.UNSIGNED_FAIL.equals(policy))
- return new Status(IStatus.ERROR, EngineActivator.ID, NLS.bind(Messages.CertificateChecker_UnsignedNotAllowed, unsigned));
-
- String[] details;
- // If we always allow unsigned content, or we don't have any, we don't prompt the user about it
- if (EngineActivator.UNSIGNED_ALLOW.equals(policy) || unsigned.isEmpty())
- details = null;
- else {
- details = new String[unsigned.size()];
- for (int i = 0; i < details.length; i++) {
- details[i] = unsigned.get(i).toString();
- }
- }
- Certificate[][] unTrustedCertificateChains;
- if (untrusted.isEmpty()) {
- unTrustedCertificateChains = null;
- } else {
- unTrustedCertificateChains = new Certificate[untrustedChain.size()][];
- for (int i = 0; i < untrustedChain.size(); i++) {
- unTrustedCertificateChains[i] = untrustedChain.get(i);
- }
- }
-
- // If there was no unsigned content, and nothing untrusted, no need to prompt.
- if (details == null && unTrustedCertificateChains == null)
- return status;
-
- TrustInfo trustInfo = serviceUI.getTrustInfo(unTrustedCertificateChains, details);
-
- // If user doesn't trust unsigned content, cancel the operation
- if (!trustInfo.trustUnsignedContent())
- return Status.CANCEL_STATUS;
-
- Certificate[] trustedCertificates = trustInfo.getTrustedCertificates();
- // If we had untrusted chains and nothing was trusted, cancel the operation
- if (unTrustedCertificateChains != null && trustedCertificates == null) {
- return new Status(IStatus.CANCEL, EngineActivator.ID, Messages.CertificateChecker_CertificateRejected);
- }
- // Anything that was trusted should be removed from the untrusted list
- if (trustedCertificates != null) {
- for (int i = 0; i < trustedCertificates.length; i++) {
- untrusted.remove(trustedCertificates[i]);
- }
- }
-
- // If there is still untrusted content, cancel the operation
- if (untrusted.size() > 0)
- return new Status(IStatus.CANCEL, EngineActivator.ID, Messages.CertificateChecker_CertificateRejected);
- // If we should persist the trusted certificates, add them to the trust engine
- if (trustInfo.persistTrust())
- return persistTrustedCertificates(trustedCertificates);
-
- return status;
- }
-
- private IStatus persistTrustedCertificates(Certificate[] trustedCertificates) {
- if (trustedCertificates == null)
- // I'm pretty sure this would be a bug; trustedCertificates should never be null here.
- return new Status(IStatus.INFO, EngineActivator.ID, Messages.CertificateChecker_CertificateRejected);
- ServiceTracker<TrustEngine, TrustEngine> trustEngineTracker = new ServiceTracker<TrustEngine, TrustEngine>(EngineActivator.getContext(), TrustEngine.class, null);
- trustEngineTracker.open();
- Object[] trustEngines = trustEngineTracker.getServices();
- try {
- if (trustEngines == null)
- return null;
- for (Certificate trustedCertificate : trustedCertificates) {
- for (Object engine : trustEngines) {
- TrustEngine trustEngine = (TrustEngine) engine;
- if (trustEngine.isReadOnly())
- continue;
- try {
- trustEngine.addTrustAnchor(trustedCertificate, trustedCertificate.toString());
- // this should mean we added an anchor successfully; continue to next cert
- break;
- } catch (IOException e) {
- //just return an INFO so the user can proceed with the install
- return new Status(IStatus.INFO, EngineActivator.ID, Messages.CertificateChecker_KeystoreConnectionError, e);
- } catch (GeneralSecurityException e) {
- return new Status(IStatus.INFO, EngineActivator.ID, Messages.CertificateChecker_CertificateError, e);
- }
- }
- }
- } finally {
- trustEngineTracker.close();
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Return the policy on unsigned content.
- */
- private String getUnsignedContentPolicy() {
- String policy = EngineActivator.getContext().getProperty(EngineActivator.PROP_UNSIGNED_POLICY);
- if (policy == null)
- policy = EngineActivator.UNSIGNED_PROMPT;
- return policy;
-
- }
-
- public void add(File toAdd) {
- artifacts.add(toAdd);
- }
-
- public void add(Object[] toAdd) {
- for (int i = 0; i < toAdd.length; i++) {
- if (toAdd[i] instanceof File)
- add((File) toAdd[i]);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java
deleted file mode 100644
index 513c0f10d..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/CheckTrust.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine.phases;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
-import org.eclipse.equinox.internal.p2.engine.InstallableUnitPhase;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.PhaseSetFactory;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.ITouchpointType;
-
-/**
- * An install phase that checks if the certificates used to sign the artifacts
- * being installed are from a trusted source.
- */
-public class CheckTrust extends InstallableUnitPhase {
-
- public static final String PARM_ARTIFACT_FILES = "artifactFiles"; //$NON-NLS-1$
-
- public CheckTrust(int weight) {
- super(PhaseSetFactory.PHASE_CHECK_TRUST, weight);
- }
-
- protected boolean isApplicable(InstallableUnitOperand op) {
- return (op.second() != null);
- }
-
- protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- @SuppressWarnings("unchecked")
- Collection<File> artifactRequests = (Collection<File>) parameters.get(PARM_ARTIFACT_FILES);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
-
- // Instantiate a check trust manager
- CertificateChecker certificateChecker = new CertificateChecker(agent);
- certificateChecker.add(artifactRequests.toArray());
- IStatus status = certificateChecker.start();
-
- return status;
- }
-
- protected List<ProvisioningAction> getActions(InstallableUnitOperand operand) {
- IInstallableUnit unit = operand.second();
- List<ProvisioningAction> parsedActions = getActions(unit, phaseId);
- if (parsedActions != null)
- return parsedActions;
-
- ITouchpointType type = unit.getTouchpointType();
- if (type == null || type == ITouchpointType.NONE)
- return null;
-
- String actionId = getActionManager().getTouchpointQualifiedActionId(phaseId, type);
- ProvisioningAction action = getActionManager().getAction(actionId, null);
- if (action == null) {
- return null;
- }
- return Collections.singletonList(action);
- }
-
- protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- IInstallableUnit iu = operand.second();
- parameters.put(PARM_IU, iu);
-
- return super.initializeOperand(profile, operand, parameters, monitor);
- }
-
- protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- parameters.put(PARM_ARTIFACT_FILES, new ArrayList<File>());
- return super.initializePhase(monitor, profile, parameters);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java
deleted file mode 100644
index af6060481..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Collect.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine.phases;
-
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.ITouchpointType;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
-
-/**
- * The goal of the collect phase is to ask the touchpoints if the artifacts associated with an IU need to be downloaded.
- */
-public class Collect extends InstallableUnitPhase {
- public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
- public static final String NO_ARTIFACT_REPOSITORIES_AVAILABLE = "noArtifactRepositoriesAvailable"; //$NON-NLS-1$
-
- public Collect(int weight) {
- super(PhaseSetFactory.PHASE_COLLECT, weight);
- //re-balance work since postPerform will do almost all the time-consuming work
- prePerformWork = 0;
- mainPerformWork = 100;
- postPerformWork = 1000;
- }
-
- protected boolean isApplicable(InstallableUnitOperand op) {
- return (op.second() != null && !op.second().equals(op.first()));
- }
-
- protected List<ProvisioningAction> getActions(InstallableUnitOperand operand) {
- IInstallableUnit unit = operand.second();
- List<ProvisioningAction> parsedActions = getActions(unit, phaseId);
- if (parsedActions != null)
- return parsedActions;
-
- ITouchpointType type = unit.getTouchpointType();
- if (type == null || type == ITouchpointType.NONE)
- return null;
-
- String actionId = getActionManager().getTouchpointQualifiedActionId(phaseId, type);
- ProvisioningAction action = getActionManager().getAction(actionId, null);
- if (action == null) {
- return null;
- }
- return Collections.singletonList(action);
- }
-
- protected String getProblemMessage() {
- return Messages.Phase_Collect_Error;
- }
-
- protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- @SuppressWarnings("unchecked")
- List<IArtifactRequest[]> artifactRequests = (List<IArtifactRequest[]>) parameters.get(PARM_ARTIFACT_REQUESTS);
- ProvisioningContext context = (ProvisioningContext) parameters.get(PARM_CONTEXT);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
-
- DownloadManager dm = new DownloadManager(context, agent);
- for (IArtifactRequest[] requests : artifactRequests) {
- dm.add(requests);
- }
- return dm.start(monitor);
- }
-
- protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- parameters.put(PARM_ARTIFACT_REQUESTS, new ArrayList<IArtifactRequest[]>());
- return null;
- }
-
- protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- IStatus status = super.initializeOperand(profile, operand, parameters, monitor);
- // defer setting the IU until after the super method to avoid triggering touchpoint initialization
- IInstallableUnit iu = operand.second();
- parameters.put(PARM_IU, iu);
- return status;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
deleted file mode 100644
index 165f3afcb..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Configure.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine.phases;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.p2.engine.PhaseSetFactory;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class Configure extends InstallableUnitPhase {
-
- public Configure(int weight) {
- super(PhaseSetFactory.PHASE_CONFIGURE, weight);
- }
-
- protected boolean isApplicable(InstallableUnitOperand op) {
- return (op.second() != null);
- }
-
- protected List<ProvisioningAction> getActions(InstallableUnitOperand currentOperand) {
- IInstallableUnit unit = currentOperand.second();
- if (QueryUtil.isFragment(unit))
- return null;
- return getActions(unit, phaseId);
- }
-
- protected String getProblemMessage() {
- return Messages.Phase_Configure_Error;
- }
-
- protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- IInstallableUnit iu = operand.second();
- monitor.subTask(NLS.bind(Messages.Phase_Configure_Task, iu.getId()));
- parameters.put(PARM_IU, iu);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts != null && artifacts.size() > 0)
- parameters.put(PARM_ARTIFACT, artifacts.iterator().next());
-
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
deleted file mode 100644
index 9fe045ef0..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Install.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine.phases;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.PhaseSetFactory;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.osgi.util.NLS;
-
-public class Install extends InstallableUnitPhase {
-
- final static class BeforeInstallEventAction extends ProvisioningAction {
-
- public IStatus execute(Map<String, Object> parameters) {
- IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
- String phaseId = (String) parameters.get(PARM_PHASE_ID);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
- return null;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- String phaseId = (String) parameters.get(PARM_PHASE_ID);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- profile.removeInstallableUnit(iu);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
- return null;
- }
- }
-
- final static class AfterInstallEventAction extends ProvisioningAction {
-
- public IStatus execute(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- String phaseId = (String) parameters.get(PARM_PHASE_ID);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- profile.addInstallableUnit(iu);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
- return null;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
- String phaseId = (String) parameters.get(PARM_PHASE_ID);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
- return null;
- }
- }
-
- public Install(int weight) {
- super(PhaseSetFactory.PHASE_INSTALL, weight);
- }
-
- protected boolean isApplicable(InstallableUnitOperand op) {
- return (op.second() != null && !op.second().equals(op.first()));
- }
-
- protected List<ProvisioningAction> getActions(InstallableUnitOperand currentOperand) {
- //TODO: monitor.subTask(NLS.bind(Messages.Engine_Installing_IU, unit.getId()));
-
- ProvisioningAction beforeAction = new BeforeInstallEventAction();
- ProvisioningAction afterAction = new AfterInstallEventAction();
-
- IInstallableUnit unit = currentOperand.second();
- Touchpoint touchpoint = getActionManager().getTouchpointPoint(unit.getTouchpointType());
- if (touchpoint != null) {
- beforeAction.setTouchpoint(touchpoint);
- afterAction.setTouchpoint(touchpoint);
- }
-
- ArrayList<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
- actions.add(beforeAction);
-
- if (QueryUtil.isFragment(unit)) {
- actions.add(afterAction);
- return actions;
- }
-
- List<ProvisioningAction> parsedActions = getActions(unit, phaseId);
- if (parsedActions != null)
- actions.addAll(parsedActions);
- actions.add(afterAction);
- return actions;
- }
-
- protected String getProblemMessage() {
- return Messages.Phase_Install_Error;
- }
-
- protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- IInstallableUnit iu = operand.second();
- monitor.subTask(NLS.bind(Messages.Phase_Install_Task, iu.getId()));
- parameters.put(PARM_IU, iu);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts != null && artifacts.size() > 0)
- parameters.put(PARM_ARTIFACT, artifacts.iterator().next());
-
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java
deleted file mode 100644
index ba69b2cf3..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Property.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine.phases;
-
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.p2.engine.PhaseSetFactory;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-public class Property extends Phase {
-
- public class ProfilePropertyAction extends ProvisioningAction {
-
- public IStatus execute(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- PropertyOperand propertyOperand = (PropertyOperand) parameters.get(PARM_OPERAND);
-
- if (propertyOperand.second() == null)
- removeProfileProperty(profile, propertyOperand);
- else
- setProfileProperty(profile, propertyOperand, false);
-
- return null;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- PropertyOperand propertyOperand = (PropertyOperand) parameters.get(PARM_OPERAND);
-
- if (propertyOperand.first() == null)
- removeProfileProperty(profile, propertyOperand);
- else
- setProfileProperty(profile, propertyOperand, true);
-
- return null;
- }
-
- private void setProfileProperty(Profile profile, PropertyOperand propertyOperand, boolean undo) {
-
- String value = (String) (undo ? propertyOperand.first() : propertyOperand.second());
-
- if (propertyOperand instanceof InstallableUnitPropertyOperand) {
- InstallableUnitPropertyOperand iuPropertyOperand = (InstallableUnitPropertyOperand) propertyOperand;
- profile.setInstallableUnitProperty(iuPropertyOperand.getInstallableUnit(), iuPropertyOperand.getKey(), value);
- } else {
- profile.setProperty(propertyOperand.getKey(), value);
- }
- }
-
- private void removeProfileProperty(Profile profile, PropertyOperand propertyOperand) {
- if (propertyOperand instanceof InstallableUnitPropertyOperand) {
- InstallableUnitPropertyOperand iuPropertyOperand = (InstallableUnitPropertyOperand) propertyOperand;
- profile.removeInstallableUnitProperty(iuPropertyOperand.getInstallableUnit(), iuPropertyOperand.getKey());
- } else {
- profile.removeProperty(propertyOperand.getKey());
- }
- }
- }
-
- public class UpdateInstallableUnitProfilePropertiesAction extends ProvisioningAction {
-
- // we do not need to use a memento here since the profile is not persisted unless the operation is successful
- Map<String, String> originalSourceProperties;
- Map<String, String> originalTargetProperties;
-
- public IStatus execute(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-
- IInstallableUnit source = iuOperand.first();
- originalSourceProperties = profile.getInstallableUnitProperties(source);
-
- IInstallableUnit target = iuOperand.second();
- originalTargetProperties = profile.getInstallableUnitProperties(target);
-
- profile.addInstallableUnitProperties(target, originalSourceProperties);
- profile.clearInstallableUnitProperties(source);
-
- return null;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-
- IInstallableUnit source = iuOperand.first();
- profile.clearInstallableUnitProperties(source);
- profile.addInstallableUnitProperties(source, originalSourceProperties);
-
- IInstallableUnit target = iuOperand.second();
- profile.clearInstallableUnitProperties(target);
- profile.addInstallableUnitProperties(target, originalTargetProperties);
-
- return null;
- }
- }
-
- public class RemoveInstallableUnitProfilePropertiesAction extends ProvisioningAction {
-
- // we do not need to use a memento here since the profile is not persisted unless the operation is successful
- Map<String, String> originalSourceProperties;
- Map<String, String> originalTargetProperties;
-
- public IStatus execute(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-
- IInstallableUnit source = iuOperand.first();
- originalSourceProperties = profile.getInstallableUnitProperties(source);
- profile.clearInstallableUnitProperties(source);
-
- return null;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) parameters.get(PARM_OPERAND);
-
- IInstallableUnit source = iuOperand.first();
- profile.clearInstallableUnitProperties(source);
- profile.addInstallableUnitProperties(source, originalSourceProperties);
-
- return null;
- }
- }
-
- public Property(int weight) {
- super(PhaseSetFactory.PHASE_PROPERTY, weight);
- }
-
- protected List<ProvisioningAction> getActions(Operand operand) {
- if (operand instanceof PropertyOperand)
- return Collections.<ProvisioningAction> singletonList(new ProfilePropertyAction());
-
- if (operand instanceof InstallableUnitOperand) {
- InstallableUnitOperand iuOperand = (InstallableUnitOperand) operand;
- if (iuOperand.first() != null) {
- if (iuOperand.second() != null) {
- return Collections.<ProvisioningAction> singletonList(new UpdateInstallableUnitProfilePropertiesAction());
- }
- return Collections.<ProvisioningAction> singletonList(new RemoveInstallableUnitProfilePropertiesAction());
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java
deleted file mode 100644
index 792f04cb4..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Sizing.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine.phases;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.ITouchpointType;
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-
-public class Sizing extends InstallableUnitPhase {
- private static final String PHASE_ID = "sizing"; //$NON-NLS-1$
- private static final String COLLECT_PHASE_ID = "collect"; //$NON-NLS-1$
-
- private long sizeOnDisk;
- private long dlSize;
-
- public Sizing(int weight) {
- super(PHASE_ID, weight);
- }
-
- protected boolean isApplicable(InstallableUnitOperand op) {
- return (op.second() != null && !op.second().equals(op.first()));
- }
-
- public long getDiskSize() {
- return sizeOnDisk;
- }
-
- public long getDownloadSize() {
- return dlSize;
- }
-
- protected List<ProvisioningAction> getActions(InstallableUnitOperand operand) {
- IInstallableUnit unit = operand.second();
- List<ProvisioningAction> parsedActions = getActions(unit, COLLECT_PHASE_ID);
- if (parsedActions != null)
- return parsedActions;
-
- ITouchpointType type = unit.getTouchpointType();
- if (type == null || type == ITouchpointType.NONE)
- return null;
-
- String actionId = getActionManager().getTouchpointQualifiedActionId(COLLECT_PHASE_ID, type);
- ProvisioningAction action = getActionManager().getAction(actionId, null);
- if (action == null) {
- return null;
- }
- return Collections.singletonList(action);
- }
-
- protected String getProblemMessage() {
- return Messages.Phase_Sizing_Error;
- }
-
- protected IStatus completePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- @SuppressWarnings("unchecked")
- List<IArtifactRequest[]> artifactRequests = (List<IArtifactRequest[]>) parameters.get(Collect.PARM_ARTIFACT_REQUESTS);
- ProvisioningContext context = (ProvisioningContext) parameters.get(PARM_CONTEXT);
- int statusCode = 0;
-
- Set<IArtifactRequest> artifactsToObtain = new HashSet<IArtifactRequest>(artifactRequests.size());
-
- for (IArtifactRequest[] requests : artifactRequests) {
- if (requests == null)
- continue;
- for (int i = 0; i < requests.length; i++) {
- artifactsToObtain.add(requests[i]);
- }
- }
-
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
-
- SubMonitor sub = SubMonitor.convert(monitor, 1000);
- IQueryable<IArtifactRepository> repoQueryable = context.getArtifactRepositories(sub.newChild(500));
- IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
- IArtifactRepository[] repositories = repoQueryable.query(all, sub.newChild(500)).toArray(IArtifactRepository.class);
-
- for (IArtifactRequest artifactRequest : artifactsToObtain) {
- if (sub.isCanceled())
- break;
- boolean found = false;
- for (int i = 0; i < repositories.length; i++) {
- IArtifactRepository repo = repositories[i];
- if (sub.isCanceled())
- return Status.CANCEL_STATUS;
- IArtifactDescriptor[] descriptors = repo.getArtifactDescriptors(artifactRequest.getArtifactKey());
- if (descriptors.length > 0) {
- if (descriptors[0].getProperty(IArtifactDescriptor.ARTIFACT_SIZE) != null)
- sizeOnDisk += Long.parseLong(descriptors[0].getProperty(IArtifactDescriptor.ARTIFACT_SIZE));
- else
- statusCode = ProvisionException.ARTIFACT_INCOMPLETE_SIZING;
- if (descriptors[0].getProperty(IArtifactDescriptor.DOWNLOAD_SIZE) != null)
- dlSize += Long.parseLong(descriptors[0].getProperty(IArtifactDescriptor.DOWNLOAD_SIZE));
- else
- statusCode = ProvisionException.ARTIFACT_INCOMPLETE_SIZING;
- found = true;
- break;
- }
- }
- if (!found)
- // The artifact wasn't present in any repository
- return new Status(IStatus.ERROR, EngineActivator.ID, ProvisionException.ARTIFACT_NOT_FOUND, Messages.Phase_Sizing_Error, null);
- }
- if (statusCode != 0)
- return new Status(IStatus.WARNING, EngineActivator.ID, statusCode, Messages.Phase_Sizing_Warning, null);
- return null;
- }
-
- protected IStatus initializePhase(IProgressMonitor monitor, IProfile profile, Map<String, Object> parameters) {
- parameters.put(Collect.PARM_ARTIFACT_REQUESTS, new ArrayList<IArtifactRequest[]>());
- return null;
- }
-
- protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- IStatus status = super.initializeOperand(profile, operand, parameters, monitor);
- // defer setting the IU until after the super method to avoid triggering touchpoint initialization
- IInstallableUnit iu = operand.second();
- parameters.put(PARM_IU, iu);
- return status;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
deleted file mode 100644
index d6181ab8d..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Unconfigure.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine.phases;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.p2.engine.PhaseSetFactory;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-public class Unconfigure extends InstallableUnitPhase {
-
- public Unconfigure(int weight, boolean forced) {
- super(PhaseSetFactory.PHASE_UNCONFIGURE, weight, forced);
- }
-
- public Unconfigure(int weight) {
- this(weight, false);
- }
-
- protected boolean isApplicable(InstallableUnitOperand op) {
- return (op.first() != null);
- }
-
- protected List<ProvisioningAction> getActions(InstallableUnitOperand currentOperand) {
- //TODO: monitor.subTask(NLS.bind(Messages.Engine_Unconfiguring_IU, unit.getId()));
-
- IInstallableUnit unit = currentOperand.first();
- if (QueryUtil.isFragment(unit))
- return null;
-
- return getActions(unit, phaseId);
- }
-
- protected String getProblemMessage() {
- return Messages.Phase_Unconfigure_Error;
- }
-
- protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- IInstallableUnit iu = operand.first();
- parameters.put(PARM_IU, iu);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts != null && artifacts.size() > 0)
- parameters.put(PARM_ARTIFACT, artifacts.iterator().next());
-
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
deleted file mode 100644
index f0b7adc80..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/phases/Uninstall.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.engine.phases;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.PhaseSetFactory;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-public class Uninstall extends InstallableUnitPhase {
-
- final static class BeforeUninstallEventAction extends ProvisioningAction {
- public IStatus execute(Map<String, Object> parameters) {
- IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
- String phaseId = (String) parameters.get(PARM_PHASE_ID);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
- return null;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- String phaseId = (String) parameters.get(PARM_PHASE_ID);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- profile.addInstallableUnit(iu);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
- return null;
- }
- }
-
- final static class AfterUninstallEventAction extends ProvisioningAction {
- public IStatus execute(Map<String, Object> parameters) {
- Profile profile = (Profile) parameters.get(PARM_PROFILE);
- String phaseId = (String) parameters.get(PARM_PHASE_ID);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- profile.removeInstallableUnit(iu);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, false, profile, iu, InstallableUnitEvent.UNINSTALL, getTouchpoint()));
- return null;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- IProfile profile = (IProfile) parameters.get(PARM_PROFILE);
- String phaseId = (String) parameters.get(PARM_PHASE_ID);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- ((IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME)).publishEvent(new InstallableUnitEvent(phaseId, true, profile, iu, InstallableUnitEvent.INSTALL, getTouchpoint()));
- return null;
- }
- }
-
- public Uninstall(int weight, boolean forced) {
- super(PhaseSetFactory.PHASE_UNINSTALL, weight, forced);
- }
-
- public Uninstall(int weight) {
- this(weight, false);
- }
-
- protected boolean isApplicable(InstallableUnitOperand op) {
- return (op.first() != null && !op.first().equals(op.second()));
- }
-
- protected List<ProvisioningAction> getActions(InstallableUnitOperand currentOperand) {
- //TODO: monitor.subTask(NLS.bind(Messages.Engine_Uninstalling_IU, unit.getId()));
-
- ProvisioningAction beforeAction = new BeforeUninstallEventAction();
- ProvisioningAction afterAction = new AfterUninstallEventAction();
-
- IInstallableUnit unit = currentOperand.first();
- Touchpoint touchpoint = getActionManager().getTouchpointPoint(unit.getTouchpointType());
- if (touchpoint != null) {
- beforeAction.setTouchpoint(touchpoint);
- afterAction.setTouchpoint(touchpoint);
- }
-
- ArrayList<ProvisioningAction> actions = new ArrayList<ProvisioningAction>();
- actions.add(beforeAction);
-
- if (QueryUtil.isFragment(unit)) {
- actions.add(afterAction);
- return actions;
- }
-
- List<ProvisioningAction> parsedActions = getActions(unit, phaseId);
- if (parsedActions != null)
- actions.addAll(parsedActions);
- actions.add(afterAction);
- return actions;
- }
-
- protected String getProblemMessage() {
- return Messages.Phase_Uninstall_Error;
- }
-
- protected IStatus initializeOperand(IProfile profile, InstallableUnitOperand operand, Map<String, Object> parameters, IProgressMonitor monitor) {
- IInstallableUnit iu = operand.first();
- parameters.put(PARM_IU, iu);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts != null && artifacts.size() > 0)
- parameters.put(PARM_ARTIFACT, artifacts.iterator().next());
-
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java
deleted file mode 100644
index fd626d36b..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IEngine.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Band XI International, LLC 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:
- * Band XI - initial API and implementation
- * IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * The engine is a service that naively performs a set of requested changes to a provisioned
- * system. No attempt is made to determine whether the requested changes or the
- * resulting system are valid or consistent. It is assumed that the engine client has
- * crafted a valid provisioning plan for the engine to perform, typically by using a planner
- * service.
- * <p>
- * The engine operates by executing a series of installation phases. The client can
- * customize the set of phases that are executed, or else the engine will execute
- * a default set of phases. During each phase the changes described by the provisioning
- * plan are performed against the profile being provisioned.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IEngine {
- /**
- * Service name constant for the engine service.
- */
- public static final String SERVICE_NAME = IEngine.class.getName();
-
- /**
- * Creates a provisioning plan whose methods can be use to provide pre-validated changes.
- * This is an advanced method for clients that know they are creating changes that do
- * not require validation by a planner. Most clients should instead obtain a validated plan
- * from a planner.
- *
- * @param profile The profile to operate against
- * @param context The provisioning context for the plan
- * @return A provisioning plan
- */
-
- public IProvisioningPlan createPlan(IProfile profile, ProvisioningContext context);
-
- /**
- * Executes a provisioning plan.
- *
- * @param plan The plan describing the changes to be made
- * @param phaseSet The phases to run, or <code>null</code> to run default phases
- * @param monitor A progress monitor, or <code>null</code> if progress reporting is not required
- * @return The result of executing the plan
- */
- public IStatus perform(IProvisioningPlan plan, IPhaseSet phaseSet, IProgressMonitor monitor);
-
- /**
- * Executes a provisioning plan with a default phase set and context.
- *
- * @param plan The plan describing the changes to be made
- * @param monitor A progress monitor, or <code>null</code> if progress reporting is not required
- * @return The result of executing the plan
- */
- public IStatus perform(IProvisioningPlan plan, IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IPhaseSet.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IPhaseSet.java
deleted file mode 100644
index 0d315e10f..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IPhaseSet.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-/**
- * Describes a set of provisioning phases to be performed by an {@link IEngine}.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IPhaseSet {
-
- /**
- * Returns the ids of the phases to be performed by this phase set. The order
- * of the returned ids indicates the order in which the phases will be run.
- * @return The phase ids.
- */
- public String[] getPhaseIds();
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfile.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfile.java
deleted file mode 100644
index aded17899..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfile.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * Represents the state of a profile in a profile registry at a given moment in time.
- * Note this object contains only a snapshot of a particular profile state, and will
- * never be updated if subsequent changes are made to this profile. A client should
- * never retain an {@link IProfile} instance, but rather retain the profile id and obtain
- * the current state of the profile from the profile registry only when required.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IProfile extends IQueryable<IInstallableUnit> {
-
- /**
- * Constant used to indicate that an installable unit is not locked in anyway.
- * @see #PROP_PROFILE_LOCKED_IU
- */
- public static int LOCK_NONE = 0;
- /**
- * Constant used to indicate that an installable unit is locked so that it may
- * not be uninstalled.
- * @see #PROP_PROFILE_LOCKED_IU
- */
- public static int LOCK_UNINSTALL = 1 << 0;
- /**
- * Constant used to indicate that an installable unit is locked so that it may
- * not be updated.
- * @see #PROP_PROFILE_LOCKED_IU
- */
- public static int LOCK_UPDATE = 1 << 1;
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.type.lock"</code>) for an
- * integer property indicating how an installable unit is locked in its profile.
- * The integer is a bit-mask indicating the different locks defined on the installable
- * unit. The property should be obtained from a profile using
- * IProfile#getInstallableUnitProperty(IInstallableUnit, String).
- *
- * @see #LOCK_UNINSTALL
- * @see #LOCK_UPDATE
- * @see #LOCK_NONE
- */
- public static final String PROP_PROFILE_LOCKED_IU = "org.eclipse.equinox.p2.type.lock"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.type.root"</code>) for a
- * boolean property indicating whether an installable unit should be considered
- * a root of the install. Typically this means the unit will appear to the end user
- * as a top-level installed item. The property should be obtained from a profile using
- * IProfile#getInstallableUnitProperty(IInstallableUnit, String).
- *
- * @see #LOCK_UNINSTALL
- * @see #LOCK_UPDATE
- * @see #LOCK_NONE
- */
- public static final String PROP_PROFILE_ROOT_IU = "org.eclipse.equinox.p2.type.root"; //$NON-NLS-1$
-
- /**
- * Profile property constant indicating the install folder for the profile.
- */
- public static final String PROP_INSTALL_FOLDER = "org.eclipse.equinox.p2.installFolder"; //$NON-NLS-1$
- /**
- * Profile property constant indicating the configuration folder for the profile.
- */
- public static final String PROP_CONFIGURATION_FOLDER = "org.eclipse.equinox.p2.configurationFolder"; //$NON-NLS-1$
- /**
- * Profile property constant indicating the location of the launcher configuration file for the profile.
- */
- public static final String PROP_LAUNCHER_CONFIGURATION = "org.eclipse.equinox.p2.launcherConfiguration"; //$NON-NLS-1$
-
- /**
- * Profile property constant indicating the installed language(s) for the profile.
- */
- public static final String PROP_NL = "org.eclipse.equinox.p2.nl"; //$NON-NLS-1$
- /**
- * Profile property constant for a string property indicating a user visible short
- * textual description of this profile. May be empty or <code>null</code>, and
- * generally will be for non-top level install contexts.
- */
- public static final String PROP_DESCRIPTION = "org.eclipse.equinox.p2.description"; //$NON-NLS-1$
- /**
- * Profile property constant for a string property indicating a user visible name of this profile.
- * May be empty or <code>null</code>, and generally will be for non-top level
- * install contexts.
- */
- public static final String PROP_NAME = "org.eclipse.equinox.p2.name"; //$NON-NLS-1$
- /**
- * Profile property constant indicating the list of environments
- * (e.g., OS, WS, ...) in which a profile can operate. The value of the property
- * is a comma-delimited string of key/value pairs.
- */
- public static final String PROP_ENVIRONMENTS = "org.eclipse.equinox.p2.environments"; //$NON-NLS-1$
- /**
- * Profile property constant for a boolean property indicating if the profiling
- * is roaming. A roaming profile is one whose physical install location varies
- * and is updated whenever it runs.
- */
- public static final String PROP_ROAMING = "org.eclipse.equinox.p2.roaming"; //$NON-NLS-1$
- /**
- * Profile property constant indicating the bundle pool cache location.
- */
- public static final String PROP_CACHE = "org.eclipse.equinox.p2.cache"; //$NON-NLS-1$
-
- /**
- * Profile property constant indicating a shared read-only bundle pool cache location.
- */
- public static final String PROP_SHARED_CACHE = "org.eclipse.equinox.p2.cache.shared"; //$NON-NLS-1$
-
- /**
- * Profile property constant for a boolean property indicating if update features should
- * be installed in this profile
- */
- public static final String PROP_INSTALL_FEATURES = "org.eclipse.update.install.features"; //$NON-NLS-1$
-
- /**
- * Returns the provisioning agent that manages this profile
- * @return A provisioning agent.
- */
- public IProvisioningAgent getProvisioningAgent();
-
- /**
- * Returns the id of this profile, unique within a given profile registry
- * @return the profile id
- */
- public String getProfileId();
-
- /**
- * Returns the profile property associated with the given key,
- * or <code>null</code> if this property is not present
- * @param key The property kid
- * @return the property value, or <code>null</code>
- */
- public String getProperty(String key);
-
- /**
- * Returns the profile property associated with the given installable unit.
- * @param iu the installable unit to return the property for
- * @param key the property key
- * @return the property value, or <code>null</code> if no such property is defined
- */
- public String getInstallableUnitProperty(IInstallableUnit iu, String key);
-
- /**
- * Returns an unmodifiable map of all profile properties.
- * @return a map of all profile properties.
- */
- public Map<String, String> getProperties();
-
- /**
- * Returns an unmodifiable map of all profile properties associated with the given
- * installable unit in this profile.
- * @param iu the installable unit to return profile properties for
- * @return an unmodifiable map of installable unit profile properties
- */
- public Map<String, String> getInstallableUnitProperties(IInstallableUnit iu);
-
- /**
- * Returns a timestamp describing when this profile snapshot was created.
- * @return A profile timestamp
- */
- public long getTimestamp();
-
- /**
- * Returns the installable units in this profile that match the given query. In a shared
- * install, this will include both the installable units in the shared base location, and in
- * the current user's private install area.
- * @param query
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The installable units that match the given query
- */
- public IQueryResult<IInstallableUnit> available(IQuery<IInstallableUnit> query, IProgressMonitor monitor);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileEvent.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileEvent.java
deleted file mode 100644
index a1f5b3403..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileEvent.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-
-/**
- * An event indicating that a profile has been added, removed, or changed.
- * @see IProvisioningEventBus
- * @since 2.0
- */
-public interface IProfileEvent {
-
- /**
- * Event constant (value 0) indicating that a profile has been added to a profile registry.
- */
- public static final int ADDED = 0;
- /**
- * Event constant (value 1) indicating that a profile has been removed from a profile registry.
- */
- public static final int REMOVED = 1;
- /**
- * Event constant (value 0) indicating that a profile has been changed in a profile registry.
- */
- public static final int CHANGED = 2;
-
- /**
- * Returns the reason for the event. The reason will be one of the event constants
- * {@link #ADDED}, {@link #REMOVED}, or {@link #CHANGED}.
- * @return the reason for the event
- */
- public int getReason();
-
- /**
- * Returns the id of the profile that changed.
- * @return the id of the profile that changed
- */
- public String getProfileId();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileRegistry.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileRegistry.java
deleted file mode 100644
index 3dfaa6e76..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProfileRegistry.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-import java.util.Map;
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-/**
- * This encapsulates the access to the profile registry.
- * It deals with persistence in a transparent way.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IProfileRegistry {
- /**
- * A special profile id representing the profile of the currently running system.
- * This constant can be used when invoking {@link #getProfile(String)} to obtain
- * the profile of the currently running system. Note that a given profile registry
- * may not have a defined self profile, for example if the running system doesn't
- * have a profile, or resides in a different profile registry.
- */
- public static final String SELF = "_SELF_"; //$NON-NLS-1$
- /**
- * Service name constant for the profile registry service.
- */
- public static final String SERVICE_NAME = IProfileRegistry.class.getName();
-
- /**
- * Return the profile in the registry that has the given id. If it does not exist,
- * then return <code>null</code>.
- *
- * @param id the profile identifier
- * @return the profile or <code>null</code>
- */
- public IProfile getProfile(String id);
-
- /**
- * Return the profile in the registry that has the given id and timestamp. If it does not exist,
- * then return <code>null</code>.
- *
- * @param id the profile identifier
- * @param timestamp the profile's timestamp
- * @return the profile or <code>null</code>
- */
- public IProfile getProfile(String id, long timestamp);
-
- /**
- * Return an array of timestamps in ascending order for the profile id in question.
- * If there are none, then return an empty array.
- *
- * @param id the id of the profile to list timestamps for
- * @return the array of timestamps
- */
- public long[] listProfileTimestamps(String id);
-
- /**
- * Return an array of profiles known to this registry. If there are none, then
- * return an empty array.
- *
- * @return the array of profiles
- */
- public IProfile[] getProfiles();
-
- /**
- * Add the given profile to this profile registry.
- *
- * @param id the profile id
- * @throws ProvisionException if a profile
- * with the same id is already present in the registry.
- * @return the new empty profile
- */
- public IProfile addProfile(String id) throws ProvisionException;
-
- /**
- * Add the given profile to this profile registry.
- *
- * @param id the profile id
- * @param properties the profile properties
- * @throws ProvisionException if a profile
- * with the same id is already present in the registry.
- * @return the new empty profile
- */
- public IProfile addProfile(String id, Map<String, String> properties) throws ProvisionException;
-
- /**
- * Returns whether this profile registry contains a profile with the given id.
- *
- * @param profileId The id of the profile to search for
- * @return <code>true</code> if this registry contains a profile with the given id,
- * and <code>false</code> otherwise.
- */
- public boolean containsProfile(String profileId);
-
- /**
- * Remove the given profile snapshot from this profile registry. This method has no effect
- * if this registry does not contain a profile with the given id and timestamp.
- * The current profile cannot be removed using this method.
- *
- * @param id the profile to remove
- * @param timestamp the timestamp of the profile to remove
- * @throws ProvisionException if the profile with the specified id and timestamp is the current profile.
- */
- public void removeProfile(String id, long timestamp) throws ProvisionException;
-
- /**
- * Remove the given profile from this profile registry. This method has no effect
- * if this registry does not contain a profile with the given id.
- *
- * @param id the profile to remove
- */
- public void removeProfile(String id);
-
- /**
- * Check if the given profile from this profile registry is up-to-date.
- *
- * @param profile the profile to check
- * @return boolean true if the profile is current; false otherwise.
- */
- public boolean isCurrent(IProfile profile);
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
deleted file mode 100644
index c67ab03a1..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/IProvisioningPlan.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQueryable;
-
-/**
- * A provisioning plan describes a proposed set of changes to a profile. The
- * proposed changes may represent a valid and consistent set of changes, or it
- * may represent a set of changes that would cause errors if executed. In this
- * case the plan contains information about the severity and explanation for the
- * problems.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IProvisioningPlan {
-
- /**
- * Returns the proposed set of installable units to be added to the profile.
- *
- * @return The proposed profile additions
- */
- public IQueryable<IInstallableUnit> getAdditions();
-
- /**
- * Returns the provisioning context in which this plan was created.
- *
- * @return The plan's provisioning context
- */
- public ProvisioningContext getContext();
-
- /**
- * Returns a plan describing the proposed set of changes to the provisioning infrastructure
- * required by this plan. The installer changes must be performed before this plan
- * can be successfully executed.
- *
- * @return The installer plan.
- */
- public IProvisioningPlan getInstallerPlan();
-
- /**
- * Returns the profile that this plan will operate on.
- *
- * @return The target profile for this plan
- */
- public IProfile getProfile();
-
- /**
- * Returns the proposed set of installable units to be removed from this profile.
- *
- * @return The proposed profile removals.
- */
- public IQueryable<IInstallableUnit> getRemovals();
-
- /**
- * Returns the overall plan status. The severity of this status indicates
- * whether the plan can be successfully executed or not:
- * <ul>
- * <li>A status of {@link IStatus#OK} indicates that the plan can be executed successfully.</li>
- * <li>A status of {@link IStatus#INFO} or {@link IStatus#WARNING} indicates
- * that the plan can be executed but may cause problems.</li>
- * <li>A status of {@link IStatus#ERROR} indicates that the plan cannot be executed
- * successfully.</li>
- * <li>A status of {@link IStatus#CANCEL} indicates that the plan computation was
- * canceled and is incomplete. A canceled plan cannot be executed.</li>
- * </ul>
- *
- * @return The overall plan status.
- */
- public IStatus getStatus();
-
- /**
- * Adds an installable unit to the plan. This will cause the given installable unit
- * to be installed into the profile when this plan is executed by the engine.
- * <p>
- * This is an advanced operation that should only be performed by clients crafting
- * their own custom plan. Most clients should instead use a planner service
- * to construct a valid plan based on a profile change request.
- * </p>
- * @param iu the installable unit to add
- */
- public void addInstallableUnit(IInstallableUnit iu);
-
- /**
- * Removes an installable unit from the plan. This will cause the given installable unit
- * to be remove from the profile when this plan is executed by the engine.
- * <p>
- * This is an advanced operation that should only be performed by clients crafting
- * their own custom plan. Most clients should instead use a planner service
- * to construct a valid plan based on a profile change request.
- * </p>
- * @param iu the installable unit to add
- */
- public void removeInstallableUnit(IInstallableUnit iu);
-
- /**
- * Adds a profile property corresponding to the given installable unit to the plan.
- * This will cause the given installable unit property to be installed into the profile
- * when this plan is executed by the engine.
- * <p>
- * This is an advanced operation that should only be performed by clients crafting
- * their own custom plan. Most clients should instead use a planner service
- * to construct a valid plan based on a profile change request.
- * </p>
- * @param iu the installable unit to set a property for
- * @param name the property name
- * @param value the property value
- */
- public void setInstallableUnitProfileProperty(IInstallableUnit iu, String name, String value);
-
- /**
- * Sets the installer plan for this plan. The installer plan describes the set of changes
- * that must be made to the provisioning agent in order for this plan to execute
- * successfully.
- * <p>
- * This is an advanced operation that should only be performed by clients crafting
- * their own custom plan. Most clients should instead use a planner service
- * to construct a valid plan based on a profile change request.
- * </p>
- * @param installerPlan the plan describing changes to the provisioning agent
- */
- public void setInstallerPlan(IProvisioningPlan installerPlan);
-
- /**
- * Sets a profile property in the plan. This will cause the given property
- * to be added to the profile when this plan is executed by the engine.
- * <p>
- * This is an advanced operation that should only be performed by clients crafting
- * their own custom plan. Most clients should instead use a planner service
- * to construct a valid plan based on a profile change request.
- * </p>
- * @param name the profile property name
- * @param value the profile property value
- */
- public void setProfileProperty(String name, String value);
-
- /**
- * Sets the overall plan status, describing whether the planner constructing
- * this plan believes it will install successfully, or whether it contains errors
- * or the plan computation has been canceled.
- * <p>
- * This is an advanced operation that should only be performed by clients crafting
- * their own custom plan. Most clients should instead use a planner service
- * to construct a valid plan based on a profile change request.
- * </p>
- * @param status the plan status
- */
- public void setStatus(IStatus status);
-
- /**
- * Adds an instruction to replace one installable unit in the profile with another.
- * This will cause the 'from' installable unit property to be uninstalled from the profile
- * and the 'to' installable unit to be added to the profile when this plan is executed
- * by the engine.
- * <p>
- * This is an advanced operation that should only be performed by clients crafting
- * their own custom plan. Most clients should instead use a planner service
- * to construct a valid plan based on a profile change request.
- * </p>
- * @param from the installable unit to remove
- * @param to the installable unit to add
- */
- public void updateInstallableUnit(IInstallableUnit from, IInstallableUnit to);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ISizingPhaseSet.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ISizingPhaseSet.java
deleted file mode 100644
index f8037fc31..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ISizingPhaseSet.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-/**
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- * @since 2.0
- */
-public interface ISizingPhaseSet extends IPhaseSet {
-
- public long getDiskSize();
-
- public long getDownloadSize();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java
deleted file mode 100644
index 75d974c46..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/PhaseSetFactory.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.internal.p2.engine.phases.*;
-
-/**
- * @since 2.0
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class PhaseSetFactory {
-
- private static final boolean forcedUninstall = Boolean.valueOf(EngineActivator.getContext().getProperty("org.eclipse.equinox.p2.engine.forcedUninstall")).booleanValue(); //$NON-NLS-1$
-
- /**
- * A phase id (value "checkTrust") describing the certificate trust check phase.
- * This phase examines the code signing certificates of the artifacts being installed
- * to ensure they are signed and trusted by the running system.
- */
- public static String PHASE_CHECK_TRUST = "checkTrust"; //$NON-NLS-1$
- /**
- * A phase id (value "collect") describing the collect phase.
- * This phase gathers all the artifacts to be installed, typically by copying them
- * from some repository into a suitable local location for the application being installed.
- */
- public static String PHASE_COLLECT = "collect"; //$NON-NLS-1$
- /**
- * A phase id (value "configure") describing the configuration phase.
- * This phase writes configuration data related to the software being provisioned.
- * Until configuration occurs the end user of the software will be have access to
- * the installed functionality.
- */
- public static String PHASE_CONFIGURE = "configure"; //$NON-NLS-1$
- /**
- * A phase id (value "install") describing the install phase.
- * This phase performs any necessary transformations on the downloaded
- * artifacts to put them in the correct shape for the running application, such
- * as decompressing or moving content, setting file permissions, etc).
- */
- public static String PHASE_INSTALL = "install"; //$NON-NLS-1$
- /**
- * A phase id (value "property") describing the property modification phase.
- * This phase performs changes to profile properties.
- */
- public static String PHASE_PROPERTY = "property"; //$NON-NLS-1$
- /**
- * A phase id (value "unconfigure") describing the unconfigure phase.
- * This phase removes configuration data related to the software being removed.
- * This phase is the inverse of the changes performed in the configure phase.
- */
- public static String PHASE_UNCONFIGURE = "unconfigure"; //$NON-NLS-1$
- /**
- * A phase id (value "uninstall") describing the uninstall phase.
- * This phase removes artifacts from the system being provisioned that are
- * no longer required in the new profile.
- */
- public static String PHASE_UNINSTALL = "uninstall"; //$NON-NLS-1$
-
- private static final List<String> ALL_PHASES_LIST = Arrays.asList(new String[] {PHASE_COLLECT, PHASE_UNCONFIGURE, PHASE_UNINSTALL, PHASE_PROPERTY, PHASE_CHECK_TRUST, PHASE_INSTALL, PHASE_CONFIGURE});
-
- /**
- * Creates a default phase set that covers all the provisioning operations.
- * Phases can be specified for exclusion.
- *
- * @param exclude - A set of bit options that specify the phases to exclude.
- * See {@link PhaseSetFactory} for possible options
- * @return the {@link PhaseSet}
- */
- public static final IPhaseSet createDefaultPhaseSetExcluding(String[] exclude) {
- if (exclude == null || exclude.length == 0)
- return createDefaultPhaseSet();
- List<String> excludeList = Arrays.asList(exclude);
- List<String> includeList = new ArrayList<String>(ALL_PHASES_LIST);
- includeList.removeAll(excludeList);
- return createPhaseSetIncluding(includeList.toArray(new String[includeList.size()]));
- }
-
- /**
- * Creates a default phase set that covers all the provisioning operations.
- * Phases can be specified for inclusion.
- *
- * @param include - A set of bit options that specify the phases to include.
- * See {@link PhaseSetFactory} for possible options
- * @return the {@link PhaseSet}
- */
- public static final IPhaseSet createPhaseSetIncluding(String[] include) {
- if (include == null || include.length == 0)
- return new PhaseSet(new Phase[0]);
- List<String> includeList = Arrays.asList(include);
- ArrayList<Phase> phases = new ArrayList<Phase>();
- if (includeList.contains(PHASE_COLLECT))
- phases.add(new Collect(100));
- if (includeList.contains(PHASE_CHECK_TRUST))
- phases.add(new CheckTrust(10));
- if (includeList.contains(PHASE_UNCONFIGURE))
- phases.add(new Unconfigure(10, forcedUninstall));
- if (includeList.contains(PHASE_UNINSTALL))
- phases.add(new Uninstall(50, forcedUninstall));
- if (includeList.contains(PHASE_PROPERTY))
- phases.add(new Property(1));
- if (includeList.contains(PHASE_INSTALL))
- phases.add(new Install(50));
- if (includeList.contains(PHASE_CONFIGURE))
- phases.add(new Configure(10));
- return new PhaseSet(phases.toArray(new Phase[phases.size()]));
- }
-
- public static IPhaseSet createDefaultPhaseSet() {
- return createPhaseSetIncluding(ALL_PHASES_LIST.toArray(new String[ALL_PHASES_LIST.size()]));
- }
-
- public static ISizingPhaseSet createSizingPhaseSet() {
- return new SizingPhaseSet();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProfileScope.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProfileScope.java
deleted file mode 100644
index 2a4c26554..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProfileScope.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-import org.eclipse.core.internal.preferences.PreferencesService;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.security.storage.EncodingUtils;
-
-/**
- * A profile scope contains the preferences associated with a particular profile
- * in a provisioned system.
- * @see IProfile
- * @since 2.0
- */
-public final class ProfileScope implements IScopeContext {
-
- /**
- * String constant (value of <code>"profile"</code>) used for the
- * scope name for this preference scope.
- */
- public static final String SCOPE = "profile"; //$NON-NLS-1$
-
- private String profileId;
-
- private IAgentLocation location;
-
- /**
- * Creates and returns a profile scope for the given profile id and agent.
- * @param agentLocation The location of the provisioning agent to obtain profile preferences for
- * @param profileId The id of the profile to obtain preferences for
- */
- public ProfileScope(IAgentLocation agentLocation, String profileId) {
- super();
- Assert.isNotNull(agentLocation);
- Assert.isNotNull(profileId);
- this.profileId = profileId;
- this.location = agentLocation;
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.IScopeContext#getLocation()
- */
- public IPath getLocation() {
- // Null returned as the location should only be used when the profile is locked
- return null;
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.IScopeContext#getName()
- */
- public String getName() {
- return SCOPE;
- }
-
- /*
- * Default path hierarchy for profile nodes is /profile/<profileId>/<qualifier>.
- *
- * @see org.eclipse.core.runtime.preferences.IScopeContext#getNode(java.lang.String)
- */
- public IEclipsePreferences getNode(String qualifier) {
- if (qualifier == null)
- throw new IllegalArgumentException();
- String locationString = EncodingUtils.encodeSlashes(location.getRootLocation().toString());
- //format is /profile/{agentLocationURI}/{profileId}/qualifier
- return (IEclipsePreferences) PreferencesService.getDefault().getRootNode().node(getName()).node(locationString).node(profileId).node(qualifier);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!super.equals(obj))
- return false;
- if (!(obj instanceof ProfileScope))
- return false;
- ProfileScope other = (ProfileScope) obj;
- return profileId.equals(other.profileId);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return super.hashCode() + profileId.hashCode();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
deleted file mode 100644
index 9e80b7339..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * WindRiver - https://bugs.eclipse.org/bugs/show_bug.cgi?id=227372
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.DebugHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * A provisioning context defines the scope in which a provisioning operation
- * occurs. A context can be used to specify the set of repositories available
- * to the planner and engine as they perform provisioning work.
- * @since 2.0
- */
-public class ProvisioningContext {
- private IProvisioningAgent agent;
- private URI[] artifactRepositories; //artifact repositories to consult
- private final List<IInstallableUnit> extraIUs = Collections.synchronizedList(new ArrayList<IInstallableUnit>());
- private URI[] metadataRepositories; //metadata repositories to consult
- private final Map<String, String> properties = new HashMap<String, String>();
- private Map<String, URI> referencedArtifactRepositories = null;
-
- private static final String FILE_PROTOCOL = "file"; //$NON-NLS-1$
-
- class ArtifactRepositoryQueryable implements IQueryable<IArtifactRepository> {
- List<IArtifactRepository> repositories;
-
- ArtifactRepositoryQueryable(List<IArtifactRepository> repositories) {
- this.repositories = repositories;
- }
-
- public IQueryResult<IArtifactRepository> query(IQuery<IArtifactRepository> query, IProgressMonitor mon) {
- return query.perform(repositories.listIterator());
- }
- }
-
- /**
- * This Comparator sorts the repositories such that local repositories are first
- */
- private static final Comparator<URI> LOCAL_FIRST_COMPARATOR = new Comparator<URI>() {
-
- public int compare(URI arg0, URI arg1) {
- String protocol0 = arg0.getScheme();
- String protocol1 = arg1.getScheme();
-
- if (FILE_PROTOCOL.equals(protocol0) && !FILE_PROTOCOL.equals(protocol1))
- return -1;
- if (!FILE_PROTOCOL.equals(protocol0) && FILE_PROTOCOL.equals(protocol1))
- return 1;
- return 0;
- }
- };
-
- /**
- * Instructs the provisioning context to follow metadata repository references when
- * providing queryables for obtaining metadata and artifacts. When this property is set to
- * "true", then metadata repository references that are encountered while loading the
- * specified metadata repositories will be included in the provisioning
- * context.
- *
- * @see #getMetadata(IProgressMonitor)
- * @see #setMetadataRepositories(URI[])
- */
- public static final String FOLLOW_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followRepositoryReferences"; //$NON-NLS-1$
-
- private static final String FOLLOW_ARTIFACT_REPOSITORY_REFERENCES = "org.eclipse.equinox.p2.director.followArtifactRepositoryReferences"; //$NON-NLS-1$
-
- /**
- * Creates a new provisioning context that includes all available metadata and
- * artifact repositories available to the specified provisioning agent.
- *
- * @param agent the provisioning agent from which to obtain any necessary services.
- */
- public ProvisioningContext(IProvisioningAgent agent) {
- this.agent = agent;
- // null repos means look at them all
- metadataRepositories = null;
- artifactRepositories = null;
- setProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES, Boolean.TRUE.toString());
- }
-
- /**
- * Returns a queryable that can be used to obtain any artifact keys that
- * are needed for the provisioning operation.
- *
- * @param monitor a progress monitor to be used when creating the queryable
- * @return a queryable that can be used to query available artifact keys.
- *
- * @see #setArtifactRepositories(URI[])
- */
- public IQueryable<IArtifactKey> getArtifactKeys(IProgressMonitor monitor) {
- return QueryUtil.compoundQueryable(getLoadedArtifactRepositories(monitor));
- }
-
- /**
- * Returns a queryable that can be used to obtain any artifact descriptors that
- * are needed for the provisioning operation.
- *
- * @param monitor a progress monitor to be used when creating the queryable
- * @return a queryable that can be used to query available artifact descriptors.
- *
- * @see #setArtifactRepositories(URI[])
- */
- public IQueryable<IArtifactDescriptor> getArtifactDescriptors(IProgressMonitor monitor) {
- List<IArtifactRepository> repos = getLoadedArtifactRepositories(monitor);
- List<IQueryable<IArtifactDescriptor>> descriptorQueryables = new ArrayList<IQueryable<IArtifactDescriptor>>();
- for (IArtifactRepository repo : repos) {
- descriptorQueryables.add(repo.descriptorQueryable());
- }
- return QueryUtil.compoundQueryable(descriptorQueryables);
- }
-
- /**
- * Returns a queryable that can be used to obtain any artifact repositories that
- * are needed for the provisioning operation.
- *
- * @param monitor a progress monitor to be used when creating the queryable
- * @return a queryable that can be used to query available artifact repositories.
- *
- * @see #setArtifactRepositories(URI[])
- */
- public IQueryable<IArtifactRepository> getArtifactRepositories(IProgressMonitor monitor) {
- return new ArtifactRepositoryQueryable(getLoadedArtifactRepositories(monitor));
- }
-
- /**
- * Return an array of loaded artifact repositories.
- */
- private List<IArtifactRepository> getLoadedArtifactRepositories(IProgressMonitor monitor) {
- IArtifactRepositoryManager repoManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- URI[] repositories = artifactRepositories == null ? repoManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL) : artifactRepositories;
- Arrays.sort(repositories, LOCAL_FIRST_COMPARATOR);
-
- List<IArtifactRepository> repos = new ArrayList<IArtifactRepository>();
- SubMonitor sub = SubMonitor.convert(monitor, (repositories.length + 1) * 100);
- for (int i = 0; i < repositories.length; i++) {
- if (sub.isCanceled())
- throw new OperationCanceledException();
- try {
- repos.add(repoManager.loadRepository(repositories[i], sub.newChild(100)));
- } catch (ProvisionException e) {
- //skip unreadable repositories
- }
- // Remove this URI from the list of extra references if it is there.
- if (referencedArtifactRepositories != null)
- referencedArtifactRepositories.remove(repositories[i]);
- }
- // Are there any extra artifact repository references to consider?
- if (referencedArtifactRepositories != null && referencedArtifactRepositories.size() > 0 && shouldFollowArtifactReferences()) {
- SubMonitor innerSub = SubMonitor.convert(sub.newChild(100), referencedArtifactRepositories.size() * 100);
- for (URI referencedURI : referencedArtifactRepositories.values()) {
- try {
- repos.add(repoManager.loadRepository(referencedURI, innerSub.newChild(100)));
- } catch (ProvisionException e) {
- // skip unreadable repositories
- }
- }
- }
- return repos;
- }
-
- private Set<IMetadataRepository> getLoadedMetadataRepositories(IProgressMonitor monitor) {
- IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- URI[] repositories = metadataRepositories == null ? repoManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL) : metadataRepositories;
-
- HashMap<String, IMetadataRepository> repos = new HashMap<String, IMetadataRepository>();
- SubMonitor sub = SubMonitor.convert(monitor, repositories.length * 100);
-
- // Clear out the list of remembered artifact repositories
- referencedArtifactRepositories = new HashMap<String, URI>();
- for (int i = 0; i < repositories.length; i++) {
- if (sub.isCanceled())
- throw new OperationCanceledException();
- loadMetadataRepository(repoManager, repositories[i], repos, shouldFollowReferences(), sub.newChild(100));
- }
- Set<IMetadataRepository> set = new HashSet<IMetadataRepository>();
- set.addAll(repos.values());
- return set;
- }
-
- private void loadMetadataRepository(IMetadataRepositoryManager manager, URI location, HashMap<String, IMetadataRepository> repos, boolean followMetadataRepoReferences, IProgressMonitor monitor) {
- // if we've already processed this repo, don't do it again. This keeps us from getting
- // caught up in circular references.
- if (repos.containsKey(location.toString()))
- return;
-
- SubMonitor sub = SubMonitor.convert(monitor, 1000);
- // First load the repository itself.
- IMetadataRepository repository;
- try {
- repository = manager.loadRepository(location, sub.newChild(500));
- } catch (ProvisionException e) {
- // nothing more to do
- return;
- }
- repos.put(location.toString(), repository);
- Collection<IRepositoryReference> references = repository.getReferences();
- // We always load artifact repositories referenced by this repository. We might load
- // metadata repositories
- if (references.size() > 0) {
- IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- SubMonitor repoSubMon = SubMonitor.convert(sub.newChild(500), 100 * references.size());
- for (IRepositoryReference ref : references) {
- try {
- if (ref.getType() == IRepository.TYPE_METADATA && followMetadataRepoReferences && isEnabled(manager, ref)) {
- loadMetadataRepository(manager, ref.getLocation(), repos, followMetadataRepoReferences, repoSubMon.newChild(100));
- } else if (ref.getType() == IRepository.TYPE_ARTIFACT) {
- // We want to remember all enabled artifact repository locations.
- if (isEnabled(artifactManager, ref))
- referencedArtifactRepositories.put(ref.getLocation().toString(), ref.getLocation());
- }
- } catch (IllegalArgumentException e) {
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=311338
- // ignore invalid location and keep going
- }
- }
- } else {
- sub.done();
- }
-
- }
-
- // If the manager knows about the repo, consider its enablement state in the manager.
- // If the manager does not know about the repo, consider the reference enablement state
- @SuppressWarnings("rawtypes")
- private boolean isEnabled(IRepositoryManager manager, IRepositoryReference reference) {
- return (manager.contains(reference.getLocation()) && manager.isEnabled(reference.getLocation())) || ((!manager.contains(reference.getLocation())) && ((reference.getOptions() & IRepository.ENABLED) == IRepository.ENABLED));
- }
-
- private boolean shouldFollowReferences() {
- return Boolean.valueOf(getProperty(FOLLOW_REPOSITORY_REFERENCES)).booleanValue();
- }
-
- private boolean shouldFollowArtifactReferences() {
- return Boolean.valueOf(getProperty(FOLLOW_ARTIFACT_REPOSITORY_REFERENCES)).booleanValue();
- }
-
- /**
- * Returns a queryable that can be used to obtain any metadata (installable units)
- * that are needed for the provisioning operation.
- *
- * The provisioning context has a distinct lifecycle, whereby the metadata
- * and artifact repositories to be used are determined when the client retrieves
- * retrieves the metadata queryable. Clients should not reset the list of
- * metadata repository locations or artifact repository locations once the
- * metadata queryable has been retrieved.
- *
- * @param monitor a progress monitor to be used when creating the queryable
- * @return a queryable that can be used to query available metadata.
- *
- * @see #setMetadataRepositories(URI[])
- * @see #FOLLOW_REPOSITORY_REFERENCES
- */
- public IQueryable<IInstallableUnit> getMetadata(IProgressMonitor monitor) {
- return QueryUtil.compoundQueryable(getLoadedMetadataRepositories(monitor));
- }
-
- /**
- * Returns the list of additional installable units that should be considered as
- * available for installation by the planner. Returns an empty list if
- * there are no extra installable units to consider. This method has no effect on the
- * execution of the engine.
- *
- * @return The extra installable units that are available
- */
- public List<IInstallableUnit> getExtraInstallableUnits() {
- return extraIUs;
- }
-
- /**
- * Returns the properties that are defined in this context. Context properties can
- * be used to influence the behavior of either the planner or engine.
- *
- * @return the defined provisioning context properties
- */
- public Map<String, String> getProperties() {
- return properties;
- }
-
- /**
- * Returns the value of the property with the given key, or <code>null</code>
- * if no such property is defined
- * @param key the property key
- * @return the property value, or <code>null</code>
- */
- public String getProperty(String key) {
- return properties.get(key);
- }
-
- /**
- * Sets the artifact repositories to consult when performing an operation.
- * <p>
- * The provisioning context has a distinct lifecycle, whereby the metadata
- * and artifact repositories to be used are determined when the client
- * retrieves the metadata queryable. Clients should not reset the list of
- * artifact repository locations once the metadata queryable has been retrieved.
- *
- * @param artifactRepositories the artifact repository locations
- */
- public void setArtifactRepositories(URI[] artifactRepositories) {
- this.artifactRepositories = artifactRepositories;
- }
-
- /**
- * Sets the metadata repositories to consult when performing an operation.
- * <p>
- * The provisioning context has a distinct lifecycle, whereby the metadata
- * and artifact repositories to be used are determined when the client
- * retrieves the metadata queryable. Clients should not reset the list of
- * metadata repository locations once the metadata queryable has been retrieved.
-
- * @param metadataRepositories the metadata repository locations
- */
- public void setMetadataRepositories(URI[] metadataRepositories) {
- this.metadataRepositories = metadataRepositories;
- }
-
- /**
- * Sets the list of additional installable units that should be considered as
- * available for installation by the planner. This method has no effect on the
- * execution of the engine.
- * @param extraIUs the extra installable units
- */
- public void setExtraInstallableUnits(List<IInstallableUnit> extraIUs) {
- this.extraIUs.clear();
- //copy the list to prevent future client tampering
- if (extraIUs != null)
- this.extraIUs.addAll(extraIUs);
- }
-
- /**
- * Sets a property on this provisioning context. Context properties can
- * be used to influence the behavior of either the planner or engine.
- * @param key the property key
- * @param value the property value
- */
- public void setProperty(String key, String value) {
- properties.put(key, value);
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("{artifactRepos=" + DebugHelper.formatArray(null != artifactRepositories ? Arrays.asList(artifactRepositories) : null, true, false)); //$NON-NLS-1$
- buffer.append(", metadataRepos=" + DebugHelper.formatArray(null != metadataRepositories ? Arrays.asList(metadataRepositories) : null, true, false)); //$NON-NLS-1$
- buffer.append(", properties=" + getProperties() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/package.html b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/package.html
deleted file mode 100644
index 8cf851643..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/package.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for interacting with the p2 provisioning engine
-<h2>
-Package Specification</h2>
-<p>
-This package specifies API for interacting with the p2 provisioning engine. The engine
-is a naive service that blindly performs a set of requested changes to a provisioned
-system. No attempt is made to resolve dependencies or determine whether the
-resulting system is valid or consistent. It is assumed that the engine client has
-crafted a valid provisioning plan for the engine to perform, typically by using a planner
-service.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java
deleted file mode 100644
index 2dac78352..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/IUProfilePropertyQuery.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * 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
- * Cloudsmith Inc. - converted into expression based query
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine.query;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
-/**
- * A query that searches for {@link IInstallableUnit} instances that have
- * a property associated with the specified profile, whose value matches the provided value.
- * @since 2.0
- */
-public class IUProfilePropertyQuery extends ExpressionMatchQuery<IInstallableUnit> {
- /**
- * A property value constant that will match any defined property value.
- * @see #IUProfilePropertyQuery(String, String)
- */
- public static final String ANY = "*"; //$NON-NLS-1$
-
- private static final IExpression matchValue = ExpressionUtil.parse("profileProperties[$0] == $1"); //$NON-NLS-1$
- private static final IExpression matchAny = ExpressionUtil.parse("profileProperties[$0] != null"); //$NON-NLS-1$
-
- private static IMatchExpression<IInstallableUnit> createMatch(String propertyName, String propertyValue) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- return ANY.equals(propertyValue) ? factory.<IInstallableUnit> matchExpression(matchAny, propertyName) : factory.<IInstallableUnit> matchExpression(matchValue, propertyName, propertyValue);
- }
-
- /**
- * Creates a new query on the given property name and value.
- * Because the queryable for this query is typically the profile
- * instance, we use a reference to the profile rather than the
- * profile id for performance reasons.
- * @param propertyName The name of the property to match
- * @param propertyValue The value to compare to. A value of {@link #ANY} will match any value.
- */
- public IUProfilePropertyQuery(String propertyName, String propertyValue) {
- super(IInstallableUnit.class, createMatch(propertyName, propertyValue));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java
deleted file mode 100644
index 0236a16ae..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/UserVisibleRootQuery.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith Inc. - converted into expression based query
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine.query;
-
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * A query matching all the {@link IInstallableUnit}s that are marked visible to the user.
- * @since 2.0
- */
-public class UserVisibleRootQuery extends IUProfilePropertyQuery {
-
- /**
- * Creates a new query that will match all installable units marked visible to the user.
- */
- public UserVisibleRootQuery() {
- super(IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
- }
-
- /**
- * Test if the {@link IInstallableUnit}, in the context of a {@link IProfile} is visible to the user
- * @param iu the element being tested.
- * @param profile the context in which the iu is tested
- * @return <tt>true</tt> if the element is visible to the user.
- */
- public static boolean isUserVisible(IInstallableUnit iu, IProfile profile) {
- String value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_ROOT_IU);
- return Boolean.valueOf(value).booleanValue();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/package.html b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/package.html
deleted file mode 100644
index 3aad2ebd3..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/query/package.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides queries specific to profiles
-<h2>
-Package Specification</h2>
-<p>
-This package specifies API for querying the profile.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java
deleted file mode 100644
index 3b0ac09af..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Memento.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine.spi;
-
-import java.util.*;
-
-/**
- * @since 2.0
- */
-public final class Memento {
- private static final long serialVersionUID = 3257399736837461585L;
- private static final Collection<Class<?>> simples = Arrays.<Class<?>> asList(String.class, Integer.class, Long.class, Float.class, Double.class, Byte.class, Short.class, Character.class, Boolean.class);
- private static final Collection<Class<?>> simpleArrays = Arrays.<Class<?>> asList(String[].class, Integer[].class, Long[].class, Float[].class, Double[].class, Byte[].class, Short[].class, Character[].class, Boolean[].class);
- private static final Collection<Class<?>> primitiveArrays = Arrays.<Class<?>> asList(long[].class, int[].class, short[].class, char[].class, byte[].class, double[].class, float[].class, boolean[].class);
-
- Map<String, Object> mementoMap = new HashMap<String, Object>();
-
- public Object remove(String key) {
- if (key == null)
- throw new NullPointerException();
-
- // TODO: persist change
- return mementoMap.remove(key);
- }
-
- public Object put(String key, Object value) {
- if (key == null)
- throw new NullPointerException();
-
- validateValue(value);
-
- // TODO: persist change
- return mementoMap.put(key, value);
- }
-
- public Object get(String key) {
- if (key == null)
- throw new NullPointerException();
-
- return mementoMap.get(key);
- }
-
- public Enumeration<String> getKeys() {
- return new Enumeration<String>() {
- Iterator<String> keysIterator = mementoMap.keySet().iterator();
-
- public boolean hasMoreElements() {
- return keysIterator.hasNext();
- }
-
- public String nextElement() {
- return keysIterator.next();
- }
- };
- }
-
- private static void validateValue(Object value) {
- if (value == null)
- return;
-
- Class<? extends Object> clazz = value.getClass();
-
- if (simples.contains(clazz))
- return;
-
- if (simpleArrays.contains(clazz) || primitiveArrays.contains(clazz))
- return;
-
- throw new IllegalArgumentException(clazz.getName());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java
deleted file mode 100644
index 2154abcc1..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/ProvisioningAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine.spi;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-
-/**
- * @since 2.0
- */
-public abstract class ProvisioningAction {
-
- private Memento memento = new Memento();
- private Touchpoint touchpoint;
-
- protected Memento getMemento() {
- return memento;
- }
-
- public abstract IStatus execute(Map<String, Object> parameters);
-
- public abstract IStatus undo(Map<String, Object> parameters);
-
- // TODO: these probably should not be visible
- public void setTouchpoint(Touchpoint touchpoint) {
- this.touchpoint = touchpoint;
- }
-
- public Touchpoint getTouchpoint() {
- return touchpoint;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java
deleted file mode 100644
index dc2258ddf..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/Touchpoint.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.engine.spi;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.engine.*;
-
-/**
- * A touchpoint is responsible for executing the required provisioning steps
- * for each phase corresponding to a particular targeted system (eclipse, native).
- * The order of phases is defined in the {@link IPhaseSet}.
- * @since 2.0
- */
-public abstract class Touchpoint {
-
- /**
- * This method is for backwards compatibility only, to be used by touchpoints
- * that existed prior to action ids being fully qualified by the engine.
- * @param actionId the unqualified action id
- * @return the qualified action id
- * @noreference This method is not intended to be referenced by clients.
- */
- public String qualifyAction(String actionId) {
- return actionId;
- }
-
- /**
- * This method is called at the beginning of execution of an engine phase. This
- * is an opportunity for the touchpoint to initialize any phase-specific structures.
- * <p>
- * The result of this method can be used to abort execution of the entire engine
- * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
- * The result can also contain warnings or informational status that will be aggregated
- * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
- * </p>
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @param profile the profile that is being operated on
- * @param phaseId the id of the phase
- * @param parameters data provided by the engine to the touchpoint
- * @return the result of phase initialization
- */
- public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) {
- return Status.OK_STATUS;
- }
-
- /**
- * This method is called at the end of execution of an engine phase. This
- * is an opportunity for the touchpoint to clean up any phase-specific structures
- * or perform any final work for the current phase.
- * <p>
- * The result of this method can be used to abort execution of the entire engine
- * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
- * The result can also contain warnings or informational status that will be aggregated
- * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
- * </p>
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting and cancellation are not desired
- * @param profile the profile that is being operated on
- * @param phaseId the id of the phase
- * @param parameters data provided by the engine to the touchpoint
- * @return the result of phase completion
- */
- public IStatus completePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> parameters) {
- return Status.OK_STATUS;
- }
-
- /**
- * This method is called at the beginning of processing of a single engine operand
- * (for example a given installable unit being installed or uninstalled). This
- * is an opportunity for the touchpoint to initialize any data structures specific
- * to a single operand.
- * <p>
- * The result of this method can be used to abort execution of the entire engine
- * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
- * The result can also contain warnings or informational status that will be aggregated
- * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
- * </p>
- * @param profile the profile that is being operated on
- * @param parameters data provided by the engine to the touchpoint
- * @return the result of initialization
- */
- public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
- return Status.OK_STATUS;
- }
-
- /**
- * This method is called at the end of processing of a single engine operand
- * (for example a given installable unit being installed or uninstalled). This
- * is an opportunity for the touchpoint to clean up any data structures specific
- * to a single operand.
- * <p>
- * The result of this method can be used to abort execution of the entire engine
- * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
- * The result can also contain warnings or informational status that will be aggregated
- * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
- * </p>
- * @param profile the profile that is being operated on
- * @param parameters data provided by the engine to the touchpoint
- * @return the result of the completion work
- */
- public IStatus completeOperand(IProfile profile, Map<String, Object> parameters) {
- return Status.OK_STATUS;
- }
-
- /**
- * This method is called at the beginning of an engine operation before any
- * phases have been executed. This is an opportunity to perform precondition
- * checks against the profile, or initialize any data structures common to an
- * entire execution of the engine.
- * <p>
- * The result of this method can be used to abort execution of the entire engine
- * operation, by using a severity of {@link IStatus#ERROR} or {@link IStatus#CANCEL}.
- * The result can also contain warnings or informational status that will be aggregated
- * and returned to the caller of {@link IEngine#perform(org.eclipse.equinox.p2.engine.IProvisioningPlan, IProgressMonitor)}.
- * </p>
- *
- * @param profile the profile about to be modified
- * @return the result of preparation work
- */
- public IStatus prepare(IProfile profile) {
- return Status.OK_STATUS;
- }
-
- /**
- * This method is called at the end of an engine operation after all phases have
- * been executed. When this method is invoked, it signals that the engine
- * operation was a complete success, and the touchpoint should commit
- * or persistent any changes it has made to some persistent storage (for
- * example the file system).
- * <p>
- * The result of this method can be used to report on the success or failure
- * of the commit. However, at this point it is too late for the engine operation
- * to fail, and the result returned from this method will not prevent the engine
- * from completing its work.
- * </p>
- *
- * @param profile the profile that was modified
- * @return the result of commit work
- */
- public IStatus commit(IProfile profile) {
- return Status.OK_STATUS;
- }
-
- /**
- * This method is called at the end of an engine operation after all phases have
- * been executed. When this method is invoked, it signals that the engine
- * operation was a failure, and the touchpoint should discard any
- * changes it has made.
- * <p>
- * The result of this method can be used to report on the success or failure
- * of the rollback. However, at this point it is too late for the engine operation
- * to be stopped, and the result returned from this method will not prevent the engine
- * from completing its rollback work.
- * </p>
- *
- * @param profile the profile that was modified
- * @return the result of commit work
- */
- public IStatus rollback(IProfile profile) {
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/package.html b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/package.html
deleted file mode 100644
index d53f58df0..000000000
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/spi/package.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides support for registering new provisioning actions and touchpoints.
-<h2>
-Package Specification</h2>
-<p>
-This package specifies SPI for registering new actions and new touchpoints to the engine.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.classpath b/bundles/org.eclipse.equinox.p2.exemplarysetup/.classpath
deleted file mode 100644
index 7cdeb7319..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.project b/bundles/org.eclipse.equinox.p2.exemplarysetup/.project
deleted file mode 100644
index 1b81b1ee6..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.exemplarysetup</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 91a0eb69e..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,349 +0,0 @@
-#Mon Feb 08 08:33:54 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-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=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index bb66afef0..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:11 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF
deleted file mode 100644
index 22725fdff..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.exemplarysetup;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.100"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.garbagecollector,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/about.html b/bundles/org.eclipse.equinox.p2.exemplarysetup/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/build.properties b/bundles/org.eclipse.equinox.p2.exemplarysetup/build.properties
deleted file mode 100644
index a6b8330d2..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/plugin.properties b/bundles/org.eclipse.equinox.p2.exemplarysetup/plugin.properties
deleted file mode 100644
index a0c085e42..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Exemplary Setup
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.exemplarysetup/src/readme.txt b/bundles/org.eclipse.equinox.p2.exemplarysetup/src/readme.txt
deleted file mode 100644
index bf54b304b..000000000
--- a/bundles/org.eclipse.equinox.p2.exemplarysetup/src/readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-This bundle is obsolete and will be deleted before 3.6 M6. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/.classpath b/bundles/org.eclipse.equinox.p2.extensionlocation/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.extensionlocation/.cvsignore b/bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore
deleted file mode 100644
index 98d91b940..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bin
-build.xml
-javaCompiler...args
-target
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/.project b/bundles/org.eclipse.equinox.p2.extensionlocation/.project
deleted file mode 100644
index 01274d2cf..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.extensionlocation</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e742b02fa..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,330 +0,0 @@
-#Tue Dec 22 19:30:45 CET 2009
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 56bcc3e9b..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:07 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF
deleted file mode 100644
index 97c257666..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,35 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.extensionlocation;singleton:=true
-Bundle-Version: 1.2.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.extensionlocation.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.extensionlocation;x-friends:="org.eclipse.equinox.p2.reconciler.dropins"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.p2.metadata
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.artifact.repository.simple,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.publisher.eclipse,
- org.eclipse.equinox.internal.p2.touchpoint.eclipse,
- org.eclipse.equinox.internal.p2.update,
- org.eclipse.equinox.internal.provisional.p2.directorywatcher,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.publisher.eclipse,
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.datalocation;version="1.1.0",
- org.eclipse.osgi.service.resolver;version="1.2.0",
- org.eclipse.osgi.util,
- org.osgi.framework;version="1.6.0"
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/about.html b/bundles/org.eclipse.equinox.p2.extensionlocation/about.html
deleted file mode 100644
index d42b3ced1..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/build.properties b/bundles/org.eclipse.equinox.p2.extensionlocation/build.properties
deleted file mode 100644
index 668447566..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- plugin.properties,\
- about.html
-source.. = src/
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/plugin.properties b/bundles/org.eclipse.equinox.p2.extensionlocation/plugin.properties
deleted file mode 100644
index 1f6e623d7..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Extension Location Repository Support
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/plugin.xml b/bundles/org.eclipse.equinox.p2.extensionlocation/plugin.xml
deleted file mode 100644
index 21d41e25b..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/plugin.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="metadataRepository"
- point="org.eclipse.equinox.p2.metadata.repository.metadataRepositories">
- <factory class="org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationMetadataRepositoryFactory" />
- <filter suffix="eclipse" />
- </extension>
-
- <extension
- id="artifactRepository"
- point="org.eclipse.equinox.p2.artifact.repository.artifactRepositories">
- <factory class="org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepositoryFactory" />
- <filter suffix="eclipse" />
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml b/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml
deleted file mode 100644
index 0f9c3a18b..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.extensionlocation</artifactId>
- <version>1.2.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java
deleted file mode 100644
index ac780a867..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Activator.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.extensionlocation;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URL;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-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.repository.artifact.IFileArtifactRepository;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.osgi.framework.*;
-
-public class Activator implements BundleActivator {
-
- public static final String ID = "org.eclipse.equinox.p2.extensionlocation"; //$NON-NLS-1$null;
- private static volatile BundleContext bundleContext;
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-
- public static BundleContext getContext() {
- return bundleContext;
- }
-
- /*
- * Helper method to get the configuration location. Return null if
- * it is unavailable.
- */
- public static File getConfigurationLocation() {
- Location configurationLocation = (Location) ServiceHelper.getService(getContext(), Location.class.getName(), Location.CONFIGURATION_FILTER);
- if (configurationLocation == null || !configurationLocation.isSet())
- return null;
- URL url = configurationLocation.getURL();
- if (url == null)
- return null;
- return URLUtil.toFile(url);
- }
-
- public static IProfile getCurrentProfile() {
- IProfileRegistry profileRegistry = (IProfileRegistry) getCurrentAgent().getService(IProfileRegistry.SERVICE_NAME);
- return profileRegistry.getProfile(IProfileRegistry.SELF);
- }
-
- public static IProvisioningAgent getCurrentAgent() {
- ServiceReference<IProvisioningAgent> reference = bundleContext.getServiceReference(IProvisioningAgent.class);
- if (reference == null)
- return null;
- return bundleContext.getService(reference);
- }
-
- public static IFileArtifactRepository getBundlePoolRepository() {
- IProfile profile = getCurrentProfile();
- IProvisioningAgent agent = getCurrentAgent();
- if (profile == null || agent == null)
- return null;
-
- return Util.getAggregatedBundleRepository(agent, profile, Util.AGGREGATE_CACHE | Util.AGGREGATE_SHARED_CACHE);
- }
-
- /**
- * Returns a reasonable human-readable repository name for the given location.
- */
- public static String getRepositoryName(URI location) {
- File file = URIUtil.toFile(location);
- return file == null ? location.toString() : file.getAbsolutePath();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java
deleted file mode 100644
index c109aafb3..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/BundlePoolFilteredListener.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.extensionlocation;
-
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryChangeListener;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
-import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
-
-public class BundlePoolFilteredListener extends DirectoryChangeListener {
-
- private DirectoryChangeListener delegate;
- private Set<File> bundlePoolFiles = new HashSet<File>();
-
- public BundlePoolFilteredListener(DirectoryChangeListener listener) {
- delegate = listener;
- IFileArtifactRepository bundlePool = Activator.getBundlePoolRepository();
- if (bundlePool != null) {
- IQueryResult<IArtifactKey> keys = bundlePool.query(ArtifactKeyQuery.ALL_KEYS, null);
- for (Iterator<IArtifactKey> iterator = keys.iterator(); iterator.hasNext();) {
- IArtifactKey key = iterator.next();
- File artifactFile = bundlePool.getArtifactFile(key);
- if (artifactFile != null)
- bundlePoolFiles.add(artifactFile);
- }
- }
- }
-
- public boolean added(File file) {
- return delegate.added(file);
- }
-
- public boolean changed(File file) {
- return delegate.changed(file);
- }
-
- public Long getSeenFile(File file) {
- return delegate.getSeenFile(file);
- }
-
- public boolean isInterested(File file) {
- if (bundlePoolFiles.contains(file))
- return false;
-
- return delegate.isInterested(file);
- }
-
- public boolean removed(File file) {
- return delegate.removed(file);
- }
-
- public void startPoll() {
- delegate.startPoll();
- }
-
- public void stopPoll() {
- delegate.stopPoll();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Constants.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Constants.java
deleted file mode 100644
index 51c4bc8e9..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Constants.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.extensionlocation;
-
-/**
- * @since 1.0
- */
-public interface Constants {
-
- public static final String ECLIPSE = "eclipse"; //$NON-NLS-1$
- public static final String EXTENSION_LOCATION = ".eclipseextension"; //$NON-NLS-1$
- public static final String FEATURES = "features"; //$NON-NLS-1$
- public static final String FILE = "file"; //$NON-NLS-1$
- public static final String PLUGINS = "plugins"; //$NON-NLS-1$
- public static final String SITE_XML = "site.xml"; //$NON-NLS-1$
- public static final String SITE = "site"; //$NON-NLS-1$
- public static final String DOT_XML = ".xml"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
deleted file mode 100644
index 5bdb8ad1f..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepository.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.extensionlocation;
-
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.spi.AbstractRepository;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-
-public class ExtensionLocationArtifactRepository extends AbstractRepository<IArtifactKey> implements IFileArtifactRepository, Constants {
-
- public static final String TYPE = "org.eclipse.equinox.p2.extensionlocation.artifactRepository"; //$NON-NLS-1$
- public static final Integer VERSION = new Integer(1);
- public static final List<String> STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList(new String[] {"artifacts.xml", "content.xml", "compositeArtifacts.xml", "compositeContent.xml"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- IFileArtifactRepository artifactRepository;
- private File base;
- private Object state = SiteListener.UNINITIALIZED;
-
- /*
- * Return the location of a local repository based on
- * the given URL.
- */
- public static URI getLocalRepositoryLocation(URI location) {
- BundleContext context = Activator.getContext();
- String stateDirName = Integer.toString(location.toString().hashCode());
- File bundleData = context.getDataFile(null);
- File stateDir = new File(bundleData, stateDirName);
- return stateDir.toURI();
- }
-
- /*
- * Constructor for the class. Return a new extension location repository based on
- * the given url and nested repository.
- */
- public ExtensionLocationArtifactRepository(IProvisioningAgent agent, URI location, IFileArtifactRepository repository, IProgressMonitor monitor) throws ProvisionException {
- super(agent, Activator.getRepositoryName(location), TYPE, VERSION.toString(), location, null, null, null);
- this.artifactRepository = repository;
- this.base = getBaseDirectory(location);
- }
-
- public synchronized void ensureInitialized() {
- if (state == SiteListener.INITIALIZED || state == SiteListener.INITIALIZING)
- return;
- // if the repo has not been synchronized for us already, synchronize it.
- // Note: this will reload "artifactRepository"
- SiteListener.synchronizeRepositories(null, this, base);
- }
-
- void reload() {
- try {
- ExtensionLocationArtifactRepositoryFactory factory = new ExtensionLocationArtifactRepositoryFactory();
- factory.setAgent(getProvisioningAgent());
- ExtensionLocationArtifactRepository repo = (ExtensionLocationArtifactRepository) factory.load(getLocation(), 0, null);
- artifactRepository = repo.artifactRepository;
- base = repo.base;
- } catch (ProvisionException e) {
- //unexpected
- e.printStackTrace();
- throw new IllegalStateException(e.getMessage());
- }
- }
-
- void state(Object value) {
- state = value;
- }
-
- public static void validate(URI location, IProgressMonitor monitor) throws ProvisionException {
- File base = getBaseDirectory(location);
- if (new File(base, EXTENSION_LOCATION).exists() || location.getPath().endsWith(EXTENSION_LOCATION))
- return;
- if (containsUpdateSiteFile(base)) {
- String message = NLS.bind(Messages.error_update_site, location.toString());
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, message, null));
- }
- if (containsStandardP2Repository(base)) {
- String message = NLS.bind(Messages.error_p2_repository, location.toString());
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, message, null));
- }
- }
-
- private static boolean containsStandardP2Repository(File base) {
- File[] foundRepos = base.listFiles(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- return (STANDARD_P2_REPOSITORY_FILE_NAMES.contains(name));
- }
- });
- return foundRepos.length > 0;
- }
-
- private static boolean containsUpdateSiteFile(File base) {
- String[] fileNames = base.list();
- if (fileNames == null)
- return false;
- for (int i = 0; i < fileNames.length; i++) {
- if (fileNames[i].endsWith(DOT_XML) && fileNames[i].indexOf(SITE) != -1)
- return true;
- }
- return false;
- }
-
- public static File getBaseDirectory(URI uri) throws ProvisionException {
- if (!FILE.equals(uri.getScheme()))
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, Messages.not_file_protocol, null));
-
- String path = URIUtil.toFile(uri).getAbsolutePath();
- if (path.endsWith(EXTENSION_LOCATION))
- path = path.substring(0, path.length() - EXTENSION_LOCATION.length());
- File base = new File(path);
-
- if (!base.isDirectory())
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.not_directory, uri.toString()), null));
-
- if (isBaseDirectory(base))
- return base;
-
- File eclipseBase = new File(base, ECLIPSE);
- if (isBaseDirectory(eclipseBase))
- return eclipseBase;
-
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.not_eclipse_extension, uri.toString()), null));
- }
-
- private static boolean isBaseDirectory(File base) {
- File plugins = new File(base, PLUGINS);
- File features = new File(base, FEATURES);
-
- return plugins.isDirectory() || features.isDirectory();
- }
-
- public void addDescriptor(IArtifactDescriptor descriptor) {
- throw new UnsupportedOperationException();
- }
-
- public void addDescriptors(IArtifactDescriptor[] descriptors) {
- throw new UnsupportedOperationException();
- }
-
- public void removeAll() {
- throw new UnsupportedOperationException();
- }
-
- public void removeDescriptor(IArtifactDescriptor descriptor) {
- throw new UnsupportedOperationException();
- }
-
- public void removeDescriptor(IArtifactKey key) {
- throw new UnsupportedOperationException();
- }
-
- public void removeDescriptors(IArtifactDescriptor[] descriptors) {
- throw new UnsupportedOperationException();
- }
-
- public void removeDescriptors(IArtifactKey[] keys) {
- throw new UnsupportedOperationException();
- }
-
- public boolean contains(IArtifactDescriptor descriptor) {
- ensureInitialized();
- return artifactRepository.contains(descriptor);
- }
-
- public boolean contains(IArtifactKey key) {
- ensureInitialized();
- return artifactRepository.contains(key);
- }
-
- public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- ensureInitialized();
- return artifactRepository.getArtifact(descriptor, destination, monitor);
- }
-
- public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- ensureInitialized();
- return artifactRepository.getRawArtifact(descriptor, destination, monitor);
- }
-
- public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- ensureInitialized();
- return artifactRepository.getArtifactDescriptors(key);
- }
-
- public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
- ensureInitialized();
- return artifactRepository.getArtifacts(requests, monitor);
- }
-
- public OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException {
- ensureInitialized();
- return artifactRepository.getOutputStream(descriptor);
- }
-
- public File getArtifactFile(IArtifactKey key) {
- ensureInitialized();
- return artifactRepository.getArtifactFile(key);
- }
-
- public File getArtifactFile(IArtifactDescriptor descriptor) {
- ensureInitialized();
- return artifactRepository.getArtifactFile(descriptor);
- }
-
- public Map<String, String> getProperties() {
- ensureInitialized();
- return artifactRepository.getProperties();
- }
-
- public String setProperty(String key, String value) {
- ensureInitialized();
- String oldValue = artifactRepository.setProperty(key, value);
- // if the value didn't really change then just return
- if (oldValue == value || (oldValue != null && oldValue.equals(value)))
- return oldValue;
- // we want to re-initialize if we are changing the site policy or plug-in list
- if (!SiteListener.SITE_LIST.equals(key) && !SiteListener.SITE_POLICY.equals(key))
- return oldValue;
- state = SiteListener.UNINITIALIZED;
- ensureInitialized();
- return oldValue;
- }
-
- public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) {
- return artifactRepository.createArtifactDescriptor(key);
- }
-
- public IArtifactKey createArtifactKey(String classifier, String id, Version version) {
- return artifactRepository.createArtifactKey(classifier, id, version);
- }
-
- public IQueryable<IArtifactDescriptor> descriptorQueryable() {
- ensureInitialized();
- return artifactRepository.descriptorQueryable();
- }
-
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
- ensureInitialized();
- return artifactRepository.query(query, monitor);
- }
-
- public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- try {
- runnable.run(monitor);
- } catch (OperationCanceledException oce) {
- return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
- } catch (Exception e) {
- return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
- }
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java
deleted file mode 100644
index 7b3574ca2..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationArtifactRepositoryFactory.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.extensionlocation;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class ExtensionLocationArtifactRepositoryFactory extends ArtifactRepositoryFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
- */
- public IArtifactRepository create(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
- // TODO proper progress monitoring
- IStatus status = validate(location, null);
- if (!status.isOK())
- throw new ProvisionException(status);
- URI repoLocation = ExtensionLocationArtifactRepository.getLocalRepositoryLocation(location);
- // unexpected
- if (repoLocation == null)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, Messages.failed_create_local_artifact_repository));
- // make sure that we aren't trying to create a repo at a location
- // where one already exists
- boolean failed = false;
- final SimpleArtifactRepositoryFactory simpleFactory = new SimpleArtifactRepositoryFactory();
- simpleFactory.setAgent(getAgent());
- try {
- simpleFactory.load(repoLocation, 0, null);
- failed = true;
- } catch (ProvisionException e) {
- // expected
- }
- if (failed) {
- String msg = NLS.bind(Messages.repo_already_exists, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_EXISTS, msg, null));
- }
- IFileArtifactRepository repo = (IFileArtifactRepository) simpleFactory.create(repoLocation, name, type, properties);
- return new ExtensionLocationArtifactRepository(getAgent(), location, repo, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.spi.p2.artifact.repository.ArtifactRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IArtifactRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- //return null if the caller wanted a modifiable repo
- if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
- return null;
- }
-
- // TODO proper progress monitoring
- IStatus status = validate(location, null);
- if (!status.isOK())
- throw new ProvisionException(status);
- URI repoLocation = ExtensionLocationArtifactRepository.getLocalRepositoryLocation(location);
- // unexpected
- if (repoLocation == null)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, Messages.failed_create_local_artifact_repository));
- // TODO proper progress monitoring
- try {
- final SimpleArtifactRepositoryFactory simpleFactory = new SimpleArtifactRepositoryFactory();
- simpleFactory.setAgent(getAgent());
- IFileArtifactRepository repo = (IFileArtifactRepository) simpleFactory.load(repoLocation, flags, null);
- return new ExtensionLocationArtifactRepository(getAgent(), location, repo, monitor);
- } catch (ProvisionException e) {
- return create(location, Activator.getRepositoryName(location), ExtensionLocationArtifactRepository.TYPE, null);
- }
- }
-
- public IStatus validate(URI location, IProgressMonitor monitor) {
- try {
- ExtensionLocationArtifactRepository.validate(location, monitor);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java
deleted file mode 100644
index 55f0d0c13..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepository.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.extensionlocation;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-
-public class ExtensionLocationMetadataRepository extends AbstractMetadataRepository implements Constants {
-
- public static final String TYPE = "org.eclipse.equinox.p2.extensionlocation.metadataRepository"; //$NON-NLS-1$
- public static final Integer VERSION = new Integer(1);
- public static final List<String> STANDARD_P2_REPOSITORY_FILE_NAMES = Arrays.asList("artifacts.xml", "content.xml", "compositeArtifacts.xml", "compositeContent.xml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- IMetadataRepository metadataRepository;
- private File base;
- private Object state = SiteListener.UNINITIALIZED;
-
- /*
- * Return the URL for this repo's nested local repository.
- */
- public static URI getLocalRepositoryLocation(URI location) {
- BundleContext context = Activator.getContext();
- String stateDirName = Integer.toString(location.toString().hashCode());
- File bundleData = context.getDataFile(null);
- return new File(bundleData, stateDirName).toURI();
- }
-
- /*
- * Constructor for the class. Return a new extension location repository based on the
- * given location and specified nested repo.
- */
- public ExtensionLocationMetadataRepository(IProvisioningAgent agent, URI location, IMetadataRepository repository, IProgressMonitor monitor) throws ProvisionException {
- super(agent, Activator.getRepositoryName(location), TYPE, VERSION.toString(), location, null, null, null);
- this.metadataRepository = repository;
- this.base = getBaseDirectory(location);
- }
-
- public synchronized void ensureInitialized() {
- if (state == SiteListener.INITIALIZED || state == SiteListener.INITIALIZING)
- return;
- // if the repo has not been synchronized for us already, synchronize it.
- // Note: this will reload "metadataRepository"
- SiteListener.synchronizeRepositories(this, null, base);
- }
-
- void reload() {
- try {
- ExtensionLocationMetadataRepositoryFactory factory = new ExtensionLocationMetadataRepositoryFactory();
- factory.setAgent(getProvisioningAgent());
- ExtensionLocationMetadataRepository repo = (ExtensionLocationMetadataRepository) factory.load(getLocation(), 0, null);
- metadataRepository = repo.metadataRepository;
- base = repo.base;
- } catch (ProvisionException e) {
- //unexpected
- e.printStackTrace();
- throw new IllegalStateException(e.getMessage());
- }
- }
-
- void state(Object value) {
- state = value;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
- */
- public Collection<IRepositoryReference> getReferences() {
- return CollectionUtils.emptyList();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#addInstallableUnits(java.util.Collection)
- */
- @Override
- public void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- throw new UnsupportedOperationException();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeAll()
- */
- @Override
- public void removeAll() {
- throw new UnsupportedOperationException();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#removeInstallableUnits(java.util.Collection)
- */
- @Override
- public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- throw new UnsupportedOperationException();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- ensureInitialized();
- return metadataRepository.query(query, monitor);
- }
-
- public static void validate(URI location, IProgressMonitor monitor) throws ProvisionException {
- File base = getBaseDirectory(location);
- if (new File(base, EXTENSION_LOCATION).exists() || location.getPath().endsWith(EXTENSION_LOCATION))
- return;
- if (containsUpdateSiteFile(base)) {
- String message = NLS.bind(Messages.error_update_site, location.toString());
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, message, null));
- }
- if (containsStandardP2Repository(base)) {
- String message = NLS.bind(Messages.error_p2_repository, location.toString());
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, message, null));
- }
- }
-
- private static boolean containsStandardP2Repository(File base) {
- File[] foundRepos = base.listFiles(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- return (STANDARD_P2_REPOSITORY_FILE_NAMES.contains(name));
- }
- });
- return foundRepos.length > 0;
- }
-
- private static boolean containsUpdateSiteFile(File base) {
- String[] fileNames = base.list();
- if (fileNames == null)
- return false;
- for (int i = 0; i < fileNames.length; i++) {
- if (fileNames[i].endsWith(DOT_XML) && fileNames[i].indexOf(SITE) != -1)
- return true;
- }
- return false;
- }
-
- public static File getBaseDirectory(URI uri) throws ProvisionException {
- if (!FILE.equals(uri.getScheme()))
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, Messages.not_file_protocol, null));
-
- File base = URIUtil.toFile(uri);
- String path = base.getAbsolutePath();
- if (path.endsWith(EXTENSION_LOCATION))
- base = new File(path.substring(0, path.length() - EXTENSION_LOCATION.length()));
-
- if (!base.isDirectory())
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.not_directory, uri.toString()), null));
-
- if (isBaseDirectory(base))
- return base;
-
- File eclipseBase = new File(base, ECLIPSE);
- if (isBaseDirectory(eclipseBase))
- return eclipseBase;
-
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, NLS.bind(Messages.not_eclipse_extension, uri.toString()), null));
- }
-
- private static boolean isBaseDirectory(File base) {
- File plugins = new File(base, PLUGINS);
- File features = new File(base, FEATURES);
-
- return plugins.isDirectory() || features.isDirectory();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#getProperties()
- */
- @Override
- public Map<String, String> getProperties() {
- ensureInitialized();
- return metadataRepository.getProperties();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#initialize(org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState)
- */
- @Override
- public void initialize(RepositoryState repositoryState) {
- //nothing to do
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#setProperty(java.lang.String, java.lang.String)
- */
- @Override
- public String setProperty(String key, String value) {
- ensureInitialized();
- String oldValue = metadataRepository.setProperty(key, value);
- // if the value didn't really change then just return
- if (oldValue == value || (oldValue != null && oldValue.equals(value)))
- return oldValue;
- // we want to re-initialize if we are changing the site policy or plug-in list
- if (!SiteListener.SITE_LIST.equals(key) && !SiteListener.SITE_POLICY.equals(key))
- return oldValue;
- state = SiteListener.UNINITIALIZED;
- ensureInitialized();
- return oldValue;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java
deleted file mode 100644
index e8e02d309..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/ExtensionLocationMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.extensionlocation;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class ExtensionLocationMetadataRepositoryFactory extends MetadataRepositoryFactory {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#create(java.net.URL, java.lang.String, java.lang.String, java.util.Map)
- */
- public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
- // TODO proper progress monitoring
- IStatus status = validate(location, null);
- if (!status.isOK())
- throw new ProvisionException(status);
- URI repoLocation = ExtensionLocationMetadataRepository.getLocalRepositoryLocation(location);
- // unexpected
- if (repoLocation == null)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, Messages.failed_create_local_artifact_repository));
- // ensure that we aren't trying to create a repository at a location
- // where one already exists
- boolean failed = false;
- final SimpleMetadataRepositoryFactory simpleFactory = new SimpleMetadataRepositoryFactory();
- simpleFactory.setAgent(getAgent());
- try {
- simpleFactory.load(repoLocation, 0, null);
- failed = true;
- } catch (ProvisionException e) {
- // expected
- }
- if (failed) {
- String msg = NLS.bind(Messages.repo_already_exists, location.toString());
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_EXISTS, msg, null));
- }
- IMetadataRepository repository = simpleFactory.create(repoLocation, name, null, properties);
- return new ExtensionLocationMetadataRepository(getAgent(), location, repository, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- //return null if the caller wanted a modifiable repo
- if ((flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0) {
- return null;
- }
-
- // TODO proper progress monitoring
- IStatus status = validate(location, null);
- if (!status.isOK())
- throw new ProvisionException(status);
- URI repoLocation = ExtensionLocationMetadataRepository.getLocalRepositoryLocation(location);
- // unexpected
- if (repoLocation == null)
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, Messages.failed_create_local_artifact_repository));
- // TODO proper progress monitoring
- try {
- final SimpleMetadataRepositoryFactory simpleFactory = new SimpleMetadataRepositoryFactory();
- simpleFactory.setAgent(getAgent());
- IMetadataRepository repository = simpleFactory.load(repoLocation, flags, null);
- return new ExtensionLocationMetadataRepository(getAgent(), location, repository, monitor);
- } catch (ProvisionException e) {
- return create(location, Activator.getRepositoryName(location), ExtensionLocationMetadataRepository.TYPE, null);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#validate(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus validate(URI location, IProgressMonitor monitor) {
- try {
- ExtensionLocationMetadataRepository.validate(location, monitor);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Messages.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Messages.java
deleted file mode 100644
index 1498de739..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/Messages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.extensionlocation;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.extensionlocation.messages"; //$NON-NLS-1$
- public static String error_update_site;
- public static String failed_create_local_artifact_repository;
- public static String not_directory;
- public static String not_eclipse_extension;
- public static String not_file_protocol;
- public static String repo_already_exists;
- public static String error_p2_repository;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- //
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
deleted file mode 100644
index 74e1307ef..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/SiteListener.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.extensionlocation;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
-import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.internal.provisional.p2.directorywatcher.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-
-/**
- * @since 1.0
- */
-public class SiteListener extends DirectoryChangeListener {
-
- public static final String SITE_POLICY = "org.eclipse.update.site.policy"; //$NON-NLS-1$
- public static final String SITE_LIST = "org.eclipse.update.site.list"; //$NON-NLS-1$
- private static final String FEATURES = "features"; //$NON-NLS-1$
- private static final String PLUGINS = "plugins"; //$NON-NLS-1$
- private static final String FEATURE_MANIFEST = "feature.xml"; //$NON-NLS-1$
- public static final Object UNINITIALIZED = "uninitialized"; //$NON-NLS-1$
- public static final Object INITIALIZING = "initializing"; //$NON-NLS-1$
- public static final Object INITIALIZED = "initialized"; //$NON-NLS-1$
-
- private String policy;
- private String[] list;
- private String siteLocation;
- private DirectoryChangeListener delegate;
- private String[] managedFiles;
- private String[] toBeRemoved;
-
- /*
- * Return true if the given list contains the full path of the given file
- * handle. Return false otherwise.
- */
- private static boolean contains(String[] plugins, File file) {
- String filename = file.getAbsolutePath();
- for (int i = 0; i < plugins.length; i++)
- if (filename.endsWith(plugins[i]))
- return true;
- return false;
- }
-
- /**
- * Converts a list of file names to a normalized form suitable for comparison.
- */
- private String[] normalize(String[] filenames) {
- for (int i = 0; i < filenames.length; i++)
- filenames[i] = new File(filenames[i]).toString();
- return filenames;
- }
-
- /**
- * Given one repo and a base location, ensure cause the other repo to be loaded and then
- * poll the base location once updating the repositories accordingly. This method is used to
- * ensure that both the metadata and artifact repos corresponding to one location are
- * synchronized in one go. It is expected that both repos have been previously created
- * so simply loading them here will work and that all their properties etc have been configured
- * previously.
- * @param metadataRepository
- * @param artifactRepository
- * @param base
- */
- public static synchronized void synchronizeRepositories(ExtensionLocationMetadataRepository metadataRepository, ExtensionLocationArtifactRepository artifactRepository, File base) {
- try {
- if (metadataRepository == null) {
- artifactRepository.reload();
- ExtensionLocationMetadataRepositoryFactory factory = new ExtensionLocationMetadataRepositoryFactory();
- factory.setAgent(artifactRepository.getProvisioningAgent());
- metadataRepository = (ExtensionLocationMetadataRepository) factory.load(artifactRepository.getLocation(), 0, null);
- } else if (artifactRepository == null) {
- metadataRepository.reload();
- ExtensionLocationArtifactRepositoryFactory factory = new ExtensionLocationArtifactRepositoryFactory();
- factory.setAgent(metadataRepository.getProvisioningAgent());
- artifactRepository = (ExtensionLocationArtifactRepository) factory.load(metadataRepository.getLocation(), 0, null);
- }
- } catch (ProvisionException e) {
- // TODO need proper error handling here. What should we do if there is a failure
- // when loading "the other" repo?
- e.printStackTrace();
- return;
- }
-
- artifactRepository.state(INITIALIZING);
- metadataRepository.state(INITIALIZING);
- File plugins = new File(base, PLUGINS);
- File features = new File(base, FEATURES);
- DirectoryWatcher watcher = new DirectoryWatcher(new File[] {plugins, features});
- // here we have to sync with the inner repos as the extension location repos are
- // read-only wrappers.
- DirectoryChangeListener listener = new RepositoryListener(metadataRepository.metadataRepository, artifactRepository.artifactRepository);
- if (metadataRepository.getProperties().get(SiteListener.SITE_POLICY) != null)
- listener = new SiteListener(metadataRepository.getProperties(), metadataRepository.getLocation().toString(), new BundlePoolFilteredListener(listener));
- watcher.addListener(listener);
- watcher.poll();
- artifactRepository.state(INITIALIZED);
- metadataRepository.state(INITIALIZED);
- }
-
- /*
- * Create a new site listener on the given site.
- */
- public SiteListener(Map<String, String> properties, String url, DirectoryChangeListener delegate) {
- this.siteLocation = url;
- this.delegate = delegate;
- this.policy = properties.get(SITE_POLICY);
- Collection<String> listCollection = new HashSet<String>();
- String listString = properties.get(SITE_LIST);
- if (listString != null)
- for (StringTokenizer tokenizer = new StringTokenizer(listString, ","); tokenizer.hasMoreTokens();) //$NON-NLS-1$
- listCollection.add(tokenizer.nextToken());
- this.list = normalize(listCollection.toArray(new String[listCollection.size()]));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryChangeListener#isInterested(java.io.File)
- */
- public boolean isInterested(File file) {
- // make sure that our delegate and super-class are both interested in
- // the file before we consider it
- if (!delegate.isInterested(file))
- return false;
- if (Site.POLICY_MANAGED_ONLY.equals(policy)) {
- // we only want plug-ins referenced by features
- return contains(getManagedFiles(), file);
- } else if (Site.POLICY_USER_EXCLUDE.equals(policy)) {
- // ensure the file doesn't refer to a plug-in in our list
- if (contains(list, file))
- return false;
- } else if (Site.POLICY_USER_INCLUDE.equals(policy)) {
- // we are only interested in plug-ins in the list
- if (!contains(list, file))
- return false;
- } else {
- // shouldn't happen... unknown policy type
- return false;
- }
- // at this point we have either a user-include or user-exclude policy set
- // and we think we are interested in the file. we should first check to
- // see if it is in the list of things to be removed
- return !isToBeRemoved(file);
- }
-
- /*
- * Return a boolean value indicating whether or not the feature pointed to
- * by the given file is in the update manager's list of features to be
- * uninstalled in its clean-up phase.
- */
- private boolean isToBeRemoved(File file) {
- String[] removed = getToBeRemoved();
- if (removed.length == 0)
- return false;
- Feature feature = getFeature(file);
- if (feature == null)
- return false;
- for (int i = 0; i < removed.length; i++) {
- String line = removed[i];
- // the line is a versioned identifier which is id_version
- if (line.equals(feature.getId() + '_' + feature.getVersion()))
- return true;
- }
- return false;
- }
-
- /*
- * Parse and return the feature.xml file in the given location.
- * Can return null.
- */
- private Feature getFeature(File location) {
- if (location.isFile())
- return null;
- File manifest = new File(location, FEATURE_MANIFEST);
- if (!manifest.exists())
- return null;
- FeatureParser parser = new FeatureParser();
- return parser.parse(location);
- }
-
- /*
- * Return an array describing the list of features are are going
- * to be removed by the update manager in its clean-up phase.
- * The strings are in the format of versioned identifiers: id_version
- */
- private String[] getToBeRemoved() {
- if (toBeRemoved != null)
- return toBeRemoved;
- File configurationLocation = Activator.getConfigurationLocation();
- if (configurationLocation == null) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to compute the configuration location.")); //$NON-NLS-1$
- toBeRemoved = new String[0];
- return toBeRemoved;
- }
- File toBeUninstalledFile = new File(configurationLocation, "org.eclipse.update/toBeUninstalled"); //$NON-NLS-1$
- if (!toBeUninstalledFile.exists()) {
- toBeRemoved = new String[0];
- return toBeRemoved;
- }
- // set it to be empty here in case we don't have a match in the file
- toBeRemoved = new String[0];
- Properties properties = new Properties();
- InputStream input = null;
- try {
- input = new BufferedInputStream(new FileInputStream(toBeUninstalledFile));
- properties.load(input);
- } catch (IOException e) {
- // TODO
- } finally {
- try {
- if (input != null)
- input.close();
- } catch (IOException e) {
- // ignore
- }
- }
- String urlString = siteLocation;
- if (urlString.endsWith(Constants.EXTENSION_LOCATION))
- urlString = urlString.substring(0, urlString.length() - Constants.EXTENSION_LOCATION.length());
- List<String> result = new ArrayList<String>();
- for (Enumeration<Object> e = properties.elements(); e.hasMoreElements();) {
- String line = (String) e.nextElement();
- StringTokenizer tokenizer = new StringTokenizer(line, ";"); //$NON-NLS-1$
- String targetSite = tokenizer.nextToken();
- try {
- // the urlString is coming from the site location which is an encoded URI
- // so we need to encode the targetSite string before we check for equality
- if (!urlString.equals(URIUtil.fromString(targetSite).toString()))
- continue;
- } catch (URISyntaxException e1) {
- // shouldn't happen
- e1.printStackTrace();
- continue;
- }
- result.add(tokenizer.nextToken());
- }
- toBeRemoved = result.toArray(new String[result.size()]);
- return toBeRemoved;
- }
-
- /*
- * Return an array of files which are managed. This includes all of the features
- * for this site, as well as the locations for all the plug-ins referenced by those
- * features.
- */
- private String[] getManagedFiles() {
- if (managedFiles != null)
- return managedFiles;
- List<String> result = new ArrayList<String>();
- File siteFile;
- try {
- siteFile = URIUtil.toFile(new URI(siteLocation));
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to create a URL from site location: " + siteLocation, e)); //$NON-NLS-1$
- return new String[0];
- }
- Map<String, File> pluginCache = getPlugins(siteFile);
- Map<File, Feature> featureCache = getFeatures(siteFile);
- for (File featureFile : featureCache.keySet()) {
- // add the feature path
- result.add(featureFile.toString());
- Feature feature = featureCache.get(featureFile);
- FeatureEntry[] entries = feature.getEntries();
- for (int inner = 0; inner < entries.length; inner++) {
- FeatureEntry entry = entries[inner];
- // grab the right location from the plug-in cache
- String key = entry.getId() + '/' + entry.getVersion();
- File pluginLocation = pluginCache.get(key);
- if (pluginLocation != null)
- result.add(pluginLocation.toString());
- }
- }
- managedFiles = normalize(result.toArray(new String[result.size()]));
- return managedFiles;
- }
-
- /*
- * Iterate over the feature directory and return a map of
- * File to Feature objects (from the generator bundle)
- */
- private Map<File, Feature> getFeatures(File location) {
- Map<File, Feature> result = new HashMap<File, Feature>();
- File featureDir = new File(location, FEATURES);
- File[] children = featureDir.listFiles();
- for (int i = 0; i < children.length; i++) {
- File featureLocation = children[i];
- if (featureLocation.isDirectory() && featureLocation.getParentFile() != null && featureLocation.getParentFile().getName().equals("features") && new File(featureLocation, "feature.xml").exists()) {//$NON-NLS-1$ //$NON-NLS-2$
- FeatureParser parser = new FeatureParser();
- Feature entry = parser.parse(featureLocation);
- if (entry != null)
- result.put(featureLocation, entry);
- }
- }
- return result;
- }
-
- /*
- * Iterate over the plugins directory and return a map of
- * plug-in id/version to File locations.
- */
- private Map<String, File> getPlugins(File location) {
- File[] plugins = new File(location, PLUGINS).listFiles();
- Map<String, File> result = new HashMap<String, File>();
- for (int i = 0; plugins != null && i < plugins.length; i++) {
- File bundleLocation = plugins[i];
- if (bundleLocation.isDirectory() || bundleLocation.getName().endsWith(".jar")) { //$NON-NLS-1$
- BundleDescription description = BundlesAction.createBundleDescription(bundleLocation);
- if (description != null) {
- String id = description.getSymbolicName();
- String version = description.getVersion().toString();
- result.put(id + '/' + version, bundleLocation);
- }
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener#added(java.io.File)
- */
- public boolean added(File file) {
- return delegate.added(file);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener#changed(java.io.File)
- */
- public boolean changed(File file) {
- return delegate.changed(file);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener#getSeenFile(java.io.File)
- */
- public Long getSeenFile(File file) {
- return delegate.getSeenFile(file);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener#removed(java.io.File)
- */
- public boolean removed(File file) {
- return delegate.removed(file);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener#startPoll()
- */
- public void startPoll() {
- delegate.startPoll();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener#stopPoll()
- */
- public void stopPoll() {
- delegate.stopPoll();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/messages.properties b/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/messages.properties
deleted file mode 100644
index 5048ffb38..000000000
--- a/bundles/org.eclipse.equinox.p2.extensionlocation/src/org/eclipse/equinox/internal/p2/extensionlocation/messages.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-###############################################################################
-error_update_site=Error: {0} is not a valid extension location because it contains a site.xml file.
-error_p2_repository=Error: {0} is not a valid extension location because it already contains a standard p2 repository file.
-failed_create_local_artifact_repository=Failed to create local repository.
-not_directory=Location: {0} not a directory.
-not_eclipse_extension=Location: {0} is not a valid extension location.
-not_file_protocol=Location must use file protocol.
-repo_already_exists=Repository: {0} already exists. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.classpath b/bundles/org.eclipse.equinox.p2.garbagecollector/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.garbagecollector/.cvsignore b/bundles/org.eclipse.equinox.p2.garbagecollector/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.options b/bundles/org.eclipse.equinox.p2.garbagecollector/.options
deleted file mode 100644
index d94f57254..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/.options
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.equinox.p2.garbagecollector/debug = false \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.project b/bundles/org.eclipse.equinox.p2.garbagecollector/.project
deleted file mode 100644
index 478c5b83e..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.garbagecollector</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 2d0c6c8fe..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Dec 29 18:58:34 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 1546d829a..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,58 +0,0 @@
-#Tue Aug 21 11:27:48 CDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-internal.default.compliance=user
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=99
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF
deleted file mode 100644
index a3d0a05c8..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.garbagecollector;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.garbagecollector.GCActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.garbagecollector;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.pde.core"
-Require-Bundle: org.eclipse.equinox.p2.engine,
- org.eclipse.osgi;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.equinox.registry;bundle-version="[3.4.0,4.0.0)"
-Import-Package: org.eclipse.core.runtime.preferences,
- org.eclipse.equinox.app;version="1.0.0",
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.6.0",
- org.osgi.service.prefs;version="1.1.0"
-Service-Component: OSGI-INF/garbagecollector.xml
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/OSGI-INF/garbagecollector.xml b/bundles/org.eclipse.equinox.p2.garbagecollector/OSGI-INF/garbagecollector.xml
deleted file mode 100644
index d50c2d256..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/OSGI-INF/garbagecollector.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.garbagecollector">
- <implementation class="org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollectorComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.p2.garbagecollector.GarbageCollector"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/about.html b/bundles/org.eclipse.equinox.p2.garbagecollector/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/build.properties b/bundles/org.eclipse.equinox.p2.garbagecollector/build.properties
deleted file mode 100644
index 078feef12..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/build.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- schema/,\
- about.html,\
- plugin.properties,\
- OSGI-INF/garbagecollector.xml
-src.includes = about.html
-javacSource = 1.5
-javacTarget = jsr14
-source.. = src/
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/plugin.properties b/bundles/org.eclipse.equinox.p2.garbagecollector/plugin.properties
deleted file mode 100644
index 923b28462..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Provisioning Garbage Collector
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/plugin.xml b/bundles/org.eclipse.equinox.p2.garbagecollector/plugin.xml
deleted file mode 100644
index a34d420c8..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="marksetproviders" name="Garbage Collector" schema="schema/GarbageCollector.exsd"/>
-
- <!--<extension
- point="org.eclipse.equinox.p2.rootsetproviders"
- id="RootSetTest">
- <run
- class="org.eclipse.equinox.p2.garbagecollector.test.RootSetTest"/>
- </extension>-->
-
- <!--<extension
- point="org.eclipse.equinox.p2.marksetproviders"
- id="TestProvider">
- <run
- class="org.eclipse.equinox.p2.garbagecollector.test.MarkSetProviderTest"/>
-</extension>-->
-
- <extension id="application" point="org.eclipse.core.runtime.applications">
- <application>
- <run class="org.eclipse.equinox.internal.p2.garbagecollector.Application"/>
- </application>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml b/bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml
deleted file mode 100644
index 0633ff4ae..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.garbagecollector</artifactId>
- <version>1.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/schema/GarbageCollector.exsd b/bundles/org.eclipse.equinox.p2.garbagecollector/schema/GarbageCollector.exsd
deleted file mode 100644
index 3c3fae073..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/schema/GarbageCollector.exsd
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.equinox.p2.garbagecollector" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.equinox.p2.garbagecollector" id="marksetproviders" name="Profile-based mark set providers"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="run"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="run">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.equinox.internal.p2.garbagecollector.MarkSetProvider:"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- org.eclipse.equinox.p2.garbagecollector 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiInfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2007, 2008 IBM Corporation and others.&lt;br&gt;
-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 &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java
deleted file mode 100644
index 8a9d5b4a4..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Application.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.garbagecollector;
-
-import java.util.Map;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-
-/**
- * @since 1.0
- */
-public class Application implements IApplication {
-
- private static final String DEFAULT_PROFILE_ID = "SDKProfile"; //$NON-NLS-1$
- private String profileId;
- private IProvisioningAgent agent;
-
- /*
- * Return the profile with the given id, or null if not found.
- */
- private IProfile getProfile(String id) {
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- return profileRegistry == null ? null : profileRegistry.getProfile(id);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) throws Exception {
- Map<?, ?> allArgs = context.getArguments();
- String[] args = (String[]) allArgs.get(IApplicationContext.APPLICATION_ARGS);
- processArguments(args);
- // if the user didn't give us a profile id, then use the default SDK one
- if (profileId == null)
- profileId = DEFAULT_PROFILE_ID;
-
- initializeServices();
- IProfile profile = getProfile(profileId);
- if (profile == null)
- throw new IllegalArgumentException("\"" + profileId + "\" is not a valid profile identifier."); //$NON-NLS-1$//$NON-NLS-2$
- GarbageCollector gc = (GarbageCollector) agent.getService(GarbageCollector.SERVICE_NAME);
- gc.runGC(profile);
- agent.stop();
- return null;
- }
-
- private void initializeServices() throws ProvisionException {
- IProvisioningAgentProvider provider = GCActivator.getService(IProvisioningAgentProvider.class);
- agent = provider.createAgent(null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- // nothing to do
- }
-
- /*
- * Iterate over the command-line arguments and pull out the ones which are important to us.
- */
- public void processArguments(String[] args) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- String opt = args[i];
- // check for args with parameters. If we are at the last argument or if the next
- // one has a '-' as the first character, then we can't have an arg with a parm so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
- if (opt.equalsIgnoreCase("-profile")) //$NON-NLS-1$
- profileId = arg;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java
deleted file mode 100644
index 4cf97c9c5..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/CoreGarbageCollector.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.garbagecollector;
-
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-
-/**
- * Given a MarkSet, the CoreGarbageCollector removes any IArtifactDescriptors which
- * are not mapped to be an IArtifactKey in the MarkSet.
- */
-public class CoreGarbageCollector {
-
- /**
- * When set to true, information will be logged every time an artifact is removed
- */
- static boolean debugMode = false;
-
- /**
- * Given a list of IArtifactKeys and an IArtifactRepository, removes all artifacts
- * in aRepository that are not mapped to by an IArtifactKey in markSet
- */
- public synchronized void clean(IArtifactKey[] markSet, final IArtifactRepository aRepository) {
- Set<IArtifactKey> set = new HashSet<IArtifactKey>(Arrays.asList(markSet));
- //this query will match all artifact keys that are not in the given set
- IQuery<IArtifactKey> query = QueryUtil.createQuery(IArtifactKey.class, "unique($0)", set); //$NON-NLS-1$
- final IQueryResult<IArtifactKey> inactive = aRepository.query(query, null);
- aRepository.executeBatch(new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- for (Iterator<IArtifactKey> iterator = inactive.iterator(); iterator.hasNext();) {
- IArtifactKey key = iterator.next();
- aRepository.removeDescriptor(key);
- if (debugMode) {
- Tracing.debug("Key removed:" + key); //$NON-NLS-1$
- }
- }
- }
- }, new NullProgressMonitor());
- }
-
- /*
- * If set to true, debug mode will log information about each artifact deleted by the CoreGarbageCollector
- * @param inDebugMode
- */
- public static void setDebugMode(boolean inDebugMode) {
- debugMode = inDebugMode;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java
deleted file mode 100644
index 60dde4517..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GCActivator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.garbagecollector;
-
-import org.eclipse.osgi.service.debug.DebugOptions;
-import org.osgi.framework.*;
-
-public class GCActivator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.garbagecollector"; //$NON-NLS-1$
- public static final String GC_ENABLED = "gc_enabled"; //$NON-NLS-1$
- private static final String DEBUG_STRING = GCActivator.ID + "/debug"; //$NON-NLS-1$
- private static final boolean DEFAULT_DEBUG = false;
-
- static BundleContext context;
-
- static <T> T getService(Class<T> clazz) {
- ServiceReference<T> reference = context.getServiceReference(clazz);
- if (reference == null)
- return null;
- T result = context.getService(reference);
- context.ungetService(reference);
- return result;
- }
-
- public void start(BundleContext inContext) throws Exception {
- GCActivator.context = inContext;
- DebugOptions debug = getService(DebugOptions.class);
- if (debug != null) {
- CoreGarbageCollector.setDebugMode(debug.getBooleanOption(DEBUG_STRING, DEFAULT_DEBUG));
- }
- }
-
- public void stop(BundleContext inContext) throws Exception {
- GCActivator.context = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
deleted file mode 100644
index 5f983aae5..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollector.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.garbagecollector;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.engine.*;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentService;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * The main control point for the p2 garbage collector. Takes a Profile and runs the CoreGarbageCollector with the
- * appropriate MarkSets for the repositories used by that Profile.
- *
- * Takes the profile passed in and creates a set (markSet) that maps the artifact repositories it uses to the
- * artifact keys its IUs hold. This is done by getting MarkSets from all registered IMarkSetProviders.
- *
- * Then, the MarkSets are obtained for every other registered Profile in a similar fashion. Each MarkSet is
- * checked to see if its artifact repository is already a key in markSet. If so, that MarkSet's artifact keys
- * are added to the list that is mapped to by the artifact repository.
- */
-public class GarbageCollector implements SynchronousProvisioningListener, IAgentService {
- /**
- * Service name constant for the garbage collection service.
- */
- public static final String SERVICE_NAME = GarbageCollector.class.getName();
-
- private class ParameterizedSafeRunnable implements ISafeRunnable {
- IProfile aProfile;
- MarkSet[] aProfileMarkSets;
- IConfigurationElement cfg;
-
- public ParameterizedSafeRunnable(IConfigurationElement runtAttribute, IProfile profile) {
- cfg = runtAttribute;
- aProfile = profile;
- }
-
- public MarkSet[] getResult() {
- return aProfileMarkSets;
- }
-
- public void handleException(Throwable exception) {
- LogHelper.log(new Status(IStatus.ERROR, GCActivator.ID, Messages.Error_in_extension, exception));
- }
-
- public void run() throws Exception {
- MarkSetProvider aMarkSetProvider = (MarkSetProvider) cfg.createExecutableExtension(ATTRIBUTE_CLASS);
- if (aMarkSetProvider == null) {
- aProfileMarkSets = null;
- return;
- }
- aProfileMarkSets = aMarkSetProvider.getMarkSets(agent, aProfile);
- }
- }
-
- private static final String ATTRIBUTE_CLASS = "class"; //$NON-NLS-1$
-
- private static final String PT_MARKSET = GCActivator.ID + ".marksetproviders"; //$NON-NLS-1$
- final IProvisioningAgent agent;
-
- //The GC is triggered when an uninstall event occurred during a "transaction" and the transaction is committed.
- String uninstallEventProfileId = null;
-
- /**
- * Maps IArtifactRepository objects to their respective "marked set" of IArtifactKeys
- */
- private Map<IArtifactRepository, Collection<IArtifactKey>> markSet;
-
- public GarbageCollector(IProvisioningAgent agent) {
- this.agent = agent;
- }
-
- private void addKeys(Collection<IArtifactKey> keyList, IArtifactKey[] keyArray) {
- for (int i = 0; i < keyArray.length; i++)
- keyList.add(keyArray[i]);
- }
-
- private void contributeMarkSets(IConfigurationElement runAttribute, IProfile profile, boolean addRepositories) {
- ParameterizedSafeRunnable providerExecutor = new ParameterizedSafeRunnable(runAttribute, profile);
- SafeRunner.run(providerExecutor);
- MarkSet[] aProfileMarkSets = providerExecutor.getResult();
- if (aProfileMarkSets == null || aProfileMarkSets.length == 0 || aProfileMarkSets[0] == null)
- return;
-
- for (int i = 0; i < aProfileMarkSets.length; i++) {
- if (aProfileMarkSets[i] == null) {
- continue;
- }
- Collection<IArtifactKey> keys = markSet.get(aProfileMarkSets[i].getRepo());
- if (keys == null) {
- if (addRepositories) {
- keys = new HashSet<IArtifactKey>();
- markSet.put(aProfileMarkSets[i].getRepo(), keys);
- addKeys(keys, aProfileMarkSets[i].getKeys());
- }
- } else {
- addKeys(keys, aProfileMarkSets[i].getKeys());
- }
- }
- }
-
- protected boolean getBooleanPreference(String key, boolean defaultValue) {
- IPreferencesService prefService = GCActivator.getService(IPreferencesService.class);
- if (prefService == null)
- return defaultValue;
- List<IEclipsePreferences> nodes = new ArrayList<IEclipsePreferences>();
- // todo we should look in the instance scope as well but have to be careful that the instance location has been set
- nodes.add(new ConfigurationScope().getNode(GCActivator.ID));
- nodes.add(new DefaultScope().getNode(GCActivator.ID));
- return Boolean.valueOf(prefService.get(key, Boolean.toString(defaultValue), nodes.toArray(new Preferences[nodes.size()]))).booleanValue();
- }
-
- private void invokeCoreGC() {
- for (IArtifactRepository nextRepo : markSet.keySet()) {
- IArtifactKey[] keys = markSet.get(nextRepo).toArray(new IArtifactKey[0]);
- MarkSet aMarkSet = new MarkSet(keys, nextRepo);
- new CoreGarbageCollector().clean(aMarkSet.getKeys(), aMarkSet.getRepo());
- }
- }
-
- public void notify(EventObject o) {
- if (o instanceof InstallableUnitEvent) {
- InstallableUnitEvent event = (InstallableUnitEvent) o;
- if (event.isUninstall() && event.isPost()) {
- uninstallEventProfileId = event.getProfile().getProfileId();
- }
- } else if (o instanceof CommitOperationEvent) {
- if (uninstallEventProfileId != null) {
- CommitOperationEvent event = (CommitOperationEvent) o;
- if (uninstallEventProfileId.equals(event.getProfile().getProfileId()) && getBooleanPreference(GCActivator.GC_ENABLED, true))
- runGC(event.getProfile());
- uninstallEventProfileId = null;
- }
- } else if (o instanceof RollbackOperationEvent) {
- if (uninstallEventProfileId != null && uninstallEventProfileId.equals(((RollbackOperationEvent) o).getProfile().getProfileId()))
- uninstallEventProfileId = null;
- }
- }
-
- public void runGC(IProfile profile) {
- markSet = new HashMap<IArtifactRepository, Collection<IArtifactKey>>();
- if (!traverseMainProfile(profile))
- return;
-
- //Complete each MarkSet with the MarkSets provided by all of the other registered Profiles
- traverseRegisteredProfiles();
-
- //Run the GC on each MarkSet
- invokeCoreGC();
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentService#start()
- */
- public void start() {
- IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
- if (eventBus == null)
- return;
- eventBus.addListener(this);
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentService#stop()
- */
- public void stop() {
- IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
- if (eventBus != null)
- eventBus.removeListener(this);
- }
-
- private boolean traverseMainProfile(IProfile profile) {
- IExtensionRegistry registry = RegistryFactory.getRegistry();
- IConfigurationElement[] configElts = registry.getConfigurationElementsFor(PT_MARKSET);
-
- //First we collect all repos and keys for the profile being GC'ed
- for (int i = 0; i < configElts.length; i++) {
- if (!(configElts[i].getName().equals("run"))) { //$NON-NLS-1$
- continue;
- }
- IConfigurationElement runAttribute = configElts[i];
- if (runAttribute == null) {
- continue;
- }
-
- contributeMarkSets(runAttribute, profile, true);
- }
- return true;
- }
-
- private void traverseRegisteredProfiles() {
- IExtensionRegistry registry = RegistryFactory.getRegistry();
- IConfigurationElement[] configElts = registry.getConfigurationElementsFor(PT_MARKSET);
- for (int i = 0; i < configElts.length; i++) {
- if (!(configElts[i].getName().equals("run"))) { //$NON-NLS-1$
- continue;
- }
- IConfigurationElement runAttribute = configElts[i];
- if (runAttribute == null) {
- continue;
- }
-
- IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null)
- return;
- IProfile[] registeredProfiles = profileRegistry.getProfiles();
-
- for (int j = 0; j < registeredProfiles.length; j++) {
- contributeMarkSets(runAttribute, registeredProfiles[j], false);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollectorComponent.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollectorComponent.java
deleted file mode 100644
index 5b0f0da26..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/GarbageCollectorComponent.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.garbagecollector;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-
-/**
- * Component for instantiating p2 garbage collectors.
- */
-public class GarbageCollectorComponent implements IAgentServiceFactory {
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentServiceFactory#createService(org.eclipse.equinox.p2.core.IProvisioningAgent)
- */
- public Object createService(IProvisioningAgent agent) {
- return new GarbageCollector(agent);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSet.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSet.java
deleted file mode 100644
index 453e0d5e4..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSet.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.garbagecollector;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-
-/**
- * Wrapper class used to store an IArtifactRepository and its root set of IArtifactKeys.
- */
-public class MarkSet {
-
- /**
- * The root set for repo. This is the set of keys that currently map to an artifact in repo.
- */
- private IArtifactKey[] keys;
-
- /**
- * The ArtifactRepository for which a root set is being stored.
- */
- private IArtifactRepository repo;
-
- public MarkSet(IArtifactKey[] inKeys, IArtifactRepository inRepo) {
- Assert.isNotNull(inKeys);
- Assert.isNotNull(inRepo);
- keys = inKeys;
- repo = inRepo;
- }
-
- public IArtifactKey[] getKeys() {
- return keys;
- }
-
- public IArtifactRepository getRepo() {
- return repo;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.java
deleted file mode 100644
index f69716c8b..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/MarkSetProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.garbagecollector;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-
-/**
- * Any class which declares itself as an extension to the <tt>org.eclipse.equinox.p2.garbagecollector.marksetproviders</tt>
- * extension point must extend this base class. Given a Profile, implementors are required
- * to provide an array of MarkSet objects, each of which must contain an IArtifactRepository
- * and the IArtifactKeys used by the given Profile.
- */
-public abstract class MarkSetProvider {
-
- /**
- * Returns a MarkSet for each bundle pool used by a Profile p. The MarkSet will contain
- * all of the IArtifactKeys found in p, as well as the IArtifactRepository over which the
- * root set of keys is being created.
- * @param profile A profile whose ArtifactRepositories require a garbage collection
- * @return An array of MarkSet object(s) containing p's IArtifactRepository and its root set of IArtifactKeys
- */
- public abstract MarkSet[] getMarkSets(IProvisioningAgent agent, IProfile profile);
-
- /**
- * Returns the IArtifactRepository for which this MarkSetProvider provides a MarkSet.
- * @param p The Profile whose IArtifactRepository is required
- * @return The IArtifactRepository for which this MarkSetProvider provides a MarkSet.
- */
- public abstract IArtifactRepository getRepository(IProvisioningAgent agent, IProfile p);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java
deleted file mode 100644
index c08ad60f9..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/Messages.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.garbagecollector;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.garbagecollector.messages"; //$NON-NLS-1$
-
- public static String Error_in_extension;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties b/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties
deleted file mode 100644
index b1f4dead6..000000000
--- a/bundles/org.eclipse.equinox.p2.garbagecollector/src/org/eclipse/equinox/internal/p2/garbagecollector/messages.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 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
-###############################################################################
-Error_in_extension=An error occurred while calling to an IMarkSetProvider.
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.classpath b/bundles/org.eclipse.equinox.p2.jarprocessor/.classpath
deleted file mode 100644
index 0179ed600..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bin_ant" path="src_ant"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/CDC-1.1%Foundation-1.1"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.cvsignore b/bundles/org.eclipse.equinox.p2.jarprocessor/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.externalToolBuilders/AntTaskBuilder.launch b/bundles/org.eclipse.equinox.p2.jarprocessor/.externalToolBuilders/AntTaskBuilder.launch
deleted file mode 100644
index ae5694459..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.externalToolBuilders/AntTaskBuilder.launch
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.jarprocessor/localbuild.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.jarprocessor"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.jarprocessor/localbuild.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/org.eclipse.equinox.p2.jarprocessor}"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.project b/bundles/org.eclipse.equinox.p2.jarprocessor/.project
deleted file mode 100644
index cf69b3579..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.jarprocessor</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/AntTaskBuilder.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index a46514810..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,345 +0,0 @@
-#Thu Sep 24 13:53:16 EDT 2009
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.incompleteClasspath=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 0d3112f5e..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,60 +0,0 @@
-#Thu Sep 24 13:53:46 EDT 2009
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.sort_members=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.remove_unused_private_members=false
-org.eclipse.jdt.ui.staticondemandthreshold=3
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.never_use_parentheses_in_expressions=true
-formatter_profile=_core
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.organize_imports=true
-sp_cleanup.always_use_blocks=true
-org.eclipse.jdt.ui.importorder=;
-sp_cleanup.use_blocks=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members_all=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.ondemandthreshold=3
-sp_cleanup.add_missing_methods=false
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.format_source_code=true
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.remove_unused_private_fields=true
-formatter_settings_version=11
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-org.eclipse.jdt.ui.ignorelowercasenames=true
-sp_cleanup.add_serial_version_id=false
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 69a27179c..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Aug 28 11:19:59 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF
deleted file mode 100644
index 5c21d1f2d..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.p2.jarprocessor;singleton:=true
-Bundle-Name: %pluginName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Version: 1.0.200.qualifier
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Main-Class: org.eclipse.equinox.internal.p2.jarprocessor.Main
-Export-Package: org.eclipse.equinox.internal.p2.jarprocessor;x-friends:="org.eclipse.equinox.p2.artifact.repository,org.eclipse.pde.build",
- org.eclipse.equinox.internal.p2.jarprocessor.unsigner;x-internal:=true,
- org.eclipse.equinox.internal.p2.jarprocessor.verifier;x-internal:=true,
- org.eclipse.internal.provisional.equinox.p2.jarprocessor;x-friends:="org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.artifact.repository,org.eclipse.pde.build"
-Import-Package: org.eclipse.core.runtime.jobs;resolution:=optional
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/about.html b/bundles/org.eclipse.equinox.p2.jarprocessor/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/build.properties b/bundles/org.eclipse.equinox.p2.jarprocessor/build.properties
deleted file mode 100644
index f0c7174cb..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/build.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- plugin.xml,\
- lib/jarprocessor-ant.jar
-src.includes = about.html
-
-source.lib/jarprocessor-ant.jar = src_ant/
-output.lib/jarprocessor-ant.jar = bin_ant/
-
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-jars.compile.order = .,\
- lib/jarprocessor-ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/lib/.cvsignore b/bundles/org.eclipse.equinox.p2.jarprocessor/lib/.cvsignore
deleted file mode 100644
index c45d3e953..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/lib/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-jarprocessor-ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/localbuild.xml b/bundles/org.eclipse.equinox.p2.jarprocessor/localbuild.xml
deleted file mode 100644
index e5729a87c..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/localbuild.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<project name="project" default="workspaceBinaries">
- <description>
- Build the jarprocessor-ant.jar by gathering up the results of a workspace build from bin_ant.
- </description>
-
- <target name="workspaceBinaries" description="Jar up the binaries that were compiled by the jdt builder" >
- <mkdir dir="lib" />
- <delete file="lib/jarprocessor-ant.jar" failonerror="false"/>
- <jar destfile="lib/jarprocessor-ant.jar" basedir="bin_ant"/>
- <eclipse.convertPath fileSystemPath="${basedir}/lib" property="resourcePath"/>
- <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
- </target>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.properties b/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.properties
deleted file mode 100644
index 937ec9174..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning JAR Processor
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.xml b/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.xml
deleted file mode 100644
index 36d254f41..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/plugin.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <!-- Tasks -->
- <extension
- point="org.eclipse.ant.core.antTasks">
- <antTask
- class="org.eclipse.equinox.internal.p2.jarprocessor.ant.JarProcessorTask"
- headless="true"
- library="lib/jarprocessor-ant.jar"
- name="eclipse.jarProcessor">
- </antTask>
- </extension>
- <!-- Extra Classpath -->
- <extension
- point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry
- library="lib/jarprocessor-ant.jar">
- </extraClasspathEntry>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml b/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml
deleted file mode 100644
index 2443cf420..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.jarprocessor</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java
deleted file mode 100644
index dde666095..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/CommandStep.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.util.List;
-import java.util.Properties;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.IProcessStep;
-
-public abstract class CommandStep implements IProcessStep {
- protected String command = null;
- protected String extension = null;
- private Properties options = null;
- protected boolean verbose = false;
-
- public CommandStep(Properties options, String command, String extension, boolean verbose) {
- this.command = command;
- this.extension = extension;
- this.options = options;
- this.verbose = verbose;
- }
-
- protected static int execute(String[] cmd) {
- return execute(cmd, false);
- }
-
- protected static int execute(String[] cmd, boolean verbose) {
- Runtime runtime = Runtime.getRuntime();
- Process proc = null;
- try {
- proc = runtime.exec(cmd);
- StreamProcessor.start(proc.getErrorStream(), StreamProcessor.STDERR, verbose);
- StreamProcessor.start(proc.getInputStream(), StreamProcessor.STDOUT, verbose);
- } catch (Exception e) {
- if (verbose) {
- System.out.println("Error executing command " + Utils.concat(cmd)); //$NON-NLS-1$
- e.printStackTrace();
- }
- return -1;
- }
- try {
- int result = proc.waitFor();
- return result;
- } catch (InterruptedException e) {
- if (verbose)
- e.printStackTrace();
- }
- return -1;
- }
-
- public Properties getOptions() {
- if (options == null)
- options = new Properties();
- return options;
- }
-
- public void adjustInf(File input, Properties inf, List containers) {
- //nothing
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Main.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Main.java
deleted file mode 100644
index 23df70d63..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Main.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-
-public class Main {
-
- private static void printUsage() {
- System.out.println("[-option ...]... input"); //$NON-NLS-1$
- System.out.println("The following options are supported:"); //$NON-NLS-1$
- System.out.println("-processAll process all jars, regardless of whether they were previously normalized"); //$NON-NLS-1$
- System.out.println(" By default only normalized jars will be processed."); //$NON-NLS-1$
- System.out.println("-repack normalize jars "); //$NON-NLS-1$
- System.out.println("-sign <command> sign jars using <command>"); //$NON-NLS-1$
- System.out.println("-pack pack the jars. pack and repack are redundant unless"); //$NON-NLS-1$
- System.out.println(" sign is also specified."); //$NON-NLS-1$
- System.out.println("-unpack unpack pack.gz files. Unpack is mutually exclusive"); //$NON-NLS-1$
- System.out.println(" with repack, sign and pack."); //$NON-NLS-1$
- System.out.println();
- System.out.println("-outputDir <dir> the output directory"); //$NON-NLS-1$
- System.out.println("-verbose verbose mode "); //$NON-NLS-1$
- }
-
- public static JarProcessorExecutor.Options processArguments(String[] args) {
- if (args.length == 0) {
- printUsage();
- return null;
- }
-
- JarProcessorExecutor.Options options = new JarProcessorExecutor.Options();
- int i = 0;
- for (; i < args.length - 1; i++) {
- if (args[i].equals("-pack")) {//$NON-NLS-1$
- options.pack = true;
- } else if (args[i].equals("-unpack")) { //$NON-NLS-1$
- options.unpack = true;
- } else if (args[i].equals("-sign") && i < args.length - 2) { //$NON-NLS-1$
- if (args[i + 1].startsWith("-")) { //$NON-NLS-1$
- printUsage();
- return null;
- }
- options.signCommand = args[++i];
- } else if (args[i].equals("-repack")) { //$NON-NLS-1$
- options.repack = true;
- } else if (args[i].equals("-outputDir") && i < args.length - 2) { //$NON-NLS-1$
- if (args[i + 1].startsWith("-")) { //$NON-NLS-1$
- printUsage();
- return null;
- }
- options.outputDir = args[++i];
- } else if (args[i].equals("-verbose")) { //$NON-NLS-1$
- options.verbose = true;
- } else if (args[i].equals("-processAll")) { //$NON-NLS-1$
- options.processAll = true;
- }
- }
-
- options.input = new File(args[i]);
-
- String problemMessage = null;
- String inputName = options.input.getName();
- if (options.unpack) {
- if (!JarProcessor.canPerformUnpack()) {
- problemMessage = "The unpack200 command cannot be found."; //$NON-NLS-1$
- } else if (options.input.isFile() && !inputName.endsWith(".zip") && !inputName.endsWith(".pack.gz")) { //$NON-NLS-1$ //$NON-NLS-2$
- problemMessage = "Input file is not a pack.gz file."; //$NON-NLS-1$
- } else if (options.pack || options.repack || options.signCommand != null) {
- problemMessage = "Pack, repack or sign cannot be specified with unpack."; //$NON-NLS-1$
- }
- } else {
- if (options.input.isFile() && !inputName.endsWith(".zip") && !inputName.endsWith(".jar")) { //$NON-NLS-1$ //$NON-NLS-2$
- problemMessage = "Input file is not a jar file."; //$NON-NLS-1$
- } else if ((options.pack || options.repack) && !JarProcessor.canPerformPack()) {
- problemMessage = "The pack200 command can not be found."; //$NON-NLS-1$
- }
- }
- if(problemMessage != null){
- System.out.println(problemMessage);
- System.out.println();
- printUsage();
- return null;
- }
-
- return options;
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- JarProcessorExecutor.Options options = processArguments(args);
- if (options == null)
- return;
- new JarProcessorExecutor().runJarProcessor(options);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
deleted file mode 100644
index 3d519736d..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackStep.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-public class PackStep extends CommandStep {
-
- protected static String packCommand = null;
- private static Boolean canPack = null;
-
- private Set exclusions = Collections.EMPTY_SET;
-
- public static boolean canPack() {
- if (canPack != null)
- return canPack.booleanValue();
-
- String[] locations = Utils.getPack200Commands("pack200"); //$NON-NLS-1$
- if (locations == null) {
- canPack = Boolean.FALSE;
- packCommand = null;
- return false;
- }
-
- int result;
- for (int i = 0; i < locations.length; i++) {
- if (locations[i] == null)
- continue;
- result = execute(new String[] {locations[i], "-V"}); //$NON-NLS-1$
- if (result == 0) {
- packCommand = locations[i];
- canPack = Boolean.TRUE;
- return true;
- }
- }
-
- canPack = Boolean.FALSE;
- return false;
- }
-
- public PackStep(Properties options) {
- super(options, null, null, false);
- exclusions = Utils.getPackExclusions(options);
- }
-
- public PackStep(Properties options, boolean verbose) {
- super(options, null, null, verbose);
- exclusions = Utils.getPackExclusions(options);
- }
-
- public String recursionEffect(String entryName) {
- if (canPack() && entryName.endsWith(".jar") && !exclusions.contains(entryName)) { //$NON-NLS-1$
- return entryName + Utils.PACKED_SUFFIX;
- }
- return null;
- }
-
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- public File postProcess(File input, File workingDirectory, List containers) {
- if (canPack() && packCommand != null) {
- Properties inf = Utils.getEclipseInf(input, verbose);
- if (!shouldPack(input, containers, inf))
- return null;
- File outputFile = new File(workingDirectory, input.getName() + Utils.PACKED_SUFFIX);
- try {
- String[] cmd = getCommand(input, outputFile, inf, containers);
- int result = execute(cmd, verbose);
- if (result != 0 && verbose)
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- return null;
- }
- return outputFile;
- }
- return null;
- }
-
- protected boolean shouldPack(File input, List containers, Properties inf) {
- //1: exclude by containers
- // innermost jar is first on the list, it can override outer jars
- for (Iterator iterator = containers.iterator(); iterator.hasNext();) {
- Properties container = (Properties) iterator.next();
- if (container.containsKey(Utils.MARK_EXCLUDE_CHILDREN_PACK)) {
- if (Boolean.valueOf(container.getProperty(Utils.MARK_EXCLUDE_CHILDREN_PACK)).booleanValue()) {
- if (verbose)
- System.out.println(input.getName() + " is excluded from pack200 by its containers."); //$NON-NLS-1$
- return false;
- }
- break;
- }
- }
-
- //2: excluded by self
- if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_PACK) && Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_PACK)).booleanValue()) {
- if (verbose)
- System.out.println("Excluding " + input.getName() + " from " + getStepName()); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- }
-
- return true;
- }
-
- protected String[] getCommand(File input, File outputFile, Properties inf, List containers) throws IOException {
- String[] cmd = null;
- String arguments = getArguments(input, inf, containers);
- if (arguments != null && arguments.length() > 0) {
- String[] args = Utils.toStringArray(arguments, ","); //$NON-NLS-1$
- cmd = new String[3 + args.length];
- cmd[0] = packCommand;
- System.arraycopy(args, 0, cmd, 1, args.length);
- cmd[cmd.length - 2] = outputFile.getCanonicalPath();
- cmd[cmd.length - 1] = input.getCanonicalPath();
- } else {
- cmd = new String[] {packCommand, outputFile.getCanonicalPath(), input.getCanonicalPath()};
- }
- return cmd;
- }
-
- protected String getArguments(File input, Properties inf, List containers) {
- //1: Explicitly marked in our .inf file
- if (inf != null && inf.containsKey(Utils.PACK_ARGS)) {
- return inf.getProperty(Utils.PACK_ARGS);
- }
-
- //2: Defaults set in one of our containing jars
- for (Iterator iterator = containers.iterator(); iterator.hasNext();) {
- Properties container = (Properties) iterator.next();
- if (container.containsKey(Utils.DEFAULT_PACK_ARGS)) {
- return container.getProperty(Utils.DEFAULT_PACK_ARGS);
- }
- }
-
- //3: Set by name in outside pack.properties file
- Properties options = getOptions();
- String argsKey = input.getName() + Utils.PACK_ARGS_SUFFIX;
- if (options.containsKey(argsKey)) {
- return options.getProperty(argsKey);
- }
-
- //4: Set by default in outside pack.properties file
- if (options.containsKey(Utils.DEFAULT_PACK_ARGS)) {
- return options.getProperty(Utils.DEFAULT_PACK_ARGS);
- }
-
- return ""; //$NON-NLS-1$
- }
-
- public String getStepName() {
- return "Pack"; //$NON-NLS-1$
- }
-
- public void adjustInf(File input, Properties inf, List containers) {
- if (input == null || inf == null)
- return;
-
- //don't be verbose to check if we should mark the inf
- boolean v = verbose;
- verbose = false;
- if (!shouldPack(input, containers, inf)) {
- verbose = v;
- return;
- }
- verbose = v;
-
- //mark as conditioned if not previously marked. A signed jar is assumed to be previously conditioned.
- if (inf.getProperty(Utils.MARK_PROPERTY) == null) {
- inf.put(Utils.MARK_PROPERTY, "true"); //$NON-NLS-1$
-
- //record arguments used
- String arguments = inf.getProperty(Utils.PACK_ARGS);
- if (arguments == null) {
- arguments = getArguments(input, inf, containers);
- if (arguments != null && arguments.length() > 0)
- inf.put(Utils.PACK_ARGS, arguments);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java
deleted file mode 100644
index 79707a69f..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/PackUnpackStep.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * @author aniefer@ca.ibm.com
- *
- */
-public class PackUnpackStep extends PackStep {
- private Set exclusions = null;
-
- public PackUnpackStep(Properties options) {
- super(options);
- exclusions = Utils.getPackExclusions(options);
- }
-
- public PackUnpackStep(Properties options, boolean verbose) {
- super(options, verbose);
- exclusions = Utils.getPackExclusions(options);
- }
-
- public String recursionEffect(String entryName) {
- if (canPack() && entryName.endsWith(".jar") && !exclusions.contains(entryName)) { //$NON-NLS-1$
- return entryName;
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.internal.jarprocessor.PackStep#postProcess(java.io.File, java.io.File, java.util.LinkedList)
- */
- public File postProcess(File input, File workingDirectory, List containers) {
- if (canPack() && packCommand != null && input != null) {
- Properties inf = Utils.getEclipseInf(input, verbose);
- if (!shouldPack(input, containers, inf))
- return null;
- File tempFile = new File(workingDirectory, "temp_" + input.getName()); //$NON-NLS-1$
- try {
- String[] tmp = getCommand(input, tempFile, inf, containers);
- String[] cmd = new String[tmp.length + 1];
- cmd[0] = tmp[0];
- cmd[1] = "-r"; //$NON-NLS-1$
- System.arraycopy(tmp, 1, cmd, 2, tmp.length - 1);
-
- int result = execute(cmd, verbose);
- if (result == 0 && tempFile.exists()) {
- File finalFile = new File(workingDirectory, input.getName());
- if (finalFile.exists())
- finalFile.delete();
- tempFile.renameTo(finalFile);
- return finalFile;
- } else if (verbose) {
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- return null;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.internal.jarprocessor.PackStep#preProcess(java.io.File, java.io.File, java.util.LinkedList)
- */
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- public String getStepName() {
- return "Repack"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java
deleted file mode 100644
index e648808fb..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/SignCommandStep.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-public class SignCommandStep extends CommandStep {
- private Set exclusions = null;
-
- public SignCommandStep(Properties options, String command) {
- super(options, command, ".jar", false); //$NON-NLS-1$
- exclusions = Utils.getSignExclusions(options);
- }
-
- public SignCommandStep(Properties options, String command, boolean verbose) {
- super(options, command, ".jar", verbose); //$NON-NLS-1$
- exclusions = Utils.getSignExclusions(options);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#recursionEffect(java.lang.String)
- */
- public String recursionEffect(String entryName) {
- if (entryName.endsWith(extension) && !exclusions.contains(entryName))
- return entryName;
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#preProcess(java.io.File, java.io.File)
- */
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#postProcess(java.io.File, java.io.File)
- */
- public File postProcess(File input, File workingDirectory, List containers) {
- if (command != null && input != null && shouldSign(input, containers)) {
- try {
- String[] cmd = new String[] {command, input.getCanonicalPath()};
- int result = execute(cmd, verbose);
- if (result == 0) {
- return input;
- } else if (verbose) {
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- } catch (IOException e) {
- if (verbose) {
- e.printStackTrace();
- }
- }
- }
- return null;
- }
-
- public boolean shouldSign(File input, List containers) {
- Properties inf = null;
-
- //1: Are we excluded from signing by our parents?
- //innermost jar is first on the list, it overrides outer jars
- for (Iterator iterator = containers.iterator(); iterator.hasNext();) {
- inf = (Properties) iterator.next();
- if (inf.containsKey(Utils.MARK_EXCLUDE_CHILDREN_SIGN)){
- if(Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_CHILDREN_SIGN)).booleanValue()) {
- if (verbose)
- System.out.println(input.getName() + "is excluded from signing by its containers."); //$NON-NLS-1$
- return false;
- }
- break;
- }
- }
-
- //2: Is this jar itself marked as exclude?
- inf = Utils.getEclipseInf(input, verbose);
- if (inf != null && inf.containsKey(Utils.MARK_EXCLUDE_SIGN) && Boolean.valueOf(inf.getProperty(Utils.MARK_EXCLUDE_SIGN)).booleanValue()) {
- if (verbose)
- System.out.println("Excluding " + input.getName() + " from signing."); //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- }
- return true;
- }
-
- public String getStepName() {
- return "Sign"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java
deleted file mode 100644
index df1a236c4..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.*;
-
-public class StreamProcessor {
- private static final String JOBS = "org.eclipse.core.runtime.jobs.Job"; //$NON-NLS-1$
- public static final String STREAM_PROCESSOR = "Stream Processor"; //$NON-NLS-1$
- public static final String STDERR = "STDERR"; //$NON-NLS-1$
- public static final String STDOUT = "STDOUT"; //$NON-NLS-1$
-
- static private boolean haveJobs = false;
-
- static {
- try {
- haveJobs = (Class.forName(JOBS) != null);
- } catch (ClassNotFoundException e) {
- //no jobs
- }
- }
-
- static public void start(final InputStream is, final String name, final boolean verbose) {
- if (haveJobs) {
- new StreamProcessorJob(is, name, verbose).schedule();
- } else {
- Thread job = new Thread(STREAM_PROCESSOR) {
- public void run() {
- StreamProcessor.run(is, name, verbose);
- }
- };
- job.start();
- }
- }
-
- static public void run(InputStream inputStream, String name, boolean verbose) {
- try {
- InputStreamReader isr = new InputStreamReader(inputStream);
- BufferedReader br = new BufferedReader(isr);
- while (true) {
- String s = br.readLine();
- if (s == null) {
- break;
- }
- if (verbose) {
- if (STDERR.equals(name))
- System.err.println(name + ": " + s); //$NON-NLS-1$
- else
- System.out.println(name + ": " + s); //$NON-NLS-1$
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java
deleted file mode 100644
index db404fec4..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/StreamProcessorJob.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.InputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-
-public class StreamProcessorJob extends Job {
- private InputStream inputStream = null;
- private String name = null;
- private boolean verbose = false;
-
- public StreamProcessorJob(InputStream stream, String name, boolean verbose) {
- super(StreamProcessor.STREAM_PROCESSOR + " : " + name); //$NON-NLS-1$
- setPriority(Job.SHORT);
- setSystem(true);
- this.inputStream = stream;
- this.name = name;
- this.verbose = verbose;
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- StreamProcessor.run(inputStream, name, verbose);
- inputStream = null;
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java
deleted file mode 100644
index a6c84bf67..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/UnpackStep.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @author aniefer
- *
- */
-public class UnpackStep extends CommandStep {
- public static final String UNPACKER_PROPERTY = "org.eclipse.update.jarprocessor.Unpacker"; //$NON-NLS-1$
- private static Boolean canUnpack = null;
- private static String unpackCommand = null;
-
- public static boolean canUnpack() {
- if (canUnpack != null)
- return canUnpack.booleanValue();
-
- String[] locations = Utils.getPack200Commands("unpack200"); //$NON-NLS-1$
- if (locations == null) {
- canUnpack = Boolean.FALSE;
- unpackCommand = null;
- return false;
- }
-
- int result;
- for (int i = 0; i < locations.length; i++) {
- if (locations[i] == null)
- continue;
- result = execute(new String[] {locations[i], "-V"}); //$NON-NLS-1$
- if (result == 0) {
- unpackCommand = locations[i];
- canUnpack = Boolean.TRUE;
- return true;
- }
- }
-
- canUnpack = Boolean.FALSE;
- return false;
- }
-
- public UnpackStep(Properties options) {
- super(options, null, null, false);
- }
-
- public UnpackStep(Properties options, boolean verbose) {
- super(options, null, null, verbose);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#recursionEffect(java.lang.String)
- */
- public String recursionEffect(String entryName) {
- if (canUnpack() && entryName.endsWith(Utils.PACKED_SUFFIX)) {
- return entryName.substring(0, entryName.length() - Utils.PACKED_SUFFIX.length());
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#preProcess(java.io.File, java.io.File)
- */
- public File preProcess(File input, File workingDirectory, List containers) {
- if (canUnpack() && unpackCommand != null) {
- String name = input.getName();
- if (name.endsWith(Utils.PACKED_SUFFIX)) {
- name = name.substring(0, name.length() - Utils.PACKED_SUFFIX.length());
-
- File unpacked = new File(workingDirectory, name);
- File parent = unpacked.getParentFile();
- if (!parent.exists())
- parent.mkdirs();
- try {
- String options = getOptions().getProperty(input.getName() + ".unpack.args"); //$NON-NLS-1$
- String[] cmd = null;
- if (options != null) {
- cmd = new String[] {unpackCommand, options, input.getCanonicalPath(), unpacked.getCanonicalPath()};
- } else {
- cmd = new String[] {unpackCommand, input.getCanonicalPath(), unpacked.getCanonicalPath()};
- }
- int result = execute(cmd, verbose);
- if (result != 0 && verbose)
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- return null;
- }
- return unpacked;
- }
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.update.jarprocessor.IProcessStep#postProcess(java.io.File, java.io.File)
- */
- public File postProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- public String getStepName() {
- return "Unpack"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
deleted file mode 100644
index d6bbc6a36..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/Utils.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.*;
-import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.zip.ZipException;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-
-/**
- * @author aniefer@ca.ibm.com
- *
- */
-public class Utils {
- public static final String MARK_FILE_NAME = "META-INF/eclipse.inf"; //$NON-NLS-1$
-
- /*
- * Properties found in outer pack.properties file
- */
- //comma separated list of jars to exclude from sigining
- public static final String SIGN_EXCLUDES = "sign.excludes"; //$NON-NLS-1$
- //comma separated list of jars to exlclude from packing
- public static final String PACK_EXCLUDES = "pack.excludes"; //$NON-NLS-1$
- //Suffix used when specifying arguments to use when running pack200 on a jar
- public static final String PACK_ARGS_SUFFIX = ".pack.args"; //$NON-NLS-1$
-
- /*
- * Properties found in both pack.properties and eclipse.inf
- */
- // Default arguments to use when running pack200.
- // Affects all jars when specified in pack.properties, affects children when specified in eclipse.inf
- public static final String DEFAULT_PACK_ARGS = "pack200.default.args"; //$NON-NLS-1$
-
- /*
- * Properties found in eclipse.inf file
- */
- //This jar has been conditioned with pack200
- public static final String MARK_PROPERTY = "pack200.conditioned"; //$NON-NLS-1$
- //Exclude this jar from processing
- public static final String MARK_EXCLUDE = "jarprocessor.exclude"; //$NON-NLS-1$
- //Exclude this jar from pack200
- public static final String MARK_EXCLUDE_PACK = "jarprocessor.exclude.pack"; //$NON-NLS-1$
- //Exclude this jar from signing
- public static final String MARK_EXCLUDE_SIGN = "jarprocessor.exclude.sign"; //$NON-NLS-1$
- //Exclude this jar's children from processing
- public static final String MARK_EXCLUDE_CHILDREN = "jarprocessor.exclude.children"; //$NON-NLS-1$
- //Exclude this jar's children from pack200
- public static final String MARK_EXCLUDE_CHILDREN_PACK = "jarprocessor.exclude.children.pack"; //$NON-NLS-1$
- //Exclude this jar's children from signing
- public static final String MARK_EXCLUDE_CHILDREN_SIGN = "jarprocessor.exclude.children.sign"; //$NON-NLS-1$
- //Arguments used in pack200 for this jar
- public static final String PACK_ARGS = "pack200.args"; //$NON-NLS-1$
-
- public static final String PACK200_PROPERTY = "org.eclipse.update.jarprocessor.pack200"; //$NON-NLS-1$
- public static final String JRE = "@jre"; //$NON-NLS-1$
- public static final String PATH = "@path"; //$NON-NLS-1$
- public static final String NONE = "@none"; //$NON-NLS-1$
-
- public static final String PACKED_SUFFIX = ".pack.gz"; //$NON-NLS-1$
- public static final String JAR_SUFFIX = ".jar"; //$NON-NLS-1$
-
- public static final FileFilter JAR_FILTER = new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.isFile() && pathname.getName().endsWith(".jar"); //$NON-NLS-1$
- }
- };
-
- public static final FileFilter PACK_GZ_FILTER = new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.isFile() && pathname.getName().endsWith(JarProcessor.PACKED_SUFFIX);
- }
- };
-
- public static void close(Object stream) {
- if (stream != null) {
- try {
- if (stream instanceof InputStream)
- ((InputStream) stream).close();
- else if (stream instanceof OutputStream)
- ((OutputStream) stream).close();
- else if (stream instanceof JarFile)
- ((JarFile) stream).close();
- } catch (IOException e) {
- //ignore
- }
- }
- }
-
- /**
- * get the set of commands to try to execute pack/unpack
- * @param cmd the command, either "pack200" or "unpack200"
- * @return String [] or null
- */
- public static String[] getPack200Commands(String cmd) {
- String[] locations = null;
- String prop = System.getProperty(PACK200_PROPERTY);
- String javaHome = System.getProperty("java.home"); //$NON-NLS-1$
- if (NONE.equals(prop)) {
- return null;
- } else if (JRE.equals(prop)) {
- locations = new String[] {javaHome + "/bin/" + cmd}; //$NON-NLS-1$
- } else if (PATH.equals(prop)) {
- locations = new String[] {cmd};
- } else if (prop == null) {
- locations = new String[] {javaHome + "/bin/" + cmd, cmd}; //$NON-NLS-1$
- } else {
- locations = new String[] {prop + "/" + cmd}; //$NON-NLS-1$
- }
- return locations;
- }
-
- /**
- * Transfers all available bytes from the given input stream to the given
- * output stream. Closes both streams if close == true, regardless of failure.
- * Flushes the destination stream if close == false
- *
- * @param source
- * @param destination
- * @param close
- * @throws IOException
- */
- public static void transferStreams(InputStream source, OutputStream destination, boolean close) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- if (close) {
- close(source);
- close(destination);
- } else {
- destination.flush();
- }
- }
- }
-
- /**
- * Deletes all the files and directories from the given root down (inclusive).
- * Returns false if we could not delete some file or an exception occurred
- * at any point in the deletion.
- * Even if an exception occurs, a best effort is made to continue deleting.
- */
- public static boolean clear(java.io.File root) {
- boolean result = clearChildren(root);
- try {
- if (root.exists())
- result &= root.delete();
- } catch (Exception e) {
- result = false;
- }
- return result;
- }
-
- /**
- * Deletes all the files and directories from the given root down, except for
- * the root itself.
- * Returns false if we could not delete some file or an exception occurred
- * at any point in the deletion.
- * Even if an exception occurs, a best effort is made to continue deleting.
- */
- public static boolean clearChildren(java.io.File root) {
- boolean result = true;
- if (root.isDirectory()) {
- String[] list = root.list();
- // for some unknown reason, list() can return null.
- // Just skip the children If it does.
- if (list != null)
- for (int i = 0; i < list.length; i++)
- result &= clear(new java.io.File(root, list[i]));
- }
- return result;
- }
-
- public static Set getPackExclusions(Properties properties) {
- if (properties == null)
- return Collections.EMPTY_SET;
-
- String packExcludes = properties.getProperty(PACK_EXCLUDES);
- if (packExcludes != null) {
- String[] excludes = toStringArray(packExcludes, ","); //$NON-NLS-1$
- Set packExclusions = new HashSet();
- for (int i = 0; i < excludes.length; i++) {
- packExclusions.add(excludes[i]);
- }
- return packExclusions;
- }
- return Collections.EMPTY_SET;
- }
-
- public static Set getSignExclusions(Properties properties) {
- if (properties == null)
- return Collections.EMPTY_SET;
- String signExcludes = properties.getProperty(SIGN_EXCLUDES);
- if (signExcludes != null) {
- String[] excludes = toStringArray(signExcludes, ","); //$NON-NLS-1$
- Set signExclusions = new HashSet();
- for (int i = 0; i < excludes.length; i++) {
- signExclusions.add(excludes[i]);
- }
- return signExclusions;
- }
- return Collections.EMPTY_SET;
- }
-
- public static String concat(String[] array) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < array.length; i++) {
- if (i > 0)
- buffer.append(' ');
- buffer.append(array[i]);
- }
- return buffer.toString();
- }
-
- public static String[] toStringArray(String input, String separator) {
- StringTokenizer tokenizer = new StringTokenizer(input, separator);
- int count = tokenizer.countTokens();
- String[] result = new String[count];
- for (int i = 0; i < count; i++) {
- result[i] = tokenizer.nextToken().trim();
- }
- return result;
- }
-
- /**
- * Get the properties from the eclipse.inf file from the given jar. If the file is not a jar, null is returned.
- * If the file is a jar, but does not contain an eclipse.inf file, an empty Properties object is returned.
- * @param jarFile
- * @return The eclipse.inf properties for the given jar file
- */
- public static Properties getEclipseInf(File jarFile, boolean verbose) {
- if (jarFile == null || !jarFile.exists()) {
- if (verbose)
- System.out.println("Failed to obtain eclipse.inf due to missing jar file: " + jarFile); //$NON-NLS-1$
- return null;
- }
- JarFile jar = null;
- try {
- jar = new JarFile(jarFile, false);
- } catch (ZipException e) {
- //not a jar, don't bother logging this.
- return null;
- } catch (IOException e) {
- if (verbose) {
- System.out.println("Failed to obtain eclipse.inf due to IOException: " + jarFile); //$NON-NLS-1$
- e.printStackTrace();
- }
- return null;
- }
- try {
- JarEntry mark = jar.getJarEntry(MARK_FILE_NAME);
- if (mark != null) {
- InputStream in = jar.getInputStream(mark);
- Properties props = new Properties();
- props.load(in);
- in.close();
- return props;
- }
- return new Properties();
- } catch (IOException e) {
- if (verbose) {
- System.out.println("Failed to obtain eclipse.inf due to IOException: " + jarFile); //$NON-NLS-1$
- e.printStackTrace();
- }
- return null;
- } finally {
- close(jar);
- }
- }
-
- public static boolean shouldSkipJar(File input, boolean processAll, boolean verbose) {
- Properties inf = getEclipseInf(input, verbose);
- if (inf == null) {
- //not a jar, could be a pack.gz
- return false;
- }
- String exclude = inf.getProperty(MARK_EXCLUDE);
-
- //was marked as exclude, we should skip
- if (exclude != null && Boolean.valueOf(exclude).booleanValue())
- return true;
-
- //process all was set, don't skip
- if (processAll)
- return false;
-
- //otherwise, we skip if not marked marked
- String marked = inf.getProperty(MARK_PROPERTY);
- return !Boolean.valueOf(marked).booleanValue();
- }
-
- /**
- * Stores the given properties in the output stream. We store the properties
- * in sorted order so that the signing hash doesn't change if the properties didn't change.
- * @param props
- * @param stream
- */
- public static void storeProperties(Properties props, OutputStream stream) {
- PrintStream printStream = new PrintStream(stream);
- printStream.print("#Processed using Jarprocessor\n"); //$NON-NLS-1$
- SortedMap sorted = new TreeMap(props);
- for (Iterator iter = sorted.keySet().iterator(); iter.hasNext();) {
- String key = (String) iter.next();
- printStream.print(key);
- printStream.print(" = "); //$NON-NLS-1$
- printStream.print(sorted.get(key));
- printStream.print("\n"); //$NON-NLS-1$
-
- }
- printStream.flush();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java
deleted file mode 100644
index 9f413f065..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/ZipProcessor.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor;
-
-import java.io.*;
-import java.util.*;
-import java.util.zip.*;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-
-/**
- * @author aniefer@ca.ibm.com
- *
- */
-public class ZipProcessor {
-
- private JarProcessorExecutor executor = null;
- private JarProcessorExecutor.Options options = null;
-
- private String workingDirectory = null;
- private Properties properties = null;
- private Set packExclusions = null;
- private Set signExclusions = null;
-
- public void setExecutor(JarProcessorExecutor executor) {
- this.executor = executor;
- }
-
- public void setOptions(JarProcessorExecutor.Options options) {
- this.options = options;
- }
-
- public void setWorkingDirectory(String dir) {
- workingDirectory = dir;
- }
-
- public String getWorkingDirectory() {
- if (workingDirectory == null)
- workingDirectory = "."; //$NON-NLS-1$
- return workingDirectory;
- }
-
- private boolean repacking() {
- return options.repack || (options.pack && options.signCommand != null);
- }
-
- public void processZip(File zipFile) throws ZipException, IOException {
- if (options.verbose)
- System.out.println("Processing " + zipFile.getPath()); //$NON-NLS-1$
- ZipFile zip = new ZipFile(zipFile);
- initialize(zip);
-
- String extension = options.unpack ? "pack.gz" : ".jar"; //$NON-NLS-1$ //$NON-NLS-2$
- File tempDir = new File(getWorkingDirectory(), "temp_" + zipFile.getName()); //$NON-NLS-1$
- JarProcessor processor = new JarProcessor();
- processor.setVerbose(options.verbose);
- processor.setProcessAll(options.processAll);
- processor.setWorkingDirectory(tempDir.getCanonicalPath());
- if (options.unpack) {
- executor.addPackUnpackStep(processor, properties, options);
- }
-
- File outputFile = new File(getWorkingDirectory(), zipFile.getName() + ".temp"); //$NON-NLS-1$
- File parent = outputFile.getParentFile();
- if (!parent.exists())
- parent.mkdirs();
- ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(outputFile));
- Enumeration entries = zip.entries();
- if (entries.hasMoreElements()) {
- for (ZipEntry entry = (ZipEntry) entries.nextElement(); entry != null; entry = entries.hasMoreElements() ? (ZipEntry) entries.nextElement() : null) {
- String name = entry.getName();
-
- InputStream entryStream = zip.getInputStream(entry);
-
- boolean pack = options.pack && !packExclusions.contains(name);
- boolean sign = options.signCommand != null && !signExclusions.contains(name);
- boolean repack = repacking() && !packExclusions.contains(name);
-
- File extractedFile = null;
-
- if (entry.getName().endsWith(extension) && (pack || sign || repack || options.unpack)) {
- extractedFile = new File(tempDir, name);
- parent = extractedFile.getParentFile();
- if (!parent.exists())
- parent.mkdirs();
- if (options.verbose)
- System.out.println("Extracting " + entry.getName()); //$NON-NLS-1$
- FileOutputStream extracted = new FileOutputStream(extractedFile);
- Utils.transferStreams(entryStream, extracted, true); // this will close the stream
- entryStream = null;
-
- boolean skip = Utils.shouldSkipJar(extractedFile, options.processAll, options.verbose);
- if (skip) {
- //skipping this file
- entryStream = new FileInputStream(extractedFile);
- if (options.verbose)
- System.out.println(entry.getName() + " is not marked, skipping."); //$NON-NLS-1$
- } else {
- if (options.unpack) {
- File result = processor.processJar(extractedFile);
- name = name.substring(0, name.length() - extractedFile.getName().length()) + result.getName();
- extractedFile = result;
- } else {
- if (repack || sign) {
- processor.clearProcessSteps();
- if (repack)
- executor.addPackUnpackStep(processor, properties, options);
- if (sign)
- executor.addSignStep(processor, properties, options);
- extractedFile = processor.processJar(extractedFile);
- }
- if (pack) {
- processor.clearProcessSteps();
- executor.addPackStep(processor, properties, options);
- File modifiedFile = processor.processJar(extractedFile);
- if (modifiedFile.exists()) {
- try {
- String newName = name.substring(0, name.length() - extractedFile.getName().length()) + modifiedFile.getName();
- if (options.verbose) {
- System.out.println("Adding " + newName + " to " + outputFile.getPath()); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println();
- }
- ZipEntry zipEntry = new ZipEntry(newName);
- entryStream = new FileInputStream(modifiedFile);
- zipOut.putNextEntry(zipEntry);
- Utils.transferStreams(entryStream, zipOut, false); //we want to keep zipOut open
- entryStream.close();
- Utils.clear(modifiedFile);
- } catch (IOException e) {
- Utils.close(entryStream);
- if (options.verbose) {
- e.printStackTrace();
- System.out.println("Warning: Problem reading " + modifiedFile.getPath() + ".");
- }
- }
- entryStream = null;
- } else if (options.verbose) {
- System.out.println("Warning: " + modifiedFile.getPath() + " not found.");
- }
- }
- }
- if (extractedFile.exists()) {
- try {
- entryStream = new FileInputStream(extractedFile);
- } catch (IOException e) {
- if (options.verbose) {
- e.printStackTrace();
- System.out.println("Warning: Problem reading " + extractedFile.getPath() + ".");
- }
- }
- }
-
- if (options.verbose && entryStream != null) {
- System.out.println("Adding " + name + " to " + outputFile.getPath()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- if (entryStream != null) {
- ZipEntry newEntry = new ZipEntry(name);
- try {
- zipOut.putNextEntry(newEntry);
- Utils.transferStreams(entryStream, zipOut, false);
- zipOut.closeEntry();
- } catch (ZipException e) {
- if (options.verbose) {
- System.out.println("Warning: " + name + " already exists in " + outputFile.getName() + ". Skipping.");
- }
- }
- entryStream.close();
- }
-
- if (extractedFile != null)
- Utils.clear(extractedFile);
-
- if (options.verbose) {
- System.out.println();
- System.out.println("Processing " + zipFile.getPath()); //$NON-NLS-1$
- }
- }
- }
- zipOut.close();
- zip.close();
-
- File finalFile = new File(getWorkingDirectory(), zipFile.getName());
- if (finalFile.exists())
- finalFile.delete();
- outputFile.renameTo(finalFile);
- Utils.clear(tempDir);
- }
-
- private void initialize(ZipFile zip) {
- ZipEntry entry = zip.getEntry("pack.properties"); //$NON-NLS-1$
- properties = new Properties();
- if (entry != null) {
- InputStream stream = null;
- try {
- stream = zip.getInputStream(entry);
- properties.load(stream);
- } catch (IOException e) {
- if (options.verbose)
- e.printStackTrace();
- } finally {
- Utils.close(stream);
- }
- }
-
- packExclusions = Utils.getPackExclusions(properties);
- signExclusions = Utils.getSignExclusions(properties);
-
- if (executor == null)
- executor = new JarProcessorExecutor();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html
deleted file mode 100644
index ef5fe5e0b..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/pack-readme.html
+++ /dev/null
@@ -1,82 +0,0 @@
-<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Eclipse update packing tool readme</title>
-</head>
-<body>
-<h1>Eclipse update packing tool</h1>
-
-<h3>Overview</h3>
-The update packing tool processes a hierarchy of arbitrarily nested
-JARs and ZIP files. It is a generic utility that performs a depth first traversal of
-a nested hierarchy of ZIPs and JARs, performs various commands on
-each of the JARs in the hierarchy, and then rebuilds the same hierarchy
-of ZIPs and JARs again. Currently its main functions are:
-<ul>
- <li>Packing JARs using the Java 1.5 <a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/pack200.html">pack200</a>
- command.</li>
- <li>Unpacking PACK.GZs using the Java 1.5 <a href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/unpack200.html">unpack200</a>
- command.</li>
- <li>Normalizing JARs for future compression by pack200. This is accomplished
- by running the pack200 command with the <tt>--repack</tt> command line argument.</li>
- <li>Signing JARs to allow for authentication of the origin of JARs. This is accomplished by
- running a supplied command (typically the command will just be a wrapper around
- the Java <a href="http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jarsigner.html">jarsigner</a> tool).</li>
-</ul>
-The packing tool is used in the following contexts:
-<ul>
- <li>During a PDE build, to prepare JARs for uploading to an Eclipse
- update site. In this usage, it is used to both nomalize JAR contents
- (pack200 -repack), and sign JARs.</li>
- <li>On an update site, to convert traditional JAR content into the
- compressed pack200 format.</li>
- <li>From an Eclipse client application during update, to convert
- compressed pack200 format content into executable JAR files.</li>
-</ul>
-<h3>Tool usage</h3>
-To run the packing tool, you need a 1.5 JRE installed. The tool is run
-by invoking Java as follows:
-
-<pre>
- java jarprocessor.jar [options] input
-</pre>
-
-Where <tt>input</tt> is either a zip file, a directory, or a JAR (or a pack.gz file). All files ending
-in ".jar" or ".pack.gz" in the provided zip or directory hierarchy
-will be processed.
-The following additional command line arguments are supported:
-<ul>
-<li>-repack : Normalize the jars using pack200 <tt>--repack</tt></li>
-<li>-sign &lt;cmd&gt; : signs the jars by executing the provided command.
-The command will be provided a single argument that will be the full path of the JAR to process.
-</li>
-<li>-pack : for each input in JAR form, produce a corresponding output
-in packed form. For an input "a.jar", the output is a.jar.pack.gz.
-</li>
-<li>-unpack : for each input in packed form, produce a corresponding output
-in unpacked form. For an input "a.jar.pack.gz", the output is "a.jar". -unpack is mutually exclusive with -repack, -pack and -sign.</li>
-<li>-outputDir &lt;dir&gt; : The directory to put the tool's output into. If the input was a zip file, then an output zip file will be
-created containg all the output files. If the input was a directory, for each input file there is a corresponding output file in the output directory. By default the current working directory is used. If the input is in the same
-directory as the output, the input files may be overwritten.</li>
-</ul>
-
-Additionally, when the input is a zip file, it may contain a file called
-<tt>pack.properties</tt>. The pack.properties file supports the following values:
-<ul>
-<li>pack.excludes = jarName[, jarName]* : A comma-delimited list of JARs that should not be packed or repacked.
-</li>
-<li>sign.excludes = jarName[, jarName]* : A comma-delimited list of JARs that should not be signed.
-</li>
-<li>&lt;jarname&gt;.pack.args = option[, option]* : A comma-delimited list of additional arguments that should
-be passed to pack200 when packing any jar with name &lt;jarname&gt;.
-</ul>
-</p>
-<p>
-<font size=-1>
-Copyright (c) IBM Corporation and others 2006. All rights reserved. This program and the accompanying materials
-are made available under the terms of the
-<a href="http://www.eclipse.org/legal/epl-v10.html">Eclipse Public License v1.0</a>.
-</font>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/UnsignCommand.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/UnsignCommand.java
deleted file mode 100644
index 30a9e852b..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/UnsignCommand.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.unsigner;
-
-import java.io.File;
-import java.util.List;
-import java.util.Properties;
-import org.eclipse.equinox.internal.p2.jarprocessor.SignCommandStep;
-
-public class UnsignCommand extends SignCommandStep {
-
- public UnsignCommand(Properties options, String command, boolean verbose) {
- super(options, command, verbose);
- }
-
- public File postProcess(File input, File workingDirectory, List containers) {
- if (command != null && input != null && shouldSign(input, containers)) {
- execute(input);
- }
- return null;
- }
-
- private void execute(File input) {
- Unsigner jarUnsigner = new Unsigner();
- jarUnsigner.setJar(input);
- jarUnsigner.setKeepManifestEntries(false);
- jarUnsigner.execute();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/Unsigner.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/Unsigner.java
deleted file mode 100644
index 6e8ca82b1..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/unsigner/Unsigner.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.unsigner;
-import java.io.*;
-import java.util.Enumeration;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-import java.util.zip.*;
-
-/**
- * This class removes the signature files from a jar and clean up the manifest.
- */
-public class Unsigner {
- private static final String META_INF = "META-INF"; //$NON-NLS-1$
- private static final String DSA_EXT = ".DSA"; //$NON-NLS-1$
- private static final String RSA_EXT = ".RSA"; //$NON-NLS-1$
- private static final String SF_EXT = ".SF"; //$NON-NLS-1$
- private static final String META_INF_PREFIX = META_INF + '/';
-
- private String[] signers;
- private File jarFile;
- private boolean keepManifestContent = false;
-
- private boolean isSigned(File file) {
- ZipFile jar = null;
- try {
- jar = new ZipFile(file);
-
- if (signers != null) {
- for (int i = 0; i < signers.length; i++) {
- if (jar.getEntry((META_INF_PREFIX + signers[i] + SF_EXT).toUpperCase()) != null)
- return true;
- }
- } else {
- Enumeration entries = jar.entries();
- while (entries.hasMoreElements()) {
- ZipEntry entry = (ZipEntry) entries.nextElement();
- String entryName = entry.getName();
- if(entryName.endsWith(SF_EXT) && entryName.startsWith(META_INF))
- return true;
- }
- }
- return false;
- } catch (ZipException e) {
- return false;
- } catch (IOException e) {
- return false;
- } finally {
- if (jar != null)
- try {
- jar.close();
- } catch (IOException e) {
- //Ignore
- }
- }
- }
-
- public void execute() {
- processJar(jarFile);
- }
-
- private void processJar(File inputFile) {
- if (!isSigned(inputFile))
- return;
-
- try {
- ZipInputStream input = new ZipInputStream(new BufferedInputStream(new FileInputStream(inputFile)));
- File outputFile = File.createTempFile("removing.", ".signature", inputFile.getParentFile()); //$NON-NLS-1$ //$NON-NLS-2$
- ZipOutputStream output = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
-
- ZipEntry inputZe = input.getNextEntry();
- byte[] b = new byte[8192];
- while (inputZe != null) {
- byte remove = shouldRemove(inputZe);
- if (remove == 2) {
- inputZe = input.getNextEntry();
- continue;
- }
-
- //copy the file or modify the manifest.mf
- if (remove == 1) {
- output.putNextEntry(new ZipEntry(inputZe.getName()));
- Manifest m = new Manifest();
- m.read(input);
- m.getEntries().clear(); //This is probably not subtle enough
- m.write(output);
- } else {
- output.putNextEntry(inputZe);
- while (input.available() != 0) {
- int read = input.read(b);
- if (read != -1)
- output.write(b, 0, read);
- }
- }
- output.closeEntry();
- input.closeEntry();
-
- inputZe = input.getNextEntry();
- }
- output.close();
- input.close();
- inputFile.delete();
- outputFile.renameTo(inputFile);
- } catch (FileNotFoundException e) {
- //this can't happen we have checked before
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private byte shouldRemove(ZipEntry entry) {
- String entryName = entry.getName();
- if(keepManifestContent == false && entryName.equalsIgnoreCase(JarFile.MANIFEST_NAME)) {
- return 1;
- }
- if (signers != null) {
- for (int i = 0; i < signers.length; i++) {
- if (entryName.equalsIgnoreCase(META_INF_PREFIX + signers[i] + SF_EXT) || entryName.equalsIgnoreCase(META_INF_PREFIX + signers[i] + RSA_EXT) || entryName.equalsIgnoreCase(META_INF_PREFIX + signers[i] + DSA_EXT))
- return 2;
- }
- } else {
- if (entryName.startsWith(META_INF) && (entryName.endsWith(SF_EXT) || entryName.endsWith(RSA_EXT) || entryName.endsWith(DSA_EXT)))
- return 2;
- }
- return 0;
- }
-
- public void setRemoveSigners(String[] fileName) {
- signers = fileName;
- }
-
- public void setJar(File file) {
- jarFile = file;
- }
-
- public void setKeepManifestEntries(boolean keep) {
- keepManifestContent = keep;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
deleted file mode 100644
index 322d77905..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/Verifier.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.jarprocessor.verifier;
-
-import java.io.*;
-import java.util.Iterator;
-import java.util.Properties;
-import org.eclipse.equinox.internal.p2.jarprocessor.UnpackStep;
-import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-
-public class Verifier extends JarProcessorExecutor {
-
- private static void printUsage() {
- System.out.println("This tool verifies that unpacking a pack.gz file with the jarprocessor results in a valid jar file."); //$NON-NLS-1$
- System.out.println("Usage: java -cp jarprocessor.jar org.eclipse.update.internal.jarprocessor.verifier.Verifier -dir <workingDirectory> input [input]"); //$NON-NLS-1$
- System.out.println(""); //$NON-NLS-1$
- System.out.println("-dir : specifies a working directory where pack.gz files can be temporarily unpacked"); //$NON-NLS-1$
- System.out.println("input : a list of directories and/or pack.gz files to verify."); //$NON-NLS-1$
-
- }
-
- public static void main(String[] args) {
- if (!VerifyStep.canVerify()) {
- System.out.println("Can't find jarsigner. Please adjust your system path or use a jdk."); //$NON-NLS-1$
- printUsage();
- return;
- }
-
- String workingDirectory = null;
- String[] input;
-
- if (args.length == 0) {
- workingDirectory = "."; //$NON-NLS-1$
- input = new String[] {"."}; //$NON-NLS-1$
- } else {
- int idx = 0;
- if (args[0] == "-help") { //$NON-NLS-1$
- printUsage();
- return;
- }
- if (args[idx] == "-dir") { //$NON-NLS-1$
- workingDirectory = args[++idx];
- idx++;
- } else {
- workingDirectory = "temp"; //$NON-NLS-1$
- }
-
- input = new String[args.length - idx];
- System.arraycopy(args, idx, input, 0, args.length - idx);
- }
-
- File workingDir = new File(workingDirectory);
- boolean clear = false;
- if (workingDir.exists()) {
- workingDir = new File(workingDir, "jarprocessor.verifier.temp"); //$NON-NLS-1$
- clear = true;
- }
-
- Verifier verifier = new Verifier();
- verifier.verify(workingDir, input);
-
- if (clear)
- workingDir.deleteOnExit();
- }
-
- public void verify(final File workingDirectory, String[] input) {
- options = new Options();
- options.verbose = false;
- options.repack = true; // We first unpack first during repack/sign phase
- options.pack = true; // then we are verifying during the pack phase.
- options.outputDir = workingDirectory.toString();
-
- Properties properties = new Properties();
-
- /* There is no need to use a full processor to do the verification unless we want to verify nested jars as well.
- * So for now, use a custom processor to just call the verify step directly.
- */
- final VerifyStep verifyStep = new VerifyStep(properties, false);
- JarProcessor verifier = new JarProcessor() {
- public File processJar(File inputFile) throws IOException {
- Iterator iterator = getStepIterator();
- if (iterator.hasNext() && iterator.next() instanceof VerifyStep)
- return verifyStep.postProcess(inputFile, workingDirectory, null);
- //else we are unpacking, call super
- return super.processJar(inputFile);
- }
- };
- verifier.setWorkingDirectory(workingDirectory.getAbsolutePath());
-
- for (int i = 0; i < input.length; i++) {
- File inputFile = new File(input[i]);
- if (inputFile.exists()) {
- try {
- process(inputFile, Utils.PACK_GZ_FILTER, true, verifier, properties);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- }
- }
- Utils.clear(workingDirectory);
- }
-
- public void addPackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new VerifyStep(properties, processOptions.verbose));
- }
-
- public void addPackUnpackStep(JarProcessor processor, Properties properties, Options processOptions) {
- processor.addProcessStep(new UnpackStep(properties, processOptions.verbose));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java
deleted file mode 100644
index f9b19351e..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/equinox/internal/p2/jarprocessor/verifier/VerifyStep.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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 - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.jarprocessor.verifier;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-import org.eclipse.equinox.internal.p2.jarprocessor.CommandStep;
-import org.eclipse.equinox.internal.p2.jarprocessor.Utils;
-
-public class VerifyStep extends CommandStep {
-
- static String verifyCommand = "jarsigner"; //$NON-NLS-1$
- static Boolean canVerify = null;
-
- public static boolean canVerify() {
- if (canVerify != null)
- return canVerify.booleanValue();
-
- String javaHome = System.getProperty("java.home"); //$NON-NLS-1$
- String command = javaHome + "/../bin/jarsigner"; //$NON-NLS-1$
- int result = execute(new String[] {command});
- if (result < 0) {
- command = "jarsigner"; //$NON-NLS-1$
- result = execute(new String[] {command});
- if (result < 0) {
- canVerify = Boolean.FALSE;
- return false;
- }
- }
- verifyCommand = command;
- canVerify = Boolean.TRUE;
- return true;
- }
-
- public VerifyStep(Properties options, boolean verbose) {
- super(options, verifyCommand, ".jar", verbose); //$NON-NLS-1$
- }
-
- public String getStepName() {
- return "Verify"; //$NON-NLS-1$
- }
-
- public File postProcess(File input, File workingDirectory, List containers) {
- if (canVerify() && verifyCommand != null) {
- try {
- System.out.print("Verifying " + input.getName() + ": "); //$NON-NLS-1$ //$NON-NLS-2$
- String[] cmd = new String[] {verifyCommand, "-verify", input.getCanonicalPath()}; //$NON-NLS-1$
- int result = execute(cmd, true);
- if (result != 0 && verbose)
- System.out.println("Error: " + result + " was returned from command: " + Utils.concat(cmd)); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- return null;
- }
- return input;
- }
- return null;
- }
-
- public File preProcess(File input, File workingDirectory, List containers) {
- return null;
- }
-
- public String recursionEffect(String entryName) {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/IProcessStep.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/IProcessStep.java
deleted file mode 100644
index 1479c4c32..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/IProcessStep.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.internal.provisional.equinox.p2.jarprocessor;
-
-import java.io.File;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * @author aniefer@ca.ibm.com
- *
- */
-public interface IProcessStep {
-
- /**
- * The effect of this processing step if the JarProcessor was to recurse on this entry.
- * Return null if this step will not do anything with this entry.
- * Return the new entryName if this step will modify this entry on recursion.
- * @param entryName
- * @return The new entry name, or <code>null</code>
- */
- public String recursionEffect(String entryName);
-
- /**
- * Perform some processing on the input file before the JarProcessor considers the entries for recursion.
- * @param input
- * @param workingDirectory
- * @param containers inf properties for containing jars, innermost jar is first on the list
- * @return the file containing the result of the processing
- */
- public File preProcess(File input, File workingDirectory, List containers);
-
- /**
- * Perform some processing on the input file after the JarProcessor returns from recursion.
- *
- * @param input
- * @param workingDirectory
- * @param containers inf properties for containing jars, innermost jar is first on the list
- * @return the file containing the result of the processing
- */
- public File postProcess(File input, File workingDirectory, List containers);
-
- /**
- * Return the name of this process step
- * @return the name of this process step
- */
- public String getStepName();
-
- /**
- * Adjust any properties in the eclipse.inf as appropriate for this step
- * @param input
- * @param inf
- * @param containers inf properties for containing jars, innermost jar is first on the list
- */
- public void adjustInf(File input, Properties inf, List containers);
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
deleted file mode 100644
index b22bc8e9b..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessor.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.internal.provisional.equinox.p2.jarprocessor;
-
-import java.io.*;
-import java.util.*;
-import java.util.jar.*;
-import org.eclipse.equinox.internal.p2.jarprocessor.*;
-
-public class JarProcessor {
- public static final String PACKED_SUFFIX = "pack.gz"; //$NON-NLS-1$
-
- private List steps = new ArrayList();
- private String workingDirectory = ""; //$NON-NLS-1$
- private int depth = -1;
- private boolean verbose = false;
- private boolean processAll = false;
- private LinkedList containingInfs = new LinkedList();
-
- static public JarProcessor getUnpackProcessor(Properties properties) {
- if (!canPerformUnpack())
- throw new UnsupportedOperationException();
- JarProcessor processor = new JarProcessor();
- processor.addProcessStep(new UnpackStep(properties));
- return processor;
- }
-
- static public JarProcessor getPackProcessor(Properties properties) {
- if (!canPerformPack())
- throw new UnsupportedOperationException();
- JarProcessor processor = new JarProcessor();
- processor.addProcessStep(new PackStep(properties));
- return processor;
- }
-
- static public boolean canPerformPack() {
- return PackStep.canPack();
- }
-
- static public boolean canPerformUnpack() {
- return UnpackStep.canUnpack();
- }
-
- public String getWorkingDirectory() {
- return workingDirectory;
- }
-
- public void setWorkingDirectory(String dir) {
- if (dir != null)
- workingDirectory = dir;
- }
-
- public void setVerbose(boolean verbose) {
- this.verbose = verbose;
- }
-
- public void setProcessAll(boolean all) {
- this.processAll = all;
- }
-
- public void addProcessStep(IProcessStep step) {
- steps.add(step);
- }
-
- public void clearProcessSteps() {
- steps.clear();
- }
-
- public Iterator getStepIterator() {
- return steps.iterator();
- }
-
- /**
- * Recreate a jar file. The replacements map specifies entry names to be replaced, the replacements are
- * expected to be found in directory.
- *
- * @param jar - The input jar
- * @param outputJar - the output
- * @param replacements - map of entryName -> new entryName
- * @param directory - location to find file for new entryName
- * @throws IOException
- */
- private void recreateJar(JarFile jar, JarOutputStream outputJar, Map replacements, File directory, Properties inf) throws IOException {
- InputStream in = null;
- boolean marked = false;
- try {
- Enumeration entries = jar.entries();
- for (JarEntry entry = (JarEntry) entries.nextElement(); entry != null; entry = entries.hasMoreElements() ? (JarEntry) entries.nextElement() : null) {
- File replacement = null;
- JarEntry newEntry = null;
- if (replacements.containsKey(entry.getName())) {
- String name = (String) replacements.get(entry.getName());
- replacement = new File(directory, name);
- if (name != null) {
- if (replacement.exists()) {
- try {
- in = new BufferedInputStream(new FileInputStream(replacement));
- newEntry = new JarEntry(name);
- } catch (Exception e) {
- if (verbose) {
- e.printStackTrace();
- System.out.println("Warning: Problem reading " + replacement.getPath() + ", using " + jar.getName() + File.separator + entry.getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- } else if (verbose) {
- System.out.println("Warning: " + replacement.getPath() + " not found, using " + jar.getName() + File.separator + entry.getName() + " instead."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- }
- if (newEntry == null) {
- try {
- in = new BufferedInputStream(jar.getInputStream(entry));
- newEntry = new JarEntry(entry.getName());
- } catch (Exception e) {
- if (verbose) {
- e.printStackTrace();
- System.out.println("ERROR: problem reading " + entry.getName() + " from " + jar.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- continue;
- }
- }
- newEntry.setTime(entry.getTime());
- outputJar.putNextEntry(newEntry);
- if (entry.getName().equals(Utils.MARK_FILE_NAME)) {
- //The eclipse.inf file was read in earlier, don't need to reread it, just write it out now
- Utils.storeProperties(inf, outputJar);
- marked = true;
- } else {
- Utils.transferStreams(in, outputJar, false);
- }
- outputJar.closeEntry();
- in.close();
-
- //delete the nested jar file
- if (replacement != null) {
- replacement.delete();
- }
- }
- if (!marked) {
- JarEntry entry = new JarEntry(Utils.MARK_FILE_NAME);
- outputJar.putNextEntry(entry);
- Utils.storeProperties(inf, outputJar);
- outputJar.closeEntry();
- }
- } finally {
- Utils.close(outputJar);
- Utils.close(jar);
- Utils.close(in);
- }
- }
-
- private String recursionEffect(String entryName) {
- String result = null;
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
-
- result = step.recursionEffect(entryName);
- if (result != null)
- entryName = result;
- }
- return result;
- }
-
- private void extractEntries(JarFile jar, File tempDir, Map data, Properties inf) throws IOException {
- if (inf != null) {
- //skip if excluding children
- if (inf.containsKey(Utils.MARK_EXCLUDE_CHILDREN)) {
- String excludeChildren = inf.getProperty(Utils.MARK_EXCLUDE_CHILDREN);
- if (Boolean.valueOf(excludeChildren).booleanValue())
- if (verbose) {
- for (int i = 0; i <= depth; i++)
- System.out.print(" "); //$NON-NLS-1$
- System.out.println("Children of " + jar.getName() + "are excluded from processing."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return;
- }
- }
-
- Enumeration entries = jar.entries();
- if (entries.hasMoreElements()) {
- for (JarEntry entry = (JarEntry) entries.nextElement(); entry != null; entry = entries.hasMoreElements() ? (JarEntry) entries.nextElement() : null) {
- String name = entry.getName();
- String newName = recursionEffect(name);
- if (newName != null) {
- if (verbose) {
- for (int i = 0; i <= depth; i++)
- System.out.print(" "); //$NON-NLS-1$
- System.out.println("Processing nested file: " + name); //$NON-NLS-1$
- }
- //extract entry to temp directory
- File extracted = new File(tempDir, name);
- File parentDir = extracted.getParentFile();
- if (!parentDir.exists())
- parentDir.mkdirs();
-
- InputStream in = null;
- OutputStream out = null;
- try {
- in = jar.getInputStream(entry);
- out = new BufferedOutputStream(new FileOutputStream(extracted));
- Utils.transferStreams(in, out, true); //this will close both streams
- } finally {
- Utils.close(in);
- Utils.close(out);
- }
- extracted.setLastModified(entry.getTime());
-
- //recurse
- String dir = getWorkingDirectory();
- try {
- containingInfs.addFirst(inf);
- setWorkingDirectory(parentDir.getCanonicalPath());
- File result = processJar(extracted);
- newName = name.substring(0, name.length() - extracted.getName().length()) + result.getName();
- data.put(name, newName);
- } finally {
- setWorkingDirectory(dir);
- containingInfs.removeFirst();
- }
-
- //delete the extracted item leaving the recursion result
- if (!name.equals(newName))
- extracted.delete();
- }
- }
- }
- }
-
- private File preProcess(File input, File tempDir) {
- File result = null;
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
- result = step.preProcess(input, tempDir, containingInfs);
- if (result != null)
- input = result;
- }
- return input;
- }
-
- private File postProcess(File input, File tempDir) {
- File result = null;
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
- result = step.postProcess(input, tempDir, containingInfs);
- if (result != null)
- input = result;
- }
- return input;
- }
-
- private void adjustInf(File input, Properties inf) {
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
- step.adjustInf(input, inf, containingInfs);
- }
- }
-
- public File processJar(File input) throws IOException {
- File tempDir = null;
- ++depth;
- try {
- long lastModified = input.lastModified();
- File workingDir = new File(getWorkingDirectory());
- if (!workingDir.exists())
- workingDir.mkdirs();
-
- boolean skip = Utils.shouldSkipJar(input, processAll, verbose);
- if (depth == 0 && verbose) {
- if (skip)
- System.out.println("Skipping " + input.getPath()); //$NON-NLS-1$
- else {
- System.out.print("Running "); //$NON-NLS-1$
- for (Iterator iter = steps.iterator(); iter.hasNext();) {
- IProcessStep step = (IProcessStep) iter.next();
- System.out.print(step.getStepName() + " "); //$NON-NLS-1$
- }
- System.out.println("on " + input.getPath()); //$NON-NLS-1$
- }
- }
-
- if (skip) {
- //This jar was not marked as conditioned, and we are only processing conditioned jars, so do nothing
- return input;
- }
-
- //pre
- File workingFile = preProcess(input, workingDir);
-
- //Extract entries from jar and recurse on them
- if (depth == 0) {
- tempDir = new File(workingDir, "temp." + workingFile.getName()); //$NON-NLS-1$
- } else {
- File parent = workingDir.getParentFile();
- tempDir = new File(parent, "temp_" + depth + '_' + workingFile.getName()); //$NON-NLS-1$
- }
-
- JarFile jar = new JarFile(workingFile, false);
- Map replacements = new HashMap();
- Properties inf = Utils.getEclipseInf(workingFile, verbose);
- extractEntries(jar, tempDir, replacements, inf);
-
- if (inf != null)
- adjustInf(workingFile, inf);
-
- //Recreate the jar with replacements.
- //TODO: This is not strictly necessary if we didn't change the inf file and didn't change any content
- File tempJar = null;
- tempJar = new File(tempDir, workingFile.getName());
- File parent = tempJar.getParentFile();
- if (!parent.exists())
- parent.mkdirs();
- JarOutputStream jarOut = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(tempJar)));
- recreateJar(jar, jarOut, replacements, tempDir, inf);
-
- jar.close();
- if (tempJar != null) {
- if (!workingFile.equals(input)) {
- workingFile.delete();
- }
- workingFile = tempJar;
- }
-
- //post
- File result = postProcess(workingFile, workingDir);
-
- //have to normalize after the post steps
- normalize(result, workingDir);
-
- if (!result.equals(workingFile) && !workingFile.equals(input))
- workingFile.delete();
- if (!result.getParentFile().equals(workingDir)) {
- File finalFile = new File(workingDir, result.getName());
- if (finalFile.exists())
- finalFile.delete();
- result.renameTo(finalFile);
- result = finalFile;
- }
-
- result.setLastModified(lastModified);
- return result;
- } finally {
- --depth;
- if (tempDir != null && tempDir.exists())
- Utils.clear(tempDir);
- }
- }
-
- private void normalize(File input, File directory) {
- if (input.getName().endsWith(JarProcessor.PACKED_SUFFIX)) {
- //not a jar
- return;
- }
- try {
- File tempJar = new File(directory, "temp_" + input.getName()); //$NON-NLS-1$
- JarFile jar = null;
- try {
- jar = new JarFile(input, false);
- } catch (JarException e) {
- //not a jar
- return;
- }
- JarOutputStream jarOut = new JarOutputStream(new BufferedOutputStream(new FileOutputStream(tempJar)));
- InputStream in = null;
- try {
- Enumeration entries = jar.entries();
- for (JarEntry entry = (JarEntry) entries.nextElement(); entry != null; entry = entries.hasMoreElements() ? (JarEntry) entries.nextElement() : null) {
- JarEntry newEntry = new JarEntry(entry.getName());
- newEntry.setTime(entry.getTime());
- in = new BufferedInputStream(jar.getInputStream(entry));
- jarOut.putNextEntry(newEntry);
- Utils.transferStreams(in, jarOut, false);
- jarOut.closeEntry();
- in.close();
- }
- } finally {
- Utils.close(jarOut);
- Utils.close(jar);
- Utils.close(in);
- }
- tempJar.setLastModified(input.lastModified());
- input.delete();
- tempJar.renameTo(input);
- } catch (IOException e) {
- if (verbose) {
- System.out.println("Error normalizing jar " + input.getName()); //$NON-NLS-1$
- e.printStackTrace();
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java
deleted file mode 100644
index 332333f05..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src/org/eclipse/internal/provisional/equinox/p2/jarprocessor/JarProcessorExecutor.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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 - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.internal.provisional.equinox.p2.jarprocessor;
-
-import java.io.*;
-import java.util.Properties;
-import java.util.Set;
-import java.util.zip.ZipException;
-import org.eclipse.equinox.internal.p2.jarprocessor.*;
-
-public class JarProcessorExecutor {
- public static class Options {
- public String outputDir = "."; //$NON-NLS-1$
- public String signCommand = null;
- public boolean pack = false;
- public boolean repack = false;
- public boolean unpack = false;
- public boolean verbose = false;
- public boolean processAll = false;
- public File input = null;
- }
-
- protected Options options = null;
- private Set packExclusions = null;
- private Set signExclusions = null;
-
- public void runJarProcessor(Options processOptions) {
- this.options = processOptions;
- if (options.input.isFile() && options.input.getName().endsWith(".zip")) { //$NON-NLS-1$
- ZipProcessor processor = new ZipProcessor();
- processor.setWorkingDirectory(options.outputDir);
- processor.setOptions(options);
- processor.setExecutor(this);
- try {
- processor.processZip(options.input);
- } catch (ZipException e) {
- if (options.verbose)
- e.printStackTrace();
- } catch (IOException e) {
- if (options.verbose)
- e.printStackTrace();
- }
- } else {
- JarProcessor processor = new JarProcessor();
-
- processor.setWorkingDirectory(options.outputDir);
- processor.setProcessAll(options.processAll);
- processor.setVerbose(options.verbose);
-
- //load options file
- Properties properties = new Properties();
- if (options.input.isDirectory()) {
- File packProperties = new File(options.input, "pack.properties"); //$NON-NLS-1$
- if (packProperties.exists() && packProperties.isFile()) {
- InputStream in = null;
- try {
- in = new BufferedInputStream(new FileInputStream(packProperties));
- properties.load(in);
- } catch (IOException e) {
- if (options.verbose)
- e.printStackTrace();
- } finally {
- Utils.close(in);
- }
- }
-
- packExclusions = Utils.getPackExclusions(properties);
- signExclusions = Utils.getSignExclusions(properties);
- }
-
- try {
- FileFilter filter = createFileFilter(options);
- process(options.input, filter, options.verbose, processor, properties);
- } catch (FileNotFoundException e) {
- if (options.verbose)
- e.printStackTrace();
- }
- }
- }
-
- protected FileFilter createFileFilter(Options processOptions) {
- return processOptions.unpack ? Utils.PACK_GZ_FILTER : Utils.JAR_FILTER;
- }
-
- protected String getRelativeName(File file) {
- if (options.input == null)
- return file.toString();
- try {
- File input = options.input.getCanonicalFile();
- File subFile = file.getCanonicalFile();
-
- if (input.isFile())
- return subFile.getName();
-
- if (!subFile.toString().startsWith(input.toString())) {
- // the file is not under the base folder.
- return file.toString();
- }
-
- File parent = subFile.getParentFile();
- String result = subFile.getName();
- while (!parent.equals(input)) {
- result = parent.getName() + '/' + result;
- parent = parent.getParentFile();
- }
- return result;
-
- } catch (IOException e) {
- return file.getName();
- }
- }
-
- private boolean shouldPack(String name) {
- if (!options.pack)
- return false;
- return packExclusions == null ? true : !packExclusions.contains(name);
- }
-
- private boolean shouldSign(String name) {
- if (options.signCommand == null)
- return false;
- return signExclusions == null ? true : !signExclusions.contains(name);
- }
-
- private boolean shouldRepack(String name) {
- if (shouldSign(name) && shouldPack(name))
- return true;
- if (!options.repack)
- return false;
- return packExclusions == null ? true : !packExclusions.contains(name);
- }
-
- protected void process(File input, FileFilter filter, boolean verbose, JarProcessor processor, Properties packProperties) throws FileNotFoundException {
- if (!input.exists())
- throw new FileNotFoundException();
-
- File[] files = null;
- if (input.isDirectory()) {
- files = input.listFiles();
- } else if (filter.accept(input)) {
- files = new File[] {input};
- } else
- return;
- for (int i = 0; i < files.length; i++) {
- if (files[i].isDirectory()) {
- processDirectory(files[i], filter, verbose, processor, packProperties);
- } else if (filter.accept(files[i])) {
- try {
- processor.clearProcessSteps();
- if (options.unpack) {
- addUnpackStep(processor, packProperties, options);
- processor.processJar(files[i]);
- } else {
- String name = getRelativeName(files[i]);
- boolean sign = shouldSign(name);
- boolean repack = shouldRepack(name);
-
- if (repack || sign) {
- processor.clearProcessSteps();
- if (repack)
- addPackUnpackStep(processor, packProperties, options);
- if (sign)
- addSignStep(processor, packProperties, options);
- files[i] = processor.processJar(files[i]);
- }
-
- if (shouldPack(name)) {
- processor.clearProcessSteps();
- addPackStep(processor, packProperties, options);
- processor.processJar(files[i]);
- }
- }
- } catch (IOException e) {
- if (verbose)
- e.printStackTrace();
- }
- }
- }
- }
-
- protected void processDirectory(File input, FileFilter filter, boolean verbose, JarProcessor processor, Properties packProperties) throws FileNotFoundException {
- if (!input.isDirectory())
- return;
- String dir = processor.getWorkingDirectory();
- processor.setWorkingDirectory(dir + "/" + input.getName()); //$NON-NLS-1$
- process(input, filter, verbose, processor, packProperties);
- processor.setWorkingDirectory(dir);
- }
-
- public void addPackUnpackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new PackUnpackStep(properties, processOptions.verbose));
- }
-
- public void addSignStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new SignCommandStep(properties, processOptions.signCommand, processOptions.verbose));
- }
-
- public void addPackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new PackStep(properties, processOptions.verbose));
- }
-
- public void addUnpackStep(JarProcessor processor, Properties properties, JarProcessorExecutor.Options processOptions) {
- processor.addProcessStep(new UnpackStep(properties, processOptions.verbose));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java
deleted file mode 100644
index 763926245..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntBasedProcessorExecutor.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.ant;
-
-import java.io.*;
-import java.util.*;
-import org.apache.tools.ant.Project;
-import org.eclipse.equinox.internal.p2.jarprocessor.unsigner.UnsignCommand;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor;
-
-public class AntBasedProcessorExecutor extends JarProcessorExecutor {
- private final Project project;
- private final Properties signArguments;
- private final String antTaskName;
- private List inputFiles;
- private HashSet filterSet = null;
- private FileFilter baseFilter = null;
-
- public AntBasedProcessorExecutor(Properties signArguments, Project project, String antTaskName) {
- this.signArguments = signArguments;
- this.project = project;
- this.antTaskName = antTaskName;
- }
-
- protected FileFilter createFileFilter(Options options) {
- baseFilter = super.createFileFilter(options);
- if (inputFiles == null || inputFiles.size() == 0)
- return baseFilter;
-
- filterSet = new HashSet();
- filterSet.addAll(inputFiles);
- return new FileFilter() {
- public boolean accept(File pathname) {
- return getFilterSet().contains(pathname);
- }
- };
- }
-
- protected HashSet getFilterSet() {
- return filterSet;
- }
-
- protected void processDirectory(File input, FileFilter filter, boolean verbose, JarProcessor processor, Properties packProperties) throws FileNotFoundException {
- if (filterSet != null && filterSet.contains(input)) {
- File[] files = input.listFiles();
- for (int i = 0; i < files.length; i++) {
- if (files[i].isDirectory() || baseFilter.accept(files[i]))
- filterSet.add(files[i]);
- }
- }
- super.processDirectory(input, filter, verbose, processor, packProperties);
- }
-
- public void addSignStep(JarProcessor processor, Properties properties, Options options) {
- if (signArguments.get(JarProcessorTask.UNSIGN) != null)
- processor.addProcessStep(new UnsignCommand(properties, options.signCommand, options.verbose));
- if (signArguments.get(JarProcessorTask.SIGN) != null)
- processor.addProcessStep(new AntSignCommand(properties, signArguments, project, antTaskName, options.signCommand, options.verbose));
- }
-
- public void setInputFiles(List inputFiles) {
- this.inputFiles = inputFiles;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntSignCommand.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntSignCommand.java
deleted file mode 100644
index 591cf8c72..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/AntSignCommand.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.ant;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.SignJar;
-import org.eclipse.equinox.internal.p2.jarprocessor.SignCommandStep;
-
-public class AntSignCommand extends SignCommandStep {
- private final Project project;
- private final Properties jarSignerArguments;
- private final String antTaskName;
-
- public AntSignCommand(Properties options, Properties signArguments, Project project, String antTaskName, String command, boolean verbose) {
- super(options, command, verbose);
- this.project = project;
- this.jarSignerArguments = signArguments;
- this.antTaskName = antTaskName;
- }
-
- public File postProcess(File input, File workingDirectory, List containers) {
- if (command != null && input != null && shouldSign(input, containers)) {
- execute(input);
- }
- return null;
- }
-
- private void execute(File input) {
- try {
- SignJar jarSigner = new SignJar();
- jarSigner.setJar(input);
- jarSigner.setAlias(jarSignerArguments.getProperty(JarProcessorTask.ALIAS));
- jarSigner.setKeystore(jarSignerArguments.getProperty(JarProcessorTask.KEYSTORE));
- jarSigner.setStorepass(jarSignerArguments.getProperty(JarProcessorTask.STOREPASS));
- jarSigner.setKeypass(jarSignerArguments.getProperty(JarProcessorTask.KEYPASS));
- jarSigner.setProject(project);
- jarSigner.setTaskName(antTaskName);
- jarSigner.execute();
- } catch (BuildException e) {
- if (e.getCause() instanceof IOException) {
- throw new BuildException("The jarsigner could not be found. Make sure to run with the build with a JDK.", e); //$NON-NLS-1$
- }
- throw e;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java b/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java
deleted file mode 100644
index c8cfbfad1..000000000
--- a/bundles/org.eclipse.equinox.p2.jarprocessor/src_ant/org/eclipse/equinox/internal/p2/jarprocessor/ant/JarProcessorTask.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.jarprocessor.ant;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Properties;
-import org.apache.tools.ant.*;
-import org.apache.tools.ant.types.FileSet;
-import org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.Options;
-
-/**
- * This task provides massaging facilities for jar files.
- * It supports: signing, unsigning, normalization, packing
- * -
- */
-public class JarProcessorTask extends Task {
- private final Options options = new Options();
- private final Properties signArgs = new Properties();
- private final ArrayList inputFiles = new ArrayList();
-
- public static final String ALIAS = "alias"; //$NON-NLS-1$
- public static final String KEYSTORE = "keystore"; //$NON-NLS-1$
- public static final String STOREPASS = "storepass"; //$NON-NLS-1$
- public static final String KEYPASS = "keypass"; //$NON-NLS-1$
- public static final String UNSIGN = "unsign"; //$NON-NLS-1$
- public static final String SIGN = "sign"; //$NON-NLS-1$
-
- private static final String FAKE_COMMAND = "fake"; //$NON-NLS-1$
-
- public void setAlias(String alias) {
- signArgs.setProperty(ALIAS, alias);
- }
-
- public void setKeystore(String keystore) {
- signArgs.setProperty(KEYSTORE, keystore);
- }
-
- public void setJar(File jar) {
- options.input = jar;
- options.outputDir = jar.getParentFile().getAbsolutePath();
- }
-
- public void setInputFolder(File folder) {
- options.input = folder;
- options.outputDir = folder.getAbsolutePath();
- }
-
- public void setStorepass(String storepass) {
- signArgs.setProperty(STOREPASS, storepass);
- }
-
- public void setKeypass(String keypass) {
- if (keypass != null && keypass.length() > 0 && !keypass.startsWith("${")) //$NON-NLS-1$
- signArgs.setProperty(KEYPASS, keypass);
- }
-
- public void setPack(boolean pack) {
- options.pack = pack;
- }
-
- public void setNormalize(boolean normalize) {
- options.repack = normalize;
- }
-
- public void setUnsign(boolean unsign) {
- if (unsign) {
- signArgs.put(UNSIGN, Boolean.TRUE.toString());
- options.signCommand = FAKE_COMMAND;
- }
- }
-
- public void setSign(boolean sign) {
- if (sign) {
- signArgs.put(SIGN, Boolean.TRUE.toString());
- options.signCommand = FAKE_COMMAND;
- }
- }
-
- private void adjustAndValidateConfiguration() {
- //Sign and pack implies a normalization
- if (options.signCommand != null && options.pack)
- options.repack = true;
-
- //Check that alias, and storepass are set
- if (options.signCommand != null && signArgs.getProperty(UNSIGN) == null) {
- if (signArgs.getProperty(ALIAS) == null)
- throw new BuildException("Alias must be set"); //$NON-NLS-1$
-
- if (signArgs.getProperty(STOREPASS) == null)
- throw new BuildException("Storepass must be set"); //$NON-NLS-1$
- }
- }
-
- public void execute() {
- options.processAll = true;
- adjustAndValidateConfiguration();
- AntBasedProcessorExecutor executor = new AntBasedProcessorExecutor(signArgs, getProject(), getTaskName());
- if (inputFiles.size() > 0)
- executor.setInputFiles(inputFiles);
- executor.runJarProcessor(options);
- }
-
- public void setVerbose(boolean verbose) {
- options.verbose = verbose;
- }
-
- public void addInputFile(File file) {
- inputFiles.add(file);
- }
-
- public void addConfiguredFile(FileSet fileset) {
- DirectoryScanner scanner = fileset.getDirectoryScanner(getProject());
- String [] included = scanner.getIncludedFiles();
- for (int i = 0; i < included.length; i++) {
- addInputFile(new File(scanner.getBasedir(), included[i]));
- }
- included = scanner.getIncludedDirectories();
- for (int i = 0; i < included.length; i++) {
- addInputFile(new File(scanner.getBasedir(), included[i]));
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath b/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath
deleted file mode 100644
index ef379494d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?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.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bin_ant" path="src_ant"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore b/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore
deleted file mode 100644
index 1a50d993e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-org.eclipse.equinox.simpleconfigurator.jar
-org.eclipse.update.configurator.jar
-bin
-ant_tasks
-target
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch
deleted file mode 100644
index 435691891..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1255396900634_19&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.equinox.p2.metadata.generator&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.metadata.generator"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.project b/bundles/org.eclipse.equinox.p2.metadata.generator/.project
deleted file mode 100644
index f1612ddce..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.metadata.generator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ce58f5ebf..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,353 +0,0 @@
-#Fri Mar 12 16:58:17 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-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.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index f8738689b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,60 +0,0 @@
-#Thu Jan 24 12:13:40 EST 2008
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.0_Foundation-1.0.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.0_Foundation-1.0.profile
deleted file mode 100644
index dde120a4d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.0_Foundation-1.0.profile
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.microedition.io
-org.osgi.framework.bootdelegation = \
- javax.microedition.io
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- CDC-1.0/Foundation-1.0
-osgi.java.profile.name = CDC-1.0/Foundation-1.0
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.1_Foundation-1.1.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.1_Foundation-1.1.profile
deleted file mode 100644
index 67b20c7ef..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/CDC-1.1_Foundation-1.1.profile
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.microedition.io,\
- javax.microedition.pki,\
- javax.security.auth.x500
-org.osgi.framework.bootdelegation = \
- javax.microedition.io,\
- javax.microedition.pki,\
- javax.security.auth.x500
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- CDC-1.0/Foundation-1.0,\
- CDC-1.1/Foundation-1.1
-osgi.java.profile.name = CDC-1.1/Foundation-1.1
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.2.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.2.profile
deleted file mode 100644
index ab98b6707..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.2.profile
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- org.omg.CORBA,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextPackage
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- JRE-1.1,\
- J2SE-1.2
-osgi.java.profile.name = J2SE-1.2
-org.eclipse.jdt.core.compiler.compliance=1.2
-org.eclipse.jdt.core.compiler.source=1.2
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.3.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.3.profile
deleted file mode 100644
index da3538e6e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.3.profile
+++ /dev/null
@@ -1,68 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.omg.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3
-osgi.java.profile.name = J2SE-1.3
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.4.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.4.profile
deleted file mode 100644
index abaa0c3d6..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.4.profile
+++ /dev/null
@@ -1,129 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml.parsers,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stream,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.views ,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4
-osgi.java.profile.name = J2SE-1.4
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.5.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.5.profile
deleted file mode 100644
index e56a9293d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/J2SE-1.5.profile
+++ /dev/null
@@ -1,157 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activity,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.management,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views ,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5
-osgi.java.profile.name = J2SE-1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/JRE-1.1.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/JRE-1.1.profile
deleted file mode 100644
index 7bb8b46de..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/JRE-1.1.profile
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- JRE-1.1
-osgi.java.profile.name = JRE-1.1
-org.eclipse.jdt.core.compiler.compliance=1.1
-org.eclipse.jdt.core.compiler.source=1.1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/JavaSE-1.6.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/JavaSE-1.6.profile
deleted file mode 100644
index 68e811f69..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/JavaSE-1.6.profile
+++ /dev/null
@@ -1,194 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activation,\
- javax.activity,\
- javax.annotation,\
- javax.annotation.processing,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.jws,\
- javax.jws.soap,\
- javax.lang.model,\
- javax.lang.model.element,\
- javax.lang.model.type,\
- javax.lang.model.util,\
- javax.management,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.script,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.tools,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.bind,\
- javax.xml.bind.annotation,\
- javax.xml.bind.annotation.adapters,\
- javax.xml.bind.attachment,\
- javax.xml.bind.helpers,\
- javax.xml.bind.util,\
- javax.xml.crypto,\
- javax.xml.crypto.dom,\
- javax.xml.crypto.dsig,\
- javax.xml.crypto.dsig.dom,\
- javax.xml.crypto.dsig.keyinfo,\
- javax.xml.crypto.dsig.spec,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.soap,\
- javax.xml.stream,\
- javax.xml.stream.events,\
- javax.xml.stream.util,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.ws,\
- javax.xml.ws.handler,\
- javax.xml.ws.handler.soap,\
- javax.xml.ws.http,\
- javax.xml.ws.soap,\
- javax.xml.ws.spi,\
- javax.xml.ws.wsaddressing,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views,\
- org.w3c.dom.xpath,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5,\
- JavaSE-1.6
-osgi.java.profile.name = JavaSE-1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF
deleted file mode 100644
index 015993571..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,44 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.generator;singleton:=true
-Bundle-Version: 1.0.300.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.generator.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.metadata.generator;x-internal:=true,
- org.eclipse.equinox.internal.p2.metadata.generator.features;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.extensionlocation",
- org.eclipse.equinox.internal.provisional.p2.metadata.generator;
- x-friends:="org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.updatesite"
-Require-Bundle: org.eclipse.equinox.p2.core,
- org.eclipse.osgi,
- org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.p2.repository
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;version="1.0.0",
- org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.frameworkadmin.equinox,
- org.eclipse.equinox.internal.frameworkadmin.utils,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.query,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
- org.w3c.dom,
- org.xml.sax,
- org.xml.sax.helpers
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Plugins and Features.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Plugins and Features.launch
deleted file mode 100644
index 5464e6492..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Plugins and Features.launch
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Metadata Generator Plugins and Features"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-metadataRepository file:C:/equinox.p2/servers/&#13;&#10;-artifactRepository file:C:/equinox.p2/servers/&#13;&#10;-source d:/tmp/orbit/eclipse&#13;&#10;-publishArtifacts&#13;&#10;-append&#13;&#10;-noDefaultIUs"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ant.core@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.common@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime@default:true"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.simpleconfigurator@default:true,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator SDK.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator SDK.launch
deleted file mode 100644
index 2fd1986a7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator SDK.launch
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Metadata Generator SDK"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/j2sdk1.4.2_08"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-metadataRepository file:C:/equinox.p2/servers/&#13;&#10;-artifactRepository file:C:/equinox.p2/servers/&#13;&#10;-source c:\eclipse\latest\eclipse&#13;&#10;-root sdk&#13;&#10;-rootVersion 3.4.0.I20080212withcopyrightlicensechanges&#13;&#10;-flavor tooling&#13;&#10;-publishArtifacts&#13;&#10;-append"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="com.ibm.icu@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net@default:default,org.eclipse.core.runtime@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.variables@default:default,org.eclipse.equinox.app@default:true,org.eclipse.equinox.common@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.launcher.win32.win32.x86@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi@:,org.eclipse.osgi.services@default:default,org.eclipse.update.configurator@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.apache.xerces@default:default,org.apache.xml.resolver@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:true,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.download@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.metadata.repository@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Update Site.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Update Site.launch
deleted file mode 100644
index bb6ef0e78..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/Metadata Generator Update Site.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Metadata Generator Update Site"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-updateSite d:/ganymedeM5/&#13;&#10;-site file:d:/ganymedeM5/site.xml&#13;&#10;-metadataRepository file:d:/ganymedeM5/&#13;&#10;-metadataRepositoryName &quot;Ganymede Update Site&quot;&#13;&#10;-artifactRepository file:d:/ganymedeM5/&#13;&#10;-artifactRepositoryName &quot;Ganymede Artifacts&quot;&#13;&#10;-append&#13;&#10;-compress&#13;&#10;-reusePack200Files"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.core.runtime.compatibility.registry*3.2.200.v20070717@default:false,org.eclipse.equinox.common*3.4.0.v20080407@default:default,com.ibm.icu*3.8.1.v20080304@default:default,org.eclipse.osgi.services*3.1.200.v20071203@default:default,org.eclipse.equinox.launcher*1.0.100.v20080407@default:default,org.eclipse.equinox.preferences*3.2.200.v20080201@default:default,org.eclipse.update.configurator*3.2.200.v20080404@default:default,org.eclipse.equinox.launcher.win32.win32.x86*1.0.100.v20080407@default:false,org.eclipse.equinox.app*1.0.100.v20080331@default:true,org.eclipse.osgi*3.4.0.v20080407@:,org.eclipse.core.runtime.compatibility.auth*3.2.100.v20070502@default:default,org.eclipse.equinox.security.win32.x86*1.0.0.v20080324@default:false,org.eclipse.core.jobs*3.4.0.v20080310@default:default,org.eclipse.equinox.registry*3.4.0.v20080316@default:default,org.eclipse.equinox.security*1.0.0.v20080407@default:default,org.eclipse.core.variables*3.2.100.v20080324-1600@default:default,org.eclipse.core.runtime*3.4.0.v20080324-1725@default:default,org.eclipse.core.contenttype*3.3.0.v20080407@default:default,org.eclipse.ant.core*3.2.0.v20080319@default:default,org.eclipse.core.net*1.0.100.I20080322@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.metadata.generator*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.metadata*0.1.0.qualifier@default:default,org.eclipse.ecf.provider.filetransfer*2.0.0.qualifier@default:default,org.eclipse.ecf*2.0.0.qualifier@default:default,org.eclipse.equinox.p2.artifact.repository*0.1.0.qualifier@default:default,org.eclipse.ecf.filetransfer*2.0.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.core*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.engine*0.1.0.qualifier@default:default,org.eclipse.ecf.identity*2.0.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin.equinox*0.1.0.qualifier@default:true,org.eclipse.equinox.p2.metadata.repository*0.1.0.qualifier@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.0.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.0.profile
deleted file mode 100644
index 773501a52..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.0.profile
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0
-osgi.java.profile.name = OSGi/Minimum-1.0
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.1.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.1.profile
deleted file mode 100644
index 5031392b7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.1.profile
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1
-osgi.java.profile.name = OSGi/Minimum-1.1
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.2.profile b/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.2.profile
deleted file mode 100644
index 601b37379..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/OSGi_Minimum-1.2.profile
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.security.auth.x500
-org.osgi.framework.bootdelegation = \
- javax.security.auth.x500
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2
-osgi.java.profile.name = OSGi/Minimum-1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/about.html b/bundles/org.eclipse.equinox.p2.metadata.generator/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties
deleted file mode 100644
index ca56ce627..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/build.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-source.ant_tasks/generator-ant.jar=src_ant/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- OSGi_Minimum-1.1.profile,\
- OSGi_Minimum-1.0.profile,\
- JavaSE-1.6.profile,\
- JRE-1.1.profile,\
- J2SE-1.5.profile,\
- J2SE-1.4.profile,\
- J2SE-1.3.profile,\
- J2SE-1.2.profile,\
- CDC-1.1_Foundation-1.1.profile,\
- CDC-1.0_Foundation-1.0.profile,\
- plugin.xml,\
- ant_tasks/generator-ant.jar,\
- plugin.properties
-src.includes = about.html
-jars.compile.order=.,ant_tasks/generator-ant.jar
-extra.ant_tasks/generator-ant.jar = platform:/plugin/org.apache.ant
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/config.ini b/bundles/org.eclipse.equinox.p2.metadata.generator/config.ini
deleted file mode 100644
index ec1329813..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/config.ini
+++ /dev/null
@@ -1,57 +0,0 @@
-# Eclipse runtime configuration file
-# This file contains a number of key/value pairs that are merged into the
-# System properties on system startup. The values control the way the
-# runtime is structured and runs.
-
-# Note: Only platform:/base/ and file: URLs are supported. In general the
-# URLs given may include a version number (e.g., .../location_1.2.3).
-# If a version is not specified, the system binds
-# to the location which matches exactly or to the versioned location with the
-# latest version number. If a version number is given then only exact matches
-# are considered.
-
-# The URL for the runtime entry point. The default value is
-# platform:/base/plugins/org.eclipse.osgi
-#osgi.framework=platform:/base/plugins/org.eclipse.osgi
-
-# The classpath for the framework found at the osgi.framework location. This
-# comma-separated list contains either URLs or simple element names. Simple
-# names are assumed to be relative to the framework's install directory.
-# Typically this value need not be set as it is initialized by the framework itself.
-# Version match searching is not done for URLs listed here.
-#osgi.frameworkClassPath =
-
-# The comma-separated list of locations to search for the splash screen file (splash.bmp).
-# For each list element a subdirectory structure based on the pattern nl/<locale> is searched.
-# The system binds to the first matching file. There is no default value.
-#osgi.splashPath=
-
-# The location of the splash screen file. If this value is set at system startup it is used
-# in favour of the osgi.splashPath searching outlined above. If the value is not set
-# the searching is done and this key is bound to the result of the search.
-#osgi.splashLocation =
-
-# The comma-separated list of bundles which are automatically installed and optionally started
-# once the system is up and running. Each entry if of the form
-# <URL | simple bundle location>[@ [<startlevel>] [":start"]]
-# If the startlevel is omitted then the framework will use the default start level for the bundle.
-# If the "start" tag is added then the bundle will be marked as started after being installed.
-# Simple bundle locations are interepreted as relative to the framework's parent directory.
-# The startlevel indicates the OSGi start level at which the bundle should run.
-osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start,org.eclipse.equinox.frameworkadmin.equinox@start
-
-# The product to run. A given Eclipse configuration may contain many products.
-# The product identified will supply the branding (window icons, title bar text) etc
-# as well as define the default application to run.
-#eclipse.product=
-
-# The application to run. The value specified here is the id of the application extension
-# the runtime will find, instantiate and execute once the system is up. Note that typically
-# the identified eclipse.product defines the default application to run.
-#eclipse.application=
-
-# The build identifier
-eclipse.buildId=@build@
-
-# End of file marker - must be here
-eof=eof \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/generator.product b/bundles/org.eclipse.equinox.p2.metadata.generator/generator.product
deleted file mode 100644
index 1e313cd49..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/generator.product
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.1"?>
-
-<product name="Equinox Provisioning Metadata Generator" id="org.eclipse.equinox.p2.metadata.generator.product" application="org.eclipse.equinox.p2.metadata.generator.EclipseGenerator" useFeatures="true">
-
- <configIni use="custom" path="/org.eclipse.equinox.p2.metadata.generator/config.ini"/>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <launcher name="eclipse">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- </plugins>
-
- <features>
- <feature id="org.eclipse.equinox.p2.generator.feature" version="0.0.0"/>
- <feature id="org.eclipse.rcp" version="0.0.0"/>
- </features>
-
-</product>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/p2-izer update site.launch b/bundles/org.eclipse.equinox.p2.metadata.generator/p2-izer update site.launch
deleted file mode 100644
index 7ad55f2eb..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/p2-izer update site.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/p2-izer update site"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.metadata.generator.EclipseGenerator&#13;&#10;-metadataRepository file:d:/ganymedeM5/&#13;&#10;-artifactRepository file:d:/ganymedeM5/&#13;&#10;-updateSite d:/ganymedeM5/&#13;&#10;-site file:d:/ganymedeM5/site.xml&#13;&#10;-flavor tooling&#13;&#10;-append&#13;&#10;-reusePack200Files&#13;&#10;-compress"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.app*1.0.100.v20080303@default:true,org.eclipse.equinox.preferences*3.2.200.v20080201@default:default,org.eclipse.update.configurator*3.2.200.v20080107@default:default,org.eclipse.core.runtime.compatibility.registry*3.2.200.v20070717@default:false,org.eclipse.core.runtime*3.4.0.v20080303@default:default,org.eclipse.core.jobs*3.3.100.v20080224@default:default,org.eclipse.equinox.launcher.win32.win32.x86*1.0.100.v20080201a@default:false,com.ibm.icu*3.8.1.v20080103@default:default,org.eclipse.equinox.launcher*1.0.100.v20080303@default:default,org.eclipse.equinox.common*3.4.0.v20080201@default:default,org.eclipse.osgi.services*3.1.200.v20071203@default:default,org.eclipse.osgi*3.4.0.v20080304@:,org.eclipse.equinox.launcher.win32.win32.x86*1.0.100.v20080201a@default:false,org.eclipse.equinox.registry*3.4.0.v20080201@default:default,org.eclipse.equinox.launcher*1.0.100.v20080303@default:default,org.eclipse.core.contenttype*3.3.0.v20080201@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.p2.metadata.generator*0.1.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.core*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.metadata*0.1.0.qualifier@default:default,org.eclipse.ecf*1.4.0.qualifier@default:default,org.eclipse.equinox.p2.artifact.repository*0.1.0.qualifier@default:default,org.eclipse.equinox.frameworkadmin.equinox*0.1.0.qualifier@default:true,org.eclipse.equinox.p2.metadata.repository*0.1.0.qualifier@default:default,org.eclipse.equinox.p2.engine*0.1.0.qualifier@default:default,org.eclipse.ecf.filetransfer*2.0.0.qualifier@default:default,org.eclipse.ecf.identity*1.3.0.qualifier@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.properties
deleted file mode 100644
index 0c0840432..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Metadata Generator
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml b/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml
deleted file mode 100644
index a0e52900a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/plugin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension
- id="EclipseGenerator"
- point="org.eclipse.core.runtime.applications">
- <application
- cardinality="1"
- thread="main"
- visible="true">
- <run
- class="org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication">
- </run>
- </application>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.metadata.generator.EclipseGenerator"
- name="Equinox Provisioning Metadata Generator">
- </product>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/pom.xml b/bundles/org.eclipse.equinox.p2.metadata.generator/pom.xml
deleted file mode 100644
index 53585eb04..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.metadata.generator</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml b/bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml
deleted file mode 100644
index b5700604c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.equinox.p2.metadata.generator" default="default" basedir="..">
-
- <target name="init" depends="properties">
- <property name="plugin" value="org.eclipse.equinox.p2.metadata.generator"/>
- <property name="temp.folder" value="${basedir}/temp.folder"/>
- <property name="plugin.destination" value="${basedir}"/>
- <property name="build.result.folder" value="${basedir}/ant_tasks"/>
- <property name="version.suffix" value="_3.1.0"/>
- </target>
-
- <target name="properties" if="eclipse.running">
- <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
- </target>
-
- <target name="buildScripts" depends="init" description="Build from generated scripts">
- <tstamp/>
- <eclipse.buildScript elements="plugin@${plugin}"
- buildDirectory="${buildDirectory}"
- configInfo="*,*,*"
- baseLocation="${baseLocation}"
- buildingOSGi="true"
- outputUpdateJars="false"
- pluginpath="${basedir}"
- forceContextQualifier="z${DSTAMP}${TSTAMP}"
- />
- <delete file="${basedir}/ant_tasks/generator-ant.jar" failonerror="false"/>
- <ant antfile="${basedir}/build.xml" target="ant_tasks/generator-ant.jar"/>
- </target>
-
- <target name="default" description="Jar up the binaries that were compiled by the jdt builder" >
- <mkdir dir="${basedir}/ant_tasks" />
- <delete file="${basedir}/ant_tasks/generator-ant.jar" failonerror="false"/>
- <jar destfile="${basedir}/ant_tasks/generator-ant.jar" basedir="bin_ant"/>
- </target>
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Activator.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Activator.java
deleted file mode 100644
index 5c2cb2cac..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Activator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static BundleContext context = null;
- public static String ID = "org.eclipse.equinox.p2.metadata.generator"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext context) throws Exception {
- Activator.context = context;
- }
-
- public void stop(BundleContext context) throws Exception {
- Activator.context = null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
deleted file mode 100644
index 3d2dd9f6f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/EclipseGeneratorApplication.java
+++ /dev/null
@@ -1,422 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.EclipseInstallGeneratorInfoProvider;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceReference;
-
-public class EclipseGeneratorApplication implements IApplication {
-
- // The mapping rules for in-place generation need to construct paths into the structure
- // of an eclipse installation; in the future the default artifact mapping declared in
- // SimpleArtifactRepository may change, for example, to not have a 'bundles' directory
- // instead of a 'plugins' directory, so a separate constant is defined and used here.
- static final private String[][] INPLACE_MAPPING_RULES = { {"(& (classifier=osgi.bundle) (format=packed)", "${repoUrl}/features/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=org.eclipse.update.feature))", "${repoUrl}/features/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}"}}; //$NON-NLS-1$//$NON-NLS-2$
-
- static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
-
- private Generator.GeneratorResult incrementalResult = null;
- private boolean generateRootIU = true;
- private URI metadataLocation;
- private String metadataRepoName;
- private URI artifactLocation;
- private String artifactRepoName;
- private String operation;
- private String argument;
- private String features;
- private String bundles;
- private String base;
- //whether repository xml files should be compressed
- private String compress = "false"; //$NON-NLS-1$
-
- private ServiceReference agentRef;
- private IProvisioningAgent agent;
-
- private File getExecutableName(String base, EclipseInstallGeneratorInfoProvider provider) {
- File location = provider.getExecutableLocation();
- if (location == null)
- return new File(base, EclipseInstallGeneratorInfoProvider.getDefaultExecutableName(null));
- if (location.isAbsolute())
- return location;
- return new File(base, location.getPath());
- }
-
- private void initialize(EclipseInstallGeneratorInfoProvider provider) throws ProvisionException {
- if ("-source".equalsIgnoreCase(operation)) //$NON-NLS-1$
- provider.initialize(new File(argument));
- else if ("-inplace".equalsIgnoreCase(operation)) { //$NON-NLS-1$
- provider.initialize(new File(argument));
- initializeForInplace(provider);
- } else if ("-config".equalsIgnoreCase(operation)) { //$NON-NLS-1$
- provider.initialize(new File(argument), new File(argument, "configuration"), getExecutableName(argument, provider), null, null); //$NON-NLS-1$
- } else if ("-updateSite".equalsIgnoreCase(operation)) { //$NON-NLS-1$
- provider.setAddDefaultIUs(false);
- provider.initialize(new File(argument), null, null, new File[] {new File(argument, "plugins")}, new File(argument, "features")); //$NON-NLS-1$ //$NON-NLS-2$
- initializeForInplace(provider);
- } else {
- // base is set but we expect everything else to have been set using
- // explicit args. Note that if we are coming in via an Ant task, we have
- // to ensure all the values are passed in
- if (base != null) {
- File[] bundlesLocation = bundles == null ? null : new File[] {new File(bundles)};
- File featuresLocation = features == null ? null : new File(features);
- provider.initialize(new File(base), null, null, bundlesLocation, featuresLocation);
- }
- }
- initializeRepositories(provider);
- }
-
- private void initializeArtifactRepository(EclipseInstallGeneratorInfoProvider provider) throws ProvisionException {
- if (artifactLocation == null)
- return;
- IArtifactRepositoryManager manager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- URI location = artifactLocation;
-
- String repositoryName = (artifactRepoName != null && artifactRepoName.length() > 0) ? artifactRepoName : artifactLocation + " - artifacts"; //$NON-NLS-1$
- Map properties = new HashMap(1);
- properties.put(IRepository.PROP_COMPRESSED, compress);
- if (provider.reuseExistingPack200Files())
- properties.put(PUBLISH_PACK_FILES_AS_SIBLINGS, Boolean.TRUE.toString());
- IArtifactRepository result = null;
- try {
- result = manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- manager.removeRepository(location);
- provider.setArtifactRepository(result);
- return;
- } catch (ProvisionException e) {
- //fall through a load existing repo
- }
-
- IArtifactRepository repository = manager.loadRepository(location, null);
- if (repository != null) {
- manager.removeRepository(location);
- if (!repository.isModifiable())
- throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNotWritable, location));
- provider.setArtifactRepository(repository);
- if (provider.reuseExistingPack200Files())
- repository.setProperty(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
- if (!provider.append()) {
- File repoLocation = URIUtil.toFile(location);
- if (repoLocation.isFile())
- repoLocation = repoLocation.getParentFile();
- if (repoLocation.equals(provider.getBaseLocation()))
- throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNoAppendDestroysInput, location));
-
- repository.removeAll();
- }
- }
- return;
- }
-
- public void initializeForInplace(EclipseInstallGeneratorInfoProvider provider) {
- File location = provider.getBaseLocation();
- if (location == null)
- location = provider.getBundleLocations()[0];
- metadataLocation = location.toURI();
- artifactLocation = location.toURI();
- provider.setPublishArtifactRepository(true);
- provider.setPublishArtifacts(false);
- provider.setAppend(true);
- provider.setMappingRules(INPLACE_MAPPING_RULES);
- }
-
- private void initializeMetadataRepository(EclipseInstallGeneratorInfoProvider provider) throws ProvisionException {
- if (metadataLocation == null)
- return;
- URI location = metadataLocation;
-
- // First try to create a simple repo, this will fail if one already exists
- // We try creating a repo first instead of just loading what is there because we don't want a repo based
- // on a site.xml if there is one there.
-
- String repositoryName = (metadataRepoName == null || metadataRepoName.length() == 0) ? metadataLocation + " - metadata" : metadataRepoName; //$NON-NLS-1$
- Map properties = new HashMap(1);
- properties.put(IRepository.PROP_COMPRESSED, compress);
-
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- try {
- IMetadataRepository result = manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- manager.removeRepository(location);
- provider.setMetadataRepository(result);
- return;
- } catch (ProvisionException e) {
- //fall through and load the existing repo
- }
-
- IMetadataRepository repository = manager.loadRepository(location, null);
- if (repository != null) {
- manager.removeRepository(location);
- // don't set the compress flag here because we don't want to change the format
- // of an already existing repository
- if (!repository.isModifiable())
- throw new IllegalArgumentException(NLS.bind(Messages.exception_metadataRepoNotWritable, location));
- provider.setMetadataRepository(repository);
- if (!provider.append())
- repository.removeAll();
- return;
- }
- }
-
- private void initializeRepositories(EclipseInstallGeneratorInfoProvider provider) throws ProvisionException {
- initializeArtifactRepository(provider);
- initializeMetadataRepository(provider);
- }
-
- public void setCompress(String value) {
- if (Boolean.valueOf(value).booleanValue())
- compress = "true"; //$NON-NLS-1$
- }
-
- public void processCommandLineArguments(String[] args, EclipseInstallGeneratorInfoProvider provider) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
-
- if (args[i].equalsIgnoreCase("-publishArtifacts") || args[i].equalsIgnoreCase("-pa")) //$NON-NLS-1$ //$NON-NLS-2$
- provider.setPublishArtifacts(true);
-
- if (args[i].equalsIgnoreCase("-publishArtifactRepository") || args[i].equalsIgnoreCase("-par")) //$NON-NLS-1$ //$NON-NLS-2$
- provider.setPublishArtifactRepository(true);
-
- if (args[i].equalsIgnoreCase("-append")) //$NON-NLS-1$
- provider.setAppend(true);
-
- if (args[i].equalsIgnoreCase("-noDefaultIUs")) //$NON-NLS-1$
- provider.setAddDefaultIUs(false);
-
- if (args[i].equalsIgnoreCase("-compress")) //$NON-NLS-1$
- compress = "true"; //$NON-NLS-1$
-
- if (args[i].equalsIgnoreCase("-reusePack200Files")) //$NON-NLS-1$
- provider.reuseExistingPack200Files(true);
-
- // check for args with parameters. If we are at the last argument or if the next one
- // has a '-' as the first character, then we can't have an arg with a parm so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- String arg = args[++i];
-
- if (args[i - 1].equalsIgnoreCase("-source")) { //$NON-NLS-1$
- operation = args[i - 1];
- argument = arg;
- }
-
- if (args[i - 1].equalsIgnoreCase("-inplace")) { //$NON-NLS-1$
- operation = args[i - 1];
- argument = arg;
- }
-
- if (args[i - 1].equalsIgnoreCase("-config")) { //$NON-NLS-1$
- operation = args[i - 1];
- argument = arg;
- }
- if (args[i - 1].equalsIgnoreCase("-updateSite")) { //$NON-NLS-1$
- operation = args[i - 1];
- argument = arg;
- }
-
- if (args[i - 1].equalsIgnoreCase("-exe")) //$NON-NLS-1$
- provider.setExecutableLocation(arg);
-
- if (args[i - 1].equalsIgnoreCase("-launcherConfig")) //$NON-NLS-1$
- provider.setLauncherConfig(arg);
-
- if (args[i - 1].equalsIgnoreCase("-metadataRepositoryName")) //$NON-NLS-1$
- metadataRepoName = arg;
-
- try {
- if (args[i - 1].equalsIgnoreCase("-metadataRepository") || args[i - 1].equalsIgnoreCase("-mr")) //$NON-NLS-1$ //$NON-NLS-2$
- metadataLocation = URIUtil.fromString(arg);
-
- if (args[i - 1].equalsIgnoreCase("-artifactRepository") | args[i - 1].equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
- artifactLocation = URIUtil.fromString(arg);
-
- if (args[i - 1].equalsIgnoreCase("-site")) //$NON-NLS-1$
- provider.setSiteLocation(URIUtil.fromString(arg));
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Repository location (" + arg + ") must be a URL."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- if (args[i - 1].equalsIgnoreCase("-artifactRepositoryName")) //$NON-NLS-1$
- artifactRepoName = arg;
-
- if (args[i - 1].equalsIgnoreCase("-flavor")) //$NON-NLS-1$
- provider.setFlavor(arg);
-
- if (args[i - 1].equalsIgnoreCase("-productFile")) //$NON-NLS-1$
- provider.setProductFile(arg);
-
- if (args[i - 1].equalsIgnoreCase("-features")) //$NON-NLS-1$
- features = arg;
-
- if (args[i - 1].equalsIgnoreCase("-bundles")) //$NON-NLS-1$
- bundles = arg;
-
- if (args[i - 1].equalsIgnoreCase("-base")) //$NON-NLS-1$
- base = arg;
-
- if (args[i - 1].equalsIgnoreCase("-root")) //$NON-NLS-1$
- provider.setRootId(arg);
-
- if (args[i - 1].equalsIgnoreCase("-rootVersion")) //$NON-NLS-1$
- provider.setRootVersion(arg);
-
- if (args[i - 1].equalsIgnoreCase("-p2.os")) //$NON-NLS-1$
- provider.setOS(arg);
-
- }
- }
-
- public Object run(String args[]) throws Exception {
- EclipseInstallGeneratorInfoProvider provider = new EclipseInstallGeneratorInfoProvider();
- processCommandLineArguments(args, provider);
- Object result = run(provider);
- if (result != IApplication.EXIT_OK)
- for (int i = 0; i < args.length; i++)
- System.out.println(args[i]);
- return result;
- }
-
- public Object run(EclipseInstallGeneratorInfoProvider provider) throws Exception {
- initializeAgent();
- initialize(provider);
-
- if (provider.getBaseLocation() == null && provider.getProductFile() == null && !generateRootIU) {
- System.out.println(Messages.exception_baseLocationNotSpecified);
- return new Integer(-1);
- }
-
- // if we asked for artifacts to be published in some form, there must be a repo given
- if ((provider.publishArtifactRepository() || provider.publishArtifacts()) && provider.getArtifactRepository() == null) {
- System.out.println(Messages.exception_artifactRepoNotSpecified);
- return new Integer(-1);
- }
-
- if (provider.getMetadataRepository() == null) {
- System.out.println(Messages.exception_metadataRepoNotSpecified);
- return new Integer(-1);
- }
-
- System.out.println(NLS.bind(Messages.message_generatingMetadata, provider.getBaseLocation()));
-
- long before = System.currentTimeMillis();
- IStatus result = generate(provider);
-
- long after = System.currentTimeMillis();
- if (result.isOK()) {
- System.out.println(NLS.bind(Messages.message_generationCompleted, String.valueOf((after - before) / 1000)));
- return IApplication.EXIT_OK;
- }
- System.out.println(result);
- return new Integer(1);
- }
-
- private void initializeAgent() throws ProvisionException {
- agentRef = Activator.getContext().getServiceReference(IProvisioningAgent.SERVICE_NAME);
- if (agentRef != null) {
- agent = (IProvisioningAgent) Activator.getContext().getService(agentRef);
- if (agent != null)
- return;
- }
- ServiceReference providerRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
- if (providerRef == null)
- throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
- IProvisioningAgentProvider provider = (IProvisioningAgentProvider) Activator.getContext().getService(providerRef);
- if (provider == null)
- throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
- //obtain agent for currently running system
- agent = provider.createAgent(null);
- Activator.getContext().ungetService(providerRef);
- }
-
- protected IStatus generate(EclipseInstallGeneratorInfoProvider provider) {
- Generator generator = new Generator(provider);
- if (incrementalResult != null)
- generator.setIncrementalResult(incrementalResult);
- generator.setGenerateRootIU(generateRootIU);
- IStatus result = generator.generate();
- incrementalResult = null;
- return result;
- }
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- public void stop() {
- if (agentRef != null) {
- Activator.getContext().ungetService(agentRef);
- agentRef = null;
- }
- }
-
- public void setBase(String base) {
- this.base = base;
- }
-
- public void setArtifactLocation(URI location) {
- this.artifactLocation = location;
- }
-
- public void setBundles(String bundles) {
- this.bundles = bundles;
- }
-
- public void setOperation(String operation, String argument) {
- this.operation = operation;
- this.argument = argument;
- }
-
- public void setFeatures(String features) {
- this.features = features;
- }
-
- public void setMetadataLocation(URI location) {
- this.metadataLocation = location;
- }
-
- public void setMetadataRepositoryName(String name) {
- this.metadataRepoName = name;
- }
-
- public void setArtifactRepositoryName(String name) {
- this.artifactRepoName = name;
- }
-
- public void setIncrementalResult(Generator.GeneratorResult ius) {
- this.incrementalResult = ius;
- }
-
- public void setGeneratorRootIU(boolean b) {
- this.generateRootIU = b;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/LocalizationHelper.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/LocalizationHelper.java
deleted file mode 100644
index deeae27c0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/LocalizationHelper.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
-
-import java.io.*;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-/**
- * Helper functions supporting the processing of localized
- * property files.
- *
- */
-public final class LocalizationHelper {
-
- private static final String PROPERTIES_FILE_EXTENSION = ".properties"; //$NON-NLS-1$
- private static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
- private static LocalizationHelper instance = new LocalizationHelper();
-
- // Extract the locale string from the properties file with the given filename
- // where the locale string follows the given prefix. For example, return "zh_HK"
- // from filename == "plugin_zh_HK.properties" and prefix == "plugin".
- static public String getLocaleString(String filename, String prefix) {
- String localeString = null;
- if (filename.startsWith(prefix) && filename.endsWith(PROPERTIES_FILE_EXTENSION)) {
- if (filename.length() > prefix.length() + PROPERTIES_FILE_EXTENSION.length()) {
- localeString = filename.substring(prefix.length() + 1, filename.length() - PROPERTIES_FILE_EXTENSION.length());
- } else {
- localeString = ""; //$NON-NLS-1$
- }
- }
- return localeString;
- }
-
- // Get the locale corresponding to the given locale string
- static public Locale getLocale(String localeString) {
- Locale locale = DEFAULT_LOCALE;
- if (localeString.length() == 5 && localeString.indexOf('_') == 2) {
- locale = new Locale(localeString.substring(0, 2), localeString.substring(3, 5));
- } else if (localeString.length() == 2) {
- locale = new Locale(localeString.substring(0, 2));
- }
- return locale;
- }
-
- // For the given root directory and path to localization files within that directory
- // get a map from locale to property set for the localization property files.
- public static Map getDirPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
- File fullPath = new File(root, localizationPath);
- File localizationDir = fullPath.getParentFile();
- final String localizationFile = fullPath.getName();
- String[] localizationFiles = LocalizationHelper.getLocalizationFiles(localizationDir, localizationFile);
-
- HashMap localizations = null;
-
- if (localizationFiles != null) {
- localizations = new HashMap(localizationFiles.length);
- for (int i = 0; i < localizationFiles.length; i++) {
- String nextFile = localizationFiles[i];
- Locale nextLocale = getLocale(LocalizationHelper.getLocaleString(nextFile, localizationFile));
-
- try {
- Properties properties = loadProperties(root, nextFile);
- Properties localizedStrings = getLocalizedProperties(propertyKeys, properties);
- if (localizedStrings.size() > 0) {
- localizations.put(nextLocale, localizedStrings);
- if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
- localizations.put(nextLocale, localizedStrings);
- }
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
- }
-
- return localizations;
- }
-
- public static Map getJarPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
- ZipFile jarFile = null;
- Map localizations = new HashMap(4);
- try {
- jarFile = new ZipFile(root, ZipFile.OPEN_READ);
- for (Enumeration entries = jarFile.entries(); entries.hasMoreElements();) {
- ZipEntry nextEntry = (ZipEntry) entries.nextElement();
- String nextName = nextEntry.getName();
- String localeString = LocalizationHelper.getLocaleString(nextName, localizationPath);
-
- if (!nextEntry.isDirectory() && localeString != null) {
- Locale nextLocale = LocalizationHelper.getLocale(localeString);
- InputStream stream = null;
- try {
- stream = jarFile.getInputStream(nextEntry);
- Properties properties = new Properties();
- properties.load(stream);
- Properties localizedStrings = LocalizationHelper.getLocalizedProperties(propertyKeys, properties);
- if (localizedStrings.size() > 0) {
- localizations.put(nextLocale, localizedStrings);
- if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
- localizations.put(nextLocale, localizedStrings);
- }
- }
- } finally {
- if (stream != null)
- stream.close();
- }
- }
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- } finally {
- if (jarFile != null) {
- try {
- jarFile.close();
- } catch (IOException ioe) {
- // do nothing
- }
- }
- }
-
- return localizations;
- }
-
- // Load a property set from given root and file with the given name
- private static Properties loadProperties(File root, String propertyFilename) throws IOException {
- Properties result = new Properties();
- InputStream propertyStream = null;
- try {
- try {
- if (root.isDirectory())
- propertyStream = new FileInputStream(new File(root, propertyFilename));
- else {
- URLConnection connection = new URL("jar:" + root.toURL().toExternalForm() + "!/" + propertyFilename).openConnection(); //$NON-NLS-1$ //$NON-NLS-2$
- connection.setUseCaches(false);
- propertyStream = connection.getInputStream();
- }
- } catch (FileNotFoundException e) {
- // if there is no messages file then just return;
- return result;
- }
- result.load(propertyStream);
- } finally {
- if (propertyStream != null)
- propertyStream.close();
- }
- return result;
- }
-
- // Given a list of keys and the corresponding localized property set,
- // return a new property set with those keys and the localized values.
- static public Properties getLocalizedProperties(String[] propertyKeys, Properties properties) {
- Properties localizedProperties = new Properties();
- for (int i = 0; i < propertyKeys.length; i++) {
- String key = propertyKeys[i];
- if (key != null) {
- String localizedValue = properties.getProperty(key);
- if (localizedValue != null)
- localizedProperties.put(key, localizedValue);
- }
- }
- return localizedProperties;
- }
-
- public static String[] getLocalizationFiles(File localizationDir, final String filenamePrefix) {
- return localizationDir.list(instance.new FileFilter() {
- public boolean accept(File directory, String filename) {
- return (getLocaleString(filename, filenamePrefix) != null ? true : false);
- }
- });
- }
-
- private abstract class FileFilter implements FilenameFilter {
-
- public FileFilter() {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
- */
- public abstract boolean accept(File directory, String filename);
- }
-
- private LocalizationHelper() {
- //
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java
deleted file mode 100644
index 8663c54ed..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.generator.messages";//$NON-NLS-1$
-
- public static String exception_errorConverting;
- public static String exception_errorParsingUpdateSite;
- public static String exception_stateAddition;
- public static String exception_sourceDirectoryInvalid;
- public static String exception_artifactRepoNotWritable;
- public static String exception_artifactRepoNotSpecified;
- public static String exception_metadataRepoNotWritable;
- public static String exception_metadataRepoNotSpecified;
- public static String exception_baseLocationNotSpecified;
- public static String exception_artifactRepoNoAppendDestroysInput;
-
- public static String message_generatingMetadata;
- public static String message_generationCompleted;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
deleted file mode 100644
index 6e9a293e5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/ProductQuery.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator;
-
-import java.io.*;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.generator.features.ProductFile;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator.GeneratorResult;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.MetadataGeneratorHelper;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.MatchQuery;
-
-public class ProductQuery extends MatchQuery {
- private static final String EQUINOX_LAUNCHER = "org.eclipse.equinox.launcher"; //$NON-NLS-1$
-
- private final ProductFile product;
- private final String flavor;
- private final Map children = new HashMap();
- private final String versionAdvice;
-
- public ProductQuery(ProductFile product, String flavor, Map configIUs, String versionAdvice) {
- this.product = product;
- this.flavor = flavor;
- this.versionAdvice = versionAdvice;
- initialize(configIUs);
- }
-
- private Properties loadVersions(String location) {
- Properties properties = new Properties();
- if (location == null)
- return properties;
- File file = new File(location);
- if (file.exists()) {
- InputStream stream = null;
- try {
- stream = new BufferedInputStream(new FileInputStream(file));
- properties.load(stream);
- } catch (IOException e) {
- // nothing
- } finally {
- if (stream != null)
- try {
- stream.close();
- } catch (IOException e) {
- //nothing
- }
- }
- }
- return properties;
- }
-
- private void initialize(Map configIUs) {
- boolean features = product.useFeatures();
- Properties versions = loadVersions(versionAdvice);
-
- List contents = features ? product.getFeatures() : product.getPlugins();
- for (Iterator iterator = contents.iterator(); iterator.hasNext();) {
- String item = (String) iterator.next();
-
- VersionRange range = VersionRange.emptyRange;
- if (versions.containsKey(item)) {
- Version value = Version.create(versions.getProperty(item));
- range = new VersionRange(value, true, value, true);
- }
-
- if (features) // for features we want the group
- item = MetadataGeneratorHelper.getTransformedId(item, false, true);
-
- children.put(item, range);
- if (configIUs.containsKey(item)) {
- for (Iterator ius = ((Set) configIUs.get(item)).iterator(); ius.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) ius.next();
- children.put(object.getId(), new VersionRange(object.getVersion(), true, object.getVersion(), true));
- }
- }
- }
-
- //also include the launcher CU fragments as a workaround to bug 218890
- String launcherPrefix = product.getId() + ".launcher"; //$NON-NLS-1$
- if (configIUs.containsKey(launcherPrefix)) {
- for (Iterator ius = ((Set) configIUs.get(launcherPrefix)).iterator(); ius.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) ius.next();
- children.put(object.getId(), new VersionRange(object.getVersion(), true, object.getVersion(), true));
- }
- }
-
- //also add the launcher.jar
- if (!children.containsKey(EQUINOX_LAUNCHER)) {
- children.put(EQUINOX_LAUNCHER, VersionRange.emptyRange);
- children.put(flavor + EQUINOX_LAUNCHER, VersionRange.emptyRange);
- }
-
- // and launcher fragment CUs
- if (configIUs.containsKey(EQUINOX_LAUNCHER)) {
- for (Iterator ius = ((Set) configIUs.get(EQUINOX_LAUNCHER)).iterator(); ius.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) ius.next();
- children.put(object.getId(), new VersionRange(object.getVersion(), true, object.getVersion(), true));
- }
- }
-
- // feature based product, individual bundle config CUs are under CONFIGURATION_CUS for convenience
- if (features && configIUs.containsKey(GeneratorResult.CONFIGURATION_CUS)) {
- for (Iterator ius = ((Set) configIUs.get(GeneratorResult.CONFIGURATION_CUS)).iterator(); ius.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) ius.next();
- children.put(object.getId(), new VersionRange(object.getVersion(), true, object.getVersion(), true));
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.query.Query#isMatch(java.lang.Object)
- */
- public boolean isMatch(Object object) {
- if (!(object instanceof IInstallableUnit))
- return false;
-
- IInstallableUnit candidate = (IInstallableUnit) object;
- VersionRange range = (VersionRange) children.get(candidate.getId());
- if (range != null) {
- return range.isIncluded(candidate.getVersion());
- }
-
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java
deleted file mode 100644
index 6552f5629..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java
+++ /dev/null
@@ -1,731 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.*;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.URLEntry;
-import org.eclipse.osgi.util.NLS;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Parses a site.xml file.
- * This class was initially copied from org.eclipse.update.core.model.DefaultSiteParser.
- */
-public class DefaultSiteParser extends DefaultHandler {
-
- private static final String ARCHIVE = "archive"; //$NON-NLS-1$
- private static final String CATEGORY = "category"; //$NON-NLS-1$
- private static final String CATEGORY_DEF = "category-def"; //$NON-NLS-1$
-
- private static final String ASSOCIATE_SITES_URL = "associateSitesURL"; //$NON-NLS-1$
- private static final String ASSOCIATE_SITE = "associateSite"; //$NON-NLS-1$
- private static final String DEFAULT_INFO_URL = "index.html"; //$NON-NLS-1$
- private static final String DESCRIPTION = "description"; //$NON-NLS-1$
- private static final String FEATURE = "feature"; //$NON-NLS-1$
- private static final String FEATURES = "features/"; //$NON-NLS-1$
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- private static final String PLUGIN_ID = Activator.ID;
- private static final String SITE = "site"; //$NON-NLS-1$
-
- private static final int STATE_ARCHIVE = 3;
- private static final int STATE_CATEGORY = 4;
- private static final int STATE_CATEGORY_DEF = 5;
- private static final int STATE_DESCRIPTION_CATEGORY_DEF = 7;
- private static final int STATE_DESCRIPTION_SITE = 6;
- private static final int STATE_FEATURE = 2;
- private static final int STATE_IGNORED_ELEMENT = -1;
- private static final int STATE_INITIAL = 0;
- private static final int STATE_SITE = 1;
-
- private int currentState;
-
- private boolean DESCRIPTION_SITE_ALREADY_SEEN = false;
- // Current object stack (used to hold the current object we are
- // populating in this plugin descriptor
- Stack objectStack = new Stack();
-
- private SAXParser parser;
-
- // Current State Information
- Stack stateStack = new Stack();
-
- // List of string keys for translated strings
- private final List messageKeys = new ArrayList(4);
-
- private MultiStatus status;
-
- /*
- *
- */
- private static void debug(String s) {
- Tracing.debug("DefaultSiteParser: " + s); //$NON-NLS-1$
- }
-
- private static URLEntry[] getAssociateSites(String associateSitesURL) {
-
- try {
- DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = domFactory.newDocumentBuilder();
- Document document = builder.parse(associateSitesURL);
- if (document == null)
- return null;
- NodeList mirrorNodes = document.getElementsByTagName(ASSOCIATE_SITE);
- URLEntry[] mirrors = new URLEntry[mirrorNodes.getLength()];
- for (int i = 0; i < mirrorNodes.getLength(); i++) {
- Element mirrorNode = (Element) mirrorNodes.item(i);
- mirrors[i] = new URLEntry();
- String infoURL = mirrorNode.getAttribute("url"); //$NON-NLS-1$
- String label = mirrorNode.getAttribute("label"); //$NON-NLS-1$
- mirrors[i].setURL(infoURL);
- mirrors[i].setAnnotation(label);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("Processed mirror: url:" + infoURL + " label:" + label); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return mirrors;
- } catch (Exception e) {
- // log if absolute url
- if (associateSitesURL != null && (associateSitesURL.startsWith("http://") //$NON-NLS-1$
- || associateSitesURL.startsWith("https://") //$NON-NLS-1$
- || associateSitesURL.startsWith("file://") //$NON-NLS-1$
- || associateSitesURL.startsWith("ftp://") //$NON-NLS-1$
- || associateSitesURL.startsWith("jar://"))) //$NON-NLS-1$
- log(Messages.DefaultSiteParser_mirrors, e);
- return null;
- }
- }
-
- static void log(Exception e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Internal Error", e)); //$NON-NLS-1$
- }
-
- static void log(String message) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, message, null));
- }
-
- static void log(String message, Exception e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, message, e));
- }
-
- /**
- * Constructs a site parser.
- */
- public DefaultSiteParser() {
- super();
- stateStack = new Stack();
- objectStack = new Stack();
- status = null;
- DESCRIPTION_SITE_ALREADY_SEEN = false;
- try {
- parserFactory.setNamespaceAware(true);
- this.parser = parserFactory.newSAXParser();
- } catch (ParserConfigurationException e) {
- log(e);
- } catch (SAXException e) {
- log(e);
- }
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("Created"); //$NON-NLS-1$
- }
-
- /**
- * Handle character text
- * @see DefaultHandler#characters(char[], int, int)
- * @since 2.0
- */
- public void characters(char[] ch, int start, int length) {
- String text = new String(ch, start, length);
- //only push if description
- int state = ((Integer) stateStack.peek()).intValue();
- if (state == STATE_DESCRIPTION_SITE || state == STATE_DESCRIPTION_CATEGORY_DEF)
- objectStack.push(text);
-
- }
-
- /**
- * Handle end of element tags
- * @see DefaultHandler#endElement(String, String, String)
- * @since 2.0
- */
- public void endElement(String uri, String localName, String qName) {
-
- String text = null;
- URLEntry info = null;
-
- int state = ((Integer) stateStack.peek()).intValue();
- switch (state) {
- case STATE_IGNORED_ELEMENT :
- case STATE_ARCHIVE :
- case STATE_CATEGORY :
- stateStack.pop();
- break;
-
- case STATE_INITIAL :
- internalError(Messages.DefaultSiteParser_ParsingStackBackToInitialState);
- break;
-
- case STATE_SITE :
- stateStack.pop();
- if (objectStack.peek() instanceof String) {
- text = (String) objectStack.pop();
- SiteModel site = (SiteModel) objectStack.peek();
- site.getDescription().setAnnotation(text);
- }
- //do not pop the object
- break;
-
- case STATE_FEATURE :
- stateStack.pop();
- objectStack.pop();
- break;
-
- case STATE_CATEGORY_DEF :
- stateStack.pop();
- if (objectStack.peek() instanceof String) {
- text = (String) objectStack.pop();
- SiteCategory category = (SiteCategory) objectStack.peek();
- category.setDescription(text);
- }
- objectStack.pop();
- break;
-
- case STATE_DESCRIPTION_SITE :
- stateStack.pop();
- text = ""; //$NON-NLS-1$
- while (objectStack.peek() instanceof String) {
- // add text, preserving at most one space between text fragments
- String newText = (String) objectStack.pop();
- if (trailingSpace(newText) && !leadingSpace(text)) {
- text = " " + text; //$NON-NLS-1$
- }
- text = newText.trim() + text;
- if (leadingSpace(newText) && !leadingSpace(text)) {
- text = " " + text; //$NON-NLS-1$
- }
- }
- text = text.trim();
-
- info = (URLEntry) objectStack.pop();
- if (text != null)
- info.setAnnotation(text);
-
- SiteModel siteModel = (SiteModel) objectStack.peek();
- // override description.
- // do not raise error as previous description may be default one
- // when parsing site tag
- if (DESCRIPTION_SITE_ALREADY_SEEN)
- debug(NLS.bind(Messages.DefaultSiteParser_ElementAlreadySet, (new String[] {getState(state)})));
- siteModel.setDescription(info);
- DESCRIPTION_SITE_ALREADY_SEEN = true;
- break;
-
- case STATE_DESCRIPTION_CATEGORY_DEF :
- stateStack.pop();
- text = ""; //$NON-NLS-1$
- while (objectStack.peek() instanceof String) {
- // add text, preserving at most one space between text fragments
- String newText = (String) objectStack.pop();
- if (trailingSpace(newText) && !leadingSpace(text)) {
- text = " " + text; //$NON-NLS-1$
- }
- text = newText.trim() + text;
- if (leadingSpace(newText) && !leadingSpace(text)) {
- text = " " + text; //$NON-NLS-1$
- }
- }
- text = text.trim();
-
- info = (URLEntry) objectStack.pop();
- if (text != null)
- info.setAnnotation(text);
-
- SiteCategory category = (SiteCategory) objectStack.peek();
- if (category.getDescription() != null)
- internalError(NLS.bind(Messages.DefaultSiteParser_ElementAlreadySet, (new String[] {getState(state), category.getLabel()})));
- else
- category.setDescription(info.getAnnotation());
- break;
-
- default :
- internalError(NLS.bind(Messages.DefaultSiteParser_UnknownEndState, (new String[] {getState(state)})));
- break;
- }
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End Element:" + uri + ":" + localName + ":" + qName);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /*
- * Handles an error state specified by the status. The collection of all logged status
- * objects can be accessed using <code>getStatus()</code>.
- *
- * @param error a status detailing the error condition
- */
- private void error(IStatus error) {
-
- if (status == null) {
- status = new MultiStatus(PLUGIN_ID, 0, Messages.DefaultSiteParser_ErrorParsingSite, null);
- }
-
- status.add(error);
- if (Tracing.DEBUG_GENERATOR_PARSING)
- LogHelper.log(error);
- }
-
- /**
- * Handle errors
- * @see DefaultHandler#error(SAXParseException)
- * @since 2.0
- */
- public void error(SAXParseException ex) {
- logStatus(ex);
- }
-
- /**
- * Handle fatal errors
- * @see DefaultHandler#fatalError(SAXParseException)
- * @exception SAXException
- * @since 2.0
- */
- public void fatalError(SAXParseException ex) throws SAXException {
- logStatus(ex);
- throw ex;
- }
-
- /*
- * return the state as String
- */
- private String getState(int state) {
-
- switch (state) {
- case STATE_IGNORED_ELEMENT :
- return "Ignored"; //$NON-NLS-1$
-
- case STATE_INITIAL :
- return "Initial"; //$NON-NLS-1$
-
- case STATE_SITE :
- return "Site"; //$NON-NLS-1$
-
- case STATE_FEATURE :
- return "Feature"; //$NON-NLS-1$
-
- case STATE_ARCHIVE :
- return "Archive"; //$NON-NLS-1$
-
- case STATE_CATEGORY :
- return "Category"; //$NON-NLS-1$
-
- case STATE_CATEGORY_DEF :
- return "Category Def"; //$NON-NLS-1$
-
- case STATE_DESCRIPTION_CATEGORY_DEF :
- return "Description / Category Def"; //$NON-NLS-1$
-
- case STATE_DESCRIPTION_SITE :
- return "Description / Site"; //$NON-NLS-1$
-
- default :
- return Messages.DefaultSiteParser_UnknownState;
- }
- }
-
- /**
- * Returns all status objects accumulated by the parser.
- *
- * @return multi-status containing accumulated status, or <code>null</code>.
- * @since 2.0
- */
- public MultiStatus getStatus() {
- return status;
- }
-
- private void handleCategoryDefState(String elementName, Attributes attributes) {
- if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
- processFeature(attributes);
- } else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
- processArchive(attributes);
- } else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
- processCategoryDef(attributes);
- } else if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_CATEGORY_DEF));
- processInfo(attributes);
- } else
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- }
-
- private void handleCategoryState(String elementName, Attributes attributes) {
- if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
- processInfo(attributes);
- } else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
- processFeature(attributes);
- } else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
- processArchive(attributes);
- } else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
- processCategoryDef(attributes);
- } else if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
- processCategory(attributes);
- } else
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- }
-
- private void handleFeatureState(String elementName, Attributes attributes) {
- if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
- processInfo(attributes);
- } else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
- processFeature(attributes);
- } else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
- processArchive(attributes);
- } else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
- processCategoryDef(attributes);
- } else if (elementName.equals(CATEGORY)) {
- stateStack.push(new Integer(STATE_CATEGORY));
- processCategory(attributes);
- } else
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- }
-
- private void handleInitialState(String elementName, Attributes attributes) throws SAXException {
- if (elementName.equals(SITE)) {
- stateStack.push(new Integer(STATE_SITE));
- processSite(attributes);
- } else {
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- // what we received was not a site.xml, no need to continue
- throw new SAXException(Messages.DefaultSiteParser_InvalidXMLStream);
- }
-
- }
-
- private void handleSiteState(String elementName, Attributes attributes) {
- if (elementName.equals(DESCRIPTION)) {
- stateStack.push(new Integer(STATE_DESCRIPTION_SITE));
- processInfo(attributes);
- } else if (elementName.equals(FEATURE)) {
- stateStack.push(new Integer(STATE_FEATURE));
- processFeature(attributes);
- } else if (elementName.equals(ARCHIVE)) {
- stateStack.push(new Integer(STATE_ARCHIVE));
- processArchive(attributes);
- } else if (elementName.equals(CATEGORY_DEF)) {
- stateStack.push(new Integer(STATE_CATEGORY_DEF));
- processCategoryDef(attributes);
- } else
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {elementName, getState(currentState)})));
- }
-
- /*
- *
- */
- private void internalError(String message) {
- error(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, message, null));
- }
-
- /*
- *
- */
- private void internalErrorUnknownTag(String msg) {
- stateStack.push(new Integer(STATE_IGNORED_ELEMENT));
- internalError(msg);
- }
-
- private boolean leadingSpace(String str) {
- if (str.length() <= 0) {
- return false;
- }
- return Character.isWhitespace(str.charAt(0));
- }
-
- /*
- *
- */
- private void logStatus(SAXParseException ex) {
- String name = ex.getSystemId();
- if (name == null)
- name = ""; //$NON-NLS-1$
- else
- name = name.substring(1 + name.lastIndexOf("/")); //$NON-NLS-1$
-
- String msg;
- if (name.equals("")) //$NON-NLS-1$
- msg = NLS.bind(Messages.DefaultSiteParser_ErrorParsing, (new String[] {ex.getMessage()}));
- else {
- String[] values = new String[] {name, Integer.toString(ex.getLineNumber()), Integer.toString(ex.getColumnNumber()), ex.getMessage()};
- msg = NLS.bind(Messages.DefaultSiteParser_ErrorlineColumnMessage, values);
- }
- error(new Status(IStatus.ERROR, PLUGIN_ID, msg, ex));
- }
-
- /**
- * Parses the specified input steam and constructs a site model.
- * The input stream is not closed as part of this operation.
- *
- * @param in input stream
- * @return site model
- * @exception SAXException
- * @exception IOException
- * @since 2.0
- */
- public SiteModel parse(InputStream in) throws SAXException, IOException {
- stateStack.push(new Integer(STATE_INITIAL));
- currentState = ((Integer) stateStack.peek()).intValue();
- parser.parse(new InputSource(in), this);
- if (objectStack.isEmpty())
- throw new SAXException(Messages.DefaultSiteParser_NoSiteTag);
- if (objectStack.peek() instanceof SiteModel) {
- SiteModel site = (SiteModel) objectStack.pop();
- site.setMessageKeys(messageKeys);
- return site;
- }
- String stack = ""; //$NON-NLS-1$
- Iterator iter = objectStack.iterator();
- while (iter.hasNext()) {
- stack = stack + iter.next().toString() + "\r\n"; //$NON-NLS-1$
- }
- throw new SAXException(NLS.bind(Messages.DefaultSiteParser_WrongParsingStack, (new String[] {stack})));
- }
-
- /*
- * process archive info
- */
- private void processArchive(Attributes attributes) {
- URLEntry archive = new URLEntry();
- String id = attributes.getValue("path"); //$NON-NLS-1$
- if (id == null || id.trim().equals("")) { //$NON-NLS-1$
- internalError(NLS.bind(Messages.DefaultSiteParser_Missing, (new String[] {"path", getState(currentState)}))); //$NON-NLS-1$
- }
-
- archive.setAnnotation(id);
-
- String url = attributes.getValue("url"); //$NON-NLS-1$
- if (url == null || url.trim().equals("")) { //$NON-NLS-1$
- internalError(NLS.bind(Messages.DefaultSiteParser_Missing, (new String[] {"archive", getState(currentState)}))); //$NON-NLS-1$
- } else {
- archive.setURL(url);
-
- SiteModel site = (SiteModel) objectStack.peek();
- site.addArchive(archive);
- }
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing Archive: path:" + id + " url:" + url);//$NON-NLS-1$ //$NON-NLS-2$
-
- }
-
- /*
- * process the Category info
- */
- private void processCategory(Attributes attributes) {
- String category = attributes.getValue("name"); //$NON-NLS-1$
- SiteFeature feature = (SiteFeature) objectStack.peek();
- feature.addCategoryName(category);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing Category: name:" + category); //$NON-NLS-1$
- }
-
- /*
- * process category def info
- */
- private void processCategoryDef(Attributes attributes) {
- SiteCategory category = new SiteCategory();
- String name = attributes.getValue("name"); //$NON-NLS-1$
- String label = attributes.getValue("label"); //$NON-NLS-1$
- checkTranslated(label);
- category.setName(name);
- category.setLabel(label);
-
- SiteModel site = (SiteModel) objectStack.peek();
- site.addCategory(category);
- objectStack.push(category);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End processing CategoryDef: name:" + name + " label:" + label); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /*
- * process feature info
- */
- private void processFeature(Attributes attributes) {
- SiteFeature feature = new SiteFeature();
-
- // feature location on the site
- String urlInfo = attributes.getValue("url"); //$NON-NLS-1$
- // identifier and version
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String ver = attributes.getValue("version"); //$NON-NLS-1$
-
- boolean noURL = (urlInfo == null || urlInfo.trim().equals("")); //$NON-NLS-1$
- boolean noId = (id == null || id.trim().equals("")); //$NON-NLS-1$
- boolean noVersion = (ver == null || ver.trim().equals("")); //$NON-NLS-1$
-
- // We need to have id and version, or the url, or both.
- if (noURL) {
- if (noId || noVersion)
- internalError(NLS.bind(Messages.DefaultSiteParser_Missing, (new String[] {"url", getState(currentState)}))); //$NON-NLS-1$
- else
- // default url
- urlInfo = FEATURES + id + '_' + ver; //
- }
-
- feature.setURLString(urlInfo);
-
- // if one is null, and not the other
- if (noId ^ noVersion) {
- String[] values = new String[] {id, ver, getState(currentState)};
- log(NLS.bind(Messages.DefaultFeatureParser_IdOrVersionInvalid, values));
- } else {
- feature.setFeatureIdentifier(id);
- feature.setFeatureVersion(ver);
- }
-
- SiteModel site = (SiteModel) objectStack.peek();
- site.addFeature(feature);
-
- objectStack.push(feature);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End Processing DefaultFeature Tag: url:" + urlInfo); //$NON-NLS-1$
-
- }
-
- /*
- * process URL info with element text
- */
- private void processInfo(Attributes attributes) {
- URLEntry inf = new URLEntry();
- String infoURL = attributes.getValue("url"); //$NON-NLS-1$
- inf.setURL(infoURL);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("Processed Info: url:" + infoURL); //$NON-NLS-1$
-
- objectStack.push(inf);
- }
-
- /*
- * process site info
- */
- private void processSite(Attributes attributes) {
- // create site map
- SiteModel site = new SiteModel();
-
- // provide default description URL
- // If <description> is specified, for the site, it takes precedence
- URLEntry description = new URLEntry();
- description.setURL(DEFAULT_INFO_URL);
- site.setDescription(description);
-
- // get mirrors, if any
- String mirrorsURL = attributes.getValue("mirrorsURL"); //$NON-NLS-1$
- if (mirrorsURL != null && mirrorsURL.trim().length() > 0) {
- site.setMirrorsURLString(mirrorsURL);
- }
-
- if (attributes.getValue(ASSOCIATE_SITES_URL) != null)
- site.setAssociateSites(getAssociateSites(attributes.getValue(ASSOCIATE_SITES_URL)));
-
- objectStack.push(site);
- }
-
- /**
- * Handle start of element tags
- * @see DefaultHandler#startElement(String, String, String, Attributes)
- * @since 2.0
- */
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
-
- if (Tracing.DEBUG_GENERATOR_PARSING) {
- debug("State: " + currentState); //$NON-NLS-1$
- debug("Start Element: uri:" + uri + " local Name:" + localName + " qName:" + qName);//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- switch (currentState) {
- case STATE_IGNORED_ELEMENT :
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownElement, (new String[] {localName, getState(currentState)})));
- break;
- case STATE_INITIAL :
- handleInitialState(localName, attributes);
- break;
-
- case STATE_SITE :
- handleSiteState(localName, attributes);
- break;
-
- case STATE_FEATURE :
- handleFeatureState(localName, attributes);
- break;
-
- case STATE_ARCHIVE :
- handleSiteState(localName, attributes);
- break;
-
- case STATE_CATEGORY :
- handleCategoryState(localName, attributes);
- break;
-
- case STATE_CATEGORY_DEF :
- handleCategoryDefState(localName, attributes);
- break;
-
- case STATE_DESCRIPTION_SITE :
- handleSiteState(localName, attributes);
- break;
-
- case STATE_DESCRIPTION_CATEGORY_DEF :
- handleSiteState(localName, attributes);
- break;
-
- default :
- internalErrorUnknownTag(NLS.bind(Messages.DefaultSiteParser_UnknownStartState, (new String[] {getState(currentState)})));
- break;
- }
- int newState = ((Integer) stateStack.peek()).intValue();
- if (newState != STATE_IGNORED_ELEMENT)
- currentState = newState;
-
- }
-
- private boolean trailingSpace(String str) {
- if (str.length() <= 0) {
- return false;
- }
- return Character.isWhitespace(str.charAt(str.length() - 1));
- }
-
- // Add translatable strings from the site.xml
- // to the list of message keys.
- private void checkTranslated(String value) {
- if (value != null && value.length() > 1 && value.startsWith("%")) //$NON-NLS-1$
- messageKeys.add(value.substring(1));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java
deleted file mode 100644
index c6a06273e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.io.*;
-import java.net.URL;
-import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import javax.xml.parsers.*;
-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.metadata.generator.Activator;
-import org.eclipse.equinox.internal.p2.metadata.generator.LocalizationHelper;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Feature;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.FeatureEntry;
-import org.eclipse.osgi.util.NLS;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Default feature parser.
- * Parses the feature manifest file as defined by the platform.
- *
- * @since 3.0
- */
-public class FeatureParser extends DefaultHandler {
-
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- private SAXParser parser;
- protected Feature result;
- private URL url;
- private StringBuffer characters = null;
-
- private Properties messages = null;
- private List messageKeys = null;
-
- public FeatureParser() {
- this(true);
- }
-
- protected FeatureParser(boolean createParser) {
- super();
- if (!createParser)
- return;
- try {
- parserFactory.setNamespaceAware(true);
- this.parser = parserFactory.newSAXParser();
- } catch (ParserConfigurationException e) {
- System.out.println(e);
- } catch (SAXException e) {
- System.out.println(e);
- }
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- if (characters == null)
- return;
- characters.append(ch, start, length);
- }
-
- protected Feature createFeature(String id, String version) {
- return new Feature(id, version);
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- if (characters == null)
- return;
- if ("description".equals(localName)) { //$NON-NLS-1$
- result.setDescription(localize(characters.toString().trim()));
- } else if ("license".equals(localName)) { //$NON-NLS-1$
- result.setLicense(localize(characters.toString().trim()));
- } else if ("copyright".equals(localName)) { //$NON-NLS-1$
- result.setCopyright(localize(characters.toString().trim()));
- }
- characters = null;
- }
-
- private void loadProperties(File directory, Properties properties) {
- //skip directories that don't contain a feature.properties file
- File file = new File(directory, "feature.properties"); //$NON-NLS-1$
- if (!file.exists())
- return;
- try {
- InputStream input = new BufferedInputStream(new FileInputStream(file));
- try {
- properties.load(input);
- } finally {
- if (input != null)
- input.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private void loadProperties(JarFile jar, Properties properties) {
- JarEntry entry = jar.getJarEntry("feature.properties"); //$NON-NLS-1$
- if (entry == null)
- return;
- try {
- InputStream input = new BufferedInputStream(jar.getInputStream(entry));
- try {
- properties.load(input);
- } finally {
- if (input != null)
- input.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private String localize(String value) {
- if (messages == null || value == null)
- return value;
- if (!value.startsWith("%")) //$NON-NLS-1$
- return value;
- String key = value.substring(1);
- messageKeys.add(key);
- return value;
- }
-
- /**
- * Parses the specified location and constructs a feature. The given location
- * should be either the location of the feature JAR or the directory containing
- * the feature.
- *
- * @param location the location of the feature to parse.
- */
- public Feature parse(File location) {
- if (!location.exists())
- return null;
-
- Feature feature = null;
- Properties properties = new Properties();
-
- if (location.isDirectory()) {
- //skip directories that don't contain a feature.xml file
- File file = new File(location, "feature.xml"); //$NON-NLS-1$
- if (!file.exists())
- return null;
- loadProperties(location, properties);
- try {
- InputStream input = new BufferedInputStream(new FileInputStream(file));
- feature = parse(input, properties);
- if (feature != null) {
- String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
- feature.setLocalizations(LocalizationHelper.getDirPropertyLocalizations(location, "feature", null, keyStrings)); //$NON-NLS-1$
- }
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- } else if (location.getName().endsWith(".jar")) { //$NON-NLS-1$
- JarFile jar = null;
- try {
- jar = new JarFile(location);
- loadProperties(jar, properties);
- JarEntry entry = jar.getJarEntry("feature.xml"); //$NON-NLS-1$
- if (entry == null)
- return null;
- InputStream input = new BufferedInputStream(jar.getInputStream(entry));
- feature = parse(input, properties);
- if (feature != null) {
- String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
- feature.setLocalizations(LocalizationHelper.getJarPropertyLocalizations(location, "feature", null, keyStrings)); //$NON-NLS-1$
- }
- } catch (IOException e) {
- e.printStackTrace();
- } catch (SecurityException e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Exception parsing feature: " + location.getAbsolutePath(), e)); //$NON-NLS-1$
- } finally {
- try {
- if (jar != null)
- jar.close();
- } catch (IOException e) {
- //
- }
- }
- }
- return feature;
- }
-
- /**
- * Parse the given input stream and return a feature object
- * or null. This method closes the input stream.
- */
- public Feature parse(InputStream in, Properties messages) {
- this.messages = messages;
- this.messageKeys = new ArrayList(messages.size());
- result = null;
- try {
- parser.parse(new InputSource(in), this);
- } catch (SAXException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } finally {
- try {
- in.close();
- } catch (IOException e1) {
- // Utils.log(e1.getLocalizedMessage());
- }
- }
- return result;
- }
-
- private void processCopyright(Attributes attributes) {
- result.setCopyrightURL(attributes.getValue("url")); //$NON-NLS-1$
- characters = new StringBuffer();
- }
-
- private void processDescription(Attributes attributes) {
- result.setDescriptionURL(attributes.getValue("url")); //$NON-NLS-1$
- characters = new StringBuffer();
- }
-
- private void processDiscoverySite(Attributes attributes) {
- //ignore discovery sites of type 'web'
- if ("web".equals(attributes.getValue("type"))) //$NON-NLS-1$ //$NON-NLS-2$
- return;
- result.addDiscoverySite(attributes.getValue("label"), attributes.getValue("url")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected void processFeature(Attributes attributes) {
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String ver = attributes.getValue("version"); //$NON-NLS-1$
-
- if (id == null || id.trim().equals("") //$NON-NLS-1$
- || ver == null || ver.trim().equals("")) { //$NON-NLS-1$
- // System.out.println(NLS.bind(Messages.FeatureParser_IdOrVersionInvalid, (new String[] { id, ver})));
- } else {
- result = createFeature(id, ver);
- result.setApplication(attributes.getValue("application")); //$NON-NLS-1$
- result.setPlugin(attributes.getValue("plugin")); //$NON-NLS-1$
- result.setExclusive(Boolean.valueOf(attributes.getValue("exclusive")).booleanValue()); //$NON-NLS-1$
- result.setPrimary(Boolean.valueOf(attributes.getValue("primary")).booleanValue()); //$NON-NLS-1$
-
- //TODO rootURLs
- if (url != null && "file".equals(url.getProtocol())) { //$NON-NLS-1$
- File f = new File(url.getFile().replace('/', File.separatorChar));
- result.setURL("features" + "/" + f.getParentFile().getName() + "/");// + f.getName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else {
- // externalized URLs might be in relative form, ensure they are absolute
- // feature.setURL(Utils.makeAbsolute(Utils.getInstallURL(), url).toExternalForm());
- }
-
- result.setProviderName(localize(attributes.getValue("provider-name"))); //$NON-NLS-1$
- result.setLabel(localize(attributes.getValue("label"))); //$NON-NLS-1$
-
- // Utils.debug("End process DefaultFeature tag: id:" +id + " ver:" +ver + " url:" + feature.getURL()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- private void processImport(Attributes attributes) {
- String id = attributes.getValue("feature"); //$NON-NLS-1$
- FeatureEntry entry = null;
- if (id != null) {
- if ("true".equalsIgnoreCase(attributes.getValue("patch"))) { //$NON-NLS-1$ //$NON-NLS-2$
- entry = FeatureEntry.createRequires(id, attributes.getValue("version"), "perfect", attributes.getValue("filter"), false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- entry.setPatch(true);
- } else {
- entry = FeatureEntry.createRequires(id, attributes.getValue("version"), attributes.getValue("match"), attributes.getValue("filter"), false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- } else {
- id = attributes.getValue("plugin"); //$NON-NLS-1$
- entry = FeatureEntry.createRequires(id, attributes.getValue("version"), attributes.getValue("match"), attributes.getValue("filter"), true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- result.addEntry(entry);
- }
-
- private void processIncludes(Attributes attributes) {
- FeatureEntry entry = new FeatureEntry(attributes.getValue("id"), attributes.getValue("version"), false); //$NON-NLS-1$ //$NON-NLS-2$
- String flag = attributes.getValue("optional"); //$NON-NLS-1$
- if (flag != null)
- entry.setOptional(Boolean.valueOf(flag).booleanValue());
- setEnvironment(attributes, entry);
- result.addEntry(entry);
- }
-
- private void processInstallHandler(Attributes attributes) {
- result.setInstallHandler(attributes.getValue("handler")); //$NON-NLS-1$
- result.setInstallHandlerLibrary(attributes.getValue("library")); //$NON-NLS-1$
- result.setInstallHandlerURL(attributes.getValue("url")); //$NON-NLS-1$
- }
-
- private void processLicense(Attributes attributes) {
- result.setLicenseURL(attributes.getValue("url")); //$NON-NLS-1$
- characters = new StringBuffer();
- }
-
- private void processPlugin(Attributes attributes) {
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String version = attributes.getValue("version"); //$NON-NLS-1$
-
- if (id == null || id.trim().equals("") || version == null || version.trim().equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(NLS.bind("FeatureParser#processPlugin, ID {0} or version {1} invalid", (new String[] {id, version}))); //$NON-NLS-1$
- } else {
- FeatureEntry plugin = new FeatureEntry(id, version, true);
- setEnvironment(attributes, plugin);
- String unpack = attributes.getValue("unpack"); //$NON-NLS-1$
- if (unpack != null)
- plugin.setUnpack(Boolean.valueOf(unpack).booleanValue());
- String fragment = attributes.getValue("fragment"); //$NON-NLS-1$
- if (fragment != null)
- plugin.setFragment(Boolean.valueOf(fragment).booleanValue());
- String filter = attributes.getValue("filter"); //$NON-NLS-1$
- if (filter != null)
- plugin.setFilter(filter);
- result.addEntry(plugin);
-
- // Utils.debug("End process DefaultFeature tag: id:" + id + " ver:" + ver + " url:" + feature.getURL()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- private void processUpdateSite(Attributes attributes) {
- result.setUpdateSiteLabel(attributes.getValue("label")); //$NON-NLS-1$
- result.setUpdateSiteURL(attributes.getValue("url")); //$NON-NLS-1$
- }
-
- private void setEnvironment(Attributes attributes, FeatureEntry entry) {
- String os = attributes.getValue("os"); //$NON-NLS-1$
- String ws = attributes.getValue("ws"); //$NON-NLS-1$
- String nl = attributes.getValue("nl"); //$NON-NLS-1$
- String arch = attributes.getValue("arch"); //$NON-NLS-1$
- entry.setEnvironment(os, ws, arch, nl);
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- // Utils.debug("Start Element: uri:" + uri + " local Name:" + localName + " qName:" + qName); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if ("plugin".equals(localName)) { //$NON-NLS-1$
- processPlugin(attributes);
- } else if ("description".equals(localName)) { //$NON-NLS-1$
- processDescription(attributes);
- } else if ("license".equals(localName)) { //$NON-NLS-1$
- processLicense(attributes);
- } else if ("copyright".equals(localName)) { //$NON-NLS-1$
- processCopyright(attributes);
- } else if ("feature".equals(localName)) { //$NON-NLS-1$
- processFeature(attributes);
- } else if ("import".equals(localName)) { //$NON-NLS-1$
- processImport(attributes);
- } else if ("includes".equals(localName)) { //$NON-NLS-1$
- processIncludes(attributes);
- } else if ("install-handler".equals(localName)) { //$NON-NLS-1$
- processInstallHandler(attributes);
- } else if ("update".equals(localName)) { //$NON-NLS-1$
- processUpdateSite(attributes);
- } else if ("discovery".equals(localName)) { //$NON-NLS-1$
- processDiscoverySite(attributes);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java
deleted file mode 100644
index dce8bba54..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.generator.features.messages";//$NON-NLS-1$
-
- public static String DefaultFeatureParser_IdOrVersionInvalid;
- public static String DefaultSiteParser_NoSiteTag;
- public static String DefaultSiteParser_WrongParsingStack;
- public static String DefaultSiteParser_UnknownElement;
- public static String DefaultSiteParser_UnknownStartState;
- public static String DefaultSiteParser_Missing;
- public static String DefaultSiteParser_ParsingStackBackToInitialState;
- public static String DefaultSiteParser_ElementAlreadySet;
- public static String DefaultSiteParser_UnknownEndState;
- public static String DefaultSiteParser_ErrorParsing;
- public static String DefaultSiteParser_ErrorlineColumnMessage;
- public static String DefaultSiteParser_ErrorParsingSite;
- public static String DefaultSiteParser_UnknownState;
- public static String DefaultSiteParser_InvalidXMLStream;
- public static String DefaultSiteParser_mirrors;
- static {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java
deleted file mode 100644
index fd1e55017..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java
+++ /dev/null
@@ -1,514 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.io.*;
-import java.util.*;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- *
- * @since 3.1
- */
-public class ProductFile extends DefaultHandler {
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
-
- private static final String PROGRAM_ARGS = "programArgs"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_LINUX = "programArgsLin"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_MAC = "programArgsMac"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_SOLARIS = "programArgsSol"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_WIN = "programArgsWin"; //$NON-NLS-1$
- private static final String VM_ARGS = "vmArgs"; //$NON-NLS-1$
- private static final String VM_ARGS_LINUX = "vmArgsLin"; //$NON-NLS-1$
- private static final String VM_ARGS_MAC = "vmArgsMac"; //$NON-NLS-1$
- private static final String VM_ARGS_SOLARIS = "vmArgsSol"; //$NON-NLS-1$
- private static final String VM_ARGS_WIN = "vmArgsWin"; //$NON-NLS-1$
-
- private static final String SOLARIS_LARGE = "solarisLarge"; //$NON-NLS-1$
- private static final String SOLARIS_MEDIUM = "solarisMedium"; //$NON-NLS-1$
- private static final String SOLARIS_SMALL = "solarisSmall"; //$NON-NLS-1$
- private static final String SOLARIS_TINY = "solarisTiny"; //$NON-NLS-1$
- private static final String WIN32_16_LOW = "winSmallLow"; //$NON-NLS-1$
- private static final String WIN32_16_HIGH = "winSmallHigh"; //$NON-NLS-1$
- private static final String WIN32_24_LOW = "win24Low"; //$NON-NLS-1$
- private static final String WIN32_32_LOW = "winMediumLow"; //$NON-NLS-1$
- private static final String WIN32_32_HIGH = "winMediumHigh"; //$NON-NLS-1$
- private static final String WIN32_48_LOW = "winLargeLow"; //$NON-NLS-1$
- private static final String WIN32_48_HIGH = "winLargeHigh"; //$NON-NLS-1$
-
- private static final String OS_WIN32 = "win32";//$NON-NLS-1$
- private static final String OS_LINUX = "linux";//$NON-NLS-1$
- private static final String OS_SOLARIS = "solaris";//$NON-NLS-1$
- private static final String OS_MACOSX = "macosx";//$NON-NLS-1$
-
- private static final String PRODUCT = "product"; //$NON-NLS-1$
- private static final String CONFIG_INI = "configIni"; //$NON-NLS-1$
- private static final String LAUNCHER = "launcher"; //$NON-NLS-1$
- private static final String LAUNCHER_ARGS = "launcherArgs"; //$NON-NLS-1$
- private static final String PLUGINS = "plugins"; //$NON-NLS-1$
- private static final String FEATURES = "features"; //$NON-NLS-1$
- private static final String P_USE_ICO = "useIco"; //$NON-NLS-1$
-
- //These constants form a small state machine to parse the .product file
- private static final int STATE_START = 0;
- private static final int STATE_PRODUCT = 1;
- private static final int STATE_LAUNCHER = 2;
- private static final int STATE_LAUNCHER_ARGS = 3;
- private static final int STATE_PLUGINS = 4;
- private static final int STATE_FEATURES = 5;
- private static final int STATE_PROGRAM_ARGS = 6;
- private static final int STATE_PROGRAM_ARGS_LINUX = 7;
- private static final int STATE_PROGRAM_ARGS_MAC = 8;
- private static final int STATE_PROGRAM_ARGS_SOLARIS = 9;
- private static final int STATE_PROGRAM_ARGS_WIN = 10;
- private static final int STATE_VM_ARGS = 11;
- private static final int STATE_VM_ARGS_LINUX = 12;
- private static final int STATE_VM_ARGS_MAC = 13;
- private static final int STATE_VM_ARGS_SOLARIS = 14;
- private static final int STATE_VM_ARGS_WIN = 15;
- private static final int STATE_CONFIG_INI = 16;
-
- private int state = STATE_START;
-
- private final SAXParser parser;
- private String currentOS = null;
- private boolean useIco = false;
- private final ArrayList result = new ArrayList(6);
- private final Map platformSpecificConfigPaths = new HashMap();
- private String configPlatform = null;
- private String platformConfigPath = null;
- private String launcherName = null;
- private String id = null;
- private String uid = null;
- private boolean useFeatures = false;
- private List plugins = null;
- private List fragments = null;
- private List features = null;
- private String productName = null;
- private String version = null;
-
- private Properties launcherArgs = new Properties();
-
- private static String normalize(String text) {
- if (text == null || text.trim().length() == 0)
- return ""; //$NON-NLS-1$
-
- text = text.replaceAll("\\r|\\n|\\f|\\t", " "); //$NON-NLS-1$ //$NON-NLS-2$
- return text.replaceAll("\\s+", " "); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Constructs a feature parser.
- */
- public ProductFile(String location, String os) throws Exception {
- super();
- this.currentOS = os;
-
- parserFactory.setNamespaceAware(true);
- parser = parserFactory.newSAXParser();
- InputStream in = new BufferedInputStream(new FileInputStream(location));
- try {
- parser.parse(new InputSource(in), this);
- } finally {
- if (in != null)
- in.close();
- }
- }
-
- public List getPlugins() {
- return getPlugins(true);
- }
-
- public List getPlugins(boolean includeFragments) {
- List p = plugins != null ? plugins : Collections.EMPTY_LIST;
- if (!includeFragments)
- return p;
-
- List f = fragments != null ? fragments : Collections.EMPTY_LIST;
- int size = p.size() + f.size();
- if (size == 0)
- return Collections.EMPTY_LIST;
-
- List both = new ArrayList(size);
- both.addAll(p);
- both.addAll(f);
- return both;
- }
-
- public List getFeatures() {
- if (features == null)
- return Collections.EMPTY_LIST;
- return features;
- }
-
- public String getId() {
- if (uid != null)
- return uid;
- return id;
- }
-
- public String getProductId() {
- return id;
- }
-
- public String getProductName() {
- return productName;
- }
-
- public boolean useFeatures() {
- return useFeatures;
- }
-
- public String getVersion() {
- return (version == null || version.length() == 0) ? "0.0.0" : version; //$NON-NLS-1$
- }
-
- public String getLauncherName() {
- return launcherName;
- }
-
- public String getVMArguments(String os) {
- String key = null;
- if (os.equals(OS_WIN32)) {
- key = VM_ARGS_WIN;
- } else if (os.equals(OS_LINUX)) {
- key = VM_ARGS_LINUX;
- } else if (os.equals(OS_MACOSX)) {
- key = VM_ARGS_MAC;
- } else if (os.equals(OS_SOLARIS)) {
- key = VM_ARGS_SOLARIS;
- }
-
- String prefix = launcherArgs.getProperty(VM_ARGS);
- String platform = null, args = null;
- if (key != null)
- platform = launcherArgs.getProperty(key);
- if (prefix != null)
- args = platform != null ? prefix + " " + platform : prefix; //$NON-NLS-1$
- else
- args = platform != null ? platform : ""; //$NON-NLS-1$
- return normalize(args);
- }
-
- public String getProgramArguments(String os) {
- String key = null;
- if (os.equals(OS_WIN32)) {
- key = PROGRAM_ARGS_WIN;
- } else if (os.equals(OS_LINUX)) {
- key = PROGRAM_ARGS_LINUX;
- } else if (os.equals(OS_MACOSX)) {
- key = PROGRAM_ARGS_MAC;
- } else if (os.equals(OS_SOLARIS)) {
- key = PROGRAM_ARGS_SOLARIS;
- }
-
- String prefix = launcherArgs.getProperty(PROGRAM_ARGS);
- String platform = null, args = null;
- if (key != null)
- platform = launcherArgs.getProperty(key);
- if (prefix != null)
- args = platform != null ? prefix + " " + platform : prefix; //$NON-NLS-1$
- else
- args = platform != null ? platform : ""; //$NON-NLS-1$
- return normalize(args);
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) {
- switch (state) {
- case STATE_START :
- if (PRODUCT.equals(localName)) {
- processProduct(attributes);
- state = STATE_PRODUCT;
- }
- break;
-
- case STATE_PRODUCT :
- if (CONFIG_INI.equals(localName)) {
- processConfigIni(attributes);
- state = STATE_CONFIG_INI;
- } else if (LAUNCHER.equals(localName)) {
- processLauncher(attributes);
- state = STATE_LAUNCHER;
- } else if (PLUGINS.equals(localName)) {
- state = STATE_PLUGINS;
- } else if (FEATURES.equals(localName)) {
- state = STATE_FEATURES;
- } else if (LAUNCHER_ARGS.equals(localName)) {
- state = STATE_LAUNCHER_ARGS;
- }
- break;
-
- case STATE_CONFIG_INI :
- processConfigIniPlatform(localName, true);
- break;
-
- case STATE_LAUNCHER :
- if (OS_SOLARIS.equals(localName)) {
- processSolaris(attributes);
- } else if ("win".equals(localName)) { //$NON-NLS-1$
- processWin(attributes);
- } else if (OS_LINUX.equals(localName)) {
- processLinux(attributes);
- } else if (OS_MACOSX.equals(localName)) {
- processMac(attributes);
- }
- if ("ico".equals(localName)) { //$NON-NLS-1$
- processIco(attributes);
- } else if ("bmp".equals(localName)) { //$NON-NLS-1$
- processBmp(attributes);
- }
- break;
-
- case STATE_LAUNCHER_ARGS :
- if (PROGRAM_ARGS.equals(localName)) {
- state = STATE_PROGRAM_ARGS;
- } else if (PROGRAM_ARGS_LINUX.equals(localName)) {
- state = STATE_PROGRAM_ARGS_LINUX;
- } else if (PROGRAM_ARGS_MAC.equals(localName)) {
- state = STATE_PROGRAM_ARGS_MAC;
- } else if (PROGRAM_ARGS_SOLARIS.equals(localName)) {
- state = STATE_PROGRAM_ARGS_SOLARIS;
- } else if (PROGRAM_ARGS_WIN.equals(localName)) {
- state = STATE_PROGRAM_ARGS_WIN;
- } else if (VM_ARGS.equals(localName)) {
- state = STATE_VM_ARGS;
- } else if (VM_ARGS_LINUX.equals(localName)) {
- state = STATE_VM_ARGS_LINUX;
- } else if (VM_ARGS_MAC.equals(localName)) {
- state = STATE_VM_ARGS_MAC;
- } else if (VM_ARGS_SOLARIS.equals(localName)) {
- state = STATE_VM_ARGS_SOLARIS;
- } else if (VM_ARGS_WIN.equals(localName)) {
- state = STATE_VM_ARGS_WIN;
- }
- break;
-
- case STATE_PLUGINS :
- if ("plugin".equals(localName)) { //$NON-NLS-1$
- processPlugin(attributes);
- }
- break;
-
- case STATE_FEATURES :
- if ("feature".equals(localName)) { //$NON-NLS-1$
- processFeature(attributes);
- }
- break;
- }
- }
-
- public void endElement(String uri, String localName, String qName) {
- switch (state) {
- case STATE_PLUGINS :
- if (PLUGINS.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_FEATURES :
- if (FEATURES.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_LAUNCHER_ARGS :
- if (LAUNCHER_ARGS.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_LAUNCHER :
- if (LAUNCHER.equals(localName))
- state = STATE_PRODUCT;
- break;
-
- case STATE_PROGRAM_ARGS :
- case STATE_PROGRAM_ARGS_LINUX :
- case STATE_PROGRAM_ARGS_MAC :
- case STATE_PROGRAM_ARGS_SOLARIS :
- case STATE_PROGRAM_ARGS_WIN :
- case STATE_VM_ARGS :
- case STATE_VM_ARGS_LINUX :
- case STATE_VM_ARGS_MAC :
- case STATE_VM_ARGS_SOLARIS :
- case STATE_VM_ARGS_WIN :
- state = STATE_LAUNCHER_ARGS;
- break;
-
- case STATE_CONFIG_INI :
- if (CONFIG_INI.equals(localName))
- state = STATE_PRODUCT;
- else
- processConfigIniPlatform(localName, false);
- break;
- }
- }
-
- public void characters(char[] ch, int start, int length) {
- switch (state) {
- case STATE_PROGRAM_ARGS :
- addLaunchArgumentToMap(PROGRAM_ARGS, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_LINUX :
- addLaunchArgumentToMap(PROGRAM_ARGS_LINUX, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_MAC :
- addLaunchArgumentToMap(PROGRAM_ARGS_MAC, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_SOLARIS :
- addLaunchArgumentToMap(PROGRAM_ARGS_SOLARIS, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_WIN :
- addLaunchArgumentToMap(PROGRAM_ARGS_WIN, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS :
- addLaunchArgumentToMap(VM_ARGS, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_LINUX :
- addLaunchArgumentToMap(VM_ARGS_LINUX, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_MAC :
- addLaunchArgumentToMap(VM_ARGS_MAC, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_SOLARIS :
- addLaunchArgumentToMap(VM_ARGS_SOLARIS, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_WIN :
- addLaunchArgumentToMap(VM_ARGS_WIN, String.valueOf(ch, start, length));
- break;
- case STATE_CONFIG_INI :
- if (platformConfigPath != null)
- platformConfigPath += String.valueOf(ch, start, length);
- break;
- }
- }
-
- private void addLaunchArgumentToMap(String key, String value) {
- if (launcherArgs == null)
- launcherArgs = new Properties();
-
- String oldValue = launcherArgs.getProperty(key);
- if (oldValue != null)
- launcherArgs.setProperty(key, oldValue + value);
- else
- launcherArgs.setProperty(key, value);
- }
-
- private void processPlugin(Attributes attributes) {
- String fragment = attributes.getValue("fragment"); //$NON-NLS-1$
- if (fragment != null && new Boolean(fragment).booleanValue()) {
- if (fragments == null)
- fragments = new ArrayList();
- fragments.add(attributes.getValue("id")); //$NON-NLS-1$
- } else {
- if (plugins == null)
- plugins = new ArrayList();
- plugins.add(attributes.getValue("id")); //$NON-NLS-1$
- }
- }
-
- private void processFeature(Attributes attributes) {
- if (features == null)
- features = new ArrayList();
- features.add(attributes.getValue("id")); //$NON-NLS-1$
- }
-
- private void processProduct(Attributes attributes) {
- id = attributes.getValue("id"); //$NON-NLS-1$
- uid = attributes.getValue("uid"); //$NON-NLS-1$
- productName = attributes.getValue("name"); //$NON-NLS-1$
- String use = attributes.getValue("useFeatures"); //$NON-NLS-1$
- if (use != null)
- useFeatures = Boolean.valueOf(use).booleanValue();
- version = attributes.getValue("version"); //$NON-NLS-1$
- }
-
- private void processConfigIni(Attributes attributes) {
- String path = null;
- if ("custom".equals(attributes.getValue("use"))) { //$NON-NLS-1$//$NON-NLS-2$
- path = attributes.getValue("path"); //$NON-NLS-1$
- }
- String os = attributes.getValue("os"); //$NON-NLS-1$
- if (os != null && os.length() > 0) {
- // TODO should we allow a platform-specific default to over-ride a custom generic path?
- if (path != null)
- platformSpecificConfigPaths.put(os, path);
- } else if (path != null) {
- // configPath = path;
- }
- }
-
- private void processConfigIniPlatform(String key, boolean begin) {
- if (begin) {
- configPlatform = key;
- platformConfigPath = ""; //$NON-NLS-1$
- } else if (configPlatform.equals(key) && platformConfigPath.length() > 0) {
- platformSpecificConfigPaths.put(key, platformConfigPath);
- platformConfigPath = null;
- }
- }
-
- private void processLauncher(Attributes attributes) {
- launcherName = attributes.getValue("name"); //$NON-NLS-1$
- }
-
- private boolean osMatch(String os) {
- if (os == currentOS)
- return true;
- if (os == null)
- return false;
- return os.equals(currentOS);
- }
-
- private void processSolaris(Attributes attributes) {
- if (!osMatch(OS_SOLARIS))
- return;
- result.add(attributes.getValue(SOLARIS_LARGE));
- result.add(attributes.getValue(SOLARIS_MEDIUM));
- result.add(attributes.getValue(SOLARIS_SMALL));
- result.add(attributes.getValue(SOLARIS_TINY));
- }
-
- private void processWin(Attributes attributes) {
- if (!osMatch(OS_WIN32))
- return;
- useIco = Boolean.valueOf(attributes.getValue(P_USE_ICO)).booleanValue();
- }
-
- private void processIco(Attributes attributes) {
- if (!osMatch(OS_WIN32) || !useIco)
- return;
- result.add(attributes.getValue("path")); //$NON-NLS-1$
- }
-
- private void processBmp(Attributes attributes) {
- if (!osMatch(OS_WIN32) || useIco)
- return;
- result.add(attributes.getValue(WIN32_16_HIGH));
- result.add(attributes.getValue(WIN32_16_LOW));
- result.add(attributes.getValue(WIN32_24_LOW));
- result.add(attributes.getValue(WIN32_32_HIGH));
- result.add(attributes.getValue(WIN32_32_LOW));
- result.add(attributes.getValue(WIN32_48_HIGH));
- result.add(attributes.getValue(WIN32_48_LOW));
- }
-
- private void processLinux(Attributes attributes) {
- if (!osMatch(OS_LINUX))
- return;
- result.add(attributes.getValue("icon")); //$NON-NLS-1$
- }
-
- private void processMac(Attributes attributes) {
- if (!osMatch(OS_MACOSX))
- return;
- result.add(attributes.getValue("icon")); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java
deleted file mode 100644
index 8acf12360..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.util.Map;
-
-/**
- * A category in an update site.
- *
- * Based on org.eclipse.update.core.model.CategoryModel.
- */
-public class SiteCategory {
-
- private String description;
- private String label;
- private String name;
- private Map localizations;
-
- /**
- * Creates an uninitialized model object.
- *
- * @since 2.0
- */
- public SiteCategory() {
- super();
- }
-
- /**
- * Compare two category models for equality.
- *
- * @see Object#equals(Object)
- * @since 2.0
- */
- public boolean equals(Object obj) {
- boolean result = false;
- if (obj instanceof SiteCategory) {
- SiteCategory otherCategory = (SiteCategory) obj;
- result = getName().equalsIgnoreCase(otherCategory.getName());
- }
- return result;
- }
-
- /**
- * Retrieve the detailed category description
- *
- * @return category description, or <code>null</code>.
- * @since 2.0
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Retrieve the non-localized displayable label for the category.
- *
- * @return non-localized displayable label, or <code>null</code>.
- * @since 2.0
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Gets the localizations for the site as a map from locale
- * to the set of translated properties for that locale.
- *
- * @return a map from locale to property set
- * @since 3.4
- */
- public Map getLocalizations() {
- return this.localizations;
- }
-
- /**
- * Retrieve the name of the category.
- *
- * @return category name, or <code>null</code>.
- * @since 2.0
- */
- public String getName() {
- return name;
- }
-
- /**
- * Compute hash code for category model.
- *
- * @see Object#hashCode()
- * @since 2.0
- */
- public int hashCode() {
- return getName().hashCode();
- }
-
- /**
- * Sets the category description.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param description category description
- * @since 2.0
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * Sets the category displayable label.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param label displayable label, or resource key
- * @since 2.0
- */
- public void setLabel(String label) {
- this.label = label;
- }
-
- /**
- * Sets the localizations for the site as a map from locale
- * to the set of translated properties for that locale.
- *
- * @param localizations as a map from locale to property set
- * @since 3.4
- */
- public void setLocalizations(Map localizations) {
- this.localizations = localizations;
- }
-
- /**
- * Sets the category name.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param name category name
- * @since 2.0
- */
- public void setName(String name) {
- this.name = name;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
deleted file mode 100644
index 589788197..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- * James D Miles (IBM Corp.) - bug 191783, NullPointerException in FeatureDownloader
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A reference to a feature in an update site.xml file.
- *
- * Based on org.eclipse.update.core.model.FeatureReferenceModel.
- */
-public class SiteFeature {
-
- // performance
- private URL base;
- private List /* of String*/categoryNames;
- private String featureId;
- private String featureVersion;
-
- private final boolean resolved = false;
- private URL url;
- private String urlString;
-
- /*
- * Compares two URL for equality
- * Return false if one of them is null
- */
- public static boolean sameURL(URL url1, URL url2) {
- if (url1 == url2)
- return true;
- if (url1 == null ^ url2 == null)
- return false;
-
- // check if URL are file: URL as we may
- // have 2 URL pointing to the same featureReference
- // but with different representation
- // (i.e. file:/C;/ and file:C:/)
- final boolean isFile1 = "file".equalsIgnoreCase(url1.getProtocol());//$NON-NLS-1$
- final boolean isFile2 = "file".equalsIgnoreCase(url2.getProtocol());//$NON-NLS-1$
- if (isFile1 && isFile2) {
- File file1 = new File(url1.getFile());
- File file2 = new File(url2.getFile());
- return file1.equals(file2);
- }
- // URL1 xor URL2 is a file, return false. (They either both need to be files, or neither)
- if (isFile1 ^ isFile2)
- return false;
- return getExternalForm(url1).equals(getExternalForm(url2));
- }
-
- /**
- * Gets the external form of this URL. In particular, it trims any white space,
- * removes a trailing slash and creates a lower case string.
- */
- private static String getExternalForm(URL url) {
- String externalForm = url.toExternalForm();
- if (externalForm == null)
- return ""; //$NON-NLS-1$
- externalForm = externalForm.trim();
- if (externalForm.endsWith("/")) { //$NON-NLS-1$
- // Remove the trailing slash
- externalForm = externalForm.substring(0, externalForm.length() - 1);
- }
- return externalForm.toLowerCase();
- }
-
- /**
- * Creates an uninitialized feature reference model object.
- */
- public SiteFeature() {
- super();
- }
-
- /**
- * Adds the name of a category this feature belongs to.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param categoryName category name
- */
- public void addCategoryName(String categoryName) {
- if (this.categoryNames == null)
- this.categoryNames = new ArrayList();
- if (!this.categoryNames.contains(categoryName))
- this.categoryNames.add(categoryName);
- }
-
- private void delayedResolve() {
-
- // PERF: delay resolution
- if (resolved)
- return;
-
- // resolve local elements
- try {
- url = new URL(base, urlString);
- } catch (MalformedURLException e) {
- // UpdateCore.warn("", e); //$NON-NLS-1$
- }
- }
-
- /**
- * Compares 2 feature reference models for equality
- *
- * @param object feature reference model to compare with
- * @return <code>true</code> if the two models are equal,
- * <code>false</code> otherwise
- */
- public boolean equals(Object object) {
- if (object == null)
- return false;
- if (!(object instanceof SiteFeature))
- return false;
- SiteFeature that = (SiteFeature) object;
- if (this.featureId == null) {
- if (that.featureId != null)
- return false;
- } else if (!this.featureId.equals(that.featureId))
- return false;
- if (this.featureVersion == null) {
- if (that.featureVersion != null)
- return false;
- } else if (!this.featureVersion.equals(that.featureVersion))
- return false;
- return sameURL(this.getURL(), that.getURL());
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + (featureId == null ? 0 : featureId.hashCode());
- result = prime * result + (featureVersion == null ? 0 : featureVersion.hashCode());
- if (this.getURL() == null)
- return result;
-
- if ("file".equalsIgnoreCase(getURL().getProtocol())) {//$NON-NLS-1$
- // If the URL is a file, then create the HashCode from the file
- File f = new File(getURL().getFile());
- if (f != null)
- result = prime * result + f.hashCode();
- } else
- // Otherwise create it from the External form of the URL (in lower case)
- result = prime * result + getExternalForm(this.getURL()).hashCode();
- return result;
- }
-
- /**
- * Returns the names of categories the referenced feature belongs to.
- *
- * @return an array of names, or an empty array.
- */
- public String[] getCategoryNames() {
- if (categoryNames == null)
- return new String[0];
-
- return (String[]) categoryNames.toArray(new String[0]);
- }
-
- /**
- * Returns the feature identifier as a string
- *
- * @return feature identifier
- */
- public String getFeatureIdentifier() {
- return featureId;
- }
-
- /**
- * Returns the feature version as a string
- *
- * @return feature version
- */
- public String getFeatureVersion() {
- return featureVersion;
- }
-
- /**
- * Returns the resolved URL for the feature reference.
- *
- * @return url string
- */
- public URL getURL() {
- delayedResolve();
- return url;
- }
-
- /**
- * Sets the feature identifier.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param featureId feature identifier
- */
- public void setFeatureIdentifier(String featureId) {
- this.featureId = featureId;
- }
-
- /**
- * Sets the feature version.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param featureVersion feature version
- */
- public void setFeatureVersion(String featureVersion) {
- this.featureVersion = featureVersion;
- }
-
- /**
- * Sets the unresolved URL for the feature reference.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param urlString unresolved URL string
- */
- public void setURLString(String urlString) {
- this.urlString = urlString;
- this.url = null;
- }
-
- /**
- * @see Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(getClass().toString() + " :"); //$NON-NLS-1$
- buffer.append(" at "); //$NON-NLS-1$
- if (url != null)
- buffer.append(url.toExternalForm());
- return buffer.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java
deleted file mode 100644
index 8b784ea3b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.URLEntry;
-
-/**
- * A model of an update site.
- *
- * Copied from org.eclipse.update.core.model.SiteModel.
- */
-public class SiteModel {
-
- private List /*of ArchiveReferenceModel*/archiveReferences;
- /**
- * Map of String (category id) -> SiteCategory
- */
- private Map categories;
- private URLEntry description;
- /**
- * Map of String (feature id) -> SiteFeature
- */
- private List features;
- private String mirrorsURLString;
- private URLEntry[] associateSites;
- private List messageKeys;
- private Map localizations;
-
- /**
- * Creates an uninitialized site model object.
- *
- * @since 2.0
- */
- public SiteModel() {
- super();
- }
-
- /**
- * Adds an archive reference model to site.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param archiveReference archive reference model
- * @since 2.0
- */
- public void addArchive(URLEntry archiveReference) {
- if (this.archiveReferences == null)
- this.archiveReferences = new ArrayList();
- if (!this.archiveReferences.contains(archiveReference))
- this.archiveReferences.add(archiveReference);
- }
-
- /**
- * Adds a category to the site.
- *
- * @param category category model
- */
- public void addCategory(SiteCategory category) {
- if (categories == null)
- categories = new HashMap();
- if (!categories.containsKey(category.getName())) {
- categories.put(category.getName(), category);
- if (localizations != null && !localizations.isEmpty())
- category.setLocalizations(localizations);
- }
- }
-
- /**
- * Adds a feature reference model to site.
- *
- * @param featureReference feature reference model
- */
- public void addFeature(SiteFeature featureReference) {
- if (this.features == null)
- this.features = new ArrayList();
- this.features.add(featureReference);
- }
-
- public URLEntry[] getAssociatedSites() {
- return associateSites;
- }
-
- /**
- * Returns the category with the given name.
- * @return the category with the given name, or <code>null</code>
- */
- public SiteCategory getCategory(String name) {
- return (SiteCategory) (categories == null ? null : categories.get(name));
- }
-
- /**
- * Returns the site description.
- *
- * @return site description, or <code>null</code>.
- */
- public URLEntry getDescription() {
- return description;
- }
-
- /**
- * Returns an array of feature reference models on this site.
- *
- * @return an array of feature reference models, or an empty array.
- */
- public SiteFeature[] getFeatures() {
- if (features == null || features.size() == 0)
- return new SiteFeature[0];
- return (SiteFeature[]) features.toArray(new SiteFeature[0]);
- }
-
- /**
- * Return the keys for translatable strings
- *
- * @return the list of keys for translatable strings; may be null
- * @since 3.4
- */
- public List getMessageKeys() {
- return messageKeys;
- }
-
- /**
- * Returns the URL from which the list of mirrors of this site can be retrieved.
- *
- * @since org.eclipse.equinox.p2.metadata.generator 1.0
- */
- public String getMirrorsURL() {
- return mirrorsURLString;
- }
-
- /**
- * Sets the site description.
- *
- * @param description site description
- * @since 2.0
- */
- public void setDescription(URLEntry description) {
- this.description = description;
- }
-
- /**
- * Sets the localizations for the site as a map from locale
- * to the set of translated properties for that locale.
- *
- * @param localizations as a map from locale to property set
- * @since 3.4
- */
- public void setLocalizations(Map localizations) {
- this.localizations = localizations;
- if (localizations != null && !localizations.isEmpty() && //
- categories != null && !categories.isEmpty()) {
- for (Iterator catIter = categories.entrySet().iterator(); catIter.hasNext();) {
- Map.Entry entry = (Map.Entry) catIter.next();
- SiteCategory category = (SiteCategory) entry.getValue();
- category.setLocalizations(localizations);
- }
- }
- }
-
- /**
- * Sets keys for translatable strings
- *
- * @param keys for translatable strings
- * @since 3.4
- */
- public void setMessageKeys(List keys) {
- this.messageKeys = keys;
- }
-
- /**
- * Sets the mirrors url. Mirror sites will then be obtained from this mirror url later.
- * This method is complementary to setMirrorsiteEntryModels(), and only one of these
- * methods should be called.
- *
- * @param mirrorsURL additional update site mirrors
- * @since 3.1
- */
- public void setMirrorsURLString(String mirrorsURL) {
- this.mirrorsURLString = mirrorsURL;
- }
-
- /**
- * Sets the associated sites for this update site.
- *
- * @param associateSites the associated sites
- */
- public void setAssociateSites(URLEntry[] associateSites) {
- this.associateSites = associateSites;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties
deleted file mode 100644
index 78bd8ff21..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2008 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
-###############################################################################
-# Install Update Core Properties File
-#
-
-DefaultFeatureParser_IdOrVersionInvalid= Error parsing feature stream. The unique identifier or the version is null or empty for the State: \"{2}\": unique identifier=\"{0}\" version=\"{1}\".
-DefaultSiteParser_NoSiteTag= Error parsing site stream. Unable to find root element \"site\" in the stream.
-DefaultSiteParser_WrongParsingStack= Internal Error parsing site stream. Unexpected Parsing Stack: \"{0}\"
-DefaultSiteParser_UnknownElement= Error parsing site stream. Unknown element \"{0}\" in parsing state \"{1}\". Check the validity of the XML file.
-DefaultSiteParser_UnknownStartState= Internal Error parsing site stream. Unknown start state \"{0}\".
-DefaultSiteParser_Missing= Error parsing site stream. The \"{0}\" tag of the element \"{1}\" is null or empty. Value is required.
-DefaultSiteParser_ParsingStackBackToInitialState= Internal Error parsing site stream. Parsing stack back to Initial State.
-DefaultSiteParser_ElementAlreadySet= Error parsing site stream. Element: \"{0}\" already set for the Site.
-DefaultSiteParser_UnknownEndState= Internal Error parsing site stream. Unknown end state \"{0}\".
-DefaultSiteParser_ErrorParsing= Error Parsing site stream. Error: \"{0}\"
-DefaultSiteParser_ErrorlineColumnMessage= Error Parsing site stream. Element \"{0}\" line: \"{1}\" column:\"{2}\". Error: \"{3}\".
-DefaultSiteParser_ErrorParsingSite= Error Parsing site stream.
-DefaultSiteParser_UnknownState= Unknown State \"{0}\".
-DefaultSiteParser_InvalidXMLStream= The XML stream is not a valid default \"site.xml\" file. The root tag is not site.
-DefaultSiteParser_mirrors = Error processing update site mirror.
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties
deleted file mode 100644
index 348bc1ed8..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2008 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
-###############################################################################
-exception_errorConverting = An error occurred while generating manifest for {0}.
-exception_errorParsingUpdateSite = Error parsing update site: {0}.
-exception_stateAddition = An error has occurred while adding the bundle {0}.
-exception_sourceDirectoryInvalid = Source directory is invalid: {0}.
-exception_artifactRepoNotWritable = Artifact repository is not writable: {0}.
-exception_artifactRepoNotSpecified = An artifact repository was not specified.
-exception_metadataRepoNotWritable = Metadata repository not writable: {0}.
-exception_metadataRepoNotSpecified = A metadata repository location was not specified.
-exception_baseLocationNotSpecified = Eclipse base location not specified.
-exception_artifactRepoNoAppendDestroysInput = Not appending to artifact repository ({0}) will destroy input files.
-message_generatingMetadata = Generating metadata for {0}.
-message_generationCompleted = Generation completed with success [{0} seconds].
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java
deleted file mode 100644
index 218c6fe6e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/BundleDescriptionFactory.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.*;
-import java.util.*;
-import java.util.jar.JarFile;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
-import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
-import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
-import org.eclipse.osgi.service.pluginconversion.PluginConverter;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.ManifestElement;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleException;
-
-/**
- * @deprecated All of the function here has moved to BundlesAction static methods
- */
-public class BundleDescriptionFactory {
- static final String DIR = "dir"; //$NON-NLS-1$
- static final String JAR = "jar"; //$NON-NLS-1$
- private static final String FEATURE_FILENAME_DESCRIPTOR = "feature.xml"; //$NON-NLS-1$
- private static final String PLUGIN_FILENAME_DESCRIPTOR = "plugin.xml"; //$NON-NLS-1$
- private static final String FRAGMENT_FILENAME_DESCRIPTOR = "fragment.xml"; //$NON-NLS-1$
-
- static String BUNDLE_FILE_KEY = "eclipse.p2.bundle.format"; //$NON-NLS-1$
-
- // static final String DEFAULT_BUNDLE_LOCALIZATION = "plugin"; //$NON-NLS-1$
- // static final String PROPERTIES_FILE_EXTENSION = ".properties"; //$NON-NLS-1$
- // static final String MANIFEST_LOCALIZATIONS = "eclipse.p2.manifest.localizations"; //$NON-NLS-1$
- //
- // static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
- // static final Locale PSEUDO_LOCALE = new Locale("zz", "ZZ"); //$NON-NLS-1$//$NON-NLS-2$
-
- StateObjectFactory factory;
- State state;
-
- public BundleDescriptionFactory(StateObjectFactory factory, State state) {
- this.factory = factory;
- this.state = state;
- //TODO find a state and a factory when not provided
- }
-
- private PluginConverter acquirePluginConverter() {
- return (PluginConverter) ServiceHelper.getService(Activator.getContext(), PluginConverter.class.getName());
- }
-
- private Dictionary convertPluginManifest(File bundleLocation, boolean logConversionException) {
- PluginConverter converter;
- try {
- converter = acquirePluginConverter();
- if (converter == null) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to aquire PluginConverter service during generation for: " + bundleLocation));
- return null;
- }
- return converter.convertManifest(bundleLocation, false, null, true, null);
- } catch (PluginConversionException convertException) {
- // only log the exception if we had a plugin.xml or fragment.xml and we failed conversion
- if (bundleLocation.getName().equals(FEATURE_FILENAME_DESCRIPTOR))
- return null;
- if (!new File(bundleLocation, PLUGIN_FILENAME_DESCRIPTOR).exists() && !new File(bundleLocation, FRAGMENT_FILENAME_DESCRIPTOR).exists())
- return null;
- if (logConversionException) {
- IStatus status = new Status(IStatus.WARNING, Activator.ID, 0, NLS.bind(Messages.exception_errorConverting, bundleLocation.getAbsolutePath()), convertException);
- LogHelper.log(status);
- }
- return null;
- }
- }
-
- public BundleDescription getBundleDescription(Dictionary enhancedManifest, File bundleLocation) {
- try {
- BundleDescription descriptor = factory.createBundleDescription(state, enhancedManifest, bundleLocation != null ? bundleLocation.getAbsolutePath() : null, 1); //TODO Do we need to have a real bundle id
- descriptor.setUserObject(enhancedManifest);
- return descriptor;
- } catch (BundleException e) {
- String message = NLS.bind(Messages.exception_stateAddition, bundleLocation == null ? null : bundleLocation.getAbsoluteFile());
- IStatus status = new Status(IStatus.WARNING, Activator.ID, message, e);
- LogHelper.log(status);
- return null;
- }
- }
-
- public BundleDescription getBundleDescription(File bundleLocation) {
- Dictionary manifest = loadManifest(bundleLocation);
- if (manifest == null)
- return null;
- return getBundleDescription(manifest, bundleLocation);
- }
-
- public BundleDescription getBundleDescription(InputStream manifestStream, File bundleLocation) {
- Hashtable entries = new Hashtable();
- try {
- ManifestElement.parseBundleManifest(manifestStream, entries);
- return getBundleDescription(entries, bundleLocation);
- } catch (IOException e) {
- String message = "An error occurred while reading the bundle description " + (bundleLocation == null ? "" : bundleLocation.getAbsolutePath() + '.'); //$NON-NLS-1$ //$NON-NLS-2$
- IStatus status = new Status(IStatus.ERROR, Activator.ID, message, e);
- LogHelper.log(status);
- } catch (BundleException e) {
- String message = "An error occurred while reading the bundle description " + (bundleLocation == null ? "" : bundleLocation.getAbsolutePath() + '.'); //$NON-NLS-1$ //$NON-NLS-2$
- IStatus status = new Status(IStatus.ERROR, Activator.ID, message, e);
- LogHelper.log(status);
- }
- return null;
- }
-
- public Dictionary loadManifest(File bundleLocation) {
- InputStream manifestStream = null;
- ZipFile jarFile = null;
- try {
- if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && bundleLocation.isFile()) { //$NON-NLS-1$
- jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
- ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
- if (manifestEntry != null) {
- manifestStream = jarFile.getInputStream(manifestEntry);
- }
- } else {
- File manifestFile = new File(bundleLocation, JarFile.MANIFEST_NAME);
- if (manifestFile.exists())
- manifestStream = new BufferedInputStream(new FileInputStream(manifestFile));
- }
- } catch (IOException e) {
- //ignore but log
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "An error occurred while loading the bundle manifest " + bundleLocation, e)); //$NON-NLS-1$
- }
-
- Dictionary manifest = null;
- if (manifestStream != null) {
- try {
- Map manifestMap = ManifestElement.parseBundleManifest(manifestStream, null);
- // TODO temporary hack. We are reading a Map but everyone wants a Dictionary so convert.
- // real answer is to have people expect a Map but that is a wider change.
- manifest = new Hashtable(manifestMap);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "An error occurred while loading the bundle manifest " + bundleLocation, e)); //$NON-NLS-1$
- return null;
- } catch (BundleException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "An error occurred while loading the bundle manifest " + bundleLocation, e)); //$NON-NLS-1$
- return null;
- } finally {
- try {
- if (jarFile != null)
- jarFile.close();
- } catch (IOException e2) {
- //Ignore
- }
- }
- } else {
- manifest = convertPluginManifest(bundleLocation, true);
- }
-
- if (manifest == null)
- return null;
-
- //Deal with the pre-3.0 plug-in shape who have a default jar manifest.mf
- if (manifest.get(org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME) == null)
- manifest = convertPluginManifest(bundleLocation, true);
-
- if (manifest == null)
- return null;
-
- manifest.put(BUNDLE_FILE_KEY, bundleLocation.isDirectory() ? DIR : JAR);
- return manifest;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
deleted file mode 100644
index 12a891c55..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
+++ /dev/null
@@ -1,538 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.*;
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
-import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * @deprecated The function in this class has been refactored into more focused locations
- * such as IPublisherAction and IPublishingAdvice classes. See the individual method deprecations
- * for more information on where the code has moved.
- */
-public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
- private final static String FILTER_OBJECTCLASS = "(" + Constants.OBJECTCLASS + "=" + FrameworkAdmin.class.getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- private final static String filterFwName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_NAME + "=Equinox)"; //$NON-NLS-1$ //$NON-NLS-2$
- //String filterFwVersion = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_VERSION + "=" + props.getProperty("equinox.fw.version") + ")";
- private final static String filterLauncherName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_NAME + "=Eclipse.exe)"; //$NON-NLS-1$ //$NON-NLS-2$
- //String filterLauncherVersion = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_VERSION + "=" + props.getProperty("equinox.launcher.version") + ")";
- private final static String frameworkAdminFillter = "(&" + FILTER_OBJECTCLASS + filterFwName + filterLauncherName + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_EQUINOX_P2_RECONCILER_DROPINS = "org.eclipse.equinox.p2.reconciler.dropins"; //$NON-NLS-1$
-
- private String os;
-
- /**
- * Returns a default name for the executable.
- * @param providedOS The operating system to return the executable for. If null,
- * the operating system is determined from the current runtime environment.
- */
- public static String getDefaultExecutableName(String providedOS) {
- String theOS = providedOS;
- if (theOS == null) {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- theOS = info.getOS();
- }
- if (theOS.equalsIgnoreCase("win32")) //$NON-NLS-1$
- return "eclipse.exe"; //$NON-NLS-1$
- if (theOS.equalsIgnoreCase("macosx")) //$NON-NLS-1$
- return "Eclipse.app"; //$NON-NLS-1$
- //FIXME Is this a reasonable default for all non-Windows platforms?
- return "eclipse"; //$NON-NLS-1$
- }
-
- private boolean addDefaultIUs = true;
-
- private boolean append = false;
- private IArtifactRepository artifactRepository;
- private File baseLocation;
- private File[] bundleLocations;
- private File configLocation;
- private ArrayList defaultIUs;
- private List otherIUs;
- private File executableLocation;
- private File featuresLocation;
- private String flavor;
- private ServiceTracker frameworkAdminTracker;
- private Manipulator manipulator;
- private IMetadataRepository metadataRepository;
- private boolean publishArtifactRepo = false;
- private boolean publishArtifacts = false;
- private String rootId;
- private String rootVersion;
- private String productFile = null;
- private String launcherConfig;
- private String versionAdvice;
-
- private URI siteLocation;
-
- private boolean reuseExistingPack200Files = false;
-
- public EclipseInstallGeneratorInfoProvider() {
- super();
- }
-
- public boolean addDefaultIUs() {
- return addDefaultIUs;
- }
-
- public boolean append() {
- return append;
- }
-
- /**
- * @deprecated moved to DefaultCUsAction
- */
- protected GeneratorBundleInfo createDefaultConfigurationBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName("defaultConfigure"); //$NON-NLS-1$
- result.setVersion("1.0.0"); //$NON-NLS-1$
- result.setStartLevel(4);
- // These should just be in the install section now
- // result.setSpecialConfigCommands("installBundle(bundle:${artifact});");
- return result;
- }
-
- /**
- * @deprecated moved to DefaultCUsAction
- */
- protected GeneratorBundleInfo createDefaultUnconfigurationBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName("defaultUnconfigure"); //$NON-NLS-1$
- result.setVersion("1.0.0"); //$NON-NLS-1$
- // These should just be in the uninstall section now
- // result.setSpecialConfigCommands("uninstallBundle(bundle:${artifact});");
- return result;
- }
-
- /**
- * Obtains the framework manipulator instance. Throws an exception
- * if it could not be created.
- * @deprecated see DataLoader
- */
- private void createFrameworkManipulator() {
- FrameworkAdmin admin = getFrameworkAdmin();
- if (admin == null)
- throw new RuntimeException("Framework admin service not found"); //$NON-NLS-1$
- manipulator = admin.getManipulator();
- if (manipulator == null)
- throw new RuntimeException("Framework manipulator not found"); //$NON-NLS-1$
- }
-
- /**
- * @deprecated moved to EquinoxLauncherData
- */
- public static GeneratorBundleInfo createLauncher() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName("org.eclipse.equinox.launcher"); //$NON-NLS-1$
- result.setVersion("0.0.0"); //$NON-NLS-1$
- //result.setSpecialConfigCommands("manipulator.addProgramArgument('-startup'); manipulator.addProgramArgument(artifact);");
- result.setSpecialConfigCommands("addProgramArg(programArg:-startup);addProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- result.setSpecialUnconfigCommands("removeProgramArg(programArg:-startup);removeProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- return result;
- }
-
- /**
- * @deprecated moved to EquinoxLauncherCUAction
- */
- private Collection createLauncherBundleInfo(Set ius) {
- Collection result = new HashSet();
- Collection launchers = getIUs(ius, "org.eclipse.equinox.launcher."); //$NON-NLS-1$
- if (launchers.size() > 0) {
- for (Iterator iterator = launchers.iterator(); iterator.hasNext();) {
- IInstallableUnit object = (IInstallableUnit) iterator.next();
- if (object.getId().endsWith(".source")) //$NON-NLS-1$
- continue;
- GeneratorBundleInfo temp = new GeneratorBundleInfo();
- temp.setSymbolicName(object.getId());
- temp.setVersion(object.getVersion().toString());
- temp.setSpecialConfigCommands("addProgramArg(programArg:--launcher.library);addProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- temp.setSpecialUnconfigCommands("removeProgramArg(programArg:--launcher.library);removeProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- result.add(temp);
- }
- } else if (launcherConfig != null) {
- String[] config = Generator.parseConfigSpec(launcherConfig);
- //we want ws.os.arch
- GeneratorBundleInfo temp = new GeneratorBundleInfo();
- temp.setSymbolicName("org.eclipse.equinox.launcher." + config[1] + '.' + config[0] + '.' + config[2]); //$NON-NLS-1$
- temp.setSpecialConfigCommands("addProgramArg(programArg:--launcher.library);addProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- temp.setSpecialUnconfigCommands("removeProgramArg(programArg:--launcher.library);removeProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- result.add(temp);
- }
- return result;
- }
-
- /**
- * @deprecated moved to EclipseInstallAction (perhaps it will be somewhere more general...)
- */
- private GeneratorBundleInfo createSimpleConfiguratorBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR);
- result.setVersion("0.0.0"); //$NON-NLS-1$
- result.setStartLevel(1);
- result.setMarkedAsStarted(true);
- return result;
- }
-
- /**
- * @deprecated moved to EclipseInstallAction (perhaps it will be somewhere more general...)
- */
- private GeneratorBundleInfo createDropinsReconcilerBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName(ORG_ECLIPSE_EQUINOX_P2_RECONCILER_DROPINS);
- result.setVersion("0.0.0"); //$NON-NLS-1$
- result.setMarkedAsStarted(true);
- result.setSpecialConfigCommands("mkdir(path:${installFolder}/dropins)"); //$NON-NLS-1$
- return result;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private void expandBundleLocations() {
- if (bundleLocations == null) {
- bundleLocations = new File[] {};
- return;
- }
- ArrayList result = new ArrayList();
- for (int i = 0; i < bundleLocations.length; i++) {
- File location = bundleLocations[i];
- if (location.isDirectory()) {
- File[] list = location.listFiles();
- for (int j = 0; j < list.length; j++)
- result.add(list[j]);
- } else {
- result.add(location);
- }
- }
- bundleLocations = (File[]) result.toArray(new File[result.size()]);
- }
-
- public IArtifactRepository getArtifactRepository() {
- return artifactRepository;
- }
-
- public File getBaseLocation() {
- return baseLocation;
- }
-
- public File[] getBundleLocations() {
- return bundleLocations;
- }
-
- public ConfigData getConfigData() {
- return manipulator == null ? null : manipulator.getConfigData();
- }
-
- /**
- * @deprecated moved to DataLoader
- */
- public ConfigData loadConfigData(File location) {
- if (manipulator == null)
- return null;
-
- EquinoxFwConfigFileParser parser = new EquinoxFwConfigFileParser(Activator.getContext());
- try {
- parser.readFwConfig(manipulator, location);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
-
- ConfigData data = manipulator.getConfigData();
- String value = data.getProperty(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL);
- if (value != null) {
- try {
- //config.ini uses simpleconfigurator, read the bundles.info and replace the bundle infos
- SimpleConfiguratorManipulator simpleManipulator = (SimpleConfiguratorManipulator) ServiceHelper.getService(Activator.getContext(), SimpleConfiguratorManipulator.class.getName());
- BundleInfo[] bundleInfos = simpleManipulator.loadConfiguration(new URL(value).openStream(), null);
- data.setBundles(bundleInfos);
- } catch (MalformedURLException e1) {
- // ignore
- } catch (IOException e1) {
- // ignore
- }
-
- try {
- data.setProperty(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL, EquinoxManipulatorImpl.makeRelative(value, configLocation.toURL()));
- } catch (MalformedURLException e) {
- //ignore
- }
- }
-
- return data;
- }
-
- /**
- * @deprecated logic moved to EclipseInstallAction (and related actions)
- */
- public ArrayList getDefaultIUs(Set ius) {
- if (defaultIUs != null)
- return defaultIUs;
- defaultIUs = new ArrayList(5);
- if (addDefaultIUs) {
- defaultIUs.addAll(createLauncherBundleInfo(ius));
- defaultIUs.add(createLauncher());
- defaultIUs.add(createSimpleConfiguratorBundleInfo());
- defaultIUs.add(createDropinsReconcilerBundleInfo());
- // defaultIUs.add(createDefaultConfigurationBundleInfo());
- // defaultIUs.add(createDefaultUnconfigurationBundleInfo());
- }
- return defaultIUs;
- }
-
- // TODO: This is kind of ugly. It's purpose is to allow us to craft CUs that we know about and need for our build
- // We should try to replace this with something more generic prior to release
- /**
- * @deprecated this has been replaced with RootIUAdvice and related things
- */
- public Collection getOtherIUs() {
- if (otherIUs != null)
- return otherIUs;
- otherIUs = new ArrayList();
- otherIUs.add(createDropinsReconcilerBundleInfo());
- return otherIUs;
- }
-
- public File getExecutableLocation() {
- return executableLocation;
- }
-
- public File getFeaturesLocation() {
- return featuresLocation;
- }
-
- public String getFlavor() {
- //use 'tooling' as default flavor since we are not actively using flavors yet
- return flavor == null ? "tooling" : flavor; //$NON-NLS-1$
- }
-
- /**
- * @deprecated moved to DataLoader
- */
- private FrameworkAdmin getFrameworkAdmin() {
- if (frameworkAdminTracker == null) {
- try {
- Filter filter = Activator.getContext().createFilter(frameworkAdminFillter);
- frameworkAdminTracker = new ServiceTracker(Activator.getContext(), filter, null);
- frameworkAdminTracker.open();
- } catch (InvalidSyntaxException e) {
- // never happens
- e.printStackTrace();
- }
- }
-
- return (FrameworkAdmin) frameworkAdminTracker.getService();
- }
-
- private Collection getIUs(Set ius, String prefix) {
- Set result = new HashSet();
- for (Iterator iterator = ius.iterator(); iterator.hasNext();) {
- IInstallableUnit tmp = (IInstallableUnit) iterator.next();
- if (tmp.getId().startsWith(prefix))
- result.add(tmp);
- }
- return result;
- }
-
- public File getJRELocation() {
- //assume JRE is relative to install location
- if (executableLocation == null)
- return null;
- return new File(executableLocation.getParentFile(), "jre"); //$NON-NLS-1$
- }
-
- public String getLauncherConfig() {
- return launcherConfig;
- }
-
- public LauncherData getLauncherData() {
- return manipulator == null ? null : manipulator.getLauncherData();
- }
-
- public IMetadataRepository getMetadataRepository() {
- return metadataRepository;
- }
-
- public String getRootId() {
- return rootId;
- }
-
- public String getRootVersion() {
- if (rootVersion == null || rootVersion.length() == 0)
- return "0.0.0"; //$NON-NLS-1$
- return rootVersion;
- }
-
- public String getProductFile() {
- return productFile;
- }
-
- public URI getSiteLocation() {
- return siteLocation;
- }
-
- public void initialize(File base) {
- // if the various locations are set in self, use them. Otherwise compute defaults
- File[] bundles = bundleLocations == null ? new File[] {new File(base, "plugins")} : bundleLocations; //$NON-NLS-1$
- File features = featuresLocation == null ? new File(base, "features") : featuresLocation; //$NON-NLS-1$
- File executable = executableLocation == null ? new File(base, getDefaultExecutableName(os)) : executableLocation;
- File configuration = configLocation == null ? new File(base, "configuration") : configLocation; //$NON-NLS-1$
-
- initialize(base, configuration, executable, bundles, features);
- }
-
- public void initialize(File base, File config, File executable, File[] bundles, File features) {
- if (base == null || !base.exists())
- throw new RuntimeException(NLS.bind(Messages.exception_sourceDirectoryInvalid, base == null ? "null" : base.getAbsolutePath())); //$NON-NLS-1$
- this.baseLocation = base;
- if (config == null || config.exists())
- this.configLocation = config;
- if (executable == null || executable.exists())
- this.executableLocation = executable;
- if (bundles != null)
- bundleLocations = bundles;
- if (features != null)
- featuresLocation = features;
- expandBundleLocations();
-
- // if the config or exe are not set then we cannot be generating any data related to the config so
- // don't bother setting up the manipulator. In fact, the manipulator will likely be invalid without
- // these locations.
- if (configLocation == null || executableLocation == null)
- return;
-
- createFrameworkManipulator();
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwPersistentDataLocation(configLocation, true);
- launcherData.setLauncher(executableLocation);
- try {
- manipulator.load();
- } catch (IllegalStateException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- } catch (FrameworkAdminRuntimeException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- } catch (IOException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- }
- }
-
- public boolean publishArtifactRepository() {
- return publishArtifactRepo;
- }
-
- public boolean publishArtifacts() {
- return publishArtifacts;
- }
-
- public boolean reuseExistingPack200Files() {
- return reuseExistingPack200Files;
- }
-
- public void reuseExistingPack200Files(boolean publishPack) {
- reuseExistingPack200Files = publishPack;
- }
-
- public void setAddDefaultIUs(boolean value) {
- addDefaultIUs = value;
- }
-
- public void setAppend(boolean value) {
- append = value;
- }
-
- public void setArtifactRepository(IArtifactRepository value) {
- artifactRepository = value;
- }
-
- public void setExecutableLocation(String value) {
- executableLocation = new File(value);
- }
-
- public void setFlavor(String value) {
- flavor = value;
- }
-
- public void setLauncherConfig(String value) {
- launcherConfig = value;
- }
-
- public void setMappingRules(String[][] value) {
- }
-
- public void setMetadataRepository(IMetadataRepository value) {
- metadataRepository = value;
- }
-
- public void setOS(String os) {
- this.os = os;
- }
-
- public void setPublishArtifactRepository(boolean value) {
- publishArtifactRepo = value;
- }
-
- public void setPublishArtifacts(boolean value) {
- publishArtifacts = value;
- }
-
- public void setRootId(String value) {
- rootId = value;
- }
-
- public void setRootVersion(String value) {
- rootVersion = value;
- }
-
- public void setProductFile(String file) {
- productFile = file;
- }
-
- /**
- * Sets the location of site.xml if applicable.
- */
- public void setSiteLocation(URI location) {
- this.siteLocation = location;
- }
-
- public String getVersionAdvice() {
- return versionAdvice;
- }
-
- public void setVersionAdvice(String advice) {
- this.versionAdvice = advice;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java
deleted file mode 100644
index e27ff87dd..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.util.ArrayList;
-import java.util.Map;
-
-/**
- *
- * Feature information
- */
-public class Feature {
-
- private final String id;
- private final String version;
- private String label;
- private String pluginId;
- private boolean primary = false;
- private boolean exclusive = false;
- private String application;
-
- private URLEntry description;
- private URLEntry license;
- private URLEntry copyright;
-
- private String installHandler;
- private String installHandlerURL;
- private String installHandlerLibrary;
-
- private URLEntry updateSite;
- private ArrayList discoverySites;
-
- private ArrayList entries;
- private String providerName;
-
- private String location;
-
- private Map localizations;
-
- public Feature(String id, String version) {
- if (id == null)
- throw new IllegalArgumentException();
- this.id = id;
- this.version = version;
- }
-
- public void addDiscoverySite(String siteLabel, String url) {
- if (siteLabel == null && url == null)
- return;
-
- if (this.discoverySites == null)
- this.discoverySites = new ArrayList();
-
- URLEntry entry = new URLEntry(url, siteLabel);
- this.discoverySites.add(entry);
- }
-
- public void addEntry(FeatureEntry plugin) {
- if (entries == null)
- entries = new ArrayList();
- entries.add(plugin);
- }
-
- public String getApplication() {
- return application;
- }
-
- public String getCopyright() {
- if (copyright != null)
- return copyright.getAnnotation();
- return null;
- }
-
- public String getCopyrightURL() {
- if (copyright != null)
- return copyright.getURL();
- return null;
- }
-
- public String getDescription() {
- if (description != null)
- return description.getAnnotation();
- return null;
- }
-
- public String getDescriptionURL() {
- if (description != null)
- return description.getURL();
- return null;
- }
-
- public URLEntry[] getDiscoverySites() {
- if (discoverySites == null)
- return new URLEntry[0];
- return (URLEntry[]) discoverySites.toArray(new URLEntry[discoverySites.size()]);
- }
-
- public FeatureEntry[] getEntries() {
- if (entries == null)
- return new FeatureEntry[0];
- return (FeatureEntry[]) entries.toArray(new FeatureEntry[entries.size()]);
- }
-
- public String getId() {
- return id;
- }
-
- public String getInstallHandler() {
- return installHandler;
- }
-
- public String getInstallHandlerLibrary() {
- return installHandlerLibrary;
- }
-
- public String getInstallHandlerURL() {
- return installHandlerURL;
- }
-
- public String getLabel() {
- return label;
- }
-
- public String getLicense() {
- if (license != null)
- return license.getAnnotation();
- return null;
- }
-
- public String getLicenseURL() {
- if (license != null)
- return license.getURL();
- return null;
- }
-
- public Map getLocalizations() {
- return this.localizations;
- }
-
- public String getLocation() {
- return this.location;
- }
-
- public String getPlugin() {
- return pluginId;
- }
-
- public String getProviderName() {
- return providerName;
- }
-
- public URLEntry getUpdateSite() {
- return updateSite;
- }
-
- public String getVersion() {
- return version;
- }
-
- public boolean isExclusive() {
- return exclusive;
- }
-
- public boolean isPrimary() {
- return primary;
- }
-
- public void setApplication(String application) {
- this.application = application;
- }
-
- public void setCopyright(String copyright) {
- if (this.copyright == null)
- this.copyright = new URLEntry();
- this.copyright.setAnnotation(copyright);
- }
-
- public void setCopyrightURL(String copyrightURL) {
- if (this.copyright == null)
- this.copyright = new URLEntry();
- this.copyright.setURL(copyrightURL);
- }
-
- public void setDescription(String description) {
- if (this.description == null)
- this.description = new URLEntry();
- this.description.setAnnotation(description);
- }
-
- public void setDescriptionURL(String descriptionURL) {
- if (this.description == null)
- this.description = new URLEntry();
- this.description.setURL(descriptionURL);
- }
-
- public void setExclusive(boolean exclusive) {
- this.exclusive = exclusive;
- }
-
- public void setInstallHandler(String installHandler) {
- this.installHandler = installHandler;
- }
-
- public void setInstallHandlerLibrary(String installHandlerLibrary) {
- this.installHandlerLibrary = installHandlerLibrary;
- }
-
- public void setInstallHandlerURL(String installHandlerURL) {
- this.installHandlerURL = installHandlerURL;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public void setLicense(String license) {
- if (this.license == null)
- this.license = new URLEntry();
- this.license.setAnnotation(license);
- }
-
- public void setLicenseURL(String licenseURL) {
- if (this.license == null)
- this.license = new URLEntry();
- this.license.setURL(licenseURL);
- }
-
- public void setLocalizations(Map localizations) {
- this.localizations = localizations;
- }
-
- public void setLocation(String location) {
- this.location = location;
- }
-
- public void setPlugin(String pluginId) {
- this.pluginId = pluginId;
- }
-
- public void setPrimary(boolean primary) {
- this.primary = primary;
- }
-
- public void setProviderName(String value) {
- providerName = value;
- }
-
- public void setUpdateSiteLabel(String updateSiteLabel) {
- if (this.updateSite == null)
- this.updateSite = new URLEntry();
- this.updateSite.setAnnotation(updateSiteLabel);
- }
-
- public void setUpdateSiteURL(String updateSiteURL) {
- if (this.updateSite == null)
- this.updateSite = new URLEntry();
- this.updateSite.setURL(updateSiteURL);
- }
-
- public void setURL(String value) {
- //
- }
-
- /**
- * For debugging purposes only.
- */
- public String toString() {
- return "Feature " + id + " version: " + version; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
deleted file mode 100644
index 870a3b6f2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- */
-public class FeatureEntry {
- private final String id;
- private final String version;
- private String os;
- private String ws;
- private String arch;
- private String nl;
- private String match;
- private final boolean isPlugin;
- private boolean isFragment = false;
- private boolean isRequires = false;
- private boolean unpack = true;
- private boolean optional = false;
- private boolean isPatch = false;
-
- /**
- * Temporary field to add provisioning filters to features
- */
- private String filter;
-
- public static FeatureEntry createRequires(String id, String version, String match, String filter, boolean isPlugin) {
- FeatureEntry result = new FeatureEntry(id, version, isPlugin);
- result.match = match;
- result.isRequires = true;
- if (filter != null)
- result.setFilter(filter);
- return result;
- }
-
- public FeatureEntry(String id, String version, boolean isPlugin) {
- this.id = id;
- this.version = Version.parseVersion(version).toString();
- this.isPlugin = isPlugin;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final FeatureEntry other = (FeatureEntry) obj;
- if (id == null) {
- if (other.id != null)
- return false;
- } else if (!id.equals(other.id))
- return false;
- if (version == null) {
- if (other.version != null)
- return false;
- } else if (!version.equals(other.version))
- return false;
- return true;
- }
-
- public String getArch() {
- return arch;
- }
-
- /**
- * Temporary method to add provisioning filters to features
- */
- public String getFilter() {
- return filter;
- }
-
- public String getId() {
- return id;
- }
-
- public String getMatch() {
- return match;
- }
-
- public String getNL() {
- return nl;
- }
-
- public String getOS() {
- return os;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getWS() {
- return ws;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
- }
-
- public boolean isFragment() {
- return isFragment;
- }
-
- public boolean isOptional() {
- return optional;
- }
-
- public boolean isPlugin() {
- return isPlugin;
- }
-
- public boolean isRequires() {
- return isRequires;
- }
-
- public boolean isUnpack() {
- return unpack;
- }
-
- public void setEnvironment(String os, String ws, String arch, String nl) {
- this.os = os;
- this.ws = ws;
- this.arch = arch;
- this.nl = nl;
- }
-
- /**
- * Temporary method to add provisioning filters to features
- */
- public void setFilter(String filter) {
- this.filter = filter;
-
- }
-
- public void setFragment(boolean value) {
- isFragment = value;
- }
-
- public void setOptional(boolean value) {
- optional = value;
- }
-
- public void setUnpack(boolean value) {
- unpack = value;
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
-
- result.append(isPlugin ? "Plugin: " : "Feature: "); //$NON-NLS-1$ //$NON-NLS-2$
- result.append(id != null ? id.toString() : ""); //$NON-NLS-1$
- result.append(version != null ? " " + version.toString() : ""); //$NON-NLS-1$ //$NON-NLS-2$
- return result.toString();
- }
-
- public boolean isPatch() {
- return isPatch;
- }
-
- public void setPatch(boolean patch) {
- this.isPatch = patch;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
deleted file mode 100644
index f40635685..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
+++ /dev/null
@@ -1,1402 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.generator.*;
-import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
-import org.eclipse.equinox.internal.p2.metadata.generator.features.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
-import org.eclipse.osgi.service.environment.Constants;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.NLS;
-
-public class Generator {
- /**
- * Captures the output of an execution of the generator.
- */
- public static class GeneratorResult {
- public static final String CONFIGURATION_CUS = "CONFIGURATION_CUS"; //$NON-NLS-1$
-
- final public Map pluginShape = new HashMap();
-
- /**
- * The set of generated IUs that will be children of the root IU
- */
- final public Set rootIUs = new HashSet();
- /**
- * The set of generated IUs that will not be children of the root IU
- */
- final public Set nonRootIUs = new HashSet();
-
- /**
- * Map of symbolic name to a set of generated CUs for that IU
- */
- final public Map configurationIUs = new HashMap();
-
- /**
- * Map launcherConfig to config.ini ConfigData
- */
- final public Map configData = new HashMap();
-
- /**
- * Returns all IUs generated during this execution of the generator.
- */
- public Set allGeneratedIUs() {
- HashSet all = new HashSet();
- all.addAll(rootIUs);
- all.addAll(nonRootIUs);
- return all;
- }
-
- /**
- * Returns the IU in this result with the given id.
- */
- public IInstallableUnit getInstallableUnit(String id) {
- for (Iterator iterator = rootIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit tmp = (IInstallableUnit) iterator.next();
- if (tmp.getId().equals(id))
- return tmp;
- }
- for (Iterator iterator = nonRootIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit tmp = (IInstallableUnit) iterator.next();
- if (tmp.getId().equals(id))
- return tmp;
- }
- return null;
-
- }
-
- public Map getPluginShapeInfo() {
- return pluginShape;
- }
- }
-
- private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_UPDATE_CONFIGURATOR = "org.eclipse.update.configurator"; //$NON-NLS-1$
- private static final String ORG_ECLIPSE_EQUINOX_LAUNCHER = "org.eclipse.equinox.launcher"; //$NON-NLS-1$
-
- private static final String PRODUCT_CONFIG_SUFFIX = ".config"; //$NON-NLS-1$
- private static final String PRODUCT_INI_SUFFIX = ".ini"; //$NON-NLS-1$
- private static final String PRODUCT_LAUCHER_SUFFIX = ".launcher"; //$NON-NLS-1$
- private static final String CONFIG_ANY = "ANY"; //$NON-NLS-1$
-
- private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
-
- protected final IGeneratorInfo info;
-
- private GeneratorResult incrementalResult = null;
- private ProductFile productFile = null;
- private boolean generateRootIU = true;
-
- /**
- * Short term fix to ensure IUs that have no corresponding category are not lost.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=211521.
- */
- protected final Set rootCategory = new HashSet();
-
- private StateObjectFactory stateObjectFactory;
-
- /**
- * Convert a list of tokens into an array. The list separator has to be
- * specified.
- */
- public static String[] getArrayFromString(String list, String separator) {
- if (list == null || list.trim().equals("")) //$NON-NLS-1$
- return new String[0];
- List result = new ArrayList();
- for (StringTokenizer tokens = new StringTokenizer(list, separator); tokens.hasMoreTokens();) {
- String token = tokens.nextToken().trim();
- if (!token.equals("")) //$NON-NLS-1$
- result.add(token);
- }
- return (String[]) result.toArray(new String[result.size()]);
- }
-
- public static String[] parseConfigSpec(String config) {
- String[] parsed = getArrayFromString(config, "_"); //$NON-NLS-1$
- for (int i = 0; i < parsed.length; i++) {
- if (parsed[i].equals("*")) //$NON-NLS-1$
- parsed[i] = "ANY"; //$NON-NLS-1$
- }
- if (parsed.length > 3) {
- String[] adjusted = new String[] {parsed[0], parsed[1], parsed[2] + '_' + parsed[3]};
- return adjusted;
- }
- return parsed;
- }
-
- public Generator(IGeneratorInfo infoProvider) {
- this.info = infoProvider;
- // TODO need to figure a better way of configuring the generator...
- PlatformAdmin platformAdmin = (PlatformAdmin) ServiceHelper.getService(Activator.getContext(), PlatformAdmin.class.getName());
- if (platformAdmin != null) {
- stateObjectFactory = platformAdmin.getFactory();
- }
- }
-
- public void setIncrementalResult(GeneratorResult result) {
- this.incrementalResult = result;
- }
-
- private String getProductVersion() {
- String version = "1.0.0"; //$NON-NLS-1$
- if (productFile != null && !productFile.getVersion().equals("0.0.0")) //$NON-NLS-1$
- version = productFile.getVersion();
- else if (!info.getRootVersion().equals("0.0.0")) //$NON-NLS-1$
- version = info.getRootVersion();
- return version;
- }
-
- /**
- * @deprecated moved to ProductAction
- */
- protected IInstallableUnit createProductIU(GeneratorResult result) {
- generateProductConfigCUs(result);
-
- GeneratorResult productContents = new GeneratorResult();
-
- ProductQuery productQuery = new ProductQuery(productFile, info.getFlavor(), result.configurationIUs, info.getVersionAdvice());
- IQuery query = QueryUtil.createLatestQuery(productQuery);
- IQueryResult queryResult = info.getMetadataRepository().query(query, null);
- for (Iterator iterator = queryResult.iterator(); iterator.hasNext();) {
- productContents.rootIUs.add(iterator.next());
- }
-
- String version = getProductVersion();
- VersionRange range = new VersionRange(Version.create(version), true, Version.create(version), true);
- ArrayList requires = new ArrayList(1);
- requires.add(MetadataFactory.createRequirement(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_LAUCHER_SUFFIX, range, null, false, true));
- requires.add(MetadataFactory.createRequirement(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_INI_SUFFIX, range, null, false, false));
- requires.add(MetadataFactory.createRequirement(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_CONFIG_SUFFIX, range, null, false, false));
-
- //default CUs
- requires.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, null, false, false));
- requires.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId("source", info.getFlavor()), VersionRange.emptyRange, null, false, false)); //$NON-NLS-1$
- if (productFile.useFeatures())
- requires.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, MetadataGeneratorHelper.createDefaultConfigUnitId(MetadataGeneratorHelper.ECLIPSE_FEATURE_CLASSIFIER, info.getFlavor()), VersionRange.emptyRange, MetadataGeneratorHelper.INSTALL_FEATURES_FILTER, true, false));
-
- InstallableUnitDescription root = createTopLevelIUDescription(productContents, productFile.getId(), version, productFile.getProductName(), requires, false);
- return MetadataFactory.createInstallableUnit(root);
- }
-
- /**
- * @deprecated moved to RootIUAction
- */
- protected IInstallableUnit createTopLevelIU(GeneratorResult result, String configurationIdentification, String configurationVersion) {
- // TODO, bit of a hack but for now set the name of the IU to the ID.
- InstallableUnitDescription root = createTopLevelIUDescription(result, configurationIdentification, configurationVersion, configurationIdentification, null, true);
- return MetadataFactory.createInstallableUnit(root);
- }
-
- /**
- * @deprecated moved to RootIUAction
- */
- protected InstallableUnitDescription createTopLevelIUDescription(GeneratorResult result, String configurationIdentification, String configurationVersion, String configurationName, List requires, boolean configureLauncherData) {
- InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription();
- root.setSingleton(true);
- root.setId(configurationIdentification);
- root.setVersion(Version.create(configurationVersion));
- root.setProperty(IInstallableUnit.PROP_NAME, configurationName);
-
- ArrayList reqsConfigurationUnits = new ArrayList(result.rootIUs.size());
- for (Iterator iterator = result.rootIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) iterator.next();
- VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
- // boolean isOptional = checkOptionalRootDependency(iu);
- reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter(), false, false));
- }
- if (requires != null)
- reqsConfigurationUnits.addAll(requires);
- root.setRequirements((IRequirement[]) reqsConfigurationUnits.toArray(new IRequirement[reqsConfigurationUnits.size()]));
- root.setArtifacts(new IArtifactKey[0]);
-
- root.setProperty("lineUp", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(configurationIdentification, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null));
- root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- root.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(configurationIdentification, Version.create(configurationVersion))});
- root.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_OSGI);
- Map touchpointData = new HashMap();
-
- // Publisher refactor - the configdata stuff moved to a distinct IU added by the ConfigCUsAction
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
-
- ConfigData configData = info.getConfigData();
- if (configData != null) {
- String[] dataStrings = getConfigurationStrings(configData);
- configurationData += dataStrings[0];
- unconfigurationData += dataStrings[1];
- }
-
- if (configureLauncherData) {
- LauncherData launcherData = info.getLauncherData();
- if (launcherData != null) {
- String[] dataStrings = getLauncherConfigStrings(launcherData.getJvmArgs(), launcherData.getProgramArgs());
- configurationData += dataStrings[0];
- unconfigurationData += dataStrings[1];
- }
- }
- touchpointData.put("configure", configurationData); //$NON-NLS-1$
- touchpointData.put("unconfigure", unconfigurationData); //$NON-NLS-1$
- //look for additional touchpoint instructions in a p2.inf file
- final String productFileLocation = info.getProductFile();
- if (productFileLocation != null) {
- File productFilePath = new File(productFileLocation);
- if (productFilePath.exists()) {
- Map advice = MetadataGeneratorHelper.getBundleAdvice(productFilePath.getParent(), "p2.inf");//$NON-NLS-1$
- if (advice != null)
- MetadataGeneratorHelper.mergeInstructionsAdvice(touchpointData, advice);
- }
- }
-
- root.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- return root;
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- private String[] getConfigurationStrings(ConfigData configData) {
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
- for (Iterator iterator = configData.getProperties().entrySet().iterator(); iterator.hasNext();) {
- Entry aProperty = (Entry) iterator.next();
- String key = ((String) aProperty.getKey());
- if (key.equals("osgi.frameworkClassPath") || key.equals("osgi.framework") || key.equals("osgi.bundles") || key.equals("eof")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- continue;
- configurationData += "setProgramProperty(propName:" + key + ", propValue:" + ((String) aProperty.getValue()) + ");"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- unconfigurationData += "setProgramProperty(propName:" + key + ", propValue:);"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- for (Iterator iterator = configData.getProperties().entrySet().iterator(); iterator.hasNext();) {
- Entry aProperty = (Entry) iterator.next();
- String key = ((String) aProperty.getKey());
- if (key.equals("osgi.frameworkClassPath") || key.equals("osgi.framework") || key.equals("osgi.bundles") || key.equals("eof")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- continue;
- configurationData += "setProgramProperty(propName:" + key + ", propValue:" + ((String) aProperty.getValue()) + ");"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- unconfigurationData += "setProgramProperty(propName:" + key + ", propValue:);"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return new String[] {configurationData, unconfigurationData};
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- private String[] getLauncherConfigStrings(final String[] jvmArgs, final String[] programArgs) {
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
-
- for (int i = 0; i < jvmArgs.length; i++) {
- configurationData += "addJvmArg(jvmArg:" + jvmArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- unconfigurationData += "removeJvmArg(jvmArg:" + jvmArgs[i] + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- for (int i = 0; i < programArgs.length; i++) {
- String programArg = programArgs[i];
- if (programArg.equals("--launcher.library") || programArg.equals("-startup") || programArg.equals("-configuration")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- i++;
- configurationData += "addProgramArg(programArg:" + programArg + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- unconfigurationData += "removeProgramArg(programArg:" + programArg + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- return new String[] {configurationData, unconfigurationData};
- }
-
- public IStatus generate() {
- GeneratorResult result = incrementalResult != null ? incrementalResult : new GeneratorResult();
-
- if (info.getProductFile() != null) {
- try {
- productFile = new ProductFile(info.getProductFile(), null);
- } catch (Exception e) {
- //TODO
- }
- }
-
- Feature[] features = getFeatures(info.getFeaturesLocation());
- generateFeatureIUs(features, result, info.getArtifactRepository());
-
- BundleDescription[] bundles = getBundleDescriptions(info.getBundleLocations());
- generateBundleIUs(bundles, result, info.getArtifactRepository());
-
- generateNativeIUs(info.getExecutableLocation(), result, info.getArtifactRepository());
-
- generateConfigIUs(result);
-
- if (info.addDefaultIUs())
- generateDefaultConfigIU(result.rootIUs);
-
- if (generateRootIU)
- generateRootIU(result, info.getRootId(), info.getRootVersion());
-
- // persistence.setMappingRules(info.getMappingRules() == null ? defaultMappingRules : info.getMappingRules());
- // if (info.publishArtifacts() || info.publishArtifactRepository()) {
- // persistence.saveArtifactRepository();
- // }
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository != null) {
- Set allGeneratedUnits = result.allGeneratedIUs();
- metadataRepository.addInstallableUnits(allGeneratedUnits);
- }
-
- return Status.OK_STATUS;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- protected void generateBundleIUs(BundleDescription[] bundles, GeneratorResult result, IArtifactRepository destination) {
- // Computing the path for localized property files in a NL fragment bundle
- // requires the BUNDLE_LOCALIZATION property from the manifest of the host bundle,
- // so a first pass is done over all the bundles to cache this value as well as the tags
- // from the manifest for the localizable properties.
- final int CACHE_PHASE = 0;
- final int GENERATE_PHASE = 1;
- Map bundleLocalizationMap = new HashMap(bundles.length);
- Set localizationIUs = new HashSet(32);
- for (int phase = CACHE_PHASE; phase <= GENERATE_PHASE; phase++) {
- for (int i = 0; i < bundles.length; i++) {
- BundleDescription bd = bundles[i];
- // A bundle may be null if the associated plug-in does not have a manifest file -
- // for example, org.eclipse.jdt.launching.j9
- if (bd != null && bd.getSymbolicName() != null && bd.getVersion() != null) {
- Map bundleManifest = (Map) bd.getUserObject();
-
- if (phase == CACHE_PHASE) {
- if (bundleManifest != null) {
- String[] cachedValues = MetadataGeneratorHelper.getManifestCachedValues(bundleManifest);
- bundleLocalizationMap.put(makeSimpleKey(bd), cachedValues);
- }
- } else {
- String format = (String) result.getPluginShapeInfo().get(bd.getSymbolicName() + '_' + bd.getVersion());
- if (format == null)
- format = (String) bundleManifest.get(BundleDescriptionFactory.BUNDLE_FILE_KEY);
- boolean isDir = (format != null && format.equals(BundleDescriptionFactory.DIR) ? true : false);
-
- IArtifactKey key = new ArtifactKey(MetadataGeneratorHelper.OSGI_BUNDLE_CLASSIFIER, bd.getSymbolicName(), Version.create(bd.getVersion().toString()));
- IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor(key, new File(bd.getLocation()), true, false);
- ((ArtifactDescriptor) ad).setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
- File bundleFile = new File(bd.getLocation());
- if (bundleFile.isDirectory())
- publishArtifact(ad, bundleFile.listFiles(), destination, false, bundleFile);
- else
- publishArtifact(ad, new File[] {bundleFile}, destination, true);
- if (info.reuseExistingPack200Files() && !info.publishArtifacts()) {
- File packFile = new Path(bd.getLocation()).addFileExtension("pack.gz").toFile(); //$NON-NLS-1$
- if (packFile.exists()) {
- IArtifactDescriptor ad200 = MetadataGeneratorHelper.createPack200ArtifactDescriptor(key, packFile, ad.getProperty(IArtifactDescriptor.ARTIFACT_SIZE));
- publishArtifact(ad200, new File[] {packFile}, destination, true);
- }
- }
-
- IInstallableUnit bundleIU = MetadataGeneratorHelper.createBundleIU(bd, bundleManifest, isDir, key, true);
-
- if (isFragment(bd)) {
- // TODO: Can NL fragments be multi-host? What special handling
- // is required for multi-host fragments in general?
- String hostId = bd.getHost().getName();
- String hostKey = makeSimpleKey(hostId);
- String[] cachedValues = (String[]) bundleLocalizationMap.get(hostKey);
-
- if (cachedValues != null) {
- MetadataGeneratorHelper.createHostLocalizationFragment(bundleIU, bd, hostId, cachedValues, localizationIUs);
- }
- }
-
- result.rootIUs.add(bundleIU);
- result.nonRootIUs.addAll(localizationIUs);
- localizationIUs.clear();
- }
- }
- }
- }
- }
-
- private static boolean isFragment(BundleDescription bd) {
- return (bd.getHost() != null ? true : false);
- }
-
- private static String makeSimpleKey(BundleDescription bd) {
- // TODO: can't use the bundle version in the key for the BundleLocalization
- // property map since the host specification for a fragment has a
- // version range, not a version. Hence, this mechanism for finding
- // manifest localization property files may break under changes
- // to the BundleLocalization property of a bundle.
- return makeSimpleKey(bd.getSymbolicName() /*, bd.getVersion() */);
- }
-
- private static String makeSimpleKey(String id /*, Version version */) {
- return id; // + '_' + version.toString();
- }
-
- /**
- * Generates IUs corresponding to update site categories.
- * @param categoriesToFeatures Map of SiteCategory ->Set (Feature IUs in that category).
- * @param result The generator result being built
- * @deprecated moved to SiteXMLAction
- */
- protected void generateCategoryIUs(Map categoriesToFeatures, GeneratorResult result) {
- for (Iterator it = categoriesToFeatures.keySet().iterator(); it.hasNext();) {
- SiteCategory category = (SiteCategory) it.next();
- result.nonRootIUs.add(MetadataGeneratorHelper.createCategoryIU(category, (Set) categoriesToFeatures.get(category), null));
- }
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- private void storeConfigData(GeneratorResult result) {
- if (result.configData.containsKey(info.getLauncherConfig()))
- return; //been here, done this
-
- LauncherData launcherData = info.getLauncherData();
- if (launcherData == null)
- return;
-
- File fwConfigFile = new File(launcherData.getFwConfigLocation(), EquinoxConstants.CONFIG_INI);
- if (fwConfigFile.exists()) {
- if (info instanceof EclipseInstallGeneratorInfoProvider) {
- ((EclipseInstallGeneratorInfoProvider) info).loadConfigData(fwConfigFile);
- ConfigData data = info.getConfigData();
- result.configData.put(info.getLauncherConfig(), data);
- }
- }
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- protected GeneratorBundleInfo createGeneratorBundleInfo(BundleInfo bundleInfo, GeneratorResult result) {
- if (bundleInfo.getLocation() != null)
- return new GeneratorBundleInfo(bundleInfo);
-
- String name = bundleInfo.getSymbolicName();
-
- //easy case: do we have a matching IU?
- IInstallableUnit iu = result.getInstallableUnit(name);
- if (iu != null) {
- bundleInfo.setVersion(iu.getVersion().toString());
- return new GeneratorBundleInfo(bundleInfo);
- }
-
- //harder: try id_version
- int i = name.indexOf('_');
- while (i > -1) {
- Version version = null;
- try {
- version = Version.create(name.substring(i));
- bundleInfo.setSymbolicName(name.substring(0, i));
- bundleInfo.setVersion(version.toString());
- return new GeneratorBundleInfo(bundleInfo);
- } catch (IllegalArgumentException e) {
- // the '_' found was probably part of the symbolic id
- i = name.indexOf('_', i);
- }
- }
-
- //Query the repo
- IQuery query = QueryUtil.createIUQuery(name);
- Iterator matches = info.getMetadataRepository().query(query, null).iterator();
- //pick the newest match
- IInstallableUnit newest = null;
- while (matches.hasNext()) {
- IInstallableUnit candidate = (IInstallableUnit) matches.next();
- if (newest == null || (newest.getVersion().compareTo(candidate.getVersion()) < 0))
- newest = candidate;
- }
- if (newest != null) {
- bundleInfo.setVersion(newest.getVersion().toString());
- return new GeneratorBundleInfo(bundleInfo);
- }
-
- return null;
- }
-
- /**
- * @deprecated moved to ConfigCUsAction
- */
- protected void generateBundleConfigIUs(BundleInfo[] infos, GeneratorResult result, String launcherConfig, int defaultStartLevel) {
- if (infos == null)
- return;
-
- String cuIdPrefix = ""; //$NON-NLS-1$
- String filter = null;
- if (launcherConfig != null) {
- //launcher config is os_ws_arch, we want suffix ws.os.arch
- String[] config = parseConfigSpec(launcherConfig);
- cuIdPrefix = config[1] + '.' + config[0] + '.' + config[2];
-
- filter = "(& (osgi.ws=" + config[1] + ") (osgi.os=" + config[0] + ") (osgi.arch=" + config[2] + "))"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-
- List allCUs = new ArrayList();
- for (int i = 0; i < infos.length; i++) {
- GeneratorBundleInfo bundle = createGeneratorBundleInfo(infos[i], result);
- if (bundle == null)
- continue;
-
- if (bundle.getSymbolicName().equals(ORG_ECLIPSE_EQUINOX_LAUNCHER)) {
- bundle = EclipseInstallGeneratorInfoProvider.createLauncher();
- } else if (bundle.getSymbolicName().startsWith(ORG_ECLIPSE_EQUINOX_LAUNCHER + '.')) {
- //launcher fragments will be handled by generateDefaultConfigIU(Set) for --launcher.library.
- //they don't need to be started so skip them here to avoid having to merge config commands
- continue;
- }
- if (bundle.getSymbolicName().equals(ORG_ECLIPSE_UPDATE_CONFIGURATOR)) {
- bundle.setStartLevel(BundleInfo.NO_LEVEL);
- bundle.setMarkedAsStarted(false);
- bundle.setSpecialConfigCommands("setProgramProperty(propName:org.eclipse.update.reconcile, propValue:false);"); //$NON-NLS-1$
- bundle.setSpecialUnconfigCommands("setProgramProperty(propName:org.eclipse.update.reconcile, propValue:);"); //$NON-NLS-1$
- } else if ((bundle.getStartLevel() == BundleInfo.NO_LEVEL || bundle.getStartLevel() == defaultStartLevel) && !bundle.isMarkedAsStarted()) {
- // this bundle does not require any particular configuration, the plug-in default IU will handle installing it
- continue;
- }
-
- IInstallableUnit cu = MetadataGeneratorHelper.createBundleConfigurationUnit(bundle.getSymbolicName(), Version.create(bundle.getVersion()), false, bundle, info.getFlavor() + cuIdPrefix, filter);
- if (cu != null) {
- allCUs.add(cu);
- result.rootIUs.add(cu);
- String key = (productFile != null && productFile.useFeatures()) ? GeneratorResult.CONFIGURATION_CUS : bundle.getSymbolicName();
- if (result.configurationIUs.containsKey(key)) {
- ((Set) result.configurationIUs.get(key)).add(cu);
- } else {
- Set set = new HashSet();
- set.add(cu);
- result.configurationIUs.put(key, set);
- }
- }
- }
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository != null && !allCUs.isEmpty()) {
- // Product Query will run against the repo later in createProductIU, make sure these CUs are in before then
- metadataRepository.addInstallableUnits(allCUs);
- }
-
- }
-
- /**
- * @deprecated moved to ConfigCUsAction (and perhaps a couple other places...)
- */
- protected void generateConfigIUs(GeneratorResult result) {
- ConfigData data = info.getConfigData();
- if ((data == null || data.getBundles().length == 0) && info.getLauncherConfig() != null) {
- //We have the config.ini but not necessarily all the needed bundle IUs, remember for later
- storeConfigData(result);
- } else if (data != null) {
- // generation against an eclipse install (config.ini + bundles)
- generateBundleConfigIUs(data.getBundles(), result, info.getLauncherConfig(), data.getInitialBundleStartLevel());
- } else if (result.configData.size() > 0 && generateRootIU) {
- // generation from remembered config.ini's
- // we have N platforms, generate a CU for each
- // TODO try and find common properties across platforms
- for (Iterator iterator = result.configData.keySet().iterator(); iterator.hasNext();) {
- String launcherConfig = (String) iterator.next();
- data = (ConfigData) result.configData.get(launcherConfig);
- generateBundleConfigIUs(data.getBundles(), result, launcherConfig, data.getInitialBundleStartLevel());
- }
- }
-
- List bundleInfoList = new ArrayList();
- List defaults = new ArrayList();
- if (info.addDefaultIUs())
- bundleInfoList.addAll(info.getDefaultIUs(result.rootIUs));
-
- bundleInfoList.addAll(info.getOtherIUs());
-
- for (Iterator iterator = bundleInfoList.iterator(); iterator.hasNext();) {
- GeneratorBundleInfo bundle = (GeneratorBundleInfo) iterator.next();
- IInstallableUnit configuredIU = result.getInstallableUnit(bundle.getSymbolicName());
- if (configuredIU == null) {
- if (!generateRootIU && data == null)
- continue;
- IQuery query = QueryUtil.createIUQuery(bundle.getSymbolicName());
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository == null)
- continue;
- Iterator matches = metadataRepository.query(query, null).iterator();
- //pick the newest match
- IInstallableUnit newest = null;
- while (matches.hasNext()) {
- IInstallableUnit candidate = (IInstallableUnit) matches.next();
- if (newest == null || (newest.getVersion().compareTo(candidate.getVersion()) < 0))
- newest = candidate;
- }
- if (newest != null) {
- configuredIU = newest;
- } else {
- continue;
- }
- }
- bundle.setVersion(configuredIU.getVersion().toString());
- IMatchExpression filter = configuredIU == null ? null : configuredIU.getFilter();
- IInstallableUnit cu = MetadataGeneratorHelper.createBundleConfigurationUnit(bundle.getSymbolicName(), Version.create(bundle.getVersion()), false, bundle, info.getFlavor(), filter);
- //the configuration unit should share the same platform filter as the IU being configured.
- if (cu != null) {
- result.rootIUs.add(cu);
- defaults.add(cu);
- }
- String key = null;
- if (productFile != null && productFile.useFeatures())
- key = GeneratorResult.CONFIGURATION_CUS;
- else if (bundle.getSymbolicName().startsWith(ORG_ECLIPSE_EQUINOX_LAUNCHER + '.'))
- key = ORG_ECLIPSE_EQUINOX_LAUNCHER;
- else
- key = bundle.getSymbolicName();
- if (result.configurationIUs.containsKey(key)) {
- ((Set) result.configurationIUs.get(key)).add(cu);
- } else {
- Set set = new HashSet();
- set.add(cu);
- result.configurationIUs.put(key, set);
- }
- }
-
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository != null && !defaults.isEmpty()) {
- // Product Query will run against the repo later in createProductIU, make sure these CUs are in before then
- metadataRepository.addInstallableUnits(defaults);
- }
- }
-
- /**
- * Short term fix to ensure IUs that have no corresponding category are not lost.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=211521.
- * @deprecated moved to RootIUAction
- */
- private IInstallableUnit generateDefaultCategory(IInstallableUnit rootIU) {
- rootCategory.add(rootIU);
-
- InstallableUnitDescription cat = new MetadataFactory.InstallableUnitDescription();
- cat.setSingleton(true);
- String categoryId = rootIU.getId() + ".categoryIU"; //$NON-NLS-1$
- cat.setId(categoryId);
- cat.setVersion(Version.emptyVersion);
- cat.setProperty(IInstallableUnit.PROP_NAME, rootIU.getProperty(IInstallableUnit.PROP_NAME));
- cat.setProperty(IInstallableUnit.PROP_DESCRIPTION, rootIU.getProperty(IInstallableUnit.PROP_DESCRIPTION));
-
- ArrayList required = new ArrayList(rootCategory.size());
- for (Iterator iterator = rootCategory.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) iterator.next();
- required.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), VersionRange.emptyRange, iu.getFilter(), false, false));
- }
- cat.setRequirements((IRequirement[]) required.toArray(new IRequirement[required.size()]));
- cat.setCapabilities(new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, categoryId, Version.emptyVersion)});
- cat.setArtifacts(new IArtifactKey[0]);
- cat.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
- return MetadataFactory.createInstallableUnit(cat);
- }
-
- /**
- * @deprecated moved to DefaultCUsAction
- */
- private void generateDefaultConfigIU(Set ius) {
- // TODO this is a bit of a hack. We need to have the default IU fragment generated with code that configures
- // and unconfigures. The Generator should be decoupled from any particular provider but it is not clear
- // that we should add the create* methods to IGeneratorInfo...
- // MockBundleDescription bd1 = new MockBundleDescription("defaultConfigure");
- // MockBundleDescription bd2 = new MockBundleDescription("defaultUnconfigure");
- EclipseInstallGeneratorInfoProvider provider = (EclipseInstallGeneratorInfoProvider) info;
- ius.add(MetadataGeneratorHelper.createDefaultBundleConfigurationUnit(provider.createDefaultConfigurationBundleInfo(), provider.createDefaultUnconfigurationBundleInfo(), info.getFlavor()));
- ius.add(MetadataGeneratorHelper.createDefaultFeatureConfigurationUnit(info.getFlavor()));
- ius.add(MetadataGeneratorHelper.createDefaultConfigurationUnitForSourceBundles(info.getFlavor()));
- }
-
- /**
- * This method generates IUs for the launchers found in the org.eclipse.executable feature, if present.
- * @return <code>true</code> if the executable feature was processed successfully,
- * and <code>false</code> otherwise.
- * @deprecated moved to ExecutablesDescriptor and EquinoxExecutableAction
- */
- private boolean generateExecutableFeatureIUs(GeneratorResult result, IArtifactRepository destination) {
- File parentDir = info.getFeaturesLocation();
- if (parentDir == null || !parentDir.exists())
- return false;
- File[] featureDirs = parentDir.listFiles();
- if (featureDirs == null)
- return false;
- File executableFeatureDir = null;
- final String featurePrefix = "org.eclipse.equinox.executable_"; //$NON-NLS-1$
- for (int i = 0; i < featureDirs.length; i++) {
- if (featureDirs[i].getName().startsWith(featurePrefix)) {
- executableFeatureDir = featureDirs[i];
- break;
- }
- }
- if (executableFeatureDir == null)
- return false;
- File binDir = new File(executableFeatureDir, "bin"); //$NON-NLS-1$
- if (!binDir.exists())
- return false;
- //the bin directory is dividing into a directory tree of the form /bin/ws/os/arch
- File[] wsDirs = binDir.listFiles();
- if (wsDirs == null)
- return false;
- String versionString = executableFeatureDir.getName().substring(featurePrefix.length());
- for (int wsIndex = 0; wsIndex < wsDirs.length; wsIndex++) {
- String ws = wsDirs[wsIndex].getName();
- File[] osDirs = wsDirs[wsIndex].listFiles();
- if (osDirs == null)
- continue;
- for (int osIndex = 0; osIndex < osDirs.length; osIndex++) {
- String os = osDirs[osIndex].getName();
- File[] archDirs = osDirs[osIndex].listFiles();
- if (archDirs == null)
- continue;
- for (int archIndex = 0; archIndex < archDirs.length; archIndex++) {
- String arch = archDirs[archIndex].getName();
- generateExecutableIUs(ws, os, arch, versionString, archDirs[archIndex], result, destination);
- }
- }
- }
- return true;
- }
-
- /**
- * Generates IUs and CUs for the files that make up the launcher for a given
- * ws/os/arch combination.
- * @deprecated moved to EquinoxExecutableAction
- */
- private void generateExecutableIUs(String ws, String os, final String arch, String version, File root, GeneratorResult result, IArtifactRepository destination) {
- if (root == null)
- return;
-
- //Create the IU
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(true);
- String productNamespace = (productFile != null) ? productFile.getId() : "org.eclipse"; //$NON-NLS-1$
- String launcherIdPrefix = productNamespace + PRODUCT_LAUCHER_SUFFIX;
- String launcherId = launcherIdPrefix + '.' + ws + '.' + os + '.' + arch;
- iu.setId(launcherId);
- Version launcherVersion = Version.create(version);
- iu.setVersion(launcherVersion);
- iu.setSingleton(true);
- IMatchExpression filter = null;
- if (!ws.equals(CONFIG_ANY) && !os.equals(CONFIG_ANY) && !arch.equals(CONFIG_ANY)) {
- filter = InstallableUnit.parseFilter("(& (osgi.ws=" + ws + ") (osgi.os=" + os + ") (osgi.arch=" + arch + "))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- iu.setFilter(filter);
- }
-
- IArtifactKey key = MetadataGeneratorHelper.createLauncherArtifactKey(launcherId, launcherVersion);
- iu.setArtifacts(new IArtifactKey[] {key});
- iu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_NATIVE);
- IProvidedCapability launcherCapability = MetadataFactory.createProvidedCapability(info.getFlavor() + productNamespace, launcherIdPrefix, launcherVersion);
- iu.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(launcherId, launcherVersion), launcherCapability});
-
- String launcherFragment = ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + ws + '.' + os;
- if (!(Constants.OS_MACOSX.equals(os) && !Constants.ARCH_X86_64.equals(arch)))
- launcherFragment += '.' + arch;
- iu.setRequirements(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherFragment, VersionRange.emptyRange, filter, false, false)});
- result.rootIUs.add(MetadataFactory.createInstallableUnit(iu));
-
- //Create the CU
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = info.getFlavor() + launcherId;
- cu.setId(configUnitId);
- cu.setVersion(launcherVersion);
- if (filter != null)
- cu.setFilter(filter);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(launcherVersion, true, launcherVersion, true), null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- //TODO bug 218890, would like the fragment to provide the launcher capability as well, but can't right now.
- cu.setCapabilities(new IProvidedCapability[] {MetadataGeneratorHelper.createSelfCapability(configUnitId, launcherVersion)});
-
- mungeLauncherFileNames(root);
-
- cu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_NATIVE);
- Map touchpointData = new HashMap();
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
-
- IInstallableUnit launcherNameIU = null;
-
- File executableLocation = info.getExecutableLocation();
- if (executableLocation != null) {
- if (!executableLocation.exists()) {
- if (Constants.OS_WIN32.equals(os) && !executableLocation.getName().endsWith(".exe")) { //$NON-NLS-1$
- executableLocation = new File(executableLocation.getParentFile(), executableLocation.getName() + ".exe"); //$NON-NLS-1$
- } else if (Constants.OS_MACOSX.equals(os)) {
- String name = executableLocation.getName();
- File parent = executableLocation.getParentFile();
- executableLocation = new File(parent, name + ".app/Contents/MacOS/" + name); //$NON-NLS-1$
- }
- }
-
- if (executableLocation.exists() && executableLocation.isFile())
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(executableLocation.getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
-
- if (launcherNameIU == null && productFile != null && productFile.getLauncherName() != null) {
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(productFile.getLauncherName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
-
- if (Constants.OS_MACOSX.equals(os)) {
- File[] appFolders = root.listFiles(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- return name.substring(name.length() - 4, name.length()).equalsIgnoreCase(".app"); //$NON-NLS-1$
- }
- });
- for (int i = 0; appFolders != null && i < appFolders.length; i++) {
- File macOSFolder = new File(appFolders[i], "Contents/MacOS"); //$NON-NLS-1$
- if (macOSFolder.exists()) {
- File[] launcherFiles = macOSFolder.listFiles();
- for (int j = 0; j < launcherFiles.length; j++) {
- configurationData += " chmod(targetDir:${installFolder}/" + appFolders[i].getName() + "/Contents/MacOS/, targetFile:" + launcherFiles[j].getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (launcherNameIU == null && launcherFiles[i].isFile() && new Path(launcherFiles[j].getName()).getFileExtension() == null)
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[j].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
- }
- }
- } else if (!Constants.OS_WIN32.equals(os)) {
- File[] launcherFiles = root.listFiles();
- for (int i = 0; launcherFiles != null && i < launcherFiles.length; i++) {
- configurationData += " chmod(targetDir:${installFolder}, targetFile:" + launcherFiles[i].getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$
- if (launcherNameIU == null && launcherFiles[i].isFile() && new Path(launcherFiles[i].getName()).getFileExtension() == null)
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[i].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
- } else if (launcherNameIU == null) {
- //windows
- File[] launcherFiles = root.listFiles(new FilenameFilter() {
- public boolean accept(File parent, String name) {
- return name.endsWith(".exe"); //$NON-NLS-1$
- }
- });
- if (launcherFiles != null && launcherFiles.length > 0)
- launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[0].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs);
- }
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- IInstallableUnit unit = MetadataFactory.createInstallableUnit(cu);
- result.rootIUs.add(unit);
- //The Product Query will need to include the launcher CU fragments as a workaround to bug 218890
- if (result.configurationIUs.containsKey(launcherIdPrefix)) {
- ((Set) result.configurationIUs.get(launcherIdPrefix)).add(unit);
- if (launcherNameIU != null)
- ((Set) result.configurationIUs.get(launcherIdPrefix)).add(launcherNameIU);
- } else {
- Set set = new HashSet();
- set.add(unit);
- if (launcherNameIU != null)
- set.add(launcherNameIU);
- result.configurationIUs.put(launcherIdPrefix, set);
- }
-
- //Create the artifact descriptor
- IArtifactDescriptor descriptor = MetadataGeneratorHelper.createArtifactDescriptor(key, root, false, true);
- publishArtifact(descriptor, root.listFiles(), destination, false, root);
- }
-
- /**
- * For each platform, generate a CU containing the information for the config.ini
- * @deprecated moved to ProductAction and ConfigCUsAction
- */
- private void generateProductConfigCUs(GeneratorResult result) {
- for (Iterator iterator = result.configData.keySet().iterator(); iterator.hasNext();) {
- String launcherConfig = (String) iterator.next();
- String[] config = parseConfigSpec(launcherConfig);
- String ws = config[1];
- String os = config[0];
- String arch = config[2];
-
- ConfigData data = (ConfigData) result.configData.get(launcherConfig);
-
- InstallableUnitDescription cu = new MetadataFactory.InstallableUnitDescription();
- String configUnitId = info.getFlavor() + productFile.getId() + ".config." + ws + '.' + os + '.' + arch; //$NON-NLS-1$
-
- String version = getProductVersion();
- Version cuVersion = Version.create(version);
- cu.setId(configUnitId);
- cu.setVersion(cuVersion);
- cu.setSingleton(true);
- cu.setFilter("(& (osgi.ws=" + ws + ") (osgi.os=" + os + ") (osgi.arch=" + arch + "))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- IProvidedCapability productConfigCapability = MetadataFactory.createProvidedCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_CONFIG_SUFFIX, cuVersion);
- IProvidedCapability selfCapability = MetadataGeneratorHelper.createSelfCapability(configUnitId, cuVersion);
- cu.setCapabilities(new IProvidedCapability[] {selfCapability, productConfigCapability});
-
- cu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_OSGI);
- Map touchpointData = new HashMap();
- String[] dataStrings = getConfigurationStrings(data);
- touchpointData.put("configure", dataStrings[0]); //$NON-NLS-1$
- touchpointData.put("unconfigure", dataStrings[1]); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- result.rootIUs.add(MetadataFactory.createInstallableUnit(cu));
- }
- }
-
- /**
- * For the given platform (ws, os, arch) generate the CU that will populate the product.ini file
- * @deprecated moved to ProductAction and ConfigCUsAction
- */
- private void generateProductIniCU(String ws, String os, String arch, String version, GeneratorResult result) {
- if (productFile == null)
- return;
-
- //attempt to merge arguments from the launcher data and the product file
- Set jvmArgs = new LinkedHashSet();
- Set progArgs = new LinkedHashSet();
- LauncherData launcherData = info.getLauncherData();
- if (launcherData != null) {
- jvmArgs.addAll(Arrays.asList(launcherData.getJvmArgs()));
- progArgs.addAll(Arrays.asList(launcherData.getProgramArgs()));
- }
- progArgs.addAll(Arrays.asList(getArrayFromString(productFile.getProgramArguments(os), " "))); //$NON-NLS-1$
- jvmArgs.addAll(Arrays.asList(getArrayFromString(productFile.getVMArguments(os), " "))); //$NON-NLS-1$
-
- String[] dataStrings = getLauncherConfigStrings((String[]) jvmArgs.toArray(new String[jvmArgs.size()]), (String[]) progArgs.toArray(new String[progArgs.size()]));
- String configurationData = dataStrings[0];
- String unconfigurationData = dataStrings[1];
-
- InstallableUnitDescription cu = new MetadataFactory.InstallableUnitDescription();
- String configUnitId = info.getFlavor() + productFile.getId() + ".ini." + ws + '.' + os + '.' + arch; //$NON-NLS-1$
- Version cuVersion = Version.create(version);
- cu.setId(configUnitId);
- cu.setVersion(cuVersion);
- cu.setSingleton(true);
- cu.setFilter("(& (osgi.ws=" + ws + ") (osgi.os=" + os + ") (osgi.arch=" + arch + "))"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- IProvidedCapability productIniCapability = MetadataFactory.createProvidedCapability(info.getFlavor() + productFile.getId(), productFile.getId() + PRODUCT_INI_SUFFIX, cuVersion);
- IProvidedCapability selfCapability = MetadataGeneratorHelper.createSelfCapability(configUnitId, cuVersion);
- cu.setCapabilities(new IProvidedCapability[] {selfCapability, productIniCapability});
-
- cu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_OSGI);
- Map touchpointData = new HashMap();
- touchpointData.put("configure", configurationData); //$NON-NLS-1$
- touchpointData.put("unconfigure", unconfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- result.rootIUs.add(MetadataFactory.createInstallableUnit(cu));
-
- }
-
- /**
- * Generates metadata for the given features.
- * @deprecated moved to FeaturesAction
- */
- protected void generateFeatureIUs(Feature[] features, GeneratorResult result, IArtifactRepository destination) {
- Map categoriesToFeatureIUs = new HashMap();
- Map featuresToCategories = getFeatureToCategoryMappings();
- //Build Feature IUs, and add them to any corresponding categories
- for (int i = 0; i < features.length; i++) {
- Feature feature = features[i];
- //publish feature site references
- URLEntry updateURL = feature.getUpdateSite();
- //don't enable feature update sites by default since this results in too many
- //extra sites being loaded and searched (Bug 234177)
- if (updateURL != null)
- generateSiteReference(updateURL.getURL(), updateURL.getAnnotation(), feature.getId(), false);
- URLEntry[] discoverySites = feature.getDiscoverySites();
- for (int j = 0; j < discoverySites.length; j++)
- generateSiteReference(discoverySites[j].getURL(), discoverySites[j].getAnnotation(), feature.getId(), false);
-
- //generate feature IU
- String location = feature.getLocation();
- boolean isExploded = (location.endsWith(".jar") ? false : true); //$NON-NLS-1$
- IInstallableUnit featureIU = MetadataGeneratorHelper.createFeatureJarIU(feature, true);
- Collection artifacts = featureIU.getArtifacts();
- storePluginShape(feature, result);
- for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
- IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor((IArtifactKey) iterator.next(), new File(location), true, false);
- if (isExploded)
- publishArtifact(ad, new File(location).listFiles(), destination, false, new File(location));
- else
- publishArtifact(ad, new File[] {new File(location)}, destination, true);
- }
- IInstallableUnit generated = MetadataGeneratorHelper.createGroupIU(feature, featureIU);
- result.rootIUs.add(generated);
- result.rootIUs.add(featureIU);
-
- // @deprecated moved to SiteXMLAction
- Set categories = getCategories(feature, featuresToCategories);
- if (categories != null) {
- for (Iterator it = categories.iterator(); it.hasNext();) {
- SiteCategory category = (SiteCategory) it.next();
- Set featureIUs = (Set) categoriesToFeatureIUs.get(category);
- if (featureIUs == null) {
- featureIUs = new HashSet();
- categoriesToFeatureIUs.put(category, featureIUs);
- }
- featureIUs.add(generated);
- }
- } else {
- rootCategory.add(generated);
- }
- }
- generateCategoryIUs(categoriesToFeatureIUs, result);
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- private void storePluginShape(Feature feature, GeneratorResult result) {
- FeatureEntry[] entries = feature.getEntries();
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].isPlugin() || entries[i].isFragment()) {
- result.getPluginShapeInfo().put(entries[i].getId() + '_' + entries[i].getVersion(), entries[i].isUnpack() ? BundleDescriptionFactory.DIR : BundleDescriptionFactory.JAR);
- }
- }
- }
-
- /**
- * @deprecated moved to various other places. mainly the aggregator actions (e.g., EclipseInstallAction)
- */
- protected void generateNativeIUs(File executableLocation, GeneratorResult result, IArtifactRepository destination) {
- //generate data for JRE
- File jreLocation = info.getJRELocation();
- IArtifactDescriptor artifact = MetadataGeneratorHelper.createJREData(jreLocation, result.rootIUs);
- publishArtifact(artifact, new File[] {jreLocation}, destination, false);
-
- if (info.getLauncherConfig() != null) {
- String[] config = parseConfigSpec(info.getLauncherConfig());
- String version = getProductVersion();
- File root = null;
- if (executableLocation != null)
- root = executableLocation.getParentFile();
- else if (info instanceof EclipseInstallGeneratorInfoProvider)
- root = ((EclipseInstallGeneratorInfoProvider) info).getBaseLocation();
- generateExecutableIUs(config[1], config[0], config[2], version, root, result, destination);
- generateProductIniCU(config[1], config[0], config[2], version, result);
- return;
- }
-
- //If the executable feature is present, use it to generate IUs for launchers
- if (generateExecutableFeatureIUs(result, destination) || executableLocation == null)
- return;
-
- //generate data for executable launcher
- artifact = MetadataGeneratorHelper.createLauncherIU(executableLocation, info.getFlavor(), result.rootIUs);
- File[] launcherFiles = null;
- //hard-coded name is ok, since console launcher is not branded, and appears on Windows only
- File consoleLauncher = new File(executableLocation.getParentFile(), "eclipsec.exe"); //$NON-NLS-1$
- if (consoleLauncher.exists())
- launcherFiles = new File[] {executableLocation, consoleLauncher};
- else
- launcherFiles = new File[] {executableLocation};
- publishArtifact(artifact, launcherFiles, destination, false);
- }
-
- /**
- * @deprecated moved to various other places. mainly the aggregator actions (e.g., EclipseInstallAction)
- */
- protected void generateRootIU(GeneratorResult result, String rootIUId, String rootIUVersion) {
- IInstallableUnit rootIU = null;
-
- if (info.getProductFile() != null)
- rootIU = createProductIU(result);
- else if (rootIUId != null)
- rootIU = createTopLevelIU(result, rootIUId, rootIUVersion);
-
- if (rootIU == null)
- return;
-
- result.nonRootIUs.add(rootIU);
- result.nonRootIUs.add(generateDefaultCategory(rootIU));
- }
-
- /**
- * Generates and publishes a reference to an update site location
- * @param location The update site location
- * @param featureId the identifier of the feature where the error occurred, or null
- * @param isEnabled Whether the site should be enabled by default
- * @deprecated moved to FeaturesAction
- */
- private void generateSiteReference(String location, String name, String featureId, boolean isEnabled) {
- IMetadataRepository metadataRepo = info.getMetadataRepository();
- try {
- URI associateLocation = URIUtil.fromString(location);
- int flags = isEnabled ? IRepository.ENABLED : IRepository.NONE;
- ArrayList refs = new ArrayList();
- refs.add(new RepositoryReference(associateLocation, name, IRepository.TYPE_METADATA, flags));
- refs.add(new RepositoryReference(associateLocation, name, IRepository.TYPE_ARTIFACT, flags));
- metadataRepo.addReferences(refs);
- } catch (URISyntaxException e) {
- String message = "Invalid site reference: " + location; //$NON-NLS-1$
- if (featureId != null)
- message = message + " in feature: " + featureId; //$NON-NLS-1$
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
- }
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- protected BundleDescription[] getBundleDescriptions(File[] bundleLocations) {
- if (bundleLocations == null)
- return new BundleDescription[0];
- boolean addSimpleConfigurator = false;
- boolean scIn = false;
- for (int i = 0; i < bundleLocations.length; i++) {
- if (!addSimpleConfigurator)
- addSimpleConfigurator = bundleLocations[i].toString().indexOf(ORG_ECLIPSE_UPDATE_CONFIGURATOR) > 0;
- if (!scIn) {
- scIn = bundleLocations[i].toString().indexOf(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR) > 0;
- if (scIn)
- break;
- }
- }
- if (scIn)
- addSimpleConfigurator = false;
- BundleDescription[] result = new BundleDescription[bundleLocations.length + (addSimpleConfigurator ? 1 : 0)];
- BundleDescriptionFactory factory = getBundleFactory();
- for (int i = 0; i < bundleLocations.length; i++) {
- BundleDescription desc = factory.getBundleDescription(bundleLocations[i]);
- if (desc != null)
- result[i] = desc;
- }
- if (addSimpleConfigurator) {
- //Add simple configurator to the list of bundles
- try {
- File location = new File(FileLocator.toFileURL(Activator.getContext().getBundle().getEntry(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR + ".jar")).getFile()); //$NON-NLS-1$
- result[result.length - 1] = factory.getBundleDescription(location);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return result;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- protected BundleDescriptionFactory getBundleFactory() {
- return new BundleDescriptionFactory(stateObjectFactory, null);
- }
-
- /**
- * Returns the categories corresponding to the given feature, or null if there
- * are no applicable categories.
- * @param feature The feature to return categories for
- * @param featuresToCategories A map of SiteFeature->Set<SiteCategory>
- * @return A Set<SiteCategory> of the categories corresponding to the feature, or <code>null</code>
- * @deprecated moved to SiteXMLAction
- */
- private Set getCategories(Feature feature, Map featuresToCategories) {
- //find the SiteFeature corresponding to the given feature
- for (Iterator it = featuresToCategories.keySet().iterator(); it.hasNext();) {
- SiteFeature siteFeature = (SiteFeature) it.next();
- String siteVersion = siteFeature.getFeatureVersion();
- if (!siteFeature.getFeatureIdentifier().equals(feature.getId()))
- continue;
- if (siteVersion.endsWith("qualifier")) { //$NON-NLS-1$
- String withoutQualifier = siteVersion.substring(0, siteVersion.lastIndexOf("qualifier")); //$NON-NLS-1$
- String featureVersion = feature.getVersion();
- if (featureVersion.length() >= withoutQualifier.length() && featureVersion.substring(0, withoutQualifier.length()).equals(withoutQualifier))
- return (Set) featuresToCategories.get(siteFeature);
- } else if (siteFeature.getFeatureVersion().equals(feature.getVersion())) {
- return (Set) featuresToCategories.get(siteFeature);
- }
- }
- return null;
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- protected Feature[] getFeatures(File folder) {
- if (folder == null || !folder.exists())
- return new Feature[0];
- File[] locations = folder.listFiles();
- ArrayList result = new ArrayList(locations.length);
- for (int i = 0; i < locations.length; i++) {
- Feature feature = new FeatureParser().parse(locations[i]);
- if (feature != null) {
- feature.setLocation(locations[i].getAbsolutePath());
- result.add(feature);
- }
- }
- return (Feature[]) result.toArray(new Feature[result.size()]);
- }
-
- /**
- * Computes the mapping of features to categories as defined in the site.xml,
- * if available. Returns an empty map if there is not site.xml, or no categories.
- * @return A map of SiteFeature -> Set<SiteCategory>.
- */
- protected Map getFeatureToCategoryMappings() {
- HashMap mappings = new HashMap();
- URI siteLocation = info.getSiteLocation();
- if (siteLocation == null)
- return mappings;
- InputStream input;
- SiteModel site = null;
- try {
- input = new BufferedInputStream(URIUtil.toURL(siteLocation).openStream());
- site = new DefaultSiteParser().parse(input);
- } catch (FileNotFoundException e) {
- //don't complain if the update site is not present
- } catch (Exception e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.exception_errorParsingUpdateSite, siteLocation), e));
- }
- if (site == null)
- return mappings;
-
- //copy mirror information from update site to p2 repositories
- String mirrors = site.getMirrorsURL();
- if (mirrors != null) {
- //remove site.xml file reference
- int index = mirrors.indexOf("site.xml"); //$NON-NLS-1$
- if (index != -1)
- mirrors = mirrors.substring(0, index) + mirrors.substring(index + "site.xml".length()); //$NON-NLS-1$
- info.getMetadataRepository().setProperty(IRepository.PROP_MIRRORS_URL, mirrors);
- info.getArtifactRepository().setProperty(IRepository.PROP_MIRRORS_URL, mirrors);
- }
-
- //publish associate sites as repository references
- URLEntry[] associatedSites = site.getAssociatedSites();
- if (associatedSites != null)
- for (int i = 0; i < associatedSites.length; i++)
- generateSiteReference(associatedSites[i].getURL(), associatedSites[i].getAnnotation(), null, true);
-
- if (PROTOCOL_FILE.equals(siteLocation.getScheme())) {
- File siteFile = URIUtil.toFile(siteLocation);
- if (siteFile.exists()) {
- File siteParent = siteFile.getParentFile();
-
- List messageKeys = site.getMessageKeys();
- if (siteParent.isDirectory()) {
- String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
- site.setLocalizations(LocalizationHelper.getDirPropertyLocalizations(siteParent, "site", null, keyStrings)); //$NON-NLS-1$
- } else if (siteFile.getName().endsWith(".jar")) { //$NON-NLS-1$
- String[] keyStrings = (String[]) messageKeys.toArray(new String[messageKeys.size()]);
- site.setLocalizations(LocalizationHelper.getJarPropertyLocalizations(siteParent, "site", null, keyStrings)); //$NON-NLS-1$
- }
- }
- }
-
- SiteFeature[] features = site.getFeatures();
- for (int i = 0; i < features.length; i++) {
- //add a mapping for each category this feature belongs to
- String[] categoryNames = features[i].getCategoryNames();
- for (int j = 0; j < categoryNames.length; j++) {
- SiteCategory category = site.getCategory(categoryNames[j]);
- if (category != null) {
- Set categories = (Set) mappings.get(features[i]);
- if (categories == null) {
- categories = new HashSet();
- mappings.put(features[i], categories);
- }
- categories.add(category);
- }
- }
- }
- return mappings;
- }
-
- /**
- * @TODO This method is a temporary hack to rename the launcher.exe files
- * to eclipse.exe (or "launcher" to "eclipse"). Eventually we will either hand-craft
- * metadata/artifacts for launchers, or alter the delta pack to contain eclipse-branded
- * launchers.
- * @deprecated moved to EquinoxExecutableAction
- */
- private void mungeLauncherFileNames(File root) {
- if (root.isDirectory()) {
- File[] children = root.listFiles();
- for (int i = 0; i < children.length; i++) {
- mungeLauncherFileNames(children[i]);
- }
- } else if (root.isFile()) {
- if (root.getName().equals("launcher")) //$NON-NLS-1$
- root.renameTo(new File(root.getParentFile(), "eclipse")); //$NON-NLS-1$
- else if (root.getName().equals("launcher.exe")) //$NON-NLS-1$
- root.renameTo(new File(root.getParentFile(), "eclipse.exe")); //$NON-NLS-1$
- }
- }
-
- protected void publishArtifact(IArtifactDescriptor descriptor, File[] files, IArtifactRepository destination, boolean asIs) {
- publishArtifact(descriptor, files, destination, asIs, null);
- }
-
- // Put the artifact on the server
- /**
- * @deprecated moved to AbstractPublishingAction
- */
- protected void publishArtifact(IArtifactDescriptor descriptor, File[] files, IArtifactRepository destination, boolean asIs, File root) {
- if (descriptor == null || destination == null)
- return;
- if (!info.publishArtifacts()) {
- destination.addDescriptor(descriptor);
- return;
- }
- if (asIs && files.length == 1) {
- try {
- if (!destination.contains(descriptor)) {
- if (destination instanceof IFileArtifactRepository) {
- //if the file is already in the same location the repo will put it, just add the descriptor and exit
- File descriptorFile = ((IFileArtifactRepository) destination).getArtifactFile(descriptor);
- if (files[0].equals(descriptorFile)) {
- destination.addDescriptor(descriptor);
- return;
- }
- }
- OutputStream output = new BufferedOutputStream(destination.getOutputStream(descriptor));
- FileUtils.copyStream(new BufferedInputStream(new FileInputStream(files[0])), true, output, true);
- }
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
- }
- } else {
- File tempFile = null;
- try {
- tempFile = File.createTempFile("p2.generator", ""); //$NON-NLS-1$ //$NON-NLS-2$
- IPathComputer computer = null;
- if (root != null)
- computer = FileUtils.createRootPathComputer(root);
- else
- computer = FileUtils.createDynamicPathComputer(1);
- FileUtils.zip(files, null, tempFile, computer);
- if (!destination.contains(descriptor)) {
- destination.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
- OutputStream output = new BufferedOutputStream(destination.getOutputStream(descriptor));
- FileUtils.copyStream(new BufferedInputStream(new FileInputStream(tempFile)), true, output, true);
- }
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
- } finally {
- if (tempFile != null)
- tempFile.delete();
- }
- }
- }
-
- public void setGenerateRootIU(boolean generateRootIU) {
- this.generateRootIU = generateRootIU;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java
deleted file mode 100644
index fdfef7d10..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/GeneratorBundleInfo.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-
-public class GeneratorBundleInfo extends BundleInfo {
- // public static final int NO_LEVEL = -1;
-
- // private String symbolicName;
- // private String version;
- // private String location;
- // private int expectedState;
- // private int startLevel = NO_LEVEL;
- // private String manifest;
-
- private String specialConfigCommands;
- private String specialUnconfigCommands;
-
- public GeneratorBundleInfo(BundleInfo bInfo) {
- super.setBundleId(bInfo.getBundleId());
- super.setLocation(bInfo.getLocation());
- super.setManifest(bInfo.getManifest());
- super.setMarkedAsStarted(bInfo.isMarkedAsStarted());
- super.setResolved(bInfo.isResolved());
- super.setStartLevel(bInfo.getStartLevel());
- super.setSymbolicName(bInfo.getSymbolicName());
- super.setVersion(bInfo.getVersion());
- }
-
- public GeneratorBundleInfo() {
- // TODO Auto-generated constructor stub
- }
-
- // /* (non-Javadoc)
- // * @see java.lang.Object#hashCode()
- // */
- // public int hashCode() {
- // int result = symbolicName == null ? 0 : symbolicName.hashCode();
- // result = result + (version == null ? 0 : version.hashCode());
- // result = result + (location == null ? 0 : location.hashCode());
- // return result;
- // }
- //
- // public String getSymbolicName() {
- // return symbolicName;
- // }
- //
- // public String getVersion() {
- // return version;
- // }
- //
- // public int expectedState() {
- // return expectedState;
- // }
- //
- // public int getStartLevel() {
- // return startLevel;
- // }
- //
- // public String getLocation() {
- // return location;
- // }
- //
- // public void setSymbolicName(String id) {
- // symbolicName = id;
- // }
- //
- // public void setVersion(String version) {
- // this.version = version;
- // }
- //
- // public void setExpectedState(int state) {
- // expectedState = state;
- // }
- //
- // public void setStartLevel(int level) {
- // this.startLevel = level;
- // }
- //
- // public void setLocation(String location) {
- // this.location = location;
- // }
- //
- // public void setManifest(String manifest) {
- // this.manifest = manifest;
- // }
- //
- // public String getManifest() {
- // return manifest;
- // }
- //
- public String getSpecialConfigCommands() {
- return specialConfigCommands;
- }
-
- public void setSpecialConfigCommands(String specialConfigCommands) {
- this.specialConfigCommands = specialConfigCommands;
- }
-
- public String getSpecialUnconfigCommands() {
- return specialUnconfigCommands;
- }
-
- public void setSpecialUnconfigCommands(String specialUnconfigCommands) {
- this.specialUnconfigCommands = specialUnconfigCommands;
- }
-
- // /* (non-Javadoc)
- // * @see java.lang.Object#equals(java.lang.Object)
- // */
- // public boolean equals(Object toCompare) {
- // if (toCompare instanceof GeneratorBundleInfo) {
- // GeneratorBundleInfo info = (GeneratorBundleInfo) toCompare;
- // if (info.symbolicName.equals(symbolicName) && info.version.equals(version) && (info.location == null || location == null ? true : info.location.equals(location)))
- // return true;
- // }
- // return false;
- // }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- String superSt = super.toString();
- if (superSt.length() > 0)
- buffer.append(superSt.substring(0, superSt.length() - 1));
- buffer.append(", this.specialConfigCommands="); //$NON-NLS-1$
- buffer.append(this.specialConfigCommands);
- buffer.append(')');
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
deleted file mode 100644
index 21dd8e27a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.File;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-public interface IGeneratorInfo {
-
- /**
- * Returns whether or not to add the default IUs to the published result.
- * The default IUs are typically used to configure bundles, features and
- * source bundles.
- * @return whether or not to publish default IUs
- */
- public boolean addDefaultIUs();
-
- /**
- * Returns whether or not to append to existing repositories or overwrite.
- * @return whether or not to append to existing repositories or overwrite.
- */
- public boolean append();
-
- /**
- * Returns the artifact repository into which any publishable artifacts are published
- * or <code>null</code> if none.
- * @return a destination artifact repository or <code>null</code>
- */
- public IArtifactRepository getArtifactRepository();
-
- /**
- * Returns a list of locations in which bundles may be found. The locations may
- * be directories to search or actual bundle files.
- * @return the list of locations holding bundles to process.
- */
- public File[] getBundleLocations();
-
- /**
- * Return the configuration data to use during publishing or <code>null</code>
- * if none. The configuration data details the framework and launcher setup.
- *
- * @return the configuration data or <code>null</code>
- */
- public ConfigData getConfigData();
-
- public ArrayList getDefaultIUs(Set ius);
-
- public File getExecutableLocation();
-
- public File getFeaturesLocation();
-
- public String getFlavor();
-
- public File getJRELocation();
-
- /**
- * The platform for the data this location
- * @return Returns a pde.build style platform config in the form os_ws_arch
- */
- public String getLauncherConfig();
-
- public LauncherData getLauncherData();
-
- public IMetadataRepository getMetadataRepository();
-
- public String getRootId();
-
- public String getRootVersion();
-
- public String getProductFile();
-
- public String getVersionAdvice();
-
- /**
- * Returns the location of the site.xml file, or <code>null</code> if not
- * generating for an update site.
- * @return The location of site.xml, or <code>null</code>
- */
- public URI getSiteLocation();
-
- public boolean publishArtifactRepository();
-
- public boolean publishArtifacts();
-
- public boolean reuseExistingPack200Files();
-
- public void reuseExistingPack200Files(boolean publishPack);
-
- public void setArtifactRepository(IArtifactRepository value);
-
- public void setFlavor(String value);
-
- public void setMetadataRepository(IMetadataRepository value);
-
- public void setPublishArtifacts(boolean value);
-
- public void setRootId(String value);
-
- public void setVersionAdvice(String advice);
-
- // TODO: This is kind of ugly. It's purpose is to allow us to craft CUs that we know about and need for our build
- // We should try to replace this with something more generic prior to release
- public Collection getOtherIUs();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IncrementalGenerator.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IncrementalGenerator.java
deleted file mode 100644
index cb90025f1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IncrementalGenerator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator.GeneratorResult;
-
-/**
- * A class to enable carrying GeneratorResults across multiple invocations of the Generator.
- * Done here in the bundle instead of in GeneratorTask because of the way org.eclipse.ant.core.AntRunner uses class loaders.
- * @since 1.0
- */
-
-public class IncrementalGenerator {
- private static String MODE_INCREMENTAL = "incremental"; //$NON-NLS-1$
- private String mode = null;
- static private GeneratorResult result = null;
-
- public void setMode(String mode) {
- this.mode = mode;
- }
-
- public void run(EclipseGeneratorApplication generator, EclipseInstallGeneratorInfoProvider provider) throws Exception {
- if (MODE_INCREMENTAL.equals(mode)) {
- if (result == null)
- result = new GeneratorResult();
- generator.setIncrementalResult(result);
- generator.setGeneratorRootIU(false);
- } else if ("final".equals(mode) && result != null) { //$NON-NLS-1$
- generator.setIncrementalResult(result);
- generator.setGeneratorRootIU(true);
- }
-
- generator.run(provider);
-
- if (!MODE_INCREMENTAL.equals(mode)) {
- result = null;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
deleted file mode 100644
index 53efbdb07..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
+++ /dev/null
@@ -1,1434 +0,0 @@
-/*******************************************************************************
- * 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
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
-import org.eclipse.equinox.internal.p2.metadata.generator.LocalizationHelper;
-import org.eclipse.equinox.internal.p2.metadata.generator.features.SiteCategory;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.ManifestElement;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
-/**
- * @deprecated this class has been renamed to PublisherHelper and the vast majority
- * of the function has been deprecated and moved elsewhere. See the deprecation notices there
- * for more information.
- */
-public class MetadataGeneratorHelper {
- /**
- * A capability namespace representing the type of Eclipse resource (bundle, feature, source bundle, etc)
- * @see IProvidedCapability#getNamespace()
- */
- public static final String NAMESPACE_ECLIPSE_TYPE = "org.eclipse.equinox.p2.eclipse.type"; //$NON-NLS-1$
-
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing and OSGi bundle resource
- * @see IProvidedCapability#getName()
- */
- public static final String TYPE_ECLIPSE_BUNDLE = "bundle"; //$NON-NLS-1$
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing a feature
- */
- public static final String TYPE_ECLIPSE_FEATURE = "feature"; //$NON-NLS-1$
-
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing a source bundle
- */
- public static final String TYPE_ECLIPSE_SOURCE = "source"; //$NON-NLS-1$
-
- /**
- * A capability namespace representing the localization (translation)
- * of strings from a specified IU in a specified locale
- * @see IProvidedCapability#getNamespace()
- * TODO: this should be in API, probably in IInstallableUnit
- */
- public static final String NAMESPACE_IU_LOCALIZATION = "org.eclipse.equinox.p2.localization"; //$NON-NLS-1$
-
- // Only certain properties in the bundle manifest are assumed to be localized.
- public static final String[] BUNDLE_LOCALIZED_PROPERTIES = {Constants.BUNDLE_NAME, Constants.BUNDLE_DESCRIPTION, Constants.BUNDLE_VENDOR, Constants.BUNDLE_CONTACTADDRESS, Constants.BUNDLE_DOCURL, Constants.BUNDLE_UPDATELOCATION};
- public static final int BUNDLE_LOCALIZATION_INDEX = BUNDLE_LOCALIZED_PROPERTIES.length;
-
- private static final String[] BUNDLE_IU_PROPERTY_MAP = {Constants.BUNDLE_NAME, IInstallableUnit.PROP_NAME, Constants.BUNDLE_DESCRIPTION, IInstallableUnit.PROP_DESCRIPTION, Constants.BUNDLE_VENDOR, IInstallableUnit.PROP_PROVIDER, Constants.BUNDLE_CONTACTADDRESS, IInstallableUnit.PROP_CONTACT, Constants.BUNDLE_DOCURL, IInstallableUnit.PROP_DOC_URL};
-
- private static final String CAPABILITY_NS_JAVA_PACKAGE = "java.package"; //$NON-NLS-1$
- private static final String CAPABILITY_NS_OSGI_BUNDLE = "osgi.bundle"; //$NON-NLS-1$
- private static final String CAPABILITY_NS_OSGI_FRAGMENT = "osgi.fragment"; //$NON-NLS-1$
-
- private static final String CAPABILITY_NS_UPDATE_FEATURE = "org.eclipse.update.feature"; //$NON-NLS-1$
-
- private static final Version DEFAULT_JRE_VERSION = Version.create("1.6"); //$NON-NLS-1$
-
- public static final String ECLIPSE_FEATURE_CLASSIFIER = "org.eclipse.update.feature"; //$NON-NLS-1$
- public static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
- public static final String BINARY_ARTIFACT_CLASSIFIER = "binary"; //$NON-NLS-1$
-
- public static final IMatchExpression INSTALL_FEATURES_FILTER = InstallableUnit.parseFilter("(org.eclipse.update.install.features=true)"); //$NON-NLS-1$
-
- private static final String IU_NAMESPACE = IInstallableUnit.NAMESPACE_IU_ID;
-
- private static final String LAUNCHER_ID_PREFIX = "org.eclipse.launcher"; //$NON-NLS-1$
-
- private static final String ECLIPSE_INSTALL_HANDLER_PROP = "org.eclipse.update.installHandler"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_APPLICATION_PROP = "org.eclipse.update.feature.application"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PLUGIN_PROP = "org.eclipse.update.feature.plugin"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_EXCLUSIVE_PROP = "org.eclipse.update.feature.exclusive"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PRIMARY_PROP = "org.eclipse.update.feature.primary"; //$NON-NLS-1$
-
- //TODO - need to come up with a way to infer launcher version
- private static final Version LAUNCHER_VERSION = Version.createOSGi(1, 0, 0);
-
- public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
- public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
-
- public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, Version.createOSGi(1, 0, 0));
- public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, Version.createOSGi(1, 0, 0));
- public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, Version.createOSGi(1, 0, 0));
-
- static final String DEFAULT_BUNDLE_LOCALIZATION = "plugin"; //$NON-NLS-1$
-
- static final String BUNDLE_ADVICE_FILE = "META-INF/p2.inf"; //$NON-NLS-1$
- static final String ADVICE_INSTRUCTIONS_PREFIX = "instructions."; //$NON-NLS-1$
-
- static final String NAMESPACE_FLAVOR = "org.eclipse.equinox.p2.flavor"; //$NON-NLS-1$"
-
- public static IArtifactDescriptor createArtifactDescriptor(IArtifactKey key, File pathOnDisk, boolean asIs, boolean recur) {
- //TODO this size calculation is bogus
- ArtifactDescriptor result = new ArtifactDescriptor(key);
- if (pathOnDisk != null) {
- result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, Long.toString(pathOnDisk.length()));
- // TODO - this is wrong but I'm testing a work-around for bug 205842
- result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
- }
- if (asIs) {
- String md5 = computeMD5(pathOnDisk);
- if (md5 != null)
- result.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, md5);
- }
- return result;
- }
-
- private static String computeMD5(File file) {
- if (file == null || file.isDirectory() || !file.exists())
- return null;
- MessageDigest md5Checker;
- try {
- md5Checker = MessageDigest.getInstance("MD5"); //$NON-NLS-1$
- } catch (NoSuchAlgorithmException e) {
- return null;
- }
- InputStream fis = null;
- try {
- fis = new BufferedInputStream(new FileInputStream(file));
- int read = -1;
- while ((read = fis.read()) != -1) {
- md5Checker.update((byte) read);
- }
- byte[] digest = md5Checker.digest();
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < digest.length; i++) {
- if ((digest[i] & 0xFF) < 0x10)
- buf.append('0');
- buf.append(Integer.toHexString(digest[i] & 0xFF));
- }
- return buf.toString();
- } catch (FileNotFoundException e) {
- return null;
- } catch (IOException e) {
- return null;
- } finally {
- if (fis != null)
- try {
- fis.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- /**
- * @deprecated moved to AbstractPublishingAction
- */
- public static IArtifactDescriptor createPack200ArtifactDescriptor(IArtifactKey key, File pathOnDisk, String installSize) {
- //TODO this size calculation is bogus
- ArtifactDescriptor result = new ArtifactDescriptor(key);
- if (pathOnDisk != null) {
- result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, installSize);
- // TODO - this is wrong but I'm testing a work-around for bug 205842
- result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
- }
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- result.setProcessingSteps(steps);
- result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
- return result;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static IInstallableUnit createBundleConfigurationUnit(String iuId, Version iuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, String ldapFilter) {
- IMatchExpression filter = ldapFilter == null ? null : InstallableUnit.parseFilter(ldapFilter);
- return createBundleConfigurationUnit(iuId, iuVersion, isBundleFragment, configInfo, configurationFlavor, filter);
- }
-
- public static IInstallableUnit createBundleConfigurationUnit(String iuId, Version iuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, IMatchExpression filter) {
- if (configInfo == null)
- return null;
-
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = configurationFlavor + iuId;
- cu.setId(configUnitId);
- cu.setVersion(iuVersion);
-
- //Indicate the IU to which this CU apply
- cu.setHost(new IRequirement[] { //
- MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, iuId, new VersionRange(iuVersion, true, Version.MAX_VERSION, true), null, false, false, true), //
- MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(Version.createOSGi(1, 0, 0), true, Version.createOSGi(2, 0, 0), false), null, false, false, false)});
-
- //Adds capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, iuVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- Map touchpointData = new HashMap();
- touchpointData.put("install", "installBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("configure", createConfigScript(configInfo, isBundleFragment)); //$NON-NLS-1$
- touchpointData.put("unconfigure", createUnconfigScript(configInfo, isBundleFragment)); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- cu.setFilter(filter);
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static IInstallableUnit createBundleIU(BundleDescription bd, Map manifest, boolean isFolderPlugin, IArtifactKey key, boolean useNestedAdvice) {
- Map manifestLocalizations = null;
- if (manifest != null && bd.getLocation() != null) {
- manifestLocalizations = getManifestLocalizations(manifest, new File(bd.getLocation()));
- }
-
- return createBundleIU(bd, manifest, isFolderPlugin, key, manifestLocalizations, useNestedAdvice);
- }
-
- private static VersionRange computeUpdateRange(org.osgi.framework.Version base) {
- VersionRange updateRange = null;
- if (!base.equals(org.osgi.framework.Version.emptyVersion)) {
- updateRange = new VersionRange(Version.emptyVersion, true, fromOSGiVersion(base), false);
- } else {
- updateRange = VersionRange.emptyRange;
- }
- return updateRange;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static IInstallableUnit createBundleIU(BundleDescription bd, Map manifest, boolean isFolderPlugin, IArtifactKey key, Map manifestLocalizations, boolean useNestedAdvice) {
- boolean isBinaryBundle = true;
- if (manifest != null && manifest.containsKey("Eclipse-SourceBundle")) { //$NON-NLS-1$
- isBinaryBundle = false;
- }
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(bd.isSingleton());
- iu.setId(bd.getSymbolicName());
- iu.setVersion(fromOSGiVersion(bd.getVersion()));
- iu.setFilter(bd.getPlatformFilter());
-
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(bd.getSymbolicName(), computeUpdateRange(bd.getVersion()), IUpdateDescriptor.NORMAL, null));
-
- boolean isFragment = bd.getHost() != null;
- // boolean requiresAFragment = isFragment ? false : requireAFragment(bd, manifest);
-
- //Process the required bundles
- BundleSpecification requiredBundles[] = bd.getRequiredBundles();
- ArrayList reqsDeps = new ArrayList();
- // if (requiresAFragment)
- // reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_TYPE_OSGI_FRAGMENTS, bd.getSymbolicName(), VersionRange.emptyRange, null, false, false));
- if (isFragment)
- reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
- for (int j = 0; j < requiredBundles.length; j++)
- reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), fromOSGiVersionRange(requiredBundles[j].getVersionRange()), null, requiredBundles[j].isOptional(), false));
-
- // Process the import packages
- ImportPackageSpecification osgiImports[] = bd.getImportPackages();
- for (int i = 0; i < osgiImports.length; i++) {
- // TODO we need to sort out how we want to handle wild-carded dynamic imports - for now we ignore them
- ImportPackageSpecification importSpec = osgiImports[i];
- String importPackageName = importSpec.getName();
- if (importPackageName.indexOf('*') != -1)
- continue;
-
- VersionRange versionRange = fromOSGiVersionRange(importSpec.getVersionRange());
-
- //TODO this needs to be refined to take into account all the attribute handled by imports
- reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
- }
- iu.setRequirements((IRequirement[]) reqsDeps.toArray(new IRequirement[reqsDeps.size()]));
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(bd.getSymbolicName(), fromOSGiVersion(bd.getVersion())));
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), fromOSGiVersion(bd.getVersion())));
-
- // Process the export package
- ExportPackageDescription exports[] = bd.getExportPackages();
- for (int i = 0; i < exports.length; i++) {
- //TODO make sure that we support all the refinement on the exports
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_JAVA_PACKAGE, exports[i].getName(), fromOSGiVersion(exports[i].getVersion())));
- }
- // Here we add a bundle capability to identify bundles
- if (isBinaryBundle)
- providedCapabilities.add(BUNDLE_CAPABILITY);
- else
- providedCapabilities.add(SOURCE_BUNDLE_CAPABILITY);
-
- if (isFragment)
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_FRAGMENT, bd.getHost().getName(), fromOSGiVersion(bd.getVersion())));
-
- if (manifestLocalizations != null) {
- for (Iterator iter = manifestLocalizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) manifestLocalizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(bd.getSymbolicName(), locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- iu.setArtifacts(new IArtifactKey[] {key});
-
- iu.setTouchpointType(TOUCHPOINT_OSGI);
-
- // Set certain properties from the manifest header attributes as IU properties.
- // The values of these attributes may be localized (strings starting with '%')
- // with the translated values appearing in the localization IU fragments
- // associated with the bundle IU.
- if (manifest != null) {
- int i = 0;
- while (i < BUNDLE_IU_PROPERTY_MAP.length) {
- if (manifest.containsKey(BUNDLE_IU_PROPERTY_MAP[i])) {
- String value = (String) manifest.get(BUNDLE_IU_PROPERTY_MAP[i]);
- if (value != null && value.length() > 0) {
- iu.setProperty(BUNDLE_IU_PROPERTY_MAP[i + 1], value);
- }
- }
- i += 2;
- }
- }
-
- // Define the immutable metadata for this IU. In this case immutable means
- // that this is something that will not impact the configuration.
- Map touchpointData = new HashMap();
- if (isFolderPlugin)
- touchpointData.put("zipped", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("manifest", toManifestString(manifest)); //$NON-NLS-1$
-
- if (useNestedAdvice)
- mergeInstructionsAdvice(touchpointData, getBundleAdvice(bd.getLocation(), BUNDLE_ADVICE_FILE));
-
- iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- /**
- * @deprecated moved to AdviceFileAdvice
- */
- public static void mergeInstructionsAdvice(Map touchpointData, Map bundleAdvice) {
- if (touchpointData == null || bundleAdvice == null)
- return;
-
- for (Iterator iterator = bundleAdvice.keySet().iterator(); iterator.hasNext();) {
- String key = (String) iterator.next();
- if (key.startsWith(ADVICE_INSTRUCTIONS_PREFIX)) {
- String phase = key.substring(ADVICE_INSTRUCTIONS_PREFIX.length());
- String instructions = touchpointData.containsKey(phase) ? (String) touchpointData.get(phase) : ""; //$NON-NLS-1$
- if (instructions.length() > 0)
- instructions += ";"; //$NON-NLS-1$
- instructions += ((String) bundleAdvice.get(key)).trim();
- touchpointData.put(phase, instructions);
- }
- }
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static void createHostLocalizationFragment(IInstallableUnit bundleIU, BundleDescription bd, String hostId, String[] hostBundleManifestValues, Set localizationIUs) {
- Map hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues);
- if (hostLocalizations != null) {
- IInstallableUnitFragment localizationFragment = createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations);
- localizationIUs.add(localizationFragment);
- }
- }
-
- /*
- * @param hostId
- * @param bd
- * @param locale
- * @param localizedStrings
- * @return installableUnitFragment
- */
- /**
- * @deprecated moved to BundlesAction
- */
- private static IInstallableUnitFragment createLocalizationFragmentOfHost(BundleDescription bd, String hostId, String[] hostManifestValues, Map hostLocalizations) {
- InstallableUnitFragmentDescription fragment = new MetadataFactory.InstallableUnitFragmentDescription();
- String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
- fragment.setId(fragmentId);
- fragment.setVersion(fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
-
- HostSpecification hostSpec = bd.getHost();
- IRequirement[] hostReqs = new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
- fragment.setHost(hostReqs);
-
- fragment.setSingleton(true);
- fragment.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-
- // Create a provided capability for each locale and add the translated properties.
- ArrayList providedCapabilities = new ArrayList(hostLocalizations.keySet().size());
- for (Iterator iter = hostLocalizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) hostLocalizations.get(locale);
-
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- fragment.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(hostId, locale));
- }
- fragment.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- return MetadataFactory.createInstallableUnitFragment(fragment);
- }
-
- /**
- * @param id
- * @return the id for the iu fragment containing the localized properties
- * for the bundle with the given id
- */
- // private static String makeBundleLocalizationFragmentId(String id) {
- // return id + ".translated_properties"; //$NON-NLS-1$
- // }
- /**
- * @param id
- * @return the id for the iu fragment containing localized properties
- * for the fragment with the given id.
- */
- /**
- * @deprecated moved to BundlesAction
- */
- private static String makeHostLocalizationFragmentId(String id) {
- return id + ".translated_host_properties"; //$NON-NLS-1$
- }
-
- private static IProvidedCapability makeTranslationCapability(String hostId, Locale locale) {
- return MetadataFactory.createProvidedCapability(NAMESPACE_IU_LOCALIZATION, locale.toString(), Version.createOSGi(1, 0, 0));
- }
-
- /**
- * Creates an IU corresponding to an update site category
- * @param category The category descriptor
- * @param featureIUs The IUs of the features that belong to the category
- * @param parentCategory The parent category, or <code>null</code>
- * @return an IU representing the category
- * @deprecated moved to SiteXMLAction
- */
- public static IInstallableUnit createCategoryIU(SiteCategory category, Set featureIUs, IInstallableUnit parentCategory) {
- InstallableUnitDescription cat = new MetadataFactory.InstallableUnitDescription();
- cat.setSingleton(true);
- String categoryId = category.getName();
- cat.setId(categoryId);
- cat.setVersion(Version.emptyVersion);
- cat.setProperty(IInstallableUnit.PROP_NAME, category.getLabel());
- cat.setProperty(IInstallableUnit.PROP_DESCRIPTION, category.getDescription());
-
- ArrayList reqsConfigurationUnits = new ArrayList(featureIUs.size());
- for (Iterator iterator = featureIUs.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = (IInstallableUnit) iterator.next();
- VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
- reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter() == null ? null : iu.getFilter(), false, false));
- }
- //note that update sites don't currently support nested categories, but it may be useful to add in the future
- if (parentCategory != null) {
- reqsConfigurationUnits.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, parentCategory.getId(), VersionRange.emptyRange, parentCategory.getFilter() == null ? null : parentCategory.getFilter(), false, false));
- }
- cat.setRequirements((IRequirement[]) reqsConfigurationUnits.toArray(new IRequirement[reqsConfigurationUnits.size()]));
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(categoryId, Version.emptyVersion));
-
- Map localizations = category.getLocalizations();
- if (localizations != null) {
- for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) localizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- cat.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(categoryId, locale));
- }
- }
-
- cat.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- cat.setArtifacts(new IArtifactKey[0]);
- cat.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
- return MetadataFactory.createInstallableUnit(cat);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String createConfigScript(GeneratorBundleInfo configInfo, boolean isBundleFragment) {
- if (configInfo == null)
- return ""; //$NON-NLS-1$
-
- String configScript = "";//$NON-NLS-1$
- if (!isBundleFragment && configInfo.getStartLevel() != BundleInfo.NO_LEVEL) {
- configScript += "setStartLevel(startLevel:" + configInfo.getStartLevel() + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (!isBundleFragment && configInfo.isMarkedAsStarted()) {
- configScript += "markStarted(started: true);"; //$NON-NLS-1$
- }
-
- if (configInfo.getSpecialConfigCommands() != null) {
- configScript += configInfo.getSpecialConfigCommands();
- }
-
- return configScript;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String createDefaultBundleConfigScript(GeneratorBundleInfo configInfo) {
- return createConfigScript(configInfo, false);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static IInstallableUnit createDefaultBundleConfigurationUnit(GeneratorBundleInfo configInfo, GeneratorBundleInfo unconfigInfo, String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId(OSGI_BUNDLE_CLASSIFIER, configurationFlavor);
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on bundles
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, VersionRange.emptyRange, null, false, true, false)};
- cu.setHost(reqs);
- Map touchpointData = new HashMap();
-
- touchpointData.put("install", "installBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("configure", createDefaultBundleConfigScript(configInfo)); //$NON-NLS-1$
- touchpointData.put("unconfigure", createDefaultBundleUnconfigScript(unconfigInfo)); //$NON-NLS-1$
-
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String createDefaultBundleUnconfigScript(GeneratorBundleInfo unconfigInfo) {
- return createUnconfigScript(unconfigInfo, false);
- }
-
- public static String createDefaultConfigUnitId(String classifier, String configurationFlavor) {
- return configurationFlavor + "." + classifier + ".default"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static IInstallableUnit createDefaultFeatureConfigurationUnit(String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId(ECLIPSE_FEATURE_CLASSIFIER, configurationFlavor);
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on features
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, VersionRange.emptyRange, null, true, true, false)};
- cu.setHost(reqs);
-
- cu.setFilter(INSTALL_FEATURES_FILTER);
- Map touchpointData = new HashMap();
- touchpointData.put("install", "installFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- public static IInstallableUnit createDefaultConfigurationUnitForSourceBundles(String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId("source", configurationFlavor); //$NON-NLS-1$
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on source providers
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, VersionRange.emptyRange, null, true, true, false)};
- cu.setHost(reqs);
- Map touchpointData = new HashMap();
-
- touchpointData.put("install", "addSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "removeSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IArtifactKey createFeatureArtifactKey(String fsn, String version) {
- return new ArtifactKey(ECLIPSE_FEATURE_CLASSIFIER, fsn, Version.create(version));
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IInstallableUnit createFeatureJarIU(Feature feature, boolean isExploded) {
- return createFeatureJarIU(feature, isExploded, null);
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IInstallableUnit createFeatureJarIU(Feature feature, boolean isExploded, Properties extraProperties) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- String id = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/false);
- iu.setId(id);
- Version version = fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
- iu.setVersion(version);
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
- iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
- if (feature.getDescription() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION, feature.getDescription());
- if (feature.getDescriptionURL() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION_URL, feature.getDescriptionURL());
- if (feature.getProviderName() != null)
- iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
- if (feature.getLicense() != null)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
- if (feature.getCopyright() != null)
- iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
- if (feature.getApplication() != null)
- iu.setProperty(UPDATE_FEATURE_APPLICATION_PROP, feature.getApplication());
- if (feature.getPlugin() != null)
- iu.setProperty(UPDATE_FEATURE_PLUGIN_PROP, feature.getPlugin());
- if (feature.isExclusive())
- iu.setProperty(UPDATE_FEATURE_EXCLUSIVE_PROP, Boolean.TRUE.toString());
- if (feature.isPrimary())
- iu.setProperty(UPDATE_FEATURE_PRIMARY_PROP, Boolean.TRUE.toString());
-
- // The required capabilities are not specified at this level because we don't want the feature jar to be attractive to install.
-
- iu.setTouchpointType(TOUCHPOINT_OSGI);
- iu.setFilter(INSTALL_FEATURES_FILTER);
- iu.setSingleton(true);
-
- if (feature.getInstallHandler() != null && feature.getInstallHandler().trim().length() > 0) {
- String installHandlerProperty = "handler=" + feature.getInstallHandler(); //$NON-NLS-1$
-
- if (feature.getInstallHandlerLibrary() != null)
- installHandlerProperty += ", library=" + feature.getInstallHandlerLibrary(); //$NON-NLS-1$
-
- if (feature.getInstallHandlerURL() != null)
- installHandlerProperty += ", url=" + feature.getInstallHandlerURL(); //$NON-NLS-1$
-
- iu.setProperty(ECLIPSE_INSTALL_HANDLER_PROP, installHandlerProperty);
- }
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(id, version));
- providedCapabilities.add(FEATURE_CAPABILITY);
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_UPDATE_FEATURE, feature.getId(), version));
-
- iu.setArtifacts(new IArtifactKey[] {createFeatureArtifactKey(feature.getId(), version.toString())});
-
- if (isExploded) {
- // Define the immutable metadata for this IU. In this case immutable means
- // that this is something that will not impact the configuration.
- Map touchpointData = new HashMap();
- touchpointData.put("zipped", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- }
-
- Map localizations = feature.getLocalizations();
- if (localizations != null) {
- for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) localizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- if (extraProperties != null) {
- Enumeration e = extraProperties.propertyNames();
- while (e.hasMoreElements()) {
- String name = (String) e.nextElement();
- iu.setProperty(name, extraProperties.getProperty(name));
- }
- }
-
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IInstallableUnit createGroupIU(Feature feature, IInstallableUnit featureIU) {
- return createGroupIU(feature, featureIU, null, true);
- }
-
- public static IInstallableUnit createGroupIU(Feature feature, IInstallableUnit featureIU, Properties extraProperties, boolean transformIds) {
- if (isPatch(feature))
- return createPatchIU(feature, featureIU, extraProperties);
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- String id = feature.getId();
- if (transformIds)
- id = getTransformedId(id, /*isPlugin*/false, /*isGroup*/true);
- iu.setId(id);
- Version version = fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
- iu.setVersion(version);
- iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
- if (feature.getDescription() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION, feature.getDescription());
- if (feature.getDescriptionURL() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION_URL, feature.getDescriptionURL());
- if (feature.getProviderName() != null)
- iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
- if (feature.getLicense() != null)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
- if (feature.getCopyright() != null)
- iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
-
- FeatureEntry entries[] = feature.getEntries();
- IRequirement[] required = new IRequirement[entries.length + (featureIU == null ? 0 : 1)];
- for (int i = 0; i < entries.length; i++) {
- VersionRange range = getVersionRange(entries[i]);
- String requiredId = entries[i].getId();
- if (transformIds)
- requiredId = getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true);
- required[i] = MetadataFactory.createRequirement(IU_NAMESPACE, requiredId, range, getFilter(entries[i]), entries[i].isOptional(), false);
- }
- // the feature IU could be null if we are just generating a feature structure rather than
- // actual features.
- if (featureIU != null)
- required[entries.length] = MetadataFactory.createRequirement(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false);
- iu.setRequirements(required);
- iu.setTouchpointType(ITouchpointType.NONE);
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- // TODO: shouldn't the filter for the group be constructed from os, ws, arch, nl
- // of the feature?
- // iu.setFilter(filter);
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(id, version));
-
- Map localizations = feature.getLocalizations();
- if (localizations != null) {
- for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) localizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- if (extraProperties != null) {
- Enumeration e = extraProperties.propertyNames();
- while (e.hasMoreElements()) {
- String name = (String) e.nextElement();
- iu.setProperty(name, extraProperties.getProperty(name));
- }
- }
-
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- public static IInstallableUnit createPatchIU(Feature feature, IInstallableUnit featureIU, Properties extraProperties) {
- InstallableUnitPatchDescription iu = new MetadataFactory.InstallableUnitPatchDescription();
- String id = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/true);
- iu.setId(id);
- Version version = fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
- iu.setVersion(version);
- iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
- if (feature.getDescription() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION, feature.getDescription());
- if (feature.getDescriptionURL() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION_URL, feature.getDescriptionURL());
- if (feature.getProviderName() != null)
- iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
- if (feature.getLicense() != null)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
- if (feature.getCopyright() != null)
- iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
-
- FeatureEntry entries[] = feature.getEntries();
- ArrayList applicabilityScope = new ArrayList();
- ArrayList patchRequirements = new ArrayList();
- ArrayList requirementChanges = new ArrayList();
- for (int i = 0; i < entries.length; i++) {
- VersionRange range = getVersionRange(entries[i]);
- IRequirement req = MetadataFactory.createRequirement(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, getFilter(entries[i]), entries[i].isOptional(), false);
- if (entries[i].isRequires()) {
- applicabilityScope.add(req);
- if (applicabilityScope.size() == 1) {
- iu.setLifeCycle(MetadataFactory.createRequirement(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, null, false, false, false));
- }
- continue;
- }
- if (entries[i].isPlugin()) {
- IRequirement from = MetadataFactory.createRequirement(IU_NAMESPACE, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), VersionRange.emptyRange, getFilter(entries[i]), entries[i].isOptional(), false);
- requirementChanges.add(MetadataFactory.createRequirementChange(from, req));
- continue;
- }
- patchRequirements.add(req);
- }
- //Always add a requirement on the IU containing the feature jar
- patchRequirements.add(MetadataFactory.createRequirement(IU_NAMESPACE, featureIU.getId(), new VersionRange(featureIU.getVersion(), true, featureIU.getVersion(), true), INSTALL_FEATURES_FILTER, false, false));
- iu.setRequirements((IRequirement[]) patchRequirements.toArray(new IRequirement[patchRequirements.size()]));
- iu.setApplicabilityScope(new IRequirement[][] {(IRequirement[]) applicabilityScope.toArray(new IRequirement[applicabilityScope.size()])});
- iu.setRequirementChanges((IRequirementChange[]) requirementChanges.toArray(new IRequirementChange[requirementChanges.size()]));
-
- //Generate lifecycle
- // IRequirement lifeCycle = null;
- // if (applicabilityScope.size() > 0) {
- // IRequirement req = (IRequirement) applicabilityScope.get(0);
- // }
-
- iu.setTouchpointType(ITouchpointType.NONE);
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString());
- // TODO: shouldn't the filter for the group be constructed from os, ws, arch, nl
- // of the feature?
- // iu.setFilter(filter);
-
- // Create set of provided capabilities
- ArrayList providedCapabilities = new ArrayList();
- providedCapabilities.add(createSelfCapability(id, version));
-
- Map localizations = feature.getLocalizations();
- if (localizations != null) {
- for (Iterator iter = localizations.keySet().iterator(); iter.hasNext();) {
- Locale locale = (Locale) iter.next();
- Properties translatedStrings = (Properties) localizations.get(locale);
- Enumeration propertyKeys = translatedStrings.propertyNames();
- while (propertyKeys.hasMoreElements()) {
- String nextKey = (String) propertyKeys.nextElement();
- iu.setProperty(locale.toString() + '.' + nextKey, translatedStrings.getProperty(nextKey));
- }
- providedCapabilities.add(makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities((IProvidedCapability[]) providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- if (extraProperties != null) {
- Enumeration e = extraProperties.propertyNames();
- while (e.hasMoreElements()) {
- String name = (String) e.nextElement();
- iu.setProperty(name, extraProperties.getProperty(name));
- }
- }
-
- return MetadataFactory.createInstallableUnitPatch(iu);
- }
-
- private static boolean isPatch(Feature feature) {
- FeatureEntry[] entries = feature.getEntries();
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].isPatch())
- return true;
- }
- return false;
- }
-
- /**
- * Creates IUs and artifact descriptors for the JRE. The resulting IUs are added
- * to the given set, and the resulting artifact descriptor, if any, is returned.
- * If the jreLocation is <code>null</code>, default information is generated.
- */
- /**
- * @deprecated moved to JREAction
- */
- public static IArtifactDescriptor createJREData(File jreLocation, Set resultantIUs) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(false);
- String id = "a.jre"; //$NON-NLS-1$
- Version version = DEFAULT_JRE_VERSION;
- iu.setId(id);
- iu.setVersion(version);
- iu.setTouchpointType(TOUCHPOINT_NATIVE);
-
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configId = "config." + id;//$NON-NLS-1$
- cu.setId(configId);
- cu.setVersion(version);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, id, new VersionRange(version, true, Version.MAX_VERSION, true), null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configId, version)});
- cu.setTouchpointType(TOUCHPOINT_NATIVE);
- Map touchpointData = new HashMap();
-
- if (jreLocation == null || !jreLocation.exists()) {
- //set some reasonable defaults
- iu.setVersion(version);
- iu.setCapabilities(generateJRECapability(id, version, null));
- resultantIUs.add(MetadataFactory.createInstallableUnit(iu));
-
- touchpointData.put("install", ""); //$NON-NLS-1$ //$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- resultantIUs.add(MetadataFactory.createInstallableUnit(cu));
- return null;
- }
- generateJREIUData(iu, id, version, jreLocation);
-
- //Generate artifact for JRE
- IArtifactKey key = new ArtifactKey(BINARY_ARTIFACT_CLASSIFIER, id, version);
- iu.setArtifacts(new IArtifactKey[] {key});
- resultantIUs.add(MetadataFactory.createInstallableUnit(iu));
-
- //Create config info for the CU
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- resultantIUs.add(MetadataFactory.createInstallableUnit(cu));
-
- //Create the artifact descriptor
- return createArtifactDescriptor(key, jreLocation, false, true);
- }
-
- public static ArtifactKey createLauncherArtifactKey(String id, Version version) {
- return new ArtifactKey(BINARY_ARTIFACT_CLASSIFIER, id, version);
- }
-
- /**
- * Creates IUs and artifacts for the Launcher executable. The resulting IUs are added
- * to the given set, and the resulting artifact descriptor is returned.
- * @deprecated use the EquinoxExecutablesAction instead
- */
- public static IArtifactDescriptor createLauncherIU(File launcher, String configurationFlavor, Set resultantIUs) {
- if (launcher == null || !launcher.exists())
- return null;
-
- //Create the IU
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(true);
- String launcherId = LAUNCHER_ID_PREFIX + '_' + launcher.getName();
- iu.setId(launcherId);
- iu.setVersion(LAUNCHER_VERSION);
-
- IArtifactKey key = createLauncherArtifactKey(launcherId, LAUNCHER_VERSION);
- iu.setArtifacts(new IArtifactKey[] {key});
- iu.setCapabilities(new IProvidedCapability[] {createSelfCapability(launcherId, LAUNCHER_VERSION)});
- iu.setTouchpointType(TOUCHPOINT_NATIVE);
- resultantIUs.add(MetadataFactory.createInstallableUnit(iu));
-
- //Create the CU
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = configurationFlavor + launcherId;
- cu.setId(configUnitId);
- cu.setVersion(LAUNCHER_VERSION);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherId, new VersionRange(LAUNCHER_VERSION, true, Version.MAX_VERSION, true), null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, LAUNCHER_VERSION)});
- cu.setTouchpointType(TOUCHPOINT_NATIVE);
- Map touchpointData = new HashMap();
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (!info.getOS().equals(org.eclipse.osgi.service.environment.Constants.OS_WIN32)) {
- if (info.getOS().equals(org.eclipse.osgi.service.environment.Constants.OS_MACOSX)) {
- configurationData += " chmod(targetDir:${installFolder}/Eclipse.app/Contents/MacOS, targetFile:eclipse, permissions:755);"; //$NON-NLS-1$
- generateLauncherSetter("Eclipse", launcherId, LAUNCHER_VERSION, "macosx", null, null, resultantIUs); //$NON-NLS-1$//$NON-NLS-2$
- } else
- configurationData += " chmod(targetDir:${installFolder}, targetFile:" + launcher.getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- generateLauncherSetter("eclipse", launcherId, LAUNCHER_VERSION, "win32", null, null, resultantIUs); //$NON-NLS-1$ //$NON-NLS-2$
- }
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- resultantIUs.add(MetadataFactory.createInstallableUnitFragment(cu));
-
- //Create the artifact descriptor
- return createArtifactDescriptor(key, launcher, false, true);
- }
-
- /**
- * @deprecated moved to EquinoxExecutablesAction
- */
- public static IInstallableUnit generateLauncherSetter(String launcherName, String iuId, Version version, String os, String ws, String arch, Set result) {
- InstallableUnitDescription iud = new MetadataFactory.InstallableUnitDescription();
- iud.setId(iuId + '.' + launcherName);
- iud.setVersion(version);
- iud.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_OSGI);
- iud.setCapabilities(new IProvidedCapability[] {createSelfCapability(iuId + '.' + launcherName, version)});
-
- if (os != null || ws != null || arch != null) {
- String filterOs = os != null ? "(osgi.os=" + os + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String filterWs = ws != null ? "(osgi.ws=" + ws + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String filterArch = arch != null ? "(osgi.arch=" + arch + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- iud.setFilter("(& " + filterOs + filterWs + filterArch + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- Map touchpointData = new HashMap();
- touchpointData.put("configure", "setLauncherName(name:" + launcherName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- touchpointData.put("unconfigure", "setLauncherName()"); //$NON-NLS-1$ //$NON-NLS-2$
- iud.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- IInstallableUnit iu = MetadataFactory.createInstallableUnit(iud);
- result.add(iu);
- return iu;
- }
-
- public static IProvidedCapability createSelfCapability(String installableUnitId, Version installableUnitVersion) {
- return MetadataFactory.createProvidedCapability(IU_NAMESPACE, installableUnitId, installableUnitVersion);
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String createUnconfigScript(GeneratorBundleInfo unconfigInfo, boolean isBundleFragment) {
- if (unconfigInfo == null)
- return ""; //$NON-NLS-1$
- String unconfigScript = "";//$NON-NLS-1$
- if (!isBundleFragment && unconfigInfo.getStartLevel() != BundleInfo.NO_LEVEL) {
- unconfigScript += "setStartLevel(startLevel:" + BundleInfo.NO_LEVEL + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (!isBundleFragment && unconfigInfo.isMarkedAsStarted()) {
- unconfigScript += "markStarted(started: false);"; //$NON-NLS-1$
- }
-
- if (unconfigInfo.getSpecialUnconfigCommands() != null) {
- unconfigScript += unconfigInfo.getSpecialUnconfigCommands();
- }
- return unconfigScript;
-
- }
-
- /**
- * @deprecated moved to JREAction
- */
- private static IProvidedCapability[] generateJRECapability(String installableUnitId, Version installableUnitVersion, InputStream profileStream) {
- if (profileStream == null) {
- //use the 1.6 profile stored in the generator bundle
- try {
- profileStream = Activator.getContext().getBundle().getEntry("JavaSE-1.6.profile").openStream(); //$NON-NLS-1$
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
- Properties p = new Properties();
- try {
- p.load(profileStream);
- ManifestElement[] jrePackages = ManifestElement.parseHeader("org.osgi.framework.system.packages", (String) p.get("org.osgi.framework.system.packages")); //$NON-NLS-1$ //$NON-NLS-2$
- IProvidedCapability[] exportedPackageAsCapabilities = new IProvidedCapability[jrePackages.length + 1];
- exportedPackageAsCapabilities[0] = createSelfCapability(installableUnitId, installableUnitVersion);
- for (int i = 1; i <= jrePackages.length; i++) {
- exportedPackageAsCapabilities[i] = MetadataFactory.createProvidedCapability(CAPABILITY_NS_JAVA_PACKAGE, jrePackages[i - 1].getValue(), null);
- }
- return exportedPackageAsCapabilities;
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (BundleException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } finally {
- if (profileStream != null) {
- try {
- profileStream.close();
- } catch (IOException e) {
- //ignore secondary failure
- }
- }
- }
- return new IProvidedCapability[0];
- }
-
- /**
- * @deprecated moved to JREAction
- */
- private static void generateJREIUData(InstallableUnitDescription iu, String installableUnitId, Version installableUnitVersion, File jreLocation) {
- //Look for a JRE profile file to set version and capabilities
- File[] profiles = jreLocation.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.getAbsolutePath().endsWith(".profile"); //$NON-NLS-1$
- }
- });
- if (profiles.length != 1) {
- iu.setVersion(DEFAULT_JRE_VERSION);
- iu.setCapabilities(generateJRECapability(installableUnitId, installableUnitVersion, null));
- return;
- }
- String profileName = profiles[0].getAbsolutePath().substring(profiles[0].getAbsolutePath().lastIndexOf('/'));
- Version version = DEFAULT_JRE_VERSION;
- //TODO Find a better way to determine JRE version
- if (profileName.indexOf("1.6") > 0) { //$NON-NLS-1$
- version = Version.create("1.6"); //$NON-NLS-1$
- } else if (profileName.indexOf("1.5") > 0) { //$NON-NLS-1$
- version = Version.create("1.5"); //$NON-NLS-1$
- } else if (profileName.indexOf("1.4") > 0) { //$NON-NLS-1$
- version = Version.create("1.4"); //$NON-NLS-1$
- }
- iu.setVersion(version);
- try {
- iu.setCapabilities(generateJRECapability(installableUnitId, installableUnitVersion, new FileInputStream(profiles[0])));
- } catch (FileNotFoundException e) {
- //Shouldn't happen, but ignore and fall through to use default
- }
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IMatchExpression getFilter(FeatureEntry entry) {
- StringBuffer result = new StringBuffer();
- result.append("(&"); //$NON-NLS-1$
- if (entry.getFilter() != null)
- result.append(entry.getFilter());
- if (entry.getOS() != null)
- result.append("(osgi.os=" + entry.getOS() + ')');//$NON-NLS-1$
- if (entry.getWS() != null)
- result.append("(osgi.ws=" + entry.getWS() + ')');//$NON-NLS-1$
- if (entry.getArch() != null)
- result.append("(osgi.arch=" + entry.getArch() + ')');//$NON-NLS-1$
- if (entry.getNL() != null)
- result.append("(osgi.nl=" + entry.getNL() + ')');//$NON-NLS-1$
- if (result.length() == 2)
- return null;
- result.append(')');
- return InstallableUnit.parseFilter(result.toString());
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static String getTransformedId(String original, boolean isPlugin, boolean isGroup) {
- return (isPlugin ? original : original + (isGroup ? ".feature.group" : ".feature.jar")); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static VersionRange getVersionRange(FeatureEntry entry) {
- String versionSpec = entry.getVersion();
- if (versionSpec == null)
- return VersionRange.emptyRange;
- Version version = Version.create(versionSpec);
- if (version.equals(Version.emptyVersion))
- return VersionRange.emptyRange;
- if (!entry.isRequires())
- return new VersionRange(version, true, version, true);
- String match = entry.getMatch();
-
- org.osgi.framework.Version osgiVersion = toOSGiVersion(version);
- if (match == null || match.equals("compatible")) { //$NON-NLS-1$
- Version upper = Version.createOSGi(osgiVersion.getMajor() + 1, 0, 0);
- return new VersionRange(version, true, upper, false);
- }
- if (match.equals("perfect")) //$NON-NLS-1$
- return new VersionRange(version, true, version, true);
- if (match.equals("equivalent")) { //$NON-NLS-1$
- Version upper = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor() + 1, 0);
- return new VersionRange(version, true, upper, false);
- }
- if (match.equals("greaterOrEqual")) //$NON-NLS-1$
- return new VersionRange(version, true, new VersionRange(null).getMaximum(), true);
- return null;
- }
-
- /**
- * @deprecated moved to AdviceFileAdvice
- */
- public static Map getBundleAdvice(String bundleLocation, String suffixLocation) {
- if (bundleLocation == null)
- return Collections.EMPTY_MAP;
-
- File bundle = new File(bundleLocation);
- if (!bundle.exists())
- return Collections.EMPTY_MAP;
-
- ZipFile jar = null;
- InputStream stream = null;
- if (bundle.isDirectory()) {
- File adviceFile = new File(bundle, suffixLocation);
- if (adviceFile.exists()) {
- try {
- stream = new BufferedInputStream(new FileInputStream(adviceFile));
- } catch (IOException e) {
- return Collections.EMPTY_MAP;
- }
- }
- } else if (bundle.isFile()) {
- try {
- jar = new ZipFile(bundle);
- ZipEntry entry = jar.getEntry(suffixLocation);
- if (entry != null)
- stream = new BufferedInputStream(jar.getInputStream(entry));
- } catch (IOException e) {
- if (jar != null)
- try {
- jar.close();
- } catch (IOException e1) {
- //boo
- }
- return Collections.EMPTY_MAP;
- }
- }
-
- Properties advice = null;
- if (stream != null) {
- try {
- advice = new Properties();
- advice.load(stream);
- } catch (IOException e) {
- return Collections.EMPTY_MAP;
- } finally {
- try {
- stream.close();
- } catch (IOException e) {
- //boo
- }
- }
- }
-
- if (jar != null) {
- try {
- jar.close();
- } catch (IOException e) {
- // boo
- }
- }
-
- return advice != null ? advice : Collections.EMPTY_MAP;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static boolean isOptional(ImportPackageSpecification importedPackage) {
- if (importedPackage.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_DYNAMIC) || importedPackage.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_OPTIONAL))
- return true;
- return false;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- private static String toManifestString(Map p) {
- if (p == null)
- return null;
- Collection properties = p.entrySet();
- StringBuffer result = new StringBuffer();
- for (Iterator iterator = properties.iterator(); iterator.hasNext();) {
- Map.Entry aProperty = (Map.Entry) iterator.next();
- if (aProperty.getKey().equals(BundleDescriptionFactory.BUNDLE_FILE_KEY))
- continue;
- result.append(aProperty.getKey()).append(": ").append(aProperty.getValue()).append('\n'); //$NON-NLS-1$
- }
- return result.toString();
- }
-
- /**
- * Returns a URI corresponding to the given URL in string form, or null
- * if a well formed URI could not be created.
- */
- private static URI toURIOrNull(String url) {
- if (url == null)
- return null;
- try {
- return URIUtil.fromString(url);
- } catch (URISyntaxException e) {
- return null;
- }
- }
-
- // Return a map from locale to property set for the manifest localizations
- // from the given bundle directory and given bundle localization path/name
- // manifest property value.
- /**
- * @deprecated moved to BundlesAction
- */
- private static Map getManifestLocalizations(Map manifest, File bundleLocation) {
- Map localizations;
- Locale defaultLocale = null; // = Locale.ENGLISH; // TODO: get this from GeneratorInfo
- String[] bundleManifestValues = getManifestCachedValues(manifest);
- String bundleLocalization = bundleManifestValues[BUNDLE_LOCALIZATION_INDEX];
-
- if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && //$NON-NLS-1$
- bundleLocation.isFile()) {
- localizations = LocalizationHelper.getJarPropertyLocalizations(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- //localizations = getJarManifestLocalization(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- } else {
- localizations = LocalizationHelper.getDirPropertyLocalizations(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- // localizations = getDirManifestLocalization(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- }
-
- return localizations;
- }
-
- /**
- * @deprecated moved to BundlesAction
- */
- public static String[] getManifestCachedValues(Map manifest) {
- String[] cachedValues = new String[BUNDLE_LOCALIZED_PROPERTIES.length + 1];
- for (int j = 0; j < MetadataGeneratorHelper.BUNDLE_LOCALIZED_PROPERTIES.length; j++) {
- String value = (String) manifest.get(BUNDLE_LOCALIZED_PROPERTIES[j]);
- if (value != null && value.length() > 1 && value.charAt(0) == '%') {
- cachedValues[j] = value.substring(1);
- }
- }
- String localizationFile = (String) manifest.get(org.osgi.framework.Constants.BUNDLE_LOCALIZATION);
- cachedValues[BUNDLE_LOCALIZATION_INDEX] = (localizationFile != null ? localizationFile : DEFAULT_BUNDLE_LOCALIZATION);
- return cachedValues;
- }
-
- // Return a map from locale to property set for the manifest localizations
- // from the given bundle directory and given bundle localization path/name
- // manifest property value.
- /**
- * @deprecated moved to BundlesAction
- */
- public static Map getHostLocalizations(File bundleLocation, String[] hostBundleManifestValues) {
- Map localizations;
- Locale defaultLocale = null; // = Locale.ENGLISH; // TODO: get this from GeneratorInfo
- String hostBundleLocalization = hostBundleManifestValues[BUNDLE_LOCALIZATION_INDEX];
-
- if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && //$NON-NLS-1$
- bundleLocation.isFile()) {
- localizations = LocalizationHelper.getJarPropertyLocalizations(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- //localizations = getJarManifestLocalization(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- } else {
- localizations = LocalizationHelper.getDirPropertyLocalizations(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- // localizations = getDirManifestLocalization(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- }
-
- return localizations;
- }
-
- /**
- * Convert <code>version</code> into its OSGi equivalent if possible.
- *
- * @param version The version to convert. Can be <code>null</code>
- * @return The converted version or <code>null</code> if the argument was <code>null</code>
- * @throws UnsupportedOperationException if the version could not be converted into an OSGi version
- */
- public static org.osgi.framework.Version toOSGiVersion(Version version) {
- if (version == null)
- return null;
- if (version == Version.emptyVersion)
- return org.osgi.framework.Version.emptyVersion;
- if (version == Version.MAX_VERSION)
- return new org.osgi.framework.Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
-
- BasicVersion bv = (BasicVersion) version;
- return new org.osgi.framework.Version(bv.getMajor(), bv.getMinor(), bv.getMicro(), bv.getQualifier());
- }
-
- /**
- * Create an omni version from an OSGi <code>version</code>.
- * @param version The OSGi version. Can be <code>null</code>.
- * @return The created omni version
- */
- public static Version fromOSGiVersion(org.osgi.framework.Version version) {
- if (version == null)
- return null;
- if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
- return Version.MAX_VERSION;
- return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
- }
-
- public static org.eclipse.osgi.service.resolver.VersionRange toOSGiVersionRange(VersionRange range) {
- if (range.equals(VersionRange.emptyRange))
- return org.eclipse.osgi.service.resolver.VersionRange.emptyRange;
- return new org.eclipse.osgi.service.resolver.VersionRange(toOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), toOSGiVersion(range.getMaximum()), range.getIncludeMinimum());
- }
-
- public static VersionRange fromOSGiVersionRange(org.eclipse.osgi.service.resolver.VersionRange range) {
- if (range.equals(org.eclipse.osgi.service.resolver.VersionRange.emptyRange))
- return VersionRange.emptyRange;
- return new VersionRange(fromOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), fromOSGiVersion(range.getMaximum()), range.getIncludeMaximum());
- }
-};
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/URLEntry.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/URLEntry.java
deleted file mode 100644
index 8e928f65c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/URLEntry.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-
-public class URLEntry {
- private String annotation;
- private String url;
-
- public URLEntry() {
- }
-
- public URLEntry(String url, String annotation) {
- this.url = url;
- this.annotation = annotation;
- }
-
- public void setAnnotation(String annotation) {
- this.annotation = annotation;
- }
-
- public String getAnnotation() {
- return annotation;
- }
-
- public void setURL(String url) {
- this.url = url;
- }
-
- public String getURL() {
- return url;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
deleted file mode 100644
index 3301c3885..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.ant;
-
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.EclipseInstallGeneratorInfoProvider;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.IncrementalGenerator;
-
-/**
- * An Ant task to call the p2 Metadata Generator application.
- *
- * @since 1.0
- */
-public class GeneratorTask extends Task {
-
- protected EclipseInstallGeneratorInfoProvider provider = null;
- protected EclipseGeneratorApplication generator = null;
-
- private String mode;
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- try {
- IncrementalGenerator incremental = new IncrementalGenerator();
- incremental.setMode(mode);
- incremental.run(generator, provider);
-
- if (!"incremental".equals(mode)) { //$NON-NLS-1$
- provider = null;
- generator = null;
- }
- } catch (Exception e) {
- throw new BuildException(TaskMessages.exception_errorOccurredCallingGenerator, e);
- }
- }
-
- public void setAppend(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setAppend(Boolean.valueOf(value).booleanValue());
- }
-
- public void setArtifactRepository(String location) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- try {
- generator.setArtifactLocation(URIUtil.fromString(location));
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Specified artifact repository location (" + location + ") is not a valid URI. ");
- }
- }
-
- public void setArtifactRepositoryName(String name) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setArtifactRepositoryName(name);
- }
-
- public void setBase(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setBase(value);
- }
-
- public void setBundles(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setBundles(value);
- }
-
- public void setCompress(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setCompress(value);
- }
-
- public void setConfig(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setOperation("-config", value); //$NON-NLS-1$
- }
-
- public void setInplace(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setOperation("-inplace", value); //$NON-NLS-1$
- }
-
- public void setSource(String location) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setOperation("-source", location); //$NON-NLS-1$
- }
-
- public void setUpdateSite(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setOperation("-updateSite", value); //$NON-NLS-1$
- }
-
- public void setExe(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setExecutableLocation(value);
- }
-
- public void setFeatures(String value) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setFeatures(value);
- }
-
- public void setFlavor(String flavor) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setFlavor(flavor);
- }
-
- public void setLauncherConfig(String launcherConfig) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setLauncherConfig(launcherConfig);
- }
-
- public void setMetadataRepository(String location) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- try {
- generator.setMetadataLocation(URIUtil.fromString(location));
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Specified metadata repository location (" + location + ") is not a valid URI. ");
- }
- }
-
- public void setMetadataRepositoryName(String name) {
- if (generator == null)
- generator = new EclipseGeneratorApplication();
- generator.setMetadataRepositoryName(name);
- }
-
- public void setNoDefaultIUs(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setAddDefaultIUs(!Boolean.valueOf(value).booleanValue());
- }
-
- public void setP2OS(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setOS(value);
- }
-
- public void setProductFile(String file) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setProductFile(file);
- }
-
- public void setPublishArtifactRepository(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setPublishArtifactRepository(Boolean.valueOf(value).booleanValue());
- }
-
- public void setPublishArtifacts(String value) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setPublishArtifacts(Boolean.valueOf(value).booleanValue());
- }
-
- public void setRoot(String root) {
- if (root == null || root.startsWith("${")) //$NON-NLS-1$
- return;
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setRootId(root);
- }
-
- public void setRootVersion(String rootVersion) {
- if (rootVersion == null || rootVersion.startsWith("${")) //$NON-NLS-1$
- return;
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setRootVersion(rootVersion);
- }
-
- public void setMode(String mode) {
- this.mode = mode;
- }
-
- public void setVersionAdvice(String advice) {
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- provider.setVersionAdvice(advice);
- }
-
- public void setSite(String site) {
- if (site == null || site.startsWith("${")) //$NON-NLS-1$
- return;
- if (provider == null)
- provider = new EclipseInstallGeneratorInfoProvider();
- try {
- provider.setSiteLocation(URIUtil.fromString(site));
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("The specified location (" + site + ") is not a valid URI."); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/TaskMessages.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/TaskMessages.java
deleted file mode 100644
index b9fb84991..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/TaskMessages.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.ant;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TaskMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.generator.ant.messages";//$NON-NLS-1$
-
- public static String exception_errorOccurredCallingGenerator;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, TaskMessages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/messages.properties
deleted file mode 100644
index d43b9040b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/messages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-
-exception_errorOccurredCallingGenerator = An error occurred when calling generator.
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.classpath b/bundles/org.eclipse.equinox.p2.metadata.repository/.classpath
deleted file mode 100644
index 834ea833e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bin_ant" path="src_ant"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore b/bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore
deleted file mode 100644
index e2f465588..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bin
-bin_ant
-ant_tasks
-target
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch b/bundles/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch
deleted file mode 100644
index d3596d85e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.metadata.repository"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.metadata.repository"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.project b/bundles/org.eclipse.equinox.p2.metadata.repository/.project
deleted file mode 100644
index 920d1f26a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.project
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.metadata.repository</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/org.eclipse.equinox.p2.metadata.reposiroy buildAntTasks.xml.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6a7984c9b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Mon Dec 28 00:17:37 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 6b7580c4a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:22 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF
deleted file mode 100644
index 92ea0e436..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,50 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata.repository;singleton:=true
-Bundle-Version: 1.1.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.repository.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.metadata.repository;
- x-friends:="org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.reconciler.dropins,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.repository.tools",
- org.eclipse.equinox.internal.p2.metadata.repository.io;x-friends:="org.eclipse.equinox.p2.engine"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.equinox.registry,
- org.eclipse.ecf.filetransfer;bundle-version="2.0.0"
-Import-Package: javax.xml.parsers,
- org.eclipse.ecf.core.util,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.index,
- org.eclipse.equinox.internal.p2.persistence,
- org.eclipse.equinox.internal.p2.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.index;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.spi;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.prefs;version="1.1.1",
- org.xml.sax
-Service-Component: OSGI-INF/repositoryManager.xml
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml b/bundles/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml
deleted file mode 100644
index fdf2579b5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/OSGI-INF/repositoryManager.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.metadata.repository">
- <implementation class="org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/about.html b/bundles/org.eclipse.equinox.p2.metadata.repository/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/build.properties b/bundles/org.eclipse.equinox.p2.metadata.repository/build.properties
deleted file mode 100644
index ffda85291..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/build.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.xml,\
- plugin.properties,\
- ant_tasks/metadataRepository-ant.jar,\
- OSGI-INF/
-src.includes = about.html,\
- schema/
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-jars.compile.order = .,\
- ant_tasks/metadataRepository-ant.jar
-source.ant_tasks/metadataRepository-ant.jar = src_ant/
-output.ant_tasks/metadataRepository-ant.jar = bin_ant/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml b/bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml
deleted file mode 100644
index d59add568..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/buildAntTasks.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.equinox.p2.metadata.repository" default="default" basedir=".">
-
- <target name="default" description="Compile ant tasks" >
- <mkdir dir="${basedir}/ant_tasks" />
- <delete file="${basedir}/ant_tasks/metadataRepository-ant.jar" failonerror="false"/>
- <jar destfile="${basedir}/ant_tasks/metadataRepository-ant.jar" basedir="${basedir}/bin_ant"/>
- </target>
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties b/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties
deleted file mode 100644
index ee478c241..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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:
-# henrik.lindberg@cloudsmith.com
-###############################################################################
-pluginName = Equinox Provisioning Metadata Repository
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml b/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml
deleted file mode 100644
index 3deee9519..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/plugin.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="metadataRepositories" name="Metadata Repositories" schema="schema/metadataRepositories.exsd"/>
- <extension id="simpleRepository" point="org.eclipse.equinox.p2.metadata.repository.metadataRepositories">
- <filter suffix="content.xml"/>
- <factory class="org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory"/>
- </extension>
-
- <extension id="compositeRepository" point="org.eclipse.equinox.p2.metadata.repository.metadataRepositories">
- <filter suffix="compositeContent.xml"/>
- <factory class="org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepositoryFactory"/>
- </extension>
-
- <extension point="org.eclipse.ant.core.antTasks">
- <antTask
- library="ant_tasks/metadataRepository-ant.jar"
- name="p2.composite.metadata.repository.add"
- class="org.eclipse.equinox.internal.p2.metadata.repository.ant.AddChildTask">
- </antTask>
-
- <antTask
- library="ant_tasks/metadataRepository-ant.jar"
- name="p2.composite.metadata.repository.create"
- class="org.eclipse.equinox.internal.p2.metadata.repository.ant.CreateCompositeMetadataRepositoryTask">
- </antTask>
-
- <antTask
- library="ant_tasks/metadataRepository-ant.jar"
- name="p2.composite.metadata.repository.remove"
- class="org.eclipse.equinox.internal.p2.metadata.repository.ant.RemoveChildTask">
- </antTask>
-
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml b/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml
deleted file mode 100644
index af77333e7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version>
- <relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.metadata.repository</artifactId>
- <version>1.1.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <extraClasspathElements>
- <extraClasspathElement>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.7.1</version>
- </extraClasspathElement>
- </extraClasspathElements>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.7.1</version>
- </dependency>
-
- </dependencies>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd b/bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd
deleted file mode 100644
index 20624c4f2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/schema/metadataRepositories.exsd
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.equinox.p2.metadata.repository" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.equinox.p2.metadata.repository" id="metadataRepositories" name="Metadata Repositories"/>
- </appInfo>
- <documentation>
- This extension point is used to provide metadata repository implementations
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="factory"/>
- <element ref="filter"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="factory">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- the fully-qualified name of a class which implements
-&lt;samp&gt;org.eclipse.equinox.p2.artifact.repository.IArtifactRepository&lt;/samp&gt;.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.eclipse.equinox.p2.artifact.repository.IArtifactRepository"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="filter">
- <complexType>
- <attribute name="suffix" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- org.eclipse.equinox.p2.metadata.repository 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- The value of the class attribute must represent an
-implementor of &lt;tt&gt;org.eclipse.equinox.internal.provisional.spi.p2.metadata.repository.MetadataRepositoryFactory&lt;/tt&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- This bundle provides an artifact repository factory for the IMetadataRepositoryManager#TYPE_SIMPLE_REPOSITORY repository type.
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2007, 2008 IBM Corporation and others.&lt;br&gt;
-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 &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
deleted file mode 100644
index 1d92ba70f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Activator.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Cloudsmith Inc - additional implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
-
- public static final String ID = "org.eclipse.equinox.p2.metadata.repository"; //$NON-NLS-1$
- public static final String REPO_PROVIDER_XPT = ID + '.' + "metadataRepositories"; //$NON-NLS-1$
-
- private static BundleContext bundleContext;
-
- public static BundleContext getContext() {
- return bundleContext;
- }
-
- public void start(BundleContext aContext) throws Exception {
- bundleContext = aContext;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- bundleContext = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
deleted file mode 100644
index f10a0a088..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarOutputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryIO;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeMetadataRepository extends AbstractMetadataRepository implements ICompositeRepository<IInstallableUnit>, IIndexProvider<IInstallableUnit> {
-
- static final public String REPOSITORY_TYPE = CompositeMetadataRepository.class.getName();
- public static final String PI_REPOSITORY_TYPE = "compositeMetadataRepository"; //$NON-NLS-1$
- static final private Integer REPOSITORY_VERSION = new Integer(1);
- static final public String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- static final private String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
-
- // keep a list of the child URIs. they can be absolute or relative. they may or may not point
- // to a valid reachable repo
- private List<URI> childrenURIs = new ArrayList<URI>();
- // keep a list of the repositories that we have successfully loaded
- private List<IMetadataRepository> loadedRepos = new ArrayList<IMetadataRepository>();
- private IMetadataRepositoryManager manager;
-
- /**
- * Create a Composite repository in memory.
- * @return the repository or null if unable to create one
- */
- public static CompositeMetadataRepository createMemoryComposite(IProvisioningAgent agent) {
- if (agent == null)
- return null;
- IMetadataRepositoryManager repoManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (repoManager == null)
- return null;
- try {
- //create a unique opaque URI
- long time = System.currentTimeMillis();
- URI repositoryURI = new URI("memory:" + String.valueOf(time)); //$NON-NLS-1$
- while (repoManager.contains(repositoryURI))
- repositoryURI = new URI("memory:" + String.valueOf(++time)); //$NON-NLS-1$
-
- CompositeMetadataRepository result = (CompositeMetadataRepository) repoManager.createRepository(repositoryURI, repositoryURI.toString(), IMetadataRepositoryManager.TYPE_COMPOSITE_REPOSITORY, null);
- repoManager.removeRepository(repositoryURI);
- return result;
- } catch (ProvisionException e) {
- // just return null
- LogHelper.log(e);
- } catch (URISyntaxException e) {
- // just return null
- }
- return null;
- }
-
- private IMetadataRepositoryManager getManager() {
- return manager;
- }
-
- private boolean isLocal() {
- return "file".equalsIgnoreCase(getLocation().getScheme()); //$NON-NLS-1$
- }
-
- public boolean isModifiable() {
- return isLocal();
- }
-
- CompositeMetadataRepository(IMetadataRepositoryManager manager, URI location, String name, Map<String, String> properties) {
- super(manager.getAgent(), name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
- this.manager = manager;
- //when creating a repository, we must ensure it exists on disk so a subsequent load will succeed
- save();
- }
-
- /*
- * This is only called by the parser when loading a repository.
- */
- CompositeMetadataRepository(IMetadataRepositoryManager manager, CompositeRepositoryState state) {
- super(manager.getAgent(), state.getName(), state.getType(), state.getVersion(), state.getLocation(), state.getDescription(), state.getProvider(), state.getProperties());
- this.manager = manager;
- for (int i = 0; i < state.getChildren().length; i++)
- addChild(state.getChildren()[i], false);
- }
-
- /*
- * Create and return a new repository state object which represents this repository.
- * It will be used while persisting the repository to disk.
- */
- public CompositeRepositoryState toState() {
- CompositeRepositoryState result = new CompositeRepositoryState();
- result.setName(getName());
- result.setType(getType());
- result.setVersion(getVersion());
- result.setLocation(getLocation());
- result.setDescription(getDescription());
- result.setProvider(getProvider());
- result.setProperties(getProperties());
- // it is important to directly access the field so we have the relative URIs
- result.setChildren(childrenURIs.toArray(new URI[childrenURIs.size()]));
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- try {
- // Query all the all the repositories this composite repo contains
- IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
- return queryable.query(query, monitor);
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
-
- private void addChild(URI childURI, boolean save) {
- URI absolute = URIUtil.makeAbsolute(childURI, getLocation());
- if (childrenURIs.contains(childURI) || childrenURIs.contains(absolute))
- return;
- // always add the URI to the list of child URIs (even if we can't load it later)
- childrenURIs.add(childURI);
- if (save)
- save();
- try {
- boolean currentLoaded = getManager().contains(absolute);
- IMetadataRepository currentRepo = getManager().loadRepository(absolute, null);
- if (!currentLoaded) {
- //set enabled to false so repositories do not polled twice
- getManager().setEnabled(absolute, false);
- //set repository to system to hide from users
- getManager().setRepositoryProperty(absolute, IRepository.PROP_SYSTEM, String.valueOf(true));
- }
- // we successfully loaded the repo so remember it
- loadedRepos.add(currentRepo);
- } catch (ProvisionException e) {
- //repository failed to load. fall through
- LogHelper.log(e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.ICompositeRepository#addChild(java.net.URI)
- */
- public void addChild(URI childURI) {
- addChild(childURI, true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.ICompositeRepository#removeChild(java.net.URI)
- */
- public void removeChild(URI childURI) {
- boolean removed = childrenURIs.remove(childURI);
- // if the child wasn't there make sure and try the other permutation
- // (absolute/relative) to see if it really is in the list.
- URI other = childURI.isAbsolute() ? URIUtil.makeRelative(childURI, getLocation()) : URIUtil.makeAbsolute(childURI, getLocation());
- if (!removed)
- removed = childrenURIs.remove(other);
-
- if (removed) {
- // we removed the child from the list so remove the associated repo object as well
- IMetadataRepository found = null;
- for (IMetadataRepository current : loadedRepos) {
- URI repoLocation = current.getLocation();
- if (URIUtil.sameURI(childURI, repoLocation) || URIUtil.sameURI(other, repoLocation)) {
- found = current;
- break;
- }
- }
- if (found != null)
- loadedRepos.remove(found);
- save();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.ICompositeRepository#removeAllChildren()
- */
- public void removeAllChildren() {
- childrenURIs.clear();
- loadedRepos.clear();
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addInstallableUnits(java.util.Collection)
- */
- @Override
- public void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- throw new UnsupportedOperationException("Cannot add IUs to a composite repository"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeAll()
- */
- @Override
- public synchronized void removeAll() {
- throw new UnsupportedOperationException("Cannot remove IUs from a composite repository"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeInstallableUnits(java.util.Collection)
- */
- @Override
- public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- throw new UnsupportedOperationException("Cannot remove IUs from a composite repository"); //$NON-NLS-1$
- }
-
- private static File getActualLocation(URI location, String extension) {
- File spec = URIUtil.toFile(location);
- String path = spec.getAbsolutePath();
- if (path.endsWith(CompositeMetadataRepositoryFactory.CONTENT_FILENAME + extension)) {
- //todo this is the old code that doesn't look right
- // return new File(spec + extension);
- return spec;
- }
- if (path.endsWith("/")) //$NON-NLS-1$
- path += CompositeMetadataRepositoryFactory.CONTENT_FILENAME;
- else
- path += "/" + CompositeMetadataRepositoryFactory.CONTENT_FILENAME; //$NON-NLS-1$
- return new File(path + extension);
- }
-
- public static File getActualLocation(URI location) {
- return getActualLocation(location, XML_EXTENSION);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addReferences(java.util.Collection)
- */
- public synchronized void addReferences(Collection<? extends IRepositoryReference> references) {
- throw new UnsupportedOperationException("Cannot add References to a composite repository"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
- */
- public Collection<IRepositoryReference> getReferences() {
- HashSet<IRepositoryReference> allRefs = new HashSet<IRepositoryReference>();
- for (IMetadataRepository child : loadedRepos)
- allRefs.addAll(child.getReferences());
- return allRefs;
- }
-
- // caller should be synchronized
- private void save() {
- if (!isModifiable())
- return;
- File file = getActualLocation(getLocation());
- File jarFile = getActualLocation(getLocation(), JAR_EXTENSION);
- boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
- try {
- OutputStream output = null;
- if (!compress) {
- if (jarFile.exists()) {
- jarFile.delete();
- }
- if (!file.exists()) {
- if (!file.getParentFile().exists())
- file.getParentFile().mkdirs();
- file.createNewFile();
- }
- output = new FileOutputStream(file);
- } else {
- if (file.exists()) {
- file.delete();
- }
- if (!jarFile.exists()) {
- if (!jarFile.getParentFile().exists())
- jarFile.getParentFile().mkdirs();
- jarFile.createNewFile();
- }
- JarEntry jarEntry = new JarEntry(file.getName());
- JarOutputStream jOutput = new JarOutputStream(new FileOutputStream(jarFile));
- jOutput.putNextEntry(jarEntry);
- output = jOutput;
- }
- super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
- new CompositeRepositoryIO().write(toState(), output, PI_REPOSITORY_TYPE);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, NLS.bind(Messages.io_failedWrite, getLocation()), e));
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.ICompositeRepository#getChildren()
- */
- public List<URI> getChildren() {
- List<URI> result = new ArrayList<URI>();
- for (URI childURI : childrenURIs)
- result.add(URIUtil.makeAbsolute(childURI, getLocation()));
- return result;
- }
-
- public static URI getActualLocationURI(URI base, String extension) {
- if (extension == null)
- extension = XML_EXTENSION;
- return URIUtil.append(base, CompositeMetadataRepositoryFactory.CONTENT_FILENAME + extension);
- }
-
- //TODO this should never be called. What do we do?
- public void initialize(RepositoryState state) {
- setName(state.Name);
- setType(state.Type);
- setVersion(state.Version.toString());
- setProvider(state.Provider);
- setDescription(state.Description);
- setLocation(state.Location);
- setProperties(state.Properties);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#getIndex(java.lang.String)
- */
- @SuppressWarnings("unchecked")
- public IIndex<IInstallableUnit> getIndex(String memberName) {
- IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
- if (queryable instanceof IIndexProvider<?>) {
- return ((IIndexProvider<IInstallableUnit>) queryable).getIndex(memberName);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#everything()
- */
- @SuppressWarnings("unchecked")
- public Iterator<IInstallableUnit> everything() {
- IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
- if (queryable instanceof IIndexProvider<?>) {
- return ((IIndexProvider<IInstallableUnit>) queryable).everything();
- }
- return Collections.EMPTY_LIST.iterator();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#getManagedProperty(java.lang.Object, java.lang.String, java.lang.Object)
- */
- @SuppressWarnings("unchecked")
- public Object getManagedProperty(Object client, String memberName, Object key) {
- IQueryable<IInstallableUnit> queryable = QueryUtil.compoundQueryable(loadedRepos);
- if (queryable instanceof IIndexProvider<?>) {
- return ((IIndexProvider<IInstallableUnit>) queryable).getManagedProperty(client, memberName, key);
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java
deleted file mode 100644
index 0c5d3c3c0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Sonatype Inc - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import org.eclipse.equinox.internal.p2.repository.CacheManager;
-
-import java.io.*;
-import java.net.URI;
-import java.util.Map;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryIO;
-import org.eclipse.equinox.internal.p2.persistence.CompositeRepositoryState;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class CompositeMetadataRepositoryFactory extends MetadataRepositoryFactory {
-
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
- public static final String CONTENT_FILENAME = "compositeContent"; //$NON-NLS-1$
-
- public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) {
- return new CompositeMetadataRepository(getManager(), location, name, properties);
- }
-
- private IMetadataRepositoryManager getManager() {
- if (getAgent() != null)
- return (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- return null;
- }
-
- /**
- * Returns a file in the local file system that contains the contents of the
- * metadata repository at the given location.
- */
- private File getLocalFile(URI location, IProgressMonitor monitor) throws IOException, ProvisionException {
- File localFile = null;
- URI jarLocation = CompositeMetadataRepository.getActualLocationURI(location, JAR_EXTENSION);
- URI xmlLocation = CompositeMetadataRepository.getActualLocationURI(location, XML_EXTENSION);
- // If the repository is local, we can return the repository file directly
- if (PROTOCOL_FILE.equals(xmlLocation.getScheme())) {
- //look for a compressed local file
- localFile = URIUtil.toFile(jarLocation);
- if (localFile.exists())
- return localFile;
- //look for an uncompressed local file
- localFile = URIUtil.toFile(xmlLocation);
- if (localFile.exists())
- return localFile;
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
- }
- //file is not local, create a cache of the repository metadata
- CacheManager cache = (CacheManager) getAgent().getService(CacheManager.SERVICE_NAME);
- if (cache == null)
- throw new IllegalArgumentException("Cache manager service not available"); //$NON-NLS-1$
- localFile = cache.createCache(location, CONTENT_FILENAME, monitor);
- if (localFile == null) {
- //there is no remote file in either form
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
- }
- return localFile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- long time = 0;
- final String debugMsg = "Validating and loading metadata repository "; //$NON-NLS-1$
- if (Tracing.DEBUG_METADATA_PARSING) {
- Tracing.debug(debugMsg + location);
- time = -System.currentTimeMillis();
- }
- SubMonitor sub = SubMonitor.convert(monitor, 400);
- try {
- //non local repos are not modifiable
- if (!PROTOCOL_FILE.equals(location.getScheme()) && (flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0)
- return null;
-
- File localFile = getLocalFile(location, sub.newChild(300));
- InputStream inStream = new BufferedInputStream(new FileInputStream(localFile));
- JarInputStream jarStream = null;
- try {
- //if reading from a jar, obtain a stream on the entry with the actual contents
- if (localFile.getAbsolutePath().endsWith(JAR_EXTENSION)) {
- jarStream = new JarInputStream(inStream);
- JarEntry jarEntry = jarStream.getNextJarEntry();
- String entryName = CONTENT_FILENAME + CompositeMetadataRepository.XML_EXTENSION;
- while (jarEntry != null && (!entryName.equals(jarEntry.getName()))) {
- jarEntry = jarStream.getNextJarEntry();
- }
- //if there is a jar but the entry is missing or invalid, treat this as an invalid repository
- if (jarEntry == null)
- throw new IOException(NLS.bind(Messages.repoMan_invalidLocation, location));
- }
- //parse the repository descriptor file
- sub.setWorkRemaining(100);
- InputStream descriptorStream = jarStream != null ? jarStream : inStream;
- CompositeRepositoryIO io = new CompositeRepositoryIO();
- CompositeRepositoryState resultState = io.read(localFile.toURL(), descriptorStream, CompositeMetadataRepository.PI_REPOSITORY_TYPE, sub.newChild(100));
- if (resultState.getLocation() == null)
- resultState.setLocation(location);
- CompositeMetadataRepository result = new CompositeMetadataRepository(getManager(), resultState);
- if (Tracing.DEBUG_METADATA_PARSING) {
- time += System.currentTimeMillis();
- Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$
- }
- return result;
- } finally {
- safeClose(jarStream);
- safeClose(inStream);
- }
- } catch (FileNotFoundException e) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, e));
- } catch (IOException e) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
-
- /**
- * Closes a stream, ignoring any secondary exceptions
- */
- private void safeClose(InputStream stream) {
- if (stream == null)
- return;
- try {
- stream.close();
- } catch (IOException e) {
- //ignore
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
deleted file mode 100644
index 6f848b152..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/LocalMetadataRepository.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*******************************************************************************
- * 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
- * Prashant Deva - Bug 194674 [prov] Provide write access to metadata repository
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-import java.util.jar.JarEntry;
-import java.util.jar.JarOutputStream;
-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.*;
-import org.eclipse.equinox.internal.p2.metadata.index.*;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-
-/**
- * A metadata repository that resides in the local file system. If the repository
- * location is a directory, this implementation will traverse the directory structure
- * and combine any metadata repository files that are found.
- */
-public class LocalMetadataRepository extends AbstractMetadataRepository implements IIndexProvider<IInstallableUnit> {
-
- static final private String CONTENT_FILENAME = "content"; //$NON-NLS-1$
- static final private String REPOSITORY_TYPE = LocalMetadataRepository.class.getName();
- static final private Integer REPOSITORY_VERSION = new Integer(1);
- static final private String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- static final private String XML_EXTENSION = ".xml"; //$NON-NLS-1$
-
- protected IUMap units = new IUMap();
- protected HashSet<IRepositoryReference> repositories = new HashSet<IRepositoryReference>();
- private IIndex<IInstallableUnit> idIndex;
- private IIndex<IInstallableUnit> capabilityIndex;
- private TranslationSupport translationSupport;
- private boolean snapshotNeeded = false;
- private boolean disableSave = false;
-
- private static File getActualLocation(URI location, String extension) {
- File spec = URIUtil.toFile(location);
- String path = spec.getAbsolutePath();
- if (path.endsWith(CONTENT_FILENAME + extension)) {
- //todo this is the old code that doesn't look right
- // return new File(spec + extension);
- return spec;
- }
- if (path.endsWith("/")) //$NON-NLS-1$
- path += CONTENT_FILENAME;
- else
- path += "/" + CONTENT_FILENAME; //$NON-NLS-1$
- return new File(path + extension);
- }
-
- public static File getActualLocation(URI location) {
- return getActualLocation(location, XML_EXTENSION);
- }
-
- /**
- * This no argument constructor is called when restoring an existing repository.
- */
- public LocalMetadataRepository(IProvisioningAgent agent) {
- super(agent);
- }
-
- /**
- * This constructor is used when creating a new local repository.
- * @param location The location of the repository
- * @param name The name of the repository
- */
- public LocalMetadataRepository(IProvisioningAgent agent, URI location, String name, Map<String, String> properties) {
- super(agent, name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
- if (!location.getScheme().equals("file")) //$NON-NLS-1$
- throw new IllegalArgumentException("Invalid local repository location: " + location); //$NON-NLS-1$
- //when creating a repository, we must ensure it exists on disk so a subsequent load will succeed
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addInstallableUnits(java.util.Collection)
- */
- @Override
- public synchronized void addInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- if (installableUnits == null || installableUnits.isEmpty())
- return;
- if (snapshotNeeded) {
- units = units.clone();
- idIndex = null; // Backed by units
- snapshotNeeded = false;
- }
- units.addAll(installableUnits);
- capabilityIndex = null; // Generated, not backed by units
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#addReferences(java.util.Collection)
- */
- @Override
- public void addReferences(Collection<? extends IRepositoryReference> references) {
- assertModifiable();
- repositories.addAll(references);
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#getReferences()
- */
- public Collection<IRepositoryReference> getReferences() {
- return Collections.unmodifiableCollection(repositories);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#getIndex(java.lang.String)
- */
- public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
- if (InstallableUnit.MEMBER_ID.equals(memberName)) {
- snapshotNeeded = true;
- if (idIndex == null)
- idIndex = new IdIndex(units);
- return idIndex;
- }
-
- if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
- snapshotNeeded = true;
- if (capabilityIndex == null)
- capabilityIndex = new CapabilityIndex(units.iterator());
- return capabilityIndex;
- }
- return null;
- }
-
- public synchronized Object getManagedProperty(Object client, String memberName, Object key) {
- if (!(client instanceof IInstallableUnit))
- return null;
- IInstallableUnit iu = (IInstallableUnit) client;
- if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
- if (translationSupport == null)
- translationSupport = new TranslationSupport(this);
- return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#initialize(org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState)
- */
- @Override
- public void initialize(RepositoryState state) {
- synchronized (this) {
- setName(state.Name);
- setType(state.Type);
- setVersion(state.Version.toString());
- setProvider(state.Provider);
- setDescription(state.Description);
- setLocation(state.Location);
- setProperties(state.Properties);
- this.units.addAll(state.Units);
- this.repositories.addAll(Arrays.asList(state.Repositories));
- }
- publishRepositoryReferences();
- }
-
- /**
- * Broadcast discovery events for all repositories referenced by this repository.
- */
- public void publishRepositoryReferences() {
- IProvisioningEventBus bus = (IProvisioningEventBus) getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
- if (bus == null)
- return;
-
- List<IRepositoryReference> repositoriesSnapshot = createRepositoriesSnapshot();
- for (IRepositoryReference reference : repositoriesSnapshot) {
- boolean isEnabled = (reference.getOptions() & IRepository.ENABLED) != 0;
- bus.publishEvent(new RepositoryEvent(reference.getLocation(), reference.getType(), RepositoryEvent.DISCOVERED, isEnabled));
- }
- }
-
- private synchronized List<IRepositoryReference> createRepositoriesSnapshot() {
- if (repositories.isEmpty())
- return CollectionUtils.emptyList();
- return new ArrayList<IRepositoryReference>(repositories);
- }
-
- // use this method to setup any transient fields etc after the object has been restored from a stream
- public synchronized void initializeAfterLoad(URI aLocation) {
- setLocation(aLocation);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#isModifiable()
- */
- @Override
- public boolean isModifiable() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.query.IQueryable#query(org.eclipse.equinox.p2.query.IQuery, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return IndexProvider.query(this, query, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.metadata.index.IIndexProvider#everything()
- */
- public synchronized Iterator<IInstallableUnit> everything() {
- snapshotNeeded = true;
- return units.iterator();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeAll()
- */
- @Override
- public synchronized void removeAll() {
- if (snapshotNeeded) {
- units = new IUMap();
- idIndex = null; // Backed by units
- snapshotNeeded = false;
- } else
- units.clear();
- capabilityIndex = null; // Generated, not backed by units.
- save();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository#removeInstallableUnits(java.util.Collection)
- */
- @Override
- public synchronized boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) {
- boolean changed = false;
- if (installableUnits != null && !installableUnits.isEmpty()) {
- changed = true;
- if (snapshotNeeded) {
- units = units.clone();
- idIndex = null; // Backed by units
- snapshotNeeded = false;
- }
- units.removeAll(installableUnits);
- capabilityIndex = null; // Generated, not backed by units.
- }
- if (changed)
- save();
- return changed;
- }
-
- // caller should be synchronized
- /**
- * Marking protected so we can test. This is internal, so it shouldn't matter, but I'll
- * mark it as no override just to be clear.
- * @nooverride This method is not intended to be re-implemented or extended by clients.
- */
- protected void save() {
- if (disableSave)
- return;
- File file = getActualLocation(getLocation());
- File jarFile = getActualLocation(getLocation(), JAR_EXTENSION);
- boolean compress = "true".equalsIgnoreCase(getProperty(PROP_COMPRESSED)); //$NON-NLS-1$
- try {
- OutputStream output = null;
- if (!compress) {
- if (jarFile.exists()) {
- jarFile.delete();
- }
- if (!file.exists()) {
- if (!file.getParentFile().exists())
- file.getParentFile().mkdirs();
- file.createNewFile();
- }
- output = new FileOutputStream(file);
- } else {
- if (file.exists()) {
- file.delete();
- }
- if (!jarFile.exists()) {
- if (!jarFile.getParentFile().exists())
- jarFile.getParentFile().mkdirs();
- jarFile.createNewFile();
- }
- JarEntry jarEntry = new JarEntry(file.getName());
- JarOutputStream jOutput = new JarOutputStream(new FileOutputStream(jarFile));
- jOutput.putNextEntry(jarEntry);
- output = jOutput;
- }
- super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
- new MetadataRepositoryIO(getProvisioningAgent()).write(this, output);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_WRITE, "Error saving metadata repository: " + getLocation(), e)); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.spi.AbstractRepository#setProperty(java.lang.String, java.lang.String)
- */
- @Override
- public String setProperty(String key, String newValue) {
- String oldValue = null;
- synchronized (this) {
- oldValue = super.setProperty(key, newValue);
- if (oldValue == newValue || (oldValue != null && oldValue.equals(newValue)))
- return oldValue;
- save();
- }
- //force repository manager to reload this repository because it caches properties
- MetadataRepositoryManager manager = (MetadataRepositoryManager) getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager.removeRepository(getLocation()))
- manager.addRepository(this);
- return oldValue;
- }
-
- public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) {
- IStatus result = null;
- synchronized (this) {
- try {
- disableSave = true;
- runnable.run(monitor);
- } catch (OperationCanceledException oce) {
- return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce);
- } catch (Throwable e) {
- result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
- } finally {
- disableSave = false;
- try {
- save();
- } catch (Exception e) {
- if (result != null)
- result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e);
- else
- result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e);
- }
- }
- }
- if (result == null)
- result = Status.OK_STATUS;
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java
deleted file mode 100644
index c764e0654..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/Messages.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype Inc - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.repository.messages"; //$NON-NLS-1$
-
- static {
- // initialize resource bundles
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Do not instantiate
- }
-
- public static String io_failedRead;
- public static String io_failedWrite;
-
- public static String io_IncompatibleVersion;
- public static String io_parseError;
-
- public static String no_provisioning_agent;
-
- public static String repo_loading;
-
- public static String repoMan_internalError;
- public static String repoMan_invalidLocation;
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java
deleted file mode 100644
index 7cb5c05db..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryComponent.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- * Sonatype Inc - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Service factory for creating {@link IMetadataRepositoryManager} instances.
- */
-public class MetadataRepositoryComponent implements IAgentServiceFactory {
-
- public Object createService(IProvisioningAgent agent) {
- return new MetadataRepositoryManager(agent);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java
deleted file mode 100644
index afd6a7c4f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryIO.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Prashant Deva - Bug 194674 [prov] Provide write access to metadata repository
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-
-import java.io.*;
-import java.lang.reflect.Constructor;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Iterator;
-import java.util.Set;
-import javax.xml.parsers.ParserConfigurationException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataParser;
-import org.eclipse.equinox.internal.p2.metadata.repository.io.MetadataWriter;
-import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository.RepositoryState;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.xml.sax.*;
-
-/**
- * This class reads and writes provisioning metadata.
- */
-public class MetadataRepositoryIO {
-
- protected final IProvisioningAgent agent;
-
- public MetadataRepositoryIO(IProvisioningAgent agent) {
- this.agent = agent;
- }
-
- /**
- * Reads metadata from the given stream, and returns the contained array
- * of abstract metadata repositories.
- * This method performs buffering, and closes the stream when finished.
- */
- public IMetadataRepository read(URL location, InputStream input, IProgressMonitor monitor) throws ProvisionException {
- BufferedInputStream bufferedInput = null;
- try {
- try {
- bufferedInput = new BufferedInputStream(input);
-
- Parser repositoryParser = new Parser(Activator.getContext(), Activator.ID);
- repositoryParser.parse(input, monitor);
- IStatus result = repositoryParser.getStatus();
- switch (result.getSeverity()) {
- case IStatus.CANCEL :
- throw new OperationCanceledException();
- case IStatus.ERROR :
- throw new ProvisionException(result);
- case IStatus.WARNING :
- case IStatus.INFO :
- LogHelper.log(result);
- }
- return repositoryParser.getRepository();
- } finally {
- if (bufferedInput != null)
- bufferedInput.close();
- }
- } catch (IOException ioe) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, ioe));
- }
- }
-
- /**
- *
- */
- public void write(IMetadataRepository repository, OutputStream output) throws IOException {
- OutputStream bufferedOutput = null;
- try {
- bufferedOutput = new BufferedOutputStream(output);
- Writer repositoryWriter = new Writer(bufferedOutput, repository.getClass());
- repositoryWriter.write(repository);
- } finally {
- if (bufferedOutput != null) {
- bufferedOutput.close();
- }
- }
- }
-
- private interface XMLConstants extends org.eclipse.equinox.internal.p2.metadata.repository.io.XMLConstants {
-
- // Constants defining the structure of the XML for a MetadataRepository
-
- // A format version number for metadata repository XML.
- public static final Version COMPATIBLE_VERSION = Version.createOSGi(1, 0, 0);
- public static final Version CURRENT_VERSION = Version.createOSGi(1, 1, 0);
- public static final VersionRange XML_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
-
- // Constants for processing Instructions
- public static final String PI_REPOSITORY_TARGET = "metadataRepository"; //$NON-NLS-1$
-
- // Constants for metadata repository elements
- public static final String REPOSITORY_ELEMENT = "repository"; //$NON-NLS-1$
-
- }
-
- protected XMLWriter.ProcessingInstruction[] createPI(Class<?> repositoryClass) {
- //TODO We should remove this processing instruction, but currently old clients rely on this. See bug 210450.
- return new XMLWriter.ProcessingInstruction[] {XMLWriter.ProcessingInstruction.makeTargetVersionInstruction(XMLConstants.PI_REPOSITORY_TARGET, XMLConstants.CURRENT_VERSION)};
- }
-
- // XML writer for a IMetadataRepository
- protected class Writer extends MetadataWriter implements XMLConstants {
-
- public Writer(OutputStream output, Class<? extends IMetadataRepository> repositoryClass) throws IOException {
- super(output, createPI(repositoryClass));
- }
-
- /**
- * Write the given metadata repository to the output stream.
- */
- public void write(IMetadataRepository repository) {
- start(REPOSITORY_ELEMENT);
- attribute(NAME_ATTRIBUTE, repository.getName());
- attribute(TYPE_ATTRIBUTE, repository.getType());
- attribute(VERSION_ATTRIBUTE, repository.getVersion());
- attributeOptional(PROVIDER_ATTRIBUTE, repository.getProvider());
- attributeOptional(DESCRIPTION_ATTRIBUTE, repository.getDescription()); // TODO: could be cdata?
-
- writeProperties(repository.getProperties());
- if (repository instanceof LocalMetadataRepository) {
- Set<IRepositoryReference> references = ((LocalMetadataRepository) repository).repositories;
- writeRepositoryReferences(references.iterator(), references.size());
- }
- // The size attribute is a problematic since it forces the use of a collection.
- Set<IInstallableUnit> units = repository.query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet();
- writeInstallableUnits(units.iterator(), units.size());
-
- end(REPOSITORY_ELEMENT);
- flush();
- }
-
- /**
- * Writes a list of {@link IRepositoryReference}.
- * @param references An Iterator of {@link IRepositoryReference}.
- * @param size The number of references to write
- */
- protected void writeRepositoryReferences(Iterator<IRepositoryReference> references, int size) {
- if (size == 0)
- return;
- start(REPOSITORY_REFERENCES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, size);
- while (references.hasNext())
- writeRepositoryReference(references.next());
- end(REPOSITORY_REFERENCES_ELEMENT);
- }
-
- private void writeRepositoryReference(IRepositoryReference reference) {
- start(REPOSITORY_REFERENCE_ELEMENT);
- attribute(URI_ATTRIBUTE, reference.getLocation().toString());
-
- try {
- // we write the URL attribute for backwards compatibility with 3.4.x
- // this attribute should be removed if we make a breaking format change.
- attribute(URL_ATTRIBUTE, URIUtil.toURL(reference.getLocation()).toExternalForm());
- } catch (MalformedURLException e) {
- attribute(URL_ATTRIBUTE, reference.getLocation().toString());
- }
-
- attribute(TYPE_ATTRIBUTE, Integer.toString(reference.getType()));
- attribute(OPTIONS_ATTRIBUTE, Integer.toString(reference.getOptions()));
- end(REPOSITORY_REFERENCE_ELEMENT);
- }
- }
-
- /*
- * Parser for the contents of a metadata repository,
- * as written by the Writer class.
- */
- private class Parser extends MetadataParser implements XMLConstants {
-
- private IMetadataRepository theRepository = null;
-
- public Parser(BundleContext context, String bundleId) {
- super(context, bundleId);
- }
-
- public synchronized void parse(InputStream stream, IProgressMonitor monitor) throws IOException {
- this.status = null;
- setProgressMonitor(monitor);
- monitor.beginTask(Messages.repo_loading, IProgressMonitor.UNKNOWN);
- try {
- // TODO: currently not caching the parser since we make no assumptions
- // or restrictions on concurrent parsing
- getParser();
- RepositoryHandler repositoryHandler = new RepositoryHandler();
- xmlReader.setContentHandler(new RepositoryDocHandler(REPOSITORY_ELEMENT, repositoryHandler));
- xmlReader.parse(new InputSource(stream));
- if (isValidXML()) {
- theRepository = repositoryHandler.getRepository();
- }
- } catch (SAXException e) {
- if (!(e.getException() instanceof OperationCanceledException))
- throw new IOException(e.getMessage());
- } catch (ParserConfigurationException e) {
- throw new IOException(e.getMessage());
- } finally {
- monitor.done();
- stream.close();
- }
- }
-
- public IMetadataRepository getRepository() {
- return theRepository;
- }
-
- protected Object getRootObject() {
- return theRepository;
- }
-
- private final class RepositoryDocHandler extends DocHandler {
-
- public RepositoryDocHandler(String rootName, RootHandler rootHandler) {
- super(rootName, rootHandler);
- }
-
- public void processingInstruction(String target, String data) throws SAXException {
- if (PI_REPOSITORY_TARGET.equals(target)) {
- Version repositoryVersion = extractPIVersion(target, data);
- if (!MetadataRepositoryIO.XMLConstants.XML_TOLERANCE.isIncluded(repositoryVersion)) {
- throw new SAXException(NLS.bind(Messages.io_IncompatibleVersion, repositoryVersion, MetadataRepositoryIO.XMLConstants.XML_TOLERANCE));
- }
- }
- }
-
- }
-
- private final class RepositoryHandler extends RootHandler {
-
- private final String[] required = new String[] {NAME_ATTRIBUTE, TYPE_ATTRIBUTE, VERSION_ATTRIBUTE};
- private final String[] optional = new String[] {DESCRIPTION_ATTRIBUTE, PROVIDER_ATTRIBUTE};
-
- private InstallableUnitsHandler unitsHandler = null;
- private PropertiesHandler propertiesHandler = null;
- private RepositoryReferencesHandler repositoryReferencesHandler = null;
-
- private AbstractMetadataRepository repository = null;
-
- private RepositoryState state = new RepositoryState();
-
- public RepositoryHandler() {
- super();
- }
-
- public IMetadataRepository getRepository() {
- return repository;
- }
-
- protected void handleRootAttributes(Attributes attributes) {
- String[] values = parseAttributes(attributes, required, optional);
- Version version = checkVersion(this.elementHandled, VERSION_ATTRIBUTE, values[2]);
- state.Name = values[0];
- state.Type = values[1];
- state.Version = version;
- state.Description = values[3];
- state.Provider = values[4];
- state.Location = null;
- }
-
- public void startElement(String name, Attributes attributes) {
- checkCancel();
- if (PROPERTIES_ELEMENT.equals(name)) {
- if (propertiesHandler == null) {
- propertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (INSTALLABLE_UNITS_ELEMENT.equals(name)) {
- if (unitsHandler == null) {
- unitsHandler = new InstallableUnitsHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (REPOSITORY_REFERENCES_ELEMENT.equals(name)) {
- if (repositoryReferencesHandler == null) {
- repositoryReferencesHandler = new RepositoryReferencesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else {
- invalidElement(name, attributes);
- }
- }
-
- protected void finished() {
- if (isValidXML()) {
- state.Properties = (propertiesHandler == null ? new OrderedProperties(0) //
- : propertiesHandler.getProperties());
- state.Units = (unitsHandler == null ? new IInstallableUnit[0] //
- : unitsHandler.getUnits());
- state.Repositories = repositoryReferencesHandler == null ? new IRepositoryReference[0] : repositoryReferencesHandler.getReferences();
- Object repositoryObject = null;
- //can't create repository if missing type - this is already logged when parsing attributes
- if (state.Type == null)
- return;
- try {
- Class<?> clazz = Class.forName(state.Type);
- Constructor<?> ctor = clazz.getConstructor(IProvisioningAgent.class);
- repositoryObject = ctor.newInstance(agent);
- } catch (Exception e) {
- // TODO: Throw a SAXException
- e.printStackTrace();
- }
- if (repositoryObject instanceof AbstractMetadataRepository) {
- repository = (AbstractMetadataRepository) repositoryObject;
- repository.initialize(state);
- }
- }
- }
- }
-
- protected String getErrorMessage() {
- return Messages.io_parseError;
- }
-
- public String toString() {
- // TODO:
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java
deleted file mode 100644
index e1afa910c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/MetadataRepositoryManager.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.net.URI;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager;
-import org.eclipse.equinox.internal.p2.repository.helpers.LocationProperties;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
-
-/**
- * Default implementation of {@link IMetadataRepositoryManager}.
- */
-public class MetadataRepositoryManager extends AbstractRepositoryManager<IInstallableUnit> implements IMetadataRepositoryManager {
-
- public MetadataRepositoryManager(IProvisioningAgent agent) {
- super(agent);
- }
-
- public void addRepository(IMetadataRepository repository) {
- super.addRepository(repository, true, null);
- }
-
- public IMetadataRepository createRepository(URI location, String name, String type, Map<String, String> properties) throws ProvisionException {
- return (IMetadataRepository) doCreateRepository(location, name, type, properties);
- }
-
- protected IRepository<IInstallableUnit> factoryCreate(URI location, String name, String type, Map<String, String> properties, IExtension extension) throws ProvisionException {
- MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- factory.setAgent(agent);
- return factory.create(location, name, type, properties);
- }
-
- protected IRepository<IInstallableUnit> factoryLoad(URI location, IExtension extension, int flags, SubMonitor monitor) throws ProvisionException {
- MetadataRepositoryFactory factory = (MetadataRepositoryFactory) createExecutableExtension(extension, EL_FACTORY);
- if (factory == null)
- return null;
- factory.setAgent(agent);
- return factory.load(location, flags, monitor.newChild(10));
- }
-
- protected String getBundleId() {
- return Activator.ID;
- }
-
- protected String getDefaultSuffix() {
- return "content.xml"; //$NON-NLS-1$
- }
-
- public IMetadataRepository getRepository(URI location) {
- return (IMetadataRepository) basicGetRepository(location);
- }
-
- protected String getRepositoryProviderExtensionPointId() {
- return Activator.REPO_PROVIDER_XPT;
- }
-
- protected String[] getPreferredRepositorySearchOrder(LocationProperties properties) {
- return properties.getMetadataFactorySearchOrder();
- }
-
- /**
- * Restores metadata repositories specified as system properties.
- */
- protected String getRepositorySystemProperty() {
- return "eclipse.p2.metadataRepository"; //$NON-NLS-1$
- }
-
- protected int getRepositoryType() {
- return IRepository.TYPE_METADATA;
- }
-
- public IMetadataRepository loadRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- return loadRepository(location, 0, monitor);
- }
-
- public IMetadataRepository loadRepository(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- return (IMetadataRepository) loadRepository(location, monitor, null, flags);
- }
-
- public IMetadataRepository refreshRepository(URI location, IProgressMonitor monitor) throws ProvisionException {
- return (IMetadataRepository) basicRefreshRepository(location, monitor);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
deleted file mode 100644
index 4f98f6ead..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/SimpleMetadataRepositoryFactory.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Sonatype Inc - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import org.eclipse.equinox.internal.p2.repository.CacheManager;
-
-import java.io.*;
-import java.net.URI;
-import java.util.Map;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory;
-import org.eclipse.osgi.util.NLS;
-
-public class SimpleMetadataRepositoryFactory extends MetadataRepositoryFactory {
-
- private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
- private static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
-
- public IMetadataRepository create(URI location, String name, String type, Map<String, String> properties) {
- if (location.getScheme().equals("file")) //$NON-NLS-1$
- return new LocalMetadataRepository(getAgent(), location, name, properties);
- return new URLMetadataRepository(getAgent(), location, name, properties);
- }
-
- /**
- * Returns a file in the local file system that contains the contents of the
- * metadata repository at the given location.
- */
- private File getLocalFile(URI location, IProgressMonitor monitor) throws IOException, ProvisionException {
- File localFile = null;
- URI jarLocation = URLMetadataRepository.getActualLocation(location, JAR_EXTENSION);
- URI xmlLocation = URLMetadataRepository.getActualLocation(location, XML_EXTENSION);
- // If the repository is local, we can return the repository file directly
- if (PROTOCOL_FILE.equals(xmlLocation.getScheme())) {
- //look for a compressed local file
- localFile = URIUtil.toFile(jarLocation);
- if (localFile.exists())
- return localFile;
- //look for an uncompressed local file
- localFile = URIUtil.toFile(xmlLocation);
- if (localFile.exists())
- return localFile;
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, null));
- }
- // file is not local, create a cache of the repository metadata
- CacheManager cache = (CacheManager) getAgent().getService(CacheManager.SERVICE_NAME);
- if (cache == null)
- throw new IllegalArgumentException("Cache manager service not available"); //$NON-NLS-1$
- localFile = cache.createCache(location, URLMetadataRepository.CONTENT_FILENAME, monitor);
- if (localFile == null) {
- // there is no remote file in either form - this should not really happen as
- // createCache should bail out with exception if something is wrong. This is an internal
- // error.
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, Messages.repoMan_internalError, null));
- }
- return localFile;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
- */
- public IMetadataRepository load(URI location, int flags, IProgressMonitor monitor) throws ProvisionException {
- long time = 0;
- final String debugMsg = "Validating and loading metadata repository "; //$NON-NLS-1$
- if (Tracing.DEBUG_METADATA_PARSING) {
- Tracing.debug(debugMsg + location);
- time = -System.currentTimeMillis();
- }
- SubMonitor sub = SubMonitor.convert(monitor, 400);
- try {
- File localFile = getLocalFile(location, sub.newChild(300));
- InputStream inStream = new BufferedInputStream(new FileInputStream(localFile));
- JarInputStream jarStream = null;
- try {
- //if reading from a jar, obtain a stream on the entry with the actual contents
- if (localFile.getAbsolutePath().endsWith(JAR_EXTENSION)) {
- jarStream = new JarInputStream(inStream);
- JarEntry jarEntry = jarStream.getNextJarEntry();
- String entryName = URLMetadataRepository.CONTENT_FILENAME + URLMetadataRepository.XML_EXTENSION;
- while (jarEntry != null && (!entryName.equals(jarEntry.getName()))) {
- jarEntry = jarStream.getNextJarEntry();
- }
- //if there is a jar but the entry is missing or invalid, treat this as an invalid repository
- if (jarEntry == null)
- throw new IOException(NLS.bind(Messages.repoMan_invalidLocation, location));
- }
- //parse the repository descriptor file
- sub.setWorkRemaining(100);
- InputStream descriptorStream = jarStream != null ? jarStream : inStream;
- IMetadataRepository result = new MetadataRepositoryIO(getAgent()).read(localFile.toURL(), descriptorStream, sub.newChild(100));
- if (result != null && (flags & IRepositoryManager.REPOSITORY_HINT_MODIFIABLE) > 0 && !result.isModifiable())
- return null;
- if (result instanceof LocalMetadataRepository)
- ((LocalMetadataRepository) result).initializeAfterLoad(location);
- if (result instanceof URLMetadataRepository)
- ((URLMetadataRepository) result).initializeAfterLoad(location);
- if (Tracing.DEBUG_METADATA_PARSING) {
- time += System.currentTimeMillis();
- Tracing.debug(debugMsg + "time (ms): " + time); //$NON-NLS-1$
- }
- return result;
- } finally {
- safeClose(jarStream);
- safeClose(inStream);
- }
- } catch (FileNotFoundException e) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_NOT_FOUND, msg, e));
- } catch (IOException e) {
- String msg = NLS.bind(Messages.io_failedRead, location);
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, e));
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
-
- /**
- * Closes a stream, ignoring any secondary exceptions
- */
- private void safeClose(InputStream stream) {
- if (stream == null)
- return;
- try {
- stream.close();
- } catch (IOException e) {
- //ignore
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
deleted file mode 100644
index c07bf3bb7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/URLMetadataRepository.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * Prashant Deva - Bug 194674 [prov] Provide write access to metadata repository
- * Cloudsmith Inc. - query indexes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.p2.metadata.index.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.metadata.spi.AbstractMetadataRepository;
-
-/**
- * A metadata repository backed by an arbitrary URL.
- */
-public class URLMetadataRepository extends AbstractMetadataRepository implements IIndexProvider<IInstallableUnit> {
-
- public static final String CONTENT_FILENAME = "content"; //$NON-NLS-1$
- protected Collection<IRepositoryReference> references;
- public static final String XML_EXTENSION = ".xml"; //$NON-NLS-1$
- private static final String REPOSITORY_TYPE = URLMetadataRepository.class.getName();
- private static final Integer REPOSITORY_VERSION = new Integer(1);
-
- transient protected URI content;
- protected IUMap units = new IUMap();
- private IIndex<IInstallableUnit> idIndex;
- private IIndex<IInstallableUnit> capabilityIndex;
- private TranslationSupport translationSupport;
-
- public static URI getActualLocation(URI base) {
- return getActualLocation(base, XML_EXTENSION);
- }
-
- public static URI getActualLocation(URI base, String extension) {
- if (extension == null)
- extension = XML_EXTENSION;
- return URIUtil.append(base, CONTENT_FILENAME + extension);
- }
-
- public URLMetadataRepository(IProvisioningAgent agent) {
- super(agent);
- }
-
- public URLMetadataRepository(IProvisioningAgent agent, URI location, String name, Map<String, String> properties) {
- super(agent, name == null ? (location != null ? location.toString() : "") : name, REPOSITORY_TYPE, REPOSITORY_VERSION.toString(), location, null, null, properties); //$NON-NLS-1$
- content = getActualLocation(location);
- }
-
- // this is synchronized because content can be initialized in initializeAfterLoad
- protected synchronized URI getContentURL() {
- return content;
- }
-
- public synchronized void initialize(RepositoryState state) {
- setName(state.Name);
- setType(state.Type);
- setVersion(state.Version.toString());
- setProvider(state.Provider);
- setDescription(state.Description);
- setLocation(state.Location);
- setProperties(state.Properties);
- this.units.addAll(state.Units);
- this.references = CollectionUtils.unmodifiableList(state.Repositories);
- }
-
- // Use this method to setup any transient fields etc after the object has been restored from a stream
- public synchronized void initializeAfterLoad(URI repoLocation) {
- setLocation(repoLocation);
- content = getActualLocation(repoLocation);
- }
-
- public Collection<IRepositoryReference> getReferences() {
- return references;
- }
-
- public boolean isModifiable() {
- return false;
- }
-
- public synchronized IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- return IndexProvider.query(this, query, monitor);
- }
-
- public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
- if (InstallableUnit.MEMBER_ID.equals(memberName)) {
- if (idIndex == null)
- idIndex = new IdIndex(units);
- return idIndex;
- }
-
- if (InstallableUnit.MEMBER_PROVIDED_CAPABILITIES.equals(memberName)) {
- if (capabilityIndex == null)
- capabilityIndex = new CapabilityIndex(units.iterator());
- return capabilityIndex;
- }
- return null;
- }
-
- public synchronized Object getManagedProperty(Object client, String memberName, Object key) {
- if (!(client instanceof IInstallableUnit))
- return null;
- IInstallableUnit iu = (IInstallableUnit) client;
- if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) {
- if (translationSupport == null)
- translationSupport = new TranslationSupport(this);
- return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString());
- }
- return null;
- }
-
- public Iterator<IInstallableUnit> everything() {
- return units.iterator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
deleted file mode 100644
index 390dbea9f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java
+++ /dev/null
@@ -1,934 +0,0 @@
-/*******************************************************************************
- * 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
- * Genuitec, LLC - added license support
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.io;
-
-import java.net.URI;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.persistence.XMLParser;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
-import org.osgi.framework.BundleContext;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-
-public abstract class MetadataParser extends XMLParser implements XMLConstants {
- static final ILicense[] NO_LICENSES = new ILicense[0];
-
- public MetadataParser(BundleContext context, String bundleId) {
- super(context, bundleId);
- }
-
- protected abstract class AbstractMetadataHandler extends AbstractHandler {
-
- public AbstractMetadataHandler(ContentHandler parentHandler, String elementHandled) {
- super(parentHandler, elementHandled);
- }
-
- int getOptionalSize(Attributes attributes, int dflt) {
- String sizeStr = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- return sizeStr != null ? Integer.parseInt(sizeStr) : dflt;
- }
- }
-
- protected class RepositoryReferencesHandler extends AbstractMetadataHandler {
- private HashSet<IRepositoryReference> references;
-
- public RepositoryReferencesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, REPOSITORY_REFERENCES_ELEMENT);
- references = new HashSet<IRepositoryReference>(getOptionalSize(attributes, 4));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REPOSITORY_REFERENCE_ELEMENT)) {
- new RepositoryReferenceHandler(this, attributes, references);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- public IRepositoryReference[] getReferences() {
- return references.toArray(new IRepositoryReference[references.size()]);
- }
- }
-
- protected class RepositoryReferenceHandler extends AbstractHandler {
-
- private final String[] required = new String[] {TYPE_ATTRIBUTE, OPTIONS_ATTRIBUTE};
-
- public RepositoryReferenceHandler(AbstractHandler parentHandler, Attributes attributes, Set<IRepositoryReference> references) {
- super(parentHandler, REPOSITORY_REFERENCE_ELEMENT);
- String[] values = parseRequiredAttributes(attributes, required);
- String name = parseOptionalAttribute(attributes, NAME_ATTRIBUTE);
- int type = checkInteger(elementHandled, TYPE_ATTRIBUTE, values[0]);
- int options = checkInteger(elementHandled, OPTIONS_ATTRIBUTE, values[1]);
- URI location = parseURIAttribute(attributes, true);
- if (location != null)
- references.add(new RepositoryReference(location, name, type, options));
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected class InstallableUnitsHandler extends AbstractMetadataHandler {
- private ArrayList<InstallableUnitDescription> units;
-
- public InstallableUnitsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, INSTALLABLE_UNITS_ELEMENT);
- units = new ArrayList<InstallableUnitDescription>(getOptionalSize(attributes, 4));
- }
-
- public IInstallableUnit[] getUnits() {
- int size = units.size();
- IInstallableUnit[] result = new IInstallableUnit[size];
- int i = 0;
- for (InstallableUnitDescription desc : units)
- result[i++] = MetadataFactory.createInstallableUnit(desc);
- return result;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(INSTALLABLE_UNIT_ELEMENT)) {
- new InstallableUnitHandler(this, attributes, units);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class InstallableUnitHandler extends AbstractHandler {
-
- InstallableUnitDescription currentUnit = null;
-
- private PropertiesHandler propertiesHandler = null;
- private ProvidedCapabilitiesHandler providedCapabilitiesHandler = null;
- private RequiredCapabilitiesHandler requiredCapabilitiesHandler = null;
- private HostRequiredCapabilitiesHandler hostRequiredCapabilitiesHandler = null;
- private MetaRequiredCapabilitiesHandler metaRequiredCapabilitiesHandler = null;
- private TextHandler filterHandler = null;
- private ArtifactsHandler artifactsHandler = null;
- private TouchpointTypeHandler touchpointTypeHandler = null;
- private TouchpointDataHandler touchpointDataHandler = null;
- private UpdateDescriptorHandler updateDescriptorHandler = null;
- private LicensesHandler licensesHandler = null;
- private CopyrightHandler copyrightHandler = null;
- private RequirementsChangeHandler requirementChangesHandler = null;
- private ApplicabilityScopesHandler applicabilityScopeHandler = null;
- private LifeCycleHandler lifeCycleHandler;
-
- private String id;
- private Version version;
- private boolean singleton;
-
- private List<InstallableUnitDescription> units;
-
- public InstallableUnitHandler(AbstractHandler parentHandler, Attributes attributes, List<InstallableUnitDescription> units) {
- super(parentHandler, INSTALLABLE_UNIT_ELEMENT);
- String[] values = parseAttributes(attributes, REQUIRED_IU_ATTRIBUTES, OPTIONAL_IU_ATTRIBUTES);
- this.units = units;
- //skip entire IU if the id is missing
- if (values[0] == null)
- return;
-
- id = values[0];
- version = checkVersion(INSTALLABLE_UNIT_ELEMENT, VERSION_ATTRIBUTE, values[1]);
- singleton = checkBoolean(INSTALLABLE_UNIT_ELEMENT, SINGLETON_ATTRIBUTE, values[2], true).booleanValue();
- }
-
- public IInstallableUnit getInstallableUnit() {
- return MetadataFactory.createInstallableUnit(currentUnit);
- }
-
- public void startElement(String name, Attributes attributes) {
- checkCancel();
- if (PROPERTIES_ELEMENT.equals(name)) {
- if (propertiesHandler == null) {
- propertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (PROVIDED_CAPABILITIES_ELEMENT.equals(name)) {
- if (providedCapabilitiesHandler == null) {
- providedCapabilitiesHandler = new ProvidedCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (REQUIREMENTS_ELEMENT.equals(name)) {
- if (requiredCapabilitiesHandler == null) {
- requiredCapabilitiesHandler = new RequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (HOST_REQUIREMENTS_ELEMENT.equals(name)) {
- if (hostRequiredCapabilitiesHandler == null) {
- hostRequiredCapabilitiesHandler = new HostRequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (META_REQUIREMENTS_ELEMENT.equals(name)) {
- if (metaRequiredCapabilitiesHandler == null) {
- metaRequiredCapabilitiesHandler = new MetaRequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (IU_FILTER_ELEMENT.equals(name)) {
- if (filterHandler == null) {
- filterHandler = new TextHandler(this, IU_FILTER_ELEMENT, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (ARTIFACT_KEYS_ELEMENT.equals(name)) {
- if (artifactsHandler == null) {
- artifactsHandler = new ArtifactsHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (TOUCHPOINT_TYPE_ELEMENT.equals(name)) {
- if (touchpointTypeHandler == null) {
- touchpointTypeHandler = new TouchpointTypeHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (TOUCHPOINT_DATA_ELEMENT.equals(name)) {
- if (touchpointDataHandler == null) {
- touchpointDataHandler = new TouchpointDataHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (UPDATE_DESCRIPTOR_ELEMENT.equals(name)) {
- if (updateDescriptorHandler == null)
- updateDescriptorHandler = new UpdateDescriptorHandler(this, attributes);
- else {
- duplicateElement(this, name, attributes);
- }
- } else if (LICENSES_ELEMENT.equals(name)) {
- if (licensesHandler == null) {
- licensesHandler = new LicensesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (REQUIREMENT_CHANGES.equals(name)) {
- if (requirementChangesHandler == null) {
- requirementChangesHandler = new RequirementsChangeHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (APPLICABILITY_SCOPE.equals(name)) {
- if (applicabilityScopeHandler == null) {
- applicabilityScopeHandler = new ApplicabilityScopesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (LIFECYCLE.equals(name)) {
- if (lifeCycleHandler == null) {
- lifeCycleHandler = new LifeCycleHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (COPYRIGHT_ELEMENT.equals(name)) {
- if (copyrightHandler == null) {
- copyrightHandler = new CopyrightHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else {
- invalidElement(name, attributes);
- }
- }
-
- protected void finished() {
- if (isValidXML()) {
- if (requirementChangesHandler != null) {
- currentUnit = new MetadataFactory.InstallableUnitPatchDescription();
- ((InstallableUnitPatchDescription) currentUnit).setRequirementChanges(requirementChangesHandler.getRequirementChanges().toArray(new IRequirementChange[requirementChangesHandler.getRequirementChanges().size()]));
- if (applicabilityScopeHandler != null)
- ((InstallableUnitPatchDescription) currentUnit).setApplicabilityScope(applicabilityScopeHandler.getScope());
- if (lifeCycleHandler != null)
- ((InstallableUnitPatchDescription) currentUnit).setLifeCycle(lifeCycleHandler.getLifeCycleRequirement());
- } else if (hostRequiredCapabilitiesHandler == null || hostRequiredCapabilitiesHandler.getHostRequiredCapabilities().length == 0) {
- currentUnit = new InstallableUnitDescription();
- } else {
- currentUnit = new MetadataFactory.InstallableUnitFragmentDescription();
- ((InstallableUnitFragmentDescription) currentUnit).setHost(hostRequiredCapabilitiesHandler.getHostRequiredCapabilities());
- }
- currentUnit.setId(id);
- currentUnit.setVersion(version);
- currentUnit.setSingleton(singleton);
- OrderedProperties properties = (propertiesHandler == null ? new OrderedProperties(0) : propertiesHandler.getProperties());
- String updateFrom = null;
- VersionRange updateRange = null;
- for (Entry<String, String> e : properties.entrySet()) {
- String key = e.getKey();
- String value = e.getValue();
- //Backward compatibility
- if (key.equals("equinox.p2.update.from")) { //$NON-NLS-1$
- updateFrom = value;
- continue;
- }
- if (key.equals("equinox.p2.update.range")) { //$NON-NLS-1$
- updateRange = new VersionRange(value);
- continue;
- }
- //End of backward compatibility
- currentUnit.setProperty(key, value);
- }
- //Backward compatibility
- if (updateFrom != null && updateRange != null)
- currentUnit.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(updateFrom, updateRange, IUpdateDescriptor.NORMAL, null));
- //End of backward compatibility
-
- if (licensesHandler != null) {
- currentUnit.setLicenses(licensesHandler.getLicenses());
- }
-
- if (copyrightHandler != null) {
- ICopyright copyright = copyrightHandler.getCopyright();
- currentUnit.setCopyright(copyright);
- }
-
- IProvidedCapability[] providedCapabilities = (providedCapabilitiesHandler == null ? new IProvidedCapability[0] : providedCapabilitiesHandler.getProvidedCapabilities());
- currentUnit.setCapabilities(providedCapabilities);
- IRequirement[] requiredCapabilities = (requiredCapabilitiesHandler == null ? new IRequirement[0] : requiredCapabilitiesHandler.getRequiredCapabilities());
- currentUnit.setRequirements(requiredCapabilities);
- IRequirement[] metaRequiredCapabilities = (metaRequiredCapabilitiesHandler == null ? new IRequirement[0] : metaRequiredCapabilitiesHandler.getMetaRequiredCapabilities());
- currentUnit.setMetaRequirements(metaRequiredCapabilities);
- if (filterHandler != null) {
- currentUnit.setFilter(filterHandler.getText());
- }
- IArtifactKey[] artifacts = (artifactsHandler == null ? new IArtifactKey[0] : artifactsHandler.getArtifactKeys());
- currentUnit.setArtifacts(artifacts);
- if (touchpointTypeHandler != null) {
- currentUnit.setTouchpointType(touchpointTypeHandler.getTouchpointType());
- } else {
- // TODO: create an error
- }
- ITouchpointData[] touchpointData = (touchpointDataHandler == null ? new ITouchpointData[0] : touchpointDataHandler.getTouchpointData());
- for (int i = 0; i < touchpointData.length; i++)
- currentUnit.addTouchpointData(touchpointData[i]);
- if (updateDescriptorHandler != null)
- currentUnit.setUpdateDescriptor(updateDescriptorHandler.getUpdateDescriptor());
- units.add(currentUnit);
- }
- }
- }
-
- protected class ApplicabilityScopesHandler extends AbstractMetadataHandler {
- private List<IRequirement[]> scopes;
-
- public ApplicabilityScopesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, APPLICABILITY_SCOPE);
- scopes = new ArrayList<IRequirement[]>(getOptionalSize(attributes, 4));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (APPLY_ON.equals(name)) {
- new ApplicabilityScopeHandler(this, attributes, scopes);
- } else {
- duplicateElement(this, name, attributes);
- }
- }
-
- public IRequirement[][] getScope() {
- return scopes.toArray(new IRequirement[scopes.size()][]);
- }
- }
-
- protected class ApplicabilityScopeHandler extends AbstractHandler {
- private RequiredCapabilitiesHandler children;
- private List<IRequirement[]> scopes;
-
- public ApplicabilityScopeHandler(AbstractHandler parentHandler, Attributes attributes, List<IRequirement[]> scopes) {
- super(parentHandler, APPLY_ON);
- this.scopes = scopes;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (REQUIREMENTS_ELEMENT.equals(name)) {
- children = new RequiredCapabilitiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- }
-
- protected void finished() {
- if (children != null) {
- scopes.add(children.getRequiredCapabilities());
- }
- }
- }
-
- protected class RequirementsChangeHandler extends AbstractMetadataHandler {
- private List<IRequirementChange> requirementChanges;
-
- public RequirementsChangeHandler(InstallableUnitHandler parentHandler, Attributes attributes) {
- super(parentHandler, REQUIREMENT_CHANGES);
- requirementChanges = new ArrayList<IRequirementChange>(getOptionalSize(attributes, 4));
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_CHANGE)) {
- new RequirementChangeHandler(this, attributes, requirementChanges);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- public List<IRequirementChange> getRequirementChanges() {
- return requirementChanges;
- }
- }
-
- protected class RequirementChangeHandler extends AbstractHandler {
- private List<IRequirement> from;
- private List<IRequirement> to;
- private List<IRequirementChange> requirementChanges;
-
- public RequirementChangeHandler(AbstractHandler parentHandler, Attributes attributes, List<IRequirementChange> requirementChanges) {
- super(parentHandler, REQUIREMENT_CHANGE);
- from = new ArrayList<IRequirement>(1);
- to = new ArrayList<IRequirement>(1);
- this.requirementChanges = requirementChanges;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_FROM)) {
- new RequirementChangeEltHandler(this, REQUIREMENT_FROM, attributes, from);
- return;
- }
-
- if (name.equals(REQUIREMENT_TO)) {
- new RequirementChangeEltHandler(this, REQUIREMENT_TO, attributes, to);
- return;
- }
- invalidElement(name, attributes);
- }
-
- protected void finished() {
- requirementChanges.add(MetadataFactory.createRequirementChange(from.size() == 0 ? null : (IRequirement) from.get(0), to.size() == 0 ? null : (IRequirement) to.get(0)));
- }
- }
-
- protected class RequirementChangeEltHandler extends AbstractHandler {
- private List<IRequirement> requirement;
-
- public RequirementChangeEltHandler(AbstractHandler parentHandler, String parentId, Attributes attributes, List<IRequirement> from) {
- super(parentHandler, parentId);
- requirement = from;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (REQUIREMENT_ELEMENT.equals(name))
- new RequirementHandler(this, attributes, requirement);
- else {
- invalidElement(name, attributes);
- }
- }
-
- }
-
- protected class LifeCycleHandler extends AbstractHandler {
- private List<IRequirement> lifeCycleRequirement;
-
- public LifeCycleHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, LIFECYCLE);
- lifeCycleRequirement = new ArrayList<IRequirement>(1);
- }
-
- public IRequirement getLifeCycleRequirement() {
- if (lifeCycleRequirement.size() == 0)
- return null;
- return lifeCycleRequirement.get(0);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (REQUIREMENT_ELEMENT.equals(name)) {
- new RequirementHandler(this, attributes, lifeCycleRequirement);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ProvidedCapabilitiesHandler extends AbstractMetadataHandler {
- private List<IProvidedCapability> providedCapabilities;
-
- public ProvidedCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, PROVIDED_CAPABILITIES_ELEMENT);
- providedCapabilities = new ArrayList<IProvidedCapability>(getOptionalSize(attributes, 4));
- }
-
- public IProvidedCapability[] getProvidedCapabilities() {
- return providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(PROVIDED_CAPABILITY_ELEMENT)) {
- new ProvidedCapabilityHandler(this, attributes, providedCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ProvidedCapabilityHandler extends AbstractHandler {
-
- public ProvidedCapabilityHandler(AbstractHandler parentHandler, Attributes attributes, List<IProvidedCapability> capabilities) {
- super(parentHandler, PROVIDED_CAPABILITY_ELEMENT);
- String[] values = parseRequiredAttributes(attributes, REQUIRED_PROVIDED_CAPABILITY_ATTRIBUTES);
- Version version = checkVersion(PROVIDED_CAPABILITY_ELEMENT, VERSION_ATTRIBUTE, values[2]);
- capabilities.add(MetadataFactory.createProvidedCapability(values[0], values[1], version));
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected class HostRequiredCapabilitiesHandler extends AbstractMetadataHandler {
- private List<IRequirement> requiredCapabilities;
-
- public HostRequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, HOST_REQUIREMENTS_ELEMENT);
- requiredCapabilities = new ArrayList<IRequirement>(getOptionalSize(attributes, 4));
- }
-
- public IRequirement[] getHostRequiredCapabilities() {
- return requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_ELEMENT)) {
- new RequirementHandler(this, attributes, requiredCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class MetaRequiredCapabilitiesHandler extends AbstractMetadataHandler {
- private List<IRequirement> requiredCapabilities;
-
- public MetaRequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, META_REQUIREMENTS_ELEMENT);
- requiredCapabilities = new ArrayList<IRequirement>(getOptionalSize(attributes, 4));
- }
-
- public IRequirement[] getMetaRequiredCapabilities() {
- return requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_ELEMENT)) {
- new RequirementHandler(this, attributes, requiredCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class RequiredCapabilitiesHandler extends AbstractMetadataHandler {
- private List<IRequirement> requiredCapabilities;
-
- public RequiredCapabilitiesHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, REQUIREMENTS_ELEMENT);
- requiredCapabilities = new ArrayList<IRequirement>(getOptionalSize(attributes, 4));
- }
-
- public IRequirement[] getRequiredCapabilities() {
- return requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(REQUIREMENT_ELEMENT)) {
- new RequirementHandler(this, attributes, requiredCapabilities);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class RequirementHandler extends AbstractHandler {
- private List<IRequirement> capabilities;
-
- private String match;
- private String matchParams;
- private String namespace;
- private String name;
- private VersionRange range;
- private int min;
- private int max;
- private boolean greedy;
-
- private TextHandler filterHandler = null;
- private TextHandler descriptionHandler = null;
-
- public RequirementHandler(AbstractHandler parentHandler, Attributes attributes, List<IRequirement> capabilities) {
- super(parentHandler, REQUIREMENT_ELEMENT);
- this.capabilities = capabilities;
- if (attributes.getIndex(NAMESPACE_ATTRIBUTE) >= 0) {
- String[] values = parseAttributes(attributes, REQIURED_CAPABILITY_ATTRIBUTES, OPTIONAL_CAPABILITY_ATTRIBUTES);
- namespace = values[0];
- name = values[1];
- range = checkVersionRange(REQUIREMENT_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[2]);
- boolean isOptional = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_OPTIONAL_ATTRIBUTE, values[3], false).booleanValue();
- min = isOptional ? 0 : 1;
- boolean isMultiple = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_MULTIPLE_ATTRIBUTE, values[4], false).booleanValue();
- max = isMultiple ? Integer.MAX_VALUE : 1;
- greedy = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_GREED_ATTRIBUTE, values[5], true).booleanValue();
- } else {
- // Expression based requirement
- String[] values = parseAttributes(attributes, REQIUREMENT_ATTRIBUTES, OPTIONAL_REQUIREMENT_ATTRIBUTES);
- match = values[0];
- matchParams = values[1];
- min = values[2] == null ? 1 : checkInteger(REQUIREMENT_ELEMENT, MIN_ATTRIBUTE, values[2]);
- max = values[3] == null ? 1 : checkInteger(REQUIREMENT_ELEMENT, MAX_ATTRIBUTE, values[3]);
- greedy = checkBoolean(REQUIREMENT_ELEMENT, CAPABILITY_GREED_ATTRIBUTE, values[4], true).booleanValue();
- }
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(CAPABILITY_FILTER_ELEMENT)) {
- filterHandler = new TextHandler(this, CAPABILITY_FILTER_ELEMENT, attributes);
- } else if (name.equals(REQUIREMENT_DESCRIPTION_ELEMENT)) {
- descriptionHandler = new TextHandler(this, REQUIREMENT_DESCRIPTION_ELEMENT, attributes);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- protected void finished() {
- if (!isValidXML())
- return;
- IMatchExpression<IInstallableUnit> filter = null;
- if (filterHandler != null) {
- try {
- filter = InstallableUnit.parseFilter(filterHandler.getText());
- } catch (ExpressionParseException e) {
- if (removeWhiteSpace(filterHandler.getText()).equals("(&(|)(|)(|))")) {//$NON-NLS-1$
- // We could log this I guess
- } else {
- throw e;
- }
- }
- }
- String description = descriptionHandler == null ? null : descriptionHandler.getText();
- IRequirement requirement;
- if (match != null) {
- IMatchExpression<IInstallableUnit> matchExpr = createMatchExpression(match, matchParams);
- requirement = MetadataFactory.createRequirement(matchExpr, filter, min, max, greedy, description);
- } else
- requirement = MetadataFactory.createRequirement(namespace, name, range, filter, min, max, greedy, description);
- capabilities.add(requirement);
- }
-
- private String removeWhiteSpace(String s) {
- if (s == null)
- return ""; //$NON-NLS-1$
- StringBuffer builder = new StringBuffer();
- for (int i = 0; i < s.length(); i++) {
- if (s.charAt(i) != ' ')
- builder.append(s.charAt(i));
- }
- return builder.toString();
- }
- }
-
- protected class ArtifactsHandler extends AbstractHandler {
-
- private List<IArtifactKey> artifacts;
-
- public ArtifactsHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, ARTIFACT_KEYS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- artifacts = (size != null ? new ArrayList<IArtifactKey>(new Integer(size).intValue()) : new ArrayList<IArtifactKey>(4));
- }
-
- public IArtifactKey[] getArtifactKeys() {
- return artifacts.toArray(new IArtifactKey[artifacts.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(ARTIFACT_KEY_ELEMENT)) {
- new ArtifactHandler(this, attributes, artifacts);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class ArtifactHandler extends AbstractHandler {
-
- private final String[] required = new String[] {CLASSIFIER_ATTRIBUTE, ID_ATTRIBUTE, VERSION_ATTRIBUTE};
-
- public ArtifactHandler(AbstractHandler parentHandler, Attributes attributes, List<IArtifactKey> artifacts) {
- super(parentHandler, ARTIFACT_KEY_ELEMENT);
- String[] values = parseRequiredAttributes(attributes, required);
- Version version = checkVersion(ARTIFACT_KEY_ELEMENT, VERSION_ATTRIBUTE, values[2]);
- artifacts.add(new ArtifactKey(values[0], values[1], version));
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected class TouchpointTypeHandler extends AbstractHandler {
-
- private final String[] required = new String[] {ID_ATTRIBUTE, VERSION_ATTRIBUTE};
-
- ITouchpointType touchpointType = null;
-
- public TouchpointTypeHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, TOUCHPOINT_TYPE_ELEMENT);
- String[] values = parseRequiredAttributes(attributes, required);
- Version version = checkVersion(TOUCHPOINT_TYPE_ELEMENT, VERSION_ATTRIBUTE, values[1]);
- touchpointType = MetadataFactory.createTouchpointType(values[0], version);
- }
-
- public ITouchpointType getTouchpointType() {
- return touchpointType;
- }
-
- public void startElement(String name, Attributes attributes) {
- invalidElement(name, attributes);
- }
- }
-
- protected class TouchpointDataHandler extends AbstractHandler {
-
- ITouchpointData touchpointData = null;
-
- List<TouchpointInstructionsHandler> data = null;
-
- public TouchpointDataHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, TOUCHPOINT_DATA_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- data = (size != null ? new ArrayList<TouchpointInstructionsHandler>(new Integer(size).intValue()) : new ArrayList<TouchpointInstructionsHandler>(4));
- }
-
- public ITouchpointData[] getTouchpointData() {
- ITouchpointData[] result = new ITouchpointData[data.size()];
- for (int i = 0; i < result.length; i++)
- result[i] = data.get(i).getTouchpointData();
- return result;
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT)) {
- data.add(new TouchpointInstructionsHandler(this, attributes, data));
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class TouchpointInstructionsHandler extends AbstractHandler {
-
- Map<String, ITouchpointInstruction> instructions = null;
-
- public TouchpointInstructionsHandler(AbstractHandler parentHandler, Attributes attributes, List<TouchpointInstructionsHandler> data) {
- super(parentHandler, TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- instructions = (size != null ? new LinkedHashMap<String, ITouchpointInstruction>(new Integer(size).intValue()) : new LinkedHashMap<String, ITouchpointInstruction>(4));
- }
-
- public ITouchpointData getTouchpointData() {
- return MetadataFactory.createTouchpointData(instructions);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT)) {
- new TouchpointInstructionHandler(this, attributes, instructions);
- } else {
- invalidElement(name, attributes);
- }
- }
- }
-
- protected class TouchpointInstructionHandler extends TextHandler {
-
- private final String[] required = new String[] {TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE};
- private final String[] optional = new String[] {TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE};
-
- Map<String, ITouchpointInstruction> instructions = null;
- String key = null;
- String qualifier = null;
-
- public TouchpointInstructionHandler(AbstractHandler parentHandler, Attributes attributes, Map<String, ITouchpointInstruction> instructions) {
- super(parentHandler, TOUCHPOINT_DATA_INSTRUCTION_ELEMENT);
- String[] values = parseAttributes(attributes, required, optional);
- key = values[0];
- qualifier = values[1];
- this.instructions = instructions;
- }
-
- protected void finished() {
- if (isValidXML()) {
- if (key != null) {
- instructions.put(key, MetadataFactory.createTouchpointInstruction(getText(), qualifier));
- }
- }
- }
- }
-
- protected class UpdateDescriptorHandler extends TextHandler {
- private final String[] requiredSimple = new String[] {ID_ATTRIBUTE, VERSION_RANGE_ATTRIBUTE};
- private final String[] optionalSimple = new String[] {UPDATE_DESCRIPTOR_SEVERITY, DESCRIPTION_ATTRIBUTE};
-
- private final String[] requiredComplex = new String[] {MATCH_ATTRIBUTE};
- private final String[] optionalComplex = new String[] {UPDATE_DESCRIPTOR_SEVERITY, DESCRIPTION_ATTRIBUTE, MATCH_PARAMETERS_ATTRIBUTE};
-
- private IUpdateDescriptor descriptor;
-
- public UpdateDescriptorHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, INSTALLABLE_UNIT_ELEMENT);
- boolean simple = attributes.getIndex(ID_ATTRIBUTE) >= 0;
- String[] values;
- int severityIdx;
- String description;
- if (simple) {
- values = parseAttributes(attributes, requiredSimple, optionalSimple);
- severityIdx = 2;
- description = values[3];
- } else {
- values = parseAttributes(attributes, requiredComplex, optionalComplex);
- severityIdx = 1;
- description = values[2];
- }
-
- int severity;
- try {
- severity = new Integer(values[severityIdx]).intValue();
- } catch (NumberFormatException e) {
- invalidAttributeValue(UPDATE_DESCRIPTOR_ELEMENT, UPDATE_DESCRIPTOR_SEVERITY, values[severityIdx]);
- severity = IUpdateDescriptor.NORMAL;
- }
- URI location = parseURIAttribute(attributes, false);
-
- if (simple) {
- VersionRange range = checkVersionRange(REQUIREMENT_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[1]);
- descriptor = MetadataFactory.createUpdateDescriptor(values[0], range, severity, description, location);
- } else {
- IMatchExpression<IInstallableUnit> r = createMatchExpression(values[0], values[3]);
- descriptor = MetadataFactory.createUpdateDescriptor(Collections.singleton(r), severity, description, location);
- }
- }
-
- public IUpdateDescriptor getUpdateDescriptor() {
- return descriptor;
- }
- }
-
- /**
- * Handler for a list of licenses.
- */
- protected class LicensesHandler extends AbstractHandler {
-
- // Note this handler is set up to handle multiple license elements, but for now
- // the API for IInstallableUnit only reflects one.
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=216911
- private List<ILicense> licenses;
-
- public LicensesHandler(ContentHandler parentHandler, Attributes attributes) {
- super(parentHandler, LICENSES_ELEMENT);
- String size = parseOptionalAttribute(attributes, COLLECTION_SIZE_ATTRIBUTE);
- licenses = (size != null ? new ArrayList<ILicense>(new Integer(size).intValue()) : new ArrayList<ILicense>(2));
- }
-
- public ILicense[] getLicenses() {
- if (licenses.size() == 0)
- return NO_LICENSES;
- return licenses.toArray(new ILicense[licenses.size()]);
- }
-
- public void startElement(String name, Attributes attributes) {
- if (name.equals(LICENSE_ELEMENT)) {
- new LicenseHandler(this, attributes, licenses);
- } else {
- invalidElement(name, attributes);
- }
- }
-
- }
-
- /**
- * Handler for a license in an list of licenses.
- */
- protected class LicenseHandler extends TextHandler {
-
- URI location = null;
-
- private final List<ILicense> licenses;
-
- public LicenseHandler(AbstractHandler parentHandler, Attributes attributes, List<ILicense> licenses) {
- super(parentHandler, LICENSE_ELEMENT);
- location = parseURIAttribute(attributes, false);
- this.licenses = licenses;
- }
-
- protected void finished() {
- if (isValidXML()) {
- licenses.add(MetadataFactory.createLicense(location, getText()));
- }
- }
- }
-
- /**
- * Handler for a copyright.
- */
- protected class CopyrightHandler extends TextHandler {
-
- URI location = null;
- private ICopyright copyright;
-
- public CopyrightHandler(AbstractHandler parentHandler, Attributes attributes) {
- super(parentHandler, COPYRIGHT_ELEMENT);
- location = parseURIAttribute(attributes, false);
- }
-
- protected void finished() {
- if (isValidXML()) {
- copyright = MetadataFactory.createCopyright(location, getText());
- }
- }
-
- public ICopyright getCopyright() {
- return copyright;
- }
- }
-
- static IMatchExpression<IInstallableUnit> createMatchExpression(String match, String matchParams) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression expr = ExpressionUtil.parse(match);
- Object[] params;
- if (matchParams == null)
- params = new Object[0];
- else {
- IExpression[] arrayExpr = ExpressionUtil.getOperands(ExpressionUtil.parse(matchParams));
- params = new Object[arrayExpr.length];
- for (int idx = 0; idx < arrayExpr.length; ++idx)
- params[idx] = arrayExpr[idx].evaluate(null);
- }
- return factory.matchExpression(expr, params);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
deleted file mode 100644
index 98ff47f4c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataWriter.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.io;
-
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
-import org.eclipse.equinox.internal.p2.metadata.repository.Activator;
-import org.eclipse.equinox.internal.p2.persistence.XMLWriter;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-public abstract class MetadataWriter extends XMLWriter implements XMLConstants {
-
- public MetadataWriter(OutputStream output, ProcessingInstruction[] piElements) throws UnsupportedEncodingException {
- super(output, piElements);
- // TODO: add a processing instruction for the metadata version
- }
-
- /**
- * Writes a list of {@link IInstallableUnit}.
- * @param units An Iterator of {@link IInstallableUnit}.
- * @param size The number of units to write
- */
- protected void writeInstallableUnits(Iterator<IInstallableUnit> units, int size) {
- if (size == 0)
- return;
- start(INSTALLABLE_UNITS_ELEMENT);
-
- // The size is a bummer. Is it really needed? It forces the use of a collect
- attribute(COLLECTION_SIZE_ATTRIBUTE, size);
- while (units.hasNext())
- writeInstallableUnit(units.next());
- end(INSTALLABLE_UNITS_ELEMENT);
- }
-
- protected void writeInstallableUnit(IInstallableUnit resolvedIU) {
- IInstallableUnit iu = resolvedIU.unresolved();
- start(INSTALLABLE_UNIT_ELEMENT);
- attribute(ID_ATTRIBUTE, iu.getId());
- attribute(VERSION_ATTRIBUTE, iu.getVersion());
- attribute(SINGLETON_ATTRIBUTE, iu.isSingleton(), true);
- // attribute(FRAGMENT_ATTRIBUTE, iu.isFragment(), false);
-
- boolean simpleRequirements = hasOnlySimpleRequirements(iu);
- if (!simpleRequirements)
- attribute(GENERATION_ATTRIBUTE, 2);
-
- if (iu instanceof IInstallableUnitFragment) {
- IInstallableUnitFragment fragment = (IInstallableUnitFragment) iu;
- writeHostRequirements(fragment.getHost());
- }
-
- if (iu instanceof IInstallableUnitPatch) {
- IInstallableUnitPatch patch = (IInstallableUnitPatch) iu;
- writeApplicabilityScope(patch.getApplicabilityScope());
- writeRequirementsChange(patch.getRequirementsChange());
- writeLifeCycle(patch.getLifeCycle());
- }
-
- writeUpdateDescriptor(resolvedIU, resolvedIU.getUpdateDescriptor());
- writeProperties(iu.getProperties());
- writeMetaRequirements(iu.getMetaRequirements());
- writeProvidedCapabilities(iu.getProvidedCapabilities());
- if (simpleRequirements && iu instanceof IInstallableUnitFragment) {
- Collection<IRequirement> mergedRequirementsAndFragmentHostForPre36Compatibility = new LinkedHashSet<IRequirement>(iu.getRequirements());
- mergedRequirementsAndFragmentHostForPre36Compatibility.addAll(((IInstallableUnitFragment) iu).getHost());
- writeRequirements(mergedRequirementsAndFragmentHostForPre36Compatibility);
- } else {
- writeRequirements(iu.getRequirements());
- }
- writeTrimmedCdata(IU_FILTER_ELEMENT, iu.getFilter() == null ? null : iu.getFilter().getParameters()[0].toString());
-
- writeArtifactKeys(iu.getArtifacts());
- writeTouchpointType(iu.getTouchpointType());
- writeTouchpointData(iu.getTouchpointData());
- writeLicenses(iu.getLicenses());
- writeCopyright(iu.getCopyright());
-
- end(INSTALLABLE_UNIT_ELEMENT);
- }
-
- private boolean hasOnlySimpleRequirements(IInstallableUnit iu) {
- for (IRequirement r : iu.getRequirements())
- if (r.getMax() == 0 || !RequiredCapability.isSimpleRequirement(r.getMatches()))
- return false;
-
- if (iu.getUpdateDescriptor() != null) {
- for (IMatchExpression<IInstallableUnit> m : iu.getUpdateDescriptor().getIUsBeingUpdated()) {
- if (!RequiredCapability.isSimpleRequirement(m))
- return false;
- }
- }
-
- for (IRequirement r : iu.getMetaRequirements())
- if (r.getMax() == 0 || !RequiredCapability.isSimpleRequirement(r.getMatches()))
- return false;
-
- if (iu instanceof IInstallableUnitFragment) {
- for (IRequirement r : ((IInstallableUnitFragment) iu).getHost())
- if (!RequiredCapability.isSimpleRequirement(r.getMatches()))
- return false;
- }
-
- if (iu instanceof IInstallableUnitPatch) {
- IInstallableUnitPatch iuPatch = (IInstallableUnitPatch) iu;
- for (IRequirement[] rArr : iuPatch.getApplicabilityScope())
- for (IRequirement r : rArr)
- if (!RequiredCapability.isSimpleRequirement(r.getMatches()))
- return false;
-
- IRequirement lifeCycle = iuPatch.getLifeCycle();
- if (lifeCycle != null && !RequiredCapability.isSimpleRequirement(lifeCycle.getMatches()))
- return false;
- }
- return true;
- }
-
- protected void writeLifeCycle(IRequirement capability) {
- if (capability == null)
- return;
- start(LIFECYCLE);
- writeRequirement(capability);
- end(LIFECYCLE);
- }
-
- protected void writeHostRequirements(Collection<IRequirement> hostRequirements) {
- if (hostRequirements != null && hostRequirements.size() > 0) {
- start(HOST_REQUIREMENTS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, hostRequirements.size());
- for (IRequirement req : hostRequirements) {
- writeRequirement(req);
- }
- end(HOST_REQUIREMENTS_ELEMENT);
- }
- }
-
- protected void writeProvidedCapabilities(Collection<IProvidedCapability> capabilities) {
- if (capabilities != null && capabilities.size() > 0) {
- start(PROVIDED_CAPABILITIES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, capabilities.size());
- for (IProvidedCapability capability : capabilities) {
- start(PROVIDED_CAPABILITY_ELEMENT);
- attribute(NAMESPACE_ATTRIBUTE, capability.getNamespace());
- attribute(NAME_ATTRIBUTE, capability.getName());
- attribute(VERSION_ATTRIBUTE, capability.getVersion());
- end(PROVIDED_CAPABILITY_ELEMENT);
- }
- end(PROVIDED_CAPABILITIES_ELEMENT);
- }
- }
-
- protected void writeMetaRequirements(Collection<IRequirement> metaRequirements) {
- if (metaRequirements != null && metaRequirements.size() > 0) {
- start(META_REQUIREMENTS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, metaRequirements.size());
- for (IRequirement req : metaRequirements) {
- writeRequirement(req);
- }
- end(META_REQUIREMENTS_ELEMENT);
- }
- }
-
- protected void writeRequirements(Collection<IRequirement> requirements) {
- if (requirements != null && requirements.size() > 0) {
- start(REQUIREMENTS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, requirements.size());
- for (IRequirement req : requirements) {
- writeRequirement(req);
- }
- end(REQUIREMENTS_ELEMENT);
- }
- }
-
- protected void writeUpdateDescriptor(IInstallableUnit iu, IUpdateDescriptor descriptor) {
- if (descriptor == null)
- return;
-
- if (descriptor.getIUsBeingUpdated().size() > 1)
- throw new IllegalStateException();
- IMatchExpression<IInstallableUnit> singleUD = descriptor.getIUsBeingUpdated().iterator().next();
- start(UPDATE_DESCRIPTOR_ELEMENT);
- if (RequiredCapability.isSimpleRequirement(singleUD)) {
- attribute(ID_ATTRIBUTE, RequiredCapability.extractName(singleUD));
- attribute(VERSION_RANGE_ATTRIBUTE, RequiredCapability.extractRange(singleUD));
- } else {
- writeMatchExpression(singleUD);
- }
- attribute(UPDATE_DESCRIPTOR_SEVERITY, descriptor.getSeverity());
- attribute(DESCRIPTION_ATTRIBUTE, descriptor.getDescription());
- end(UPDATE_DESCRIPTOR_ELEMENT);
- }
-
- protected void writeApplicabilityScope(IRequirement[][] capabilities) {
- start(APPLICABILITY_SCOPE);
- for (int i = 0; i < capabilities.length; i++) {
- start(APPLY_ON);
- writeRequirements(Arrays.asList(capabilities[i]));
- end(APPLY_ON);
- }
- end(APPLICABILITY_SCOPE);
- }
-
- protected void writeRequirementsChange(List<IRequirementChange> changes) {
- start(REQUIREMENT_CHANGES);
- for (int i = 0; i < changes.size(); i++) {
- writeRequirementChange(changes.get(i));
- }
- end(REQUIREMENT_CHANGES);
- }
-
- protected void writeRequirementChange(IRequirementChange change) {
- start(REQUIREMENT_CHANGE);
- if (change.applyOn() != null) {
- start(REQUIREMENT_FROM);
- writeRequirement(change.applyOn());
- end(REQUIREMENT_FROM);
- }
- if (change.newValue() != null) {
- start(REQUIREMENT_TO);
- writeRequirement(change.newValue());
- end(REQUIREMENT_TO);
- }
- end(REQUIREMENT_CHANGE);
- }
-
- protected void writeRequirement(IRequirement requirement) {
- start(REQUIREMENT_ELEMENT);
- IMatchExpression<IInstallableUnit> match = requirement.getMatches();
- if (requirement.getMax() > 0 && RequiredCapability.isSimpleRequirement(match)) {
- attribute(NAMESPACE_ATTRIBUTE, RequiredCapability.extractNamespace(match));
- attribute(NAME_ATTRIBUTE, RequiredCapability.extractName(match));
- attribute(VERSION_RANGE_ATTRIBUTE, RequiredCapability.extractRange(match));
- attribute(CAPABILITY_OPTIONAL_ATTRIBUTE, requirement.getMin() == 0, false);
- attribute(CAPABILITY_MULTIPLE_ATTRIBUTE, requirement.getMax() > 1, false);
- } else {
- writeMatchExpression(match);
- if (requirement.getMin() != 1)
- attribute(MIN_ATTRIBUTE, requirement.getMin());
- if (requirement.getMax() != 1)
- attribute(MAX_ATTRIBUTE, requirement.getMax());
- }
- attribute(CAPABILITY_GREED_ATTRIBUTE, requirement.isGreedy(), true);
- if (requirement.getFilter() != null)
- writeTrimmedCdata(CAPABILITY_FILTER_ELEMENT, requirement.getFilter().getParameters()[0].toString());
- if (requirement.getDescription() != null)
- writeTrimmedCdata(REQUIREMENT_DESCRIPTION_ELEMENT, requirement.getDescription());
- end(REQUIREMENT_ELEMENT);
- }
-
- private void writeMatchExpression(IMatchExpression<IInstallableUnit> match) {
- attribute(MATCH_ATTRIBUTE, ExpressionUtil.getOperand(match));
- Object[] params = match.getParameters();
- if (params.length > 0) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression[] constantArray = new IExpression[params.length];
- for (int idx = 0; idx < params.length; ++idx)
- constantArray[idx] = factory.constant(params[idx]);
- attribute(MATCH_PARAMETERS_ATTRIBUTE, factory.array(constantArray));
- }
- }
-
- protected void writeArtifactKeys(Collection<IArtifactKey> artifactKeys) {
- if (artifactKeys != null && artifactKeys.size() > 0) {
- start(ARTIFACT_KEYS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, artifactKeys.size());
- for (IArtifactKey artifactKey : artifactKeys) {
- start(ARTIFACT_KEY_ELEMENT);
- attribute(ARTIFACT_KEY_CLASSIFIER_ATTRIBUTE, artifactKey.getClassifier());
- attribute(ID_ATTRIBUTE, artifactKey.getId());
- attribute(VERSION_ATTRIBUTE, artifactKey.getVersion());
- end(ARTIFACT_KEY_ELEMENT);
- }
- end(ARTIFACT_KEYS_ELEMENT);
- }
- }
-
- protected void writeTouchpointType(ITouchpointType touchpointType) {
- start(TOUCHPOINT_TYPE_ELEMENT);
- attribute(ID_ATTRIBUTE, touchpointType.getId());
- attribute(VERSION_ATTRIBUTE, touchpointType.getVersion());
- end(TOUCHPOINT_TYPE_ELEMENT);
- }
-
- protected void writeTouchpointData(Collection<ITouchpointData> touchpointData) {
- if (touchpointData != null && touchpointData.size() > 0) {
- start(TOUCHPOINT_DATA_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, touchpointData.size());
- for (ITouchpointData nextData : touchpointData) {
- Map<String, ITouchpointInstruction> instructions = nextData.getInstructions();
- if (instructions.size() > 0) {
- start(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, instructions.size());
- for (Map.Entry<String, ITouchpointInstruction> entry : instructions.entrySet()) {
- start(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT);
- attribute(TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE, entry.getKey());
- ITouchpointInstruction instruction = entry.getValue();
- if (instruction.getImportAttribute() != null)
- attribute(TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE, instruction.getImportAttribute());
- cdata(instruction.getBody(), true);
- end(TOUCHPOINT_DATA_INSTRUCTION_ELEMENT);
- }
- end(TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT);
- }
- }
- end(TOUCHPOINT_DATA_ELEMENT);
- }
- }
-
- private void writeTrimmedCdata(String element, String filter) {
- String trimmed;
- if (filter != null && (trimmed = filter.trim()).length() > 0) {
- start(element);
- cdata(trimmed);
- end(element);
- }
- }
-
- private void writeLicenses(Collection<ILicense> licenses) {
- if (licenses != null && licenses.size() > 0) {
- // In the future there may be more than one license, so we write this
- // as a collection of one.
- // See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=216911
- start(LICENSES_ELEMENT);
- attribute(COLLECTION_SIZE_ATTRIBUTE, licenses.size());
- for (ILicense license : licenses) {
- if (license == null)
- continue;
- start(LICENSE_ELEMENT);
- if (license.getLocation() != null) {
- attribute(URI_ATTRIBUTE, license.getLocation().toString());
-
- try {
- // we write the URL attribute for backwards compatibility with 3.4.x
- // this attribute should be removed if we make a breaking format change.
- attribute(URL_ATTRIBUTE, URIUtil.toURL(license.getLocation()).toExternalForm());
- } catch (MalformedURLException e) {
- attribute(URL_ATTRIBUTE, license.getLocation().toString());
- }
- }
- cdata(license.getBody(), true);
- end(LICENSE_ELEMENT);
- }
- end(LICENSES_ELEMENT);
- }
- }
-
- private void writeCopyright(ICopyright copyright) {
- if (copyright != null) {
- start(COPYRIGHT_ELEMENT);
- try {
- if (copyright.getLocation() != null) {
- attribute(URI_ATTRIBUTE, copyright.getLocation().toString());
- try {
- // we write the URL attribute for backwards compatibility with 3.4.x
- // this attribute should be removed if we make a breaking format change.
- attribute(URL_ATTRIBUTE, URIUtil.toURL(copyright.getLocation()).toExternalForm());
- } catch (MalformedURLException e) {
- attribute(URL_ATTRIBUTE, copyright.getLocation().toString());
- }
- }
- } catch (IllegalStateException ise) {
- LogHelper.log(new Status(IStatus.INFO, Activator.ID, "Error writing the copyright URL: " + copyright.getLocation())); //$NON-NLS-1$
- }
- cdata(copyright.getBody(), true);
- end(COPYRIGHT_ELEMENT);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java
deleted file mode 100644
index 014f1b831..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/io/XMLConstants.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.io;
-
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
-public interface XMLConstants extends org.eclipse.equinox.internal.p2.persistence.XMLConstants {
-
- // Constants defining the structure of the XML for metadata objects
-
- // A format version number for metadata XML.
- public static final Version CURRENT_VERSION = Version.createOSGi(0, 0, 1);
- public static final VersionRange XML_TOLERANCE = new VersionRange(CURRENT_VERSION, true, Version.createOSGi(2, 0, 0), false);
-
- // Constants for processing Instructions
- public static final String PI_METADATA_TARGET = "metadata"; //$NON-NLS-1$
-
- // Constants for metadata elements
- public static final String INSTALLABLE_UNITS_ELEMENT = "units"; //$NON-NLS-1$
- public static final String INSTALLABLE_UNIT_ELEMENT = "unit"; //$NON-NLS-1$
-
- //Constants for repository references
- public static final String REPOSITORY_REFERENCES_ELEMENT = "references"; //$NON-NLS-1$
- public static final String REPOSITORY_REFERENCE_ELEMENT = "repository"; //$NON-NLS-1$
- public static final String OPTIONS_ATTRIBUTE = "options"; //$NON-NLS-1$
-
- // Constants for sub-elements of an installable unit element
- public static final String ARTIFACT_KEYS_ELEMENT = "artifacts"; //$NON-NLS-1$
- public static final String ARTIFACT_KEY_ELEMENT = "artifact"; //$NON-NLS-1$
- public static final String REQUIREMENTS_ELEMENT = "requires"; //$NON-NLS-1$
- public static final String HOST_REQUIREMENTS_ELEMENT = "hostRequirements"; //$NON-NLS-1$
- public static final String META_REQUIREMENTS_ELEMENT = "metaRequirements"; //$NON-NLS-1$
- public static final String REQUIREMENT_ELEMENT = "required"; //$NON-NLS-1$
- public static final String PROVIDED_CAPABILITIES_ELEMENT = "provides"; //$NON-NLS-1$
- public static final String PROVIDED_CAPABILITY_ELEMENT = "provided"; //$NON-NLS-1$
- public static final String[] REQUIRED_PROVIDED_CAPABILITY_ATTRIBUTES = new String[] {NAMESPACE_ATTRIBUTE, NAME_ATTRIBUTE, VERSION_ATTRIBUTE};
- public static final String TOUCHPOINT_TYPE_ELEMENT = "touchpoint"; //$NON-NLS-1$
- public static final String TOUCHPOINT_DATA_ELEMENT = "touchpointData"; //$NON-NLS-1$
- public static final String IU_FILTER_ELEMENT = "filter"; //$NON-NLS-1$
- public static final String UPDATE_DESCRIPTOR_ELEMENT = "update"; //$NON-NLS-1$
-
- public static final String APPLICABILITY_SCOPE = "patchScope"; //$NON-NLS-1$
- public static final String APPLY_ON = "scope"; //$NON-NLS-1$
- public static final String REQUIREMENT_CHANGES = "changes"; //$NON-NLS-1$
- public static final String REQUIREMENT_CHANGE = "change"; //$NON-NLS-1$
- public static final String REQUIREMENT_FROM = "from"; //$NON-NLS-1$
- public static final String REQUIREMENT_TO = "to"; //$NON-NLS-1$
- public static final String LIFECYCLE = "lifeCycle"; //$NON-NLS-1$
-
- // Constants for attributes of an installable unit element
- public static final String SINGLETON_ATTRIBUTE = "singleton"; //$NON-NLS-1$
- public static final String FRAGMENT_ATTRIBUTE = "fragment"; //$NON-NLS-1$
- public static final String[] REQUIRED_IU_ATTRIBUTES = new String[] {ID_ATTRIBUTE, VERSION_ATTRIBUTE};
- public static final String[] OPTIONAL_IU_ATTRIBUTES = new String[] {SINGLETON_ATTRIBUTE};
- public static final String GENERATION_ATTRIBUTE = "generation"; //$NON-NLS-1$
-
- // Constants for sub-elements of a required capability element
- public static final String CAPABILITY_FILTER_ELEMENT = "filter"; //$NON-NLS-1$
- public static final String REQUIREMENT_DESCRIPTION_ELEMENT = "description"; //$NON-NLS-1$
-
- // Constants for attributes of a required capability element
- public static final String CAPABILITY_OPTIONAL_ATTRIBUTE = "optional"; //$NON-NLS-1$
- public static final String CAPABILITY_MULTIPLE_ATTRIBUTE = "multiple"; //$NON-NLS-1$
- public static final String CAPABILITY_GREED_ATTRIBUTE = "greedy"; //$NON-NLS-1$
- public static final String[] REQIURED_CAPABILITY_ATTRIBUTES = new String[] {NAMESPACE_ATTRIBUTE, NAME_ATTRIBUTE, VERSION_RANGE_ATTRIBUTE};
- public static final String[] REQIUREMENT_ATTRIBUTES = new String[] {MATCH_ATTRIBUTE};
- public static final String[] OPTIONAL_CAPABILITY_ATTRIBUTES = new String[] {CAPABILITY_OPTIONAL_ATTRIBUTE, CAPABILITY_MULTIPLE_ATTRIBUTE, CAPABILITY_GREED_ATTRIBUTE};
- public static final String[] OPTIONAL_REQUIREMENT_ATTRIBUTES = new String[] {MATCH_PARAMETERS_ATTRIBUTE, MIN_ATTRIBUTE, MAX_ATTRIBUTE, CAPABILITY_GREED_ATTRIBUTE};
-
- // Constants for attributes of an artifact key element
- public static final String ARTIFACT_KEY_CLASSIFIER_ATTRIBUTE = "classifier"; //$NON-NLS-1$
-
- // Constants for sub-elements of a touchpoint data element
- public static final String TOUCHPOINT_DATA_INSTRUCTIONS_ELEMENT = "instructions"; //$NON-NLS-1$
- public static final String TOUCHPOINT_DATA_INSTRUCTION_ELEMENT = "instruction"; //$NON-NLS-1$
-
- // Constants for attributes of an a touchpoint data instruction element
- public static final String TOUCHPOINT_DATA_INSTRUCTION_KEY_ATTRIBUTE = "key"; //$NON-NLS-1$
- public static final String TOUCHPOINT_DATA_INSTRUCTION_IMPORT_ATTRIBUTE = "import"; //$NON-NLS-1$
-
- // Constants for attributes of an update descriptor
- public static final String UPDATE_DESCRIPTOR_SEVERITY = "severity"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties
deleted file mode 100644
index eae8344cc..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/messages.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-
-io_failedRead=Unable to read repository at {0}.
-io_failedWrite=Error occurred while writing repository at {0}.
-io_IncompatibleVersion=Metadata repository has incompatible version {0}; expected {1}.
-io_parseError=Error parsing metadata repository
-repo_loading = Loading the repository {0}.
-no_provisioning_agent=Unable to acquire provisioning agent service.
-repoMan_internalError=Internal error.
-repoMan_invalidLocation={0} is not a valid repository location.
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java
deleted file mode 100644
index 0ba8f6a4a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AbstractMDRTask.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.ant;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.Messages;
-import org.eclipse.equinox.internal.p2.repository.Activator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-
-public class AbstractMDRTask extends Task {
- /*
- * Return the provisioning agent. Throw an exception if it cannot be obtained.
- */
- public static IProvisioningAgent getAgent() throws BuildException {
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
- if (agent == null)
- throw new BuildException(Messages.no_provisioning_agent);
- return agent;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java
deleted file mode 100644
index 96c140057..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/AddChildTask.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Ant task for adding a child repository to a composite metadata repository.
- */
-public class AddChildTask extends AbstractMDRTask {
-
- URI location; // location of the composite repository
- URI child; // address of the child to add
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- validate();
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new BuildException("Unable to aquire metadata repository manager service.");
-
- // load the composite repository
- CompositeMetadataRepository repo = null;
- try {
- repo = (CompositeMetadataRepository) manager.loadRepository(location, null);
- } catch (ClassCastException e) {
- throw new BuildException("Repository at location: " + location + " is not a composite metadata repository.");
- } catch (ProvisionException e) {
- throw new BuildException("Error occurred while loading repository.", e);
- }
-
- // add the child
- repo.addChild(child);
- manager.removeRepository(location);
- }
-
- /*
- * Validate user input to ensure we have enough information to go forward.
- */
- private void validate() {
- if (location == null)
- throw new BuildException("Need to specify the composite repository location.");
- if (child == null)
- throw new BuildException("Need to specify the child repository location.");
- }
-
- /*
- * Set the location of the composite repository.
- */
- public void setLocation(String value) throws URISyntaxException {
- location = URIUtil.fromString(value);
- }
-
- /*
- * Set the location of the child repository.
- */
- public void setChild(String value) throws URISyntaxException {
- child = URIUtil.fromString(value);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java
deleted file mode 100644
index 10260fafd..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/CreateCompositeMetadataRepositoryTask.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Ant task for creating a new composite metadata repository.
- */
-public class CreateCompositeMetadataRepositoryTask extends AbstractMDRTask {
-
- URI location; // desired location of the composite repository
- String name = "Composite Metadata Repository";
- boolean compressed = true; // compress by default
- boolean failOnExists = false; // should we fail if one already exists?
- Map<String, String> properties = new HashMap<String, String>();
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new BuildException("Unable to aquire metadata repository manager service.");
-
- // remove the repo first.
- manager.removeRepository(location);
-
- // first try and load to see if one already exists at that location.
- // if we have an already existing repository at that location, then throw an error
- // if the user told us to
- try {
- IMetadataRepository repository = manager.loadRepository(location, null);
- if (repository instanceof CompositeMetadataRepository) {
- if (failOnExists)
- throw new BuildException("Composite repository already exists at location: " + location);
- return;
- } else {
- // we have a non-composite repo at this location. that is ok because we can co-exist.
- }
- } catch (ProvisionException e) {
- // re-throw the exception if we got anything other than "repo not found"
- if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND)
- throw new BuildException("Exception while trying to read repository at: " + location, e);
- }
-
- // create the properties
- if (compressed)
- properties.put(IRepository.PROP_COMPRESSED, Boolean.toString(true));
-
- // create the repository
- try {
- manager.createRepository(location, name, IMetadataRepositoryManager.TYPE_COMPOSITE_REPOSITORY, properties);
- } catch (ProvisionException e) {
- throw new BuildException("Error occurred while creating composite metadata repository.", e);
- }
- }
-
- /*
- * Set the name of the composite repository.
- */
- public void setName(String value) {
- name = value;
- }
-
- /*
- * Set the repository location.
- */
- public void setLocation(String value) throws URISyntaxException {
- location = URIUtil.fromString(value);
- }
-
- /*
- * Set whether or not this repository should be compressed.
- */
- public void setCompressed(boolean value) {
- compressed = value;
- }
-
- /*
- * Set whether or not we should fail the operation if a repository
- * already exists at the location.
- */
- public void setFailOnExists(boolean value) {
- failOnExists = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
deleted file mode 100644
index 31f6f1c5e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src_ant/org/eclipse/equinox/internal/p2/metadata/repository/ant/RemoveChildTask.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.repository.ant;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Ant task to remove a specific child repository (or all the children repositories)
- * from a composite metadata repository.
- */
-public class RemoveChildTask extends AbstractMDRTask {
-
- URI location; // location of the composite repository
- URI child; // address of the child to be removed
- boolean allChildren; // should we remove all the children?
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() {
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- if (manager == null)
- throw new BuildException("Unable to aquire metadata repository manager service.");
-
- CompositeMetadataRepository repo;
- try {
- repo = (CompositeMetadataRepository) manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- throw new BuildException("Error occurred while loading repository.", e);
- }
-
- // remove all the children repositories if requested, otherwise
- // just remove the specific child
- if (allChildren)
- repo.removeAllChildren();
- else
- repo.removeChild(child);
- }
-
- /*
- * Set the location of the composite repository.
- */
- public void setLocation(String value) throws URISyntaxException {
- location = URIUtil.fromString(value);
- }
-
- /*
- * Set the location of the child repository to remove.
- */
- public void setChild(String value) throws URISyntaxException {
- child = URIUtil.fromString(value);
- }
-
- /*
- * Set whether or not we should remove all the children.
- */
- public void setAllChildren(String value) {
- allChildren = Boolean.valueOf(value).booleanValue();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.classpath b/bundles/org.eclipse.equinox.p2.metadata/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.metadata/.cvsignore b/bundles/org.eclipse.equinox.p2.metadata/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.project b/bundles/org.eclipse.equinox.p2.metadata/.project
deleted file mode 100644
index e81f675e0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.metadata</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.settings/.api_filters b/bundles/org.eclipse.equinox.p2.metadata/.settings/.api_filters
deleted file mode 100644
index d8f48e5c2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.equinox.p2.metadata" version="2">
- <resource path="src/org/eclipse/equinox/p2/query/CompoundQueryable.java" type="org.eclipse.equinox.p2.query.CompoundQueryable">
- <filter id="576720909">
- <message_arguments>
- <message_argument value="IndexProvider&lt;T&gt;"/>
- <message_argument value="CompoundQueryable&lt;T&gt;"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1ffc4aa80..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,345 +0,0 @@
-#Mon Dec 21 22:17:52 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 38d7fa95e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Mon Nov 05 17:01:21 EST 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF
deleted file mode 100644
index 3ccafcf3d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,91 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.metadata;singleton:=true
-Bundle-Version: 2.1.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.metadata.MetadataActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.metadata;
- x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
- org.eclipse.equinox.p2.artifact.processors,
- org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.director.app,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.installer,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.ql,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.touchpoint.eclipse",
- org.eclipse.equinox.internal.p2.metadata.expression;
- x-friends:="org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.ql",
- org.eclipse.equinox.internal.p2.metadata.expression.parser;x-friends:="org.eclipse.equinox.p2.ql",
- org.eclipse.equinox.internal.p2.metadata.index;
- x-friends:="org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.director.app,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.ql,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.tests,
- org.eclipse.equinox.p2.touchpoint.eclipse",
- org.eclipse.equinox.internal.p2.metadata.query;
- x-friends:="org.eclipse.equinox.p2.artifact.optimizers,
- org.eclipse.equinox.p2.artifact.processors,
- org.eclipse.equinox.p2.artifact.repository,
- org.eclipse.equinox.p2.console,
- org.eclipse.equinox.p2.core,
- org.eclipse.equinox.p2.director,
- org.eclipse.equinox.p2.director.app,
- org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.engine,
- org.eclipse.equinox.p2.exemplarysetup,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.garbagecollector,
- org.eclipse.equinox.p2.installer,
- org.eclipse.equinox.p2.jarprocessor,
- org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.metadata.generator,
- org.eclipse.equinox.p2.metadata.repository,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.publisher,
- org.eclipse.equinox.p2.ql,
- org.eclipse.equinox.p2.reconciler.dropins,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.touchpoint.natives,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.ui.admin,
- org.eclipse.equinox.p2.ui.admin.rcp,
- org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.ui.sdk.scheduler,
- org.eclipse.equinox.p2.updatechecker,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.pde.core,
- org.eclipse.pde.ui",
- org.eclipse.equinox.p2.metadata;version="2.1.0",
- org.eclipse.equinox.p2.metadata.expression;version="2.0.0",
- org.eclipse.equinox.p2.metadata.index;version="2.0.0",
- org.eclipse.equinox.p2.query;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common,
- org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)"
-Import-Package: org.eclipse.osgi.service.localization;version="1.0.0",
- org.eclipse.osgi.util,
- org.osgi.framework;version="1.6.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.metadata/about.html b/bundles/org.eclipse.equinox.p2.metadata/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/build.properties b/bundles/org.eclipse.equinox.p2.metadata/build.properties
deleted file mode 100644
index 0feab6a85..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- OSGI-INF/
-src.includes = about.html,\
- OSGI-INF/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.metadata/plugin.properties b/bundles/org.eclipse.equinox.p2.metadata/plugin.properties
deleted file mode 100644
index 7dc6c1d22..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Metadata
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.metadata/pom.xml b/bundles/org.eclipse.equinox.p2.metadata/pom.xml
deleted file mode 100644
index 7e143b390..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.metadata</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java
deleted file mode 100644
index c2021b28d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ArtifactKey.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
-
-/**
- * The concrete type for representing IArtifactKey's.
- * <p>
- * See {link IArtifact for a description of the lifecycle of artifact keys)
- */
-public class ArtifactKey implements IArtifactKey, IMemberProvider {
- private static final String SEPARATOR = ","; //$NON-NLS-1$
-
- public static final String MEMBER_ID = "id"; //$NON-NLS-1$
- public static final String MEMBER_CLASSIFIER = "classifier"; //$NON-NLS-1$
- public static final String MEMBER_VERSION = "version"; //$NON-NLS-1$
-
- private final String id;
- private final String classifier;
- private final Version version;
-
- private static String[] getArrayFromList(String stringList, String separator) {
- if (stringList == null || stringList.trim().length() == 0)
- return new String[0];
- ArrayList<String> list = new ArrayList<String>();
- boolean separatorSeen = true;
- StringTokenizer tokens = new StringTokenizer(stringList, separator, true);
- while (tokens.hasMoreTokens()) {
- String token = tokens.nextToken().trim();
- if (token.equals(separator)) {
- if (separatorSeen)
- list.add(""); //$NON-NLS-1$
- separatorSeen = true;
- } else {
- separatorSeen = false;
- if (token.length() != 0)
- list.add(token);
- }
- }
- if (separatorSeen)
- list.add(""); //$NON-NLS-1$
- return list.toArray(new String[list.size()]);
- }
-
- public static IArtifactKey parse(String specification) {
- String[] parts = getArrayFromList(specification, SEPARATOR);
- if (parts.length < 2 || parts.length > 3)
- throw new IllegalArgumentException("Unexpected number of parts in artifact key: " + specification); //$NON-NLS-1$
- Version version = Version.emptyVersion;
- if (parts.length == 3 && parts[2].trim().length() > 0)
- version = Version.parseVersion(parts[2]);
- try {
- return new ArtifactKey(parts[0], parts[1], version);
- } catch (IllegalArgumentException e) {
- throw (IllegalArgumentException) new IllegalArgumentException("Wrong version syntax in artifact key: " + specification).initCause(e); //$NON-NLS-1$
- }
- }
-
- public ArtifactKey(String classifier, String id, Version version) {
- super();
- Assert.isNotNull(classifier);
- Assert.isNotNull(id);
- Assert.isNotNull(version);
- if (classifier.indexOf(SEPARATOR) != -1)
- throw new IllegalArgumentException("comma not allowed in classifier"); //$NON-NLS-1$
- if (id.indexOf(SEPARATOR) != -1)
- throw new IllegalArgumentException("comma not allowed in id"); //$NON-NLS-1$
- this.classifier = classifier;
- this.id = id;
- this.version = version;
- }
-
- public ArtifactKey(IArtifactKey artifactKey) {
- this.classifier = artifactKey.getClassifier();
- this.id = artifactKey.getId();
- this.version = artifactKey.getVersion();
- }
-
- public String getClassifier() {
- return classifier;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public int hashCode() {
- int hash = id.hashCode();
- hash = 17 * hash + getVersion().hashCode();
- hash = 17 * hash + classifier.hashCode();
- return hash;
- }
-
- public String toString() {
- return classifier + SEPARATOR + id + SEPARATOR + getVersion();
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof IArtifactKey))
- return false;
- IArtifactKey ak = (IArtifactKey) obj;
- return ak.getId().equals(id) && ak.getVersion().equals(getVersion()) && ak.getClassifier().equals(classifier);
- }
-
- public String getId() {
- return id;
- }
-
- public String toExternalForm() {
- StringBuffer data = new StringBuffer(classifier).append(SEPARATOR);
- data.append(id).append(SEPARATOR);
- data.append(version.toString());
- return data.toString();
- }
-
- public Object getMember(String memberName) {
- // It is OK to use identity comparisons here since
- // a) All constant valued strings are always interned
- // b) The Member constructor always interns the name
- //
- if (MEMBER_ID == memberName)
- return id;
- if (MEMBER_VERSION == memberName)
- return version;
- if (MEMBER_CLASSIFIER == memberName)
- return classifier;
- throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java
deleted file mode 100644
index 0514284f0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/BasicVersion.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- * The abstract BasicVersion class adds the methods necessary to to compare and serialize
- * versions in version ranges. The class is not intended as public API.
- */
-public abstract class BasicVersion extends Version {
- private static final long serialVersionUID = -2983093417537485027L;
-
- /**
- * Returns the OSGi major component of this version identifier.
- *
- * @return The major component.
- * @throws UnsupportedOperationException if the first element in the
- * vector is not a number.
- * @see #isOSGiCompatible()
- */
- public abstract int getMajor();
-
- /**
- * Returns the OSGi micro component of this version identifier.
- *
- * @return The micro component.
- * @throws UnsupportedOperationException if the third element in the
- * vector is not a number.
- * @see #isOSGiCompatible()
- */
- public abstract int getMicro();
-
- /**
- * Returns the OSGi minor component of this version identifier.
- *
- * @return The minor component.
- * @throws UnsupportedOperationException if the second element in the
- * vector is not a number.
- * @see #isOSGiCompatible()
- */
- public abstract int getMinor();
-
- /**
- * Returns the OSGi qualifier component of this version identifier.
- *
- * @return The qualifier component or <code>null</code> if not set.
- * @throws UnsupportedOperationException if the fourth element in the
- * vector is set to something other then a string.
- * @see #isOSGiCompatible()
- */
- public abstract String getQualifier();
-
- /**
- * Appends the original for this version onto the <code>sb</code> StringBuffer
- * if present.
- * @param sb The buffer that will receive the raw string format
- * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
- */
- public abstract void originalToString(StringBuffer sb, boolean rangeSafe);
-
- /**
- * Appends the raw format for this version onto the <code>sb</code> StringBuffer.
- * @param sb The buffer that will receive the raw string format
- * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
- */
- public abstract void rawToString(StringBuffer sb, boolean rangeSafe);
-
- /**
- * This method is package protected since it violates the immutable
- * contract.
- * @return The raw vector. Must be treated as read-only
- */
- abstract Comparable<?>[] getVector();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java
deleted file mode 100644
index b56578830..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Copyright.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.net.URI;
-import org.eclipse.equinox.p2.metadata.ICopyright;
-
-/**
- * The <code>Copyright</code> class represents a software copyright. A copyright has
- * required body text which may be the full text or a summary. An optional location field can be specified
- * which links to full text.
- */
-public class Copyright implements ICopyright {
- /**
- * The <code>body</code> contains the descriptive text for the copyright. This may
- * be a summary for a copyright specified in a URL.
- */
- private final String body;
-
- /**
- * The <code>location</code> is the location of a document containing a copyright notice.
- */
- private URI location;
-
- /**
- * Creates a new copyright. The body must contain the full text of the copyright.
- *
- * @param location the location of a document containing the copyright notice, or <code>null</code>
- * @param body the copyright body, cannot be <code>null</code>
- * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
- */
- public Copyright(URI location, String body) {
- if (body == null)
- throw new IllegalArgumentException("body cannot be null"); //$NON-NLS-1$
- this.location = location;
- this.body = body;
- }
-
- /**
- * Returns the location of a document containing the copyright notice.
- *
- * @return The location of the copyright notice, or <code>null</code>
- */
- public URI getLocation() {
- return location;
- }
-
- /**
- * Returns the license body.
- *
- * @return the license body, never <code>null</code>
- */
- public String getBody() {
- return body;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/EnumDefinition.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/EnumDefinition.java
deleted file mode 100644
index c8377382e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/EnumDefinition.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.io.Serializable;
-import java.util.*;
-
-/**
- * Instances of this class represents the enum version format.
- */
-class EnumDefinition implements Comparable<EnumDefinition>, Serializable {
- static class EnumSegment implements Comparable<EnumSegment>, Serializable {
- private static final long serialVersionUID = 4737907767214436543L;
-
- private final int ordinal;
- private final EnumDefinition definition;
-
- EnumSegment(int ordinal, EnumDefinition definition) {
- this.ordinal = ordinal;
- this.definition = definition;
- }
-
- public int compareTo(EnumSegment other) {
- if (other == this)
- return 0;
- if (definition == other.definition)
- // Same definition. Just compare ordinals
- return ordinal - other.ordinal;
-
- String thisId = definition.getIdentifier(ordinal);
- String otherId = other.definition.getIdentifier(other.ordinal);
- if (thisId.equals(otherId))
- return 0;
-
- int thisOrdinalInOther = other.definition.getOrdinal(thisId);
- int otherOrdinalInThis = definition.getOrdinal(otherId);
- if (thisOrdinalInOther >= 0) {
- if (otherOrdinalInThis >= 0) {
- // Both identifiers exists in both enums. Let's see if both
- // enums order them the same way
- int thisOrder = ordinal - otherOrdinalInThis;
- int otherOrder = thisOrdinalInOther - other.ordinal;
- if (thisOrder > 0 && otherOrder > 0)
- return 1;
- if (thisOrder < 0 && otherOrder < 0)
- return -1;
- // Difference in opinion...
- } else {
- // Use the order in other since it has both identifiers and
- // this enum does not
- return thisOrdinalInOther - other.ordinal;
- }
- } else if (otherOrdinalInThis >= 0) {
- // Use the order in this since it has both identifiers and the
- // other does not.
- return ordinal - otherOrdinalInThis;
- }
-
- // We can't compare the enums since neither enum contain both identifiers
- // or both do, but use different order. Fall back to comparing the definitions
- return definition.compareTo(other.definition);
- }
-
- public boolean equals(Object other) {
- return other == this || other instanceof EnumSegment && compareTo((EnumSegment) other) == 0;
- }
-
- public int hashCode() {
- return (1 + ordinal) * 31 + definition.getIdentifier(ordinal).hashCode();
- }
-
- int getOrdinal() {
- return ordinal;
- }
-
- String getIdentifier() {
- return definition.getIdentifier(ordinal);
- }
-
- void toString(StringBuffer sb) {
- definition.toString(sb, ordinal);
- }
-
- // For ligthweight deserialization
- private Object readResolve() {
- return definition.getSegment(ordinal);
- }
- }
-
- private static final long serialVersionUID = 7237775466362654473L;
- private static final Map<EnumDefinition, EnumSegment[]> enumDefinitionCache = new HashMap<EnumDefinition, EnumSegment[]>();
-
- private static EnumSegment[] getEnumSegments(EnumDefinition ed) {
- EnumSegment[] values = enumDefinitionCache.get(ed);
- if (values == null) {
- int ordinal = ed.identifiers.length;
- values = new EnumSegment[ordinal];
- while (--ordinal >= 0)
- values[ordinal] = new EnumSegment(ordinal, ed);
- enumDefinitionCache.put(ed, values);
- }
- return values;
- }
-
- static EnumDefinition getEnumDefinition(List<List<String>> identifiers) {
- nextEd: for (EnumDefinition ed : enumDefinitionCache.keySet()) {
- String[][] defs = ed.identifiers;
- int ordinal = defs.length;
- if (ordinal != identifiers.size())
- continue;
-
- while (--ordinal >= 0) {
- String[] def = defs[ordinal];
- List<String> ldef = identifiers.get(ordinal);
- int idx = def.length;
- if (ldef.size() != idx)
- continue nextEd;
- while (--idx >= 0)
- if (!def[idx].equals(ldef.get(idx)))
- continue nextEd;
- }
- return ed;
- }
- EnumDefinition ed = new EnumDefinition(identifiers);
- getEnumSegments(ed);
- return ed;
- }
-
- private final String[][] identifiers;
- private final int longestLength;
- private final int shortestLength;
-
- private EnumDefinition(List<List<String>> identifiers) {
- int ordinal = identifiers.size();
- String[][] defs = new String[ordinal][];
- int minLen = Integer.MAX_VALUE;
- int maxLen = 0;
- while (--ordinal >= 0) {
- List<String> idents = identifiers.get(ordinal);
- int idx = idents.size();
- String[] def = idents.toArray(new String[idx]);
- defs[ordinal] = def;
- while (--idx >= 0) {
- int idLen = def[idx].length();
- if (idLen < minLen)
- minLen = idLen;
- if (idLen > maxLen)
- maxLen = idLen;
- }
- }
- this.shortestLength = minLen;
- this.longestLength = maxLen;
- this.identifiers = defs;
- }
-
- static EnumSegment getSegment(List<List<String>> identifiers, int ordinal) {
- return new EnumDefinition(identifiers).getSegment(ordinal);
- }
-
- EnumSegment getSegment(int ordinal) {
- return getEnumSegments(this)[ordinal];
- }
-
- /**
- * Returns the ordinal for the given identifier
- * @param identifier The identifier
- * @return The ordinal of the identifier or -1 if it didn't exist.
- */
- int getOrdinal(String identifier) {
- if (identifier != null) {
- int ordinal = identifiers.length;
- while (--ordinal >= 0) {
- String[] idents = identifiers[ordinal];
- int idx = idents.length;
- while (--idx >= 0)
- if (idents[idx].equals(identifier))
- return ordinal;
- }
- }
- return -1;
- }
-
- /**
- * Returns the canonical identifier for the given ordinal.
- * @param ordinal The ordinal number of the desired identifier
- * @return The identifier or <code>null</code> if the ordinal is out of bounds
- */
- String getIdentifier(int ordinal) {
- return ordinal >= 0 && ordinal < identifiers.length ? identifiers[ordinal][0] : null;
- }
-
- @Override
- public int hashCode() {
- int result = 1;
- int ordinal = identifiers.length;
- while (--ordinal > 0) {
- String[] idents = identifiers[ordinal];
- int idx = idents.length;
- while (--idx >= 0)
- result = 31 * result + idents[idx].hashCode();
- }
- return result;
- }
-
- @Override
- public boolean equals(Object o) {
- if (o == this)
- return true;
- if (!(o instanceof EnumDefinition))
- return false;
- String[][] otherIds = ((EnumDefinition) o).identifiers;
- int ordinal = identifiers.length;
- if (ordinal != otherIds.length)
- return false;
- while (--ordinal >= 0)
- if (!Arrays.equals(identifiers[ordinal], otherIds[ordinal]))
- return false;
- return true;
- }
-
- public int compareTo(EnumDefinition o) {
- if (o == this)
- return 0;
-
- int top = identifiers.length;
- int cmp = top - o.identifiers.length;
- if (cmp != 0)
- return cmp;
-
- for (int idx = 0; idx < top; ++idx) {
- cmp = identifiers[idx][0].compareTo(o.identifiers[idx][0]);
- if (cmp != 0)
- return cmp;
- }
- // this should never happen since we use a lightweight pattern
- return 0;
- }
-
- @Override
- public String toString() {
- StringBuffer bld = new StringBuffer();
- toString(bld);
- return bld.toString();
- }
-
- public void toString(StringBuffer bld) {
- bld.append('{');
- int top = identifiers.length;
- for (int ordinal = 0;;) {
- String[] idents = identifiers[ordinal];
- int identsTop = idents.length;
- bld.append(idents[0]);
- for (int idx = 1; idx < identsTop; ++idx) {
- bld.append('=');
- bld.append(idents[idx]);
- }
- if (++ordinal == top)
- break;
- bld.append(',');
- }
- bld.append('}');
- }
-
- void toString(StringBuffer bld, int selectedOrdinal) {
- bld.append('{');
- int top = identifiers.length;
- for (int ordinal = 0;;) {
- if (ordinal == selectedOrdinal)
- bld.append('^');
- bld.append(identifiers[ordinal][0]);
- if (++ordinal == top)
- break;
- bld.append(',');
- }
- bld.append('}');
- }
-
- /**
- * Returns the length of the longest identifier. This method is
- * used by the parser
- * @return The length of the longest identifier
- */
- int getLongestLength() {
- return longestLength;
- }
-
- /**
- * Returns the length of the shortest identifier. This method is
- * used by the parser
- * @return The length of the shortest identifier
- */
- int getShortestLength() {
- return shortestLength;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java
deleted file mode 100644
index ef92ee045..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IRequiredCapability.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.*;
-
-/**
- * A required capability represents some external constraint on an {@link IInstallableUnit}.
- * Each capability represents something an {@link IInstallableUnit} needs that
- * it expects to be provided by another {@link IInstallableUnit}. Capabilities are
- * entirely generic, and are intended to be capable of representing anything that
- * an {@link IInstallableUnit} may need either at install time, or at runtime.
- * <p>
- * Capabilities are segmented into namespaces. Anyone can introduce new
- * capability namespaces. Some well-known namespaces are introduced directly
- * by the provisioning framework.
- *
- * @see IInstallableUnit#NAMESPACE_IU_ID
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- */
-public interface IRequiredCapability extends IRequirement {
-
- // public String getFilter();
-
- public String getName();
-
- public String getNamespace();
-
- /**
- * Returns the range of versions that satisfy this required capability. Returns
- * an empty version range ({@link VersionRange#emptyRange} if any version
- * will satisfy the capability.
- * @return the range of versions that satisfy this required capability.
- */
- public VersionRange getRange();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java
deleted file mode 100644
index 99d7b7531..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/IUMap.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith Inc. - rewrite for smaller memory footprint
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * A map that stores {@link IInstallableUnit} instances in a way that is efficient to query
- */
-public class IUMap implements Cloneable {
- /**
- * Iterator over all the {@link IInstallableUnit} instances in the map.
- */
- public class MapIterator implements Iterator<IInstallableUnit> {
- //iterator over the keys in UIMap
- private final Iterator<Object> unitIterator;
- private IInstallableUnit[] currentBucket;
- private int bucketIndex = 0;
- private IInstallableUnit nextElement = null;
-
- MapIterator() {
- super();
- unitIterator = units.values().iterator();
- }
-
- public boolean hasNext() {
- return positionNext();
- }
-
- public IInstallableUnit next() {
- if (!positionNext())
- throw new NoSuchElementException();
-
- IInstallableUnit nxt = nextElement;
- nextElement = null;
- return nxt;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- private boolean positionNext() {
- if (nextElement != null)
- return true;
-
- if (currentBucket != null) {
- nextElement = currentBucket[bucketIndex];
- if (++bucketIndex == currentBucket.length) {
- currentBucket = null;
- bucketIndex = -1;
- }
- return true;
- }
-
- if (!unitIterator.hasNext())
- return false;
-
- Object val = unitIterator.next();
- if (val instanceof IInstallableUnit)
- nextElement = (IInstallableUnit) val;
- else {
- currentBucket = (IInstallableUnit[]) val;
- nextElement = currentBucket[0];
- bucketIndex = 1;
- }
- return true;
- }
- }
-
- /**
- * Map<String,Object> mapping IU id to either arrays of iu's or a single iu with that id.
- */
- final Map<String, Object> units = new HashMap<String, Object>();
-
- public IUMap() {
- //
- }
-
- private IUMap(IUMap cloneSource) {
- units.putAll(cloneSource.units);
- }
-
- public void add(IInstallableUnit unit) {
- String key = unit.getId();
- Object matching = units.get(key);
- if (matching == null) {
- units.put(key, unit);
- return;
- }
-
- // We already had something at this key position. It must be
- // preserved.
- if (matching.getClass().isArray()) {
- // Entry is an array. Add unique
- IInstallableUnit[] iuArr = (IInstallableUnit[]) matching;
- int idx = iuArr.length;
- while (--idx >= 0)
- if (iuArr[idx].equals(unit))
- // This unit has already been added
- return;
-
- IInstallableUnit[] iuArrPlus = new IInstallableUnit[iuArr.length + 1];
- System.arraycopy(iuArr, 0, iuArrPlus, 0, iuArr.length);
- iuArrPlus[iuArr.length] = unit;
- units.put(unit.getId(), iuArrPlus);
- } else {
- IInstallableUnit old = (IInstallableUnit) matching;
- if (!old.equals(unit))
- units.put(key, new IInstallableUnit[] {old, unit});
- }
- }
-
- public void addAll(IInstallableUnit[] toAdd) {
- for (int i = 0; i < toAdd.length; i++)
- add(toAdd[i]);
- }
-
- public void addAll(Collection<IInstallableUnit> toAdd) {
- for (IInstallableUnit unit : toAdd) {
- add(unit);
- }
- }
-
- public void clear() {
- units.clear();
- }
-
- @Override
- public IUMap clone() {
- return new IUMap(this);
- }
-
- public Iterator<IInstallableUnit> iterator() {
- return new MapIterator();
- }
-
- public boolean contains(IInstallableUnit unit) {
- return !internalGet(unit.getId(), unit.getVersion()).isEmpty();
- }
-
- /**
- * Returns a collection of units that has the given <code>id</code>.
- * @param id The id of the desired units. Must not be <code>null</code>.
- * @return The units corresponding to the given <code>id</code>.
- */
- public Collection<IInstallableUnit> getUnits(String id) {
- Object bucket = units.get(id);
- if (bucket == null)
- return CollectionUtils.emptyList();
- return bucket.getClass().isArray() ? CollectionUtils.unmodifiableList((IInstallableUnit[]) bucket) : Collections.<IInstallableUnit> singletonList((IInstallableUnit) bucket);
- }
-
- public IQueryResult<IInstallableUnit> get(String id) {
- return internalGet(id, null);
- }
-
- private IQueryResult<IInstallableUnit> internalGet(String id, Version version) {
- if (id == null) {
- IQuery<IInstallableUnit> query = version == null ? QueryUtil.createIUAnyQuery() : QueryUtil.createIUQuery(null, version);
- return query.perform(iterator());
- }
-
- Collection<IInstallableUnit> idUnits = getUnits(id);
- if (idUnits.isEmpty())
- return Collector.emptyCollector();
- return version == null ? new CollectionResult<IInstallableUnit>(idUnits) : QueryUtil.createIUQuery(id, version).perform(idUnits.iterator());
- }
-
- public IInstallableUnit get(String id, Version version) {
- IQueryResult<IInstallableUnit> result = internalGet(id, version);
- return result.isEmpty() ? null : result.iterator().next();
- }
-
- public void remove(IInstallableUnit unit) {
- String key = unit.getId();
- Object matching = units.get(key);
- if (matching == null)
- return;
-
- if (matching instanceof IInstallableUnit) {
- if (matching.equals(unit))
- units.remove(key);
- return;
- }
-
- IInstallableUnit[] array = (IInstallableUnit[]) matching;
- int idx = array.length;
- while (--idx >= 0) {
- if (unit.equals(array[idx])) {
- if (array.length == 2) {
- // We no longer need this array. Replace it with the
- // entry that we keep.
- units.put(key, idx == 0 ? array[1] : array[0]);
- break;
- }
-
- // Shrink the array
- IInstallableUnit[] newArray = new IInstallableUnit[array.length - 1];
- if (idx > 0)
- System.arraycopy(array, 0, newArray, 0, idx);
- if (idx + 1 < array.length)
- System.arraycopy(array, idx + 1, newArray, idx, array.length - (idx + 1));
- units.put(key, newArray);
- break;
- }
- }
- }
-
- public void removeAll(Collection<IInstallableUnit> toRemove) {
- for (IInstallableUnit iu : toRemove)
- remove(iu);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
deleted file mode 100644
index 8d564e0b5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnit.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.OrderedProperties;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-public class InstallableUnit implements IInstallableUnit, IMemberProvider {
- @SuppressWarnings("serial")
- private static final Map<IFilterExpression, IMatchExpression<IInstallableUnit>> filterCache = new LinkedHashMap<IFilterExpression, IMatchExpression<IInstallableUnit>>() {
- public boolean removeEldestEntry(Map.Entry<IFilterExpression, IMatchExpression<IInstallableUnit>> expr) {
- return size() > 64;
- }
- };
-
- private static final OrderedProperties NO_PROPERTIES = new OrderedProperties();
- private static final IProvidedCapability[] NO_PROVIDES = new IProvidedCapability[0];
- private static final IRequirement[] NO_REQUIRES = new IRequirement[0];
- private static final IArtifactKey[] NO_ARTIFACTS = new IArtifactKey[0];
- private static final ITouchpointData[] NO_TOUCHPOINT_DATA = new ITouchpointData[0];
- private static final ILicense[] NO_LICENSE = new ILicense[0];
-
- private static final IExpression filterWrap;
-
- public static final String MEMBER_PROVIDED_CAPABILITIES = "providedCapabilities"; //$NON-NLS-1$
- public static final String MEMBER_ID = "id"; //$NON-NLS-1$
- public static final String MEMBER_VERSION = "version"; //$NON-NLS-1$
- public static final String MEMBER_PROPERTIES = "properties"; //$NON-NLS-1$
- public static final String MEMBER_FILTER = "filter"; //$NON-NLS-1$
- public static final String MEMBER_ARTIFACTS = "artifacts"; //$NON-NLS-1$
- public static final String MEMBER_REQUIREMENTS = "requirements"; //$NON-NLS-1$
- public static final String MEMBER_LICENSES = "licenses"; //$NON-NLS-1$
- public static final String MEMBER_COPYRIGHT = "copyright"; //$NON-NLS-1$
- public static final String MEMBER_TOUCHPOINT_DATA = "touchpointData"; //$NON-NLS-1$
- public static final String MEMBER_TOUCHPOINT_TYPE = "touchpointType"; //$NON-NLS-1$
- public static final String MEMBER_UPDATE_DESCRIPTOR = "updateDescriptor"; //$NON-NLS-1$
- public static final String MEMBER_SINGLETON = "singleton"; //$NON-NLS-1$
-
- static {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- filterWrap = factory.matches(factory.member(factory.thisVariable(), MEMBER_PROPERTIES), factory.indexedParameter(0));
- }
-
- private IArtifactKey[] artifacts = NO_ARTIFACTS;
- private IMatchExpression<IInstallableUnit> filter;
-
- private String id;
-
- private OrderedProperties properties;
- private OrderedProperties localizedProperties;
- IProvidedCapability[] providedCapabilities = NO_PROVIDES;
- private IRequirement[] requires = NO_REQUIRES;
- private IRequirement[] metaRequires = NO_REQUIRES;
-
- private boolean singleton;
-
- private ITouchpointData[] touchpointData = NO_TOUCHPOINT_DATA;
-
- private ITouchpointType touchpointType;
-
- private Version version = Version.emptyVersion;
-
- private IUpdateDescriptor updateInfo;
- private ILicense[] licenses = NO_LICENSE;
- private ICopyright copyright;
- public static final String MEMBER_TRANSLATED_PROPERTIES = "translatedProperties"; //$NON-NLS-1$
- public static final String MEMBER_PROFILE_PROPERTIES = "profileProperties"; //$NON-NLS-1$
-
- public InstallableUnit() {
- super();
- }
-
- public void addTouchpointData(ITouchpointData newData) {
- int tl = touchpointData.length;
- if (tl == 0)
- touchpointData = new ITouchpointData[] {newData};
- else {
- ITouchpointData[] newDatas = new ITouchpointData[tl + 1];
- System.arraycopy(touchpointData, 0, newDatas, 0, tl);
- newDatas[tl] = newData;
- touchpointData = newDatas;
- }
- }
-
- public int compareTo(IInstallableUnit other) {
- int cmp = getId().compareTo(other.getId());
- if (cmp == 0)
- cmp = getVersion().compareTo(other.getVersion());
- return cmp;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof IInstallableUnit))
- return false;
- final IInstallableUnit other = (IInstallableUnit) obj;
- if (id == null) {
- if (other.getId() != null)
- return false;
- } else if (!id.equals(other.getId()))
- return false;
- if (getVersion() == null) {
- if (other.getVersion() != null)
- return false;
- } else if (!getVersion().equals(other.getVersion()))
- return false;
- return true;
- }
-
- public Collection<IArtifactKey> getArtifacts() {
- return CollectionUtils.unmodifiableList(artifacts);
- }
-
- public IMatchExpression<IInstallableUnit> getFilter() {
- return filter;
- }
-
- public Collection<IInstallableUnitFragment> getFragments() {
- return CollectionUtils.emptyList();
- }
-
- public String getId() {
- return id;
- }
-
- /**
- * Get an <i>unmodifiable copy</i> of the properties
- * associated with the installable unit.
- *
- * @return an <i>unmodifiable copy</i> of the IU properties.
- */
- public Map<String, String> getProperties() {
- return OrderedProperties.unmodifiableProperties(properties());
- }
-
- /*
- * Helper method to cache localized properties
- */
- public String getLocalizedProperty(String key) {
- String result = null;
- if (localizedProperties != null)
- result = localizedProperties.getProperty(key);
- return result;
- }
-
- public String getProperty(String key) {
- return properties().getProperty(key);
- }
-
- public Collection<IProvidedCapability> getProvidedCapabilities() {
- return CollectionUtils.unmodifiableList(providedCapabilities);
- }
-
- public String getProperty(String key, String locale) {
- return TranslationSupport.getInstance().getIUProperty(this, key, locale);
- }
-
- public List<IRequirement> getRequirements() {
- return CollectionUtils.unmodifiableList(requires);
-
- }
-
- public Collection<ITouchpointData> getTouchpointData() {
- return CollectionUtils.unmodifiableList(touchpointData);
- }
-
- public ITouchpointType getTouchpointType() {
- return touchpointType != null ? touchpointType : ITouchpointType.NONE;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
- return result;
- }
-
- public boolean isResolved() {
- return false;
- }
-
- public boolean isSingleton() {
- return singleton;
- }
-
- private OrderedProperties properties() {
- return (properties != null ? properties : NO_PROPERTIES);
- }
-
- public void setArtifacts(IArtifactKey[] value) {
- if (value == null || value.length == 0)
- artifacts = NO_ARTIFACTS;
- else
- artifacts = value;
- }
-
- public void setCapabilities(IProvidedCapability[] newCapabilities) {
- if (newCapabilities == null || newCapabilities.length == 0)
- providedCapabilities = NO_PROVIDES;
- else
- providedCapabilities = newCapabilities;
- }
-
- public void setFilter(IMatchExpression<IInstallableUnit> filter) {
- this.filter = filter;
- }
-
- public void setFilter(String filter) {
- setFilter(parseFilter(filter));
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public static IMatchExpression<IInstallableUnit> parseFilter(String filterStr) {
- IFilterExpression filter = ExpressionUtil.parseLDAP(filterStr);
- if (filter == null)
- return null;
-
- synchronized (filterCache) {
- IMatchExpression<IInstallableUnit> matchExpr = filterCache.get(filter);
- if (matchExpr != null)
- return matchExpr;
-
- matchExpr = ExpressionUtil.getFactory().<IInstallableUnit> matchExpression(filterWrap, filter);
- filterCache.put(filter, matchExpr);
- return matchExpr;
- }
- }
-
- /*
- * Helper method to cache localized properties
- */
- public String setLocalizedProperty(String key, String value) {
- if (localizedProperties == null)
- localizedProperties = new OrderedProperties();
- return localizedProperties.put(key, value);
- }
-
- public String setProperty(String key, String value) {
- if (value == null)
- return (properties != null ? (String) properties.remove(key) : null);
- if (properties == null)
- properties = new OrderedProperties();
- return (String) properties.setProperty(key, value);
- }
-
- public void setRequiredCapabilities(IRequirement[] capabilities) {
- if (capabilities.length == 0) {
- this.requires = NO_REQUIRES;
- } else {
- //copy array for safety
- this.requires = capabilities.clone();
- }
- }
-
- public void setSingleton(boolean singleton) {
- this.singleton = singleton;
- }
-
- public void setTouchpointType(ITouchpointType type) {
- this.touchpointType = (type != ITouchpointType.NONE ? type : null);
- }
-
- public void setVersion(Version newVersion) {
- this.version = (newVersion != null ? newVersion : Version.emptyVersion);
- }
-
- public String toString() {
- return id + ' ' + getVersion();
- }
-
- public IInstallableUnit unresolved() {
- return this;
- }
-
- public IUpdateDescriptor getUpdateDescriptor() {
- return updateInfo;
- }
-
- public void setUpdateDescriptor(IUpdateDescriptor updateInfo) {
- this.updateInfo = updateInfo;
- }
-
- public void setLicenses(ILicense[] license) {
- this.licenses = license == null ? NO_LICENSE : license;
- }
-
- public Collection<ILicense> getLicenses() {
- return CollectionUtils.unmodifiableList(licenses);
- }
-
- public Collection<ILicense> getLicenses(String locale) {
- return CollectionUtils.unmodifiableList(TranslationSupport.getInstance().getLicenses(this, locale));
- }
-
- public void setCopyright(ICopyright copyright) {
- this.copyright = copyright;
- }
-
- public ICopyright getCopyright() {
- return copyright;
- }
-
- public ICopyright getCopyright(String locale) {
- return TranslationSupport.getInstance().getCopyright(this, locale);
- }
-
- public boolean satisfies(IRequirement candidate) {
- return candidate.isMatch(this);
- }
-
- public Collection<IRequirement> getMetaRequirements() {
- return CollectionUtils.unmodifiableList(metaRequires);
- }
-
- public void setMetaRequiredCapabilities(IRequirement[] metaReqs) {
- if (metaReqs.length == 0) {
- this.metaRequires = NO_REQUIRES;
- } else {
- //copy array for safety
- this.metaRequires = metaReqs.clone();
- }
- }
-
- public Object getMember(String memberName) {
- // It is OK to use identity comparisons here since
- // a) All constant valued strings are always interned
- // b) The Member constructor always interns the name
- //
- if (MEMBER_PROVIDED_CAPABILITIES == memberName)
- return providedCapabilities;
- if (MEMBER_ID == memberName)
- return id;
- if (MEMBER_VERSION == memberName)
- return version;
- if (MEMBER_PROPERTIES == memberName)
- return properties;
- if (MEMBER_FILTER == memberName)
- return filter;
- if (MEMBER_ARTIFACTS == memberName)
- return artifacts;
- if (MEMBER_REQUIREMENTS == memberName)
- return requires;
- if (MEMBER_LICENSES == memberName)
- return licenses;
- if (MEMBER_COPYRIGHT == memberName)
- return copyright;
- if (MEMBER_TOUCHPOINT_DATA == memberName)
- return touchpointData;
- if (MEMBER_TOUCHPOINT_TYPE == memberName)
- return touchpointType;
- if (MEMBER_UPDATE_DESCRIPTOR == memberName)
- return updateInfo;
- if (MEMBER_SINGLETON == memberName)
- return Boolean.valueOf(singleton);
- throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
- }
-
- public static IInstallableUnit contextIU(String ws, String os, String arch) {
- InstallableUnit ctxIU = new InstallableUnit();
- ctxIU.setId("org.eclipse.equinox.p2.context.iu"); //$NON-NLS-1$
- ctxIU.setProperty("osgi.ws", ws); //$NON-NLS-1$
- ctxIU.setProperty("osgi.os", os); //$NON-NLS-1$
- ctxIU.setProperty("osgi.arch", arch); //$NON-NLS-1$
- return ctxIU;
- }
-
- public static IInstallableUnit contextIU(Map<String, String> environment) {
- InstallableUnit ctxIU = new InstallableUnit();
- ctxIU.setId("org.eclipse.equinox.p2.context.iu"); //$NON-NLS-1$
- for (Map.Entry<String, String> entry : environment.entrySet())
- ctxIU.setProperty(entry.getKey(), entry.getValue());
- return ctxIU;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
deleted file mode 100644
index 33e8bb4b1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitFragment.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnitFragment;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-
-public class InstallableUnitFragment extends InstallableUnit implements IInstallableUnitFragment {
-
- private Collection<IRequirement> hostRequirements;
-
- public InstallableUnitFragment() {
- super();
- }
-
- public void setHost(Collection<IRequirement> hostRequirements) {
- if (hostRequirements == null)
- return;
- this.hostRequirements = hostRequirements;
- }
-
- public Collection<IRequirement> getHost() {
- return hostRequirements;
- }
-
- public Object getMember(String memberName) {
- return "host".equals(memberName) ? hostRequirements : super.getMember(memberName); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java
deleted file mode 100644
index 6b097910d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/InstallableUnitPatch.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.List;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.*;
-
-public class InstallableUnitPatch extends InstallableUnit implements IInstallableUnitPatch {
- public static final String MEMBER_APPLICABILITY_SCOPE = "applicabilityScope"; //$NON-NLS-1$
- public static final String MEMBER_LIFECYCLE = "lifeCycle"; //$NON-NLS-1$
- public static final String MEMBER_REQUIREMENTS_CHANGE = "requirementsChange"; //$NON-NLS-1$
-
- private IRequirementChange[] changes;
- private IRequirement lifeCycle;
- private IRequirement[][] scope;
-
- private void addRequiredCapability(IRequirement[] toAdd) {
- List<IRequirement> current = super.getRequirements();
- int currSize = current.size();
- IRequirement[] result = new IRequirement[currSize + toAdd.length];
- for (int i = 0; i < currSize; ++i)
- result[i] = current.get(i);
- System.arraycopy(toAdd, 0, result, current.size(), toAdd.length);
- setRequiredCapabilities(result);
- }
-
- public IRequirement[][] getApplicabilityScope() {
- return scope;
- }
-
- public IRequirement getLifeCycle() {
- return lifeCycle;
- }
-
- public List<IRequirementChange> getRequirementsChange() {
- return CollectionUtils.unmodifiableList(changes);
- }
-
- public void setApplicabilityScope(IRequirement[][] applyTo) {
- scope = applyTo;
- }
-
- public void setLifeCycle(IRequirement lifeCycle) {
- if (lifeCycle == null)
- return;
- this.lifeCycle = lifeCycle;
- addRequiredCapability(new IRequirement[] {lifeCycle});
- }
-
- public void setRequirementsChange(IRequirementChange[] changes) {
- this.changes = changes;
- }
-
- public Object getMember(String memberName) {
- if (MEMBER_APPLICABILITY_SCOPE == memberName)
- return scope;
- if (MEMBER_LIFECYCLE == memberName)
- return lifeCycle;
- if (MEMBER_REQUIREMENTS_CHANGE == memberName)
- return changes;
- return super.getMember(memberName);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
deleted file mode 100644
index 38c62c1b1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/License.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Genuitec, LLC 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:
- * Genuitec, LLC - initial API and implementation
- * IBM Corporation - ongoing development
- * EclipseSource - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.io.UnsupportedEncodingException;
-import java.math.BigInteger;
-import java.net.URI;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import org.eclipse.equinox.p2.metadata.ILicense;
-
-/**
- * The <code>License</code> class represents a software license. A license has required body text
- * which may be the full text or an annotation. An optional URL field can be specified
- * which links to full text. Licenses can be easily compared using their digests.
- */
-public class License implements ILicense {
- /**
- * The <code>body</code> contains the descriptive text for the license. This may
- * be a summary for a full license specified in a URL.
- */
- private final String body;
-
- /**
- * The <code>location</code> is the URL of the license.
- */
- private URI location;
-
- /**
- * The <code>digest</code> is the cached message digest of the normalized body
- */
- private String digest;
-
- /**
- * Creates a new license object which is identified by users using the <code>body</code> field.
- * The body should contain either the full text of the license or an summary for a license
- * fully specified in the given location.
- *
- * @param location the location of a document containing the full license, or <code>null</code>
- * @param body the license body, cannot be <code>null</code>
- * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
- */
- public License(URI location, String body, String uuid) {
- if (body == null)
- throw new IllegalArgumentException("body cannot be null"); //$NON-NLS-1$
- this.body = body;
- this.location = location;
- this.digest = uuid;
- }
-
- /**
- * Returns the location of a document containing the full license.
- *
- * @return the location of the license document, or <code>null</code>
- */
- public URI getLocation() {
- return location;
- }
-
- /**
- * Returns the license body.
- * @return the license body, never <code>null</code>
- */
- public String getBody() {
- return body;
- }
-
- /**
- * Returns the message digest of the license body. The digest is calculated on a normalized
- * version of the license where all whitespace has been reduced to one space.
- * @return the message digest as a <code>BigInteger</code>, never <code>null</code>
- */
- public synchronized String getUUID() {
- if (digest == null)
- digest = calculateLicenseDigest().toString(16);
-
- return digest;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (obj == this)
- return true;
- if (obj == null)
- return false;
- if (obj instanceof ILicense) {
- ILicense other = (ILicense) obj;
- if (other.getUUID().equals(getUUID()))
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getUUID().hashCode();
- }
-
- private BigInteger calculateLicenseDigest() {
- String message = normalize(getBody());
- try {
- MessageDigest algorithm = MessageDigest.getInstance("MD5"); //$NON-NLS-1$
- algorithm.reset();
- algorithm.update(message.getBytes("UTF-8")); //$NON-NLS-1$
- byte[] digestBytes = algorithm.digest();
- return new BigInteger(1, digestBytes);
- } catch (NoSuchAlgorithmException e) {
- throw new RuntimeException(e);
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Replace all sequences of whitespace with a single whitespace character.
- */
- private String normalize(String license) {
- String text = license.trim();
- StringBuffer result = new StringBuffer();
- int length = text.length();
- for (int i = 0; i < length; i++) {
- char c = text.charAt(i);
- boolean foundWhitespace = false;
- while (Character.isWhitespace(c) && i < length) {
- foundWhitespace = true;
- c = text.charAt(++i);
- }
- if (foundWhitespace)
- result.append(' ');
- if (i < length)
- result.append(c);
- }
- return result.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java
deleted file mode 100644
index eebdf5f49..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/Messages.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * TODO Shouldn't be a public class in an API package.
- */
-public class Messages extends NLS {
-
- public static String _0_is_not_a_valid_qualifier_in_osgi_1;
-
- public static String array_can_not_be_empty;
-
- public static String array_can_not_have_character_group;
-
- public static String array_can_not_have_enum;
-
- public static String auto_can_not_have_pad_value;
-
- public static String bad_enum_definition;
-
- public static String cannot_combine_ignore_with_other_instruction;
-
- public static String cannot_combine_range_upper_bound_with_pad_value;
-
- public static String character_group_defined_more_then_once;
-
- public static String colon_expected_before_original_version_0;
-
- public static String default_defined_more_then_once;
-
- public static String delimiter_can_not_be_ignored;
-
- public static String delimiter_can_not_have_default_value;
-
- public static String delimiter_can_not_have_pad_value;
-
- public static String delimiter_can_not_have_range;
-
- public static String EOS_after_escape;
-
- public static String enum_defined_more_then_once;
-
- public static String expected_orignal_after_colon_0;
-
- public static String expected_orignal_after_slash_0;
-
- public static String expected_slash_after_raw_vector_0;
-
- public static String filter_trailing_characters;
-
- public static String filter_missing_leftparen;
-
- public static String filter_missing_rightparen;
-
- public static String filter_invalid_operator;
-
- public static String filter_missing_attr;
-
- public static String filter_invalid_value;
-
- public static String filter_missing_value;
-
- public static String filter_premature_end;
-
- public static String format_0_unable_to_parse_1;
-
- public static String format_0_unable_to_parse_empty_version;
-
- public static String format_is_empty;
-
- public static String format_must_be_delimited_by_colon_0;
-
- public static String group_can_not_be_empty;
-
- public static String ignore_defined_more_then_once;
-
- public static String illegal_character_encountered_ascii_0;
-
- public static String missing_comma_in_range_0;
-
- public static String negative_character_range;
-
- public static String neither_raw_vector_nor_format_specified_0;
-
- public static String number_can_not_have_pad_value;
-
- public static String only_format_specified_0;
-
- public static String only_max_and_empty_string_defaults_can_have_translations;
-
- public static String original_must_start_with_colon_0;
-
- public static String original_stated_but_missing_0;
-
- public static String pad_defined_more_then_once;
-
- public static String performing_subquery;
-
- public static String premature_end_of_format;
-
- public static String premature_end_of_format_expected_0;
-
- public static String premature_EOS_0;
-
- public static String range_boundaries_0_and_1_cannot_have_different_formats;
-
- public static String range_defined_more_then_once;
-
- public static String range_max_cannot_be_less_then_range_min;
-
- public static String range_max_cannot_be_zero;
-
- public static String range_min_0_is_not_less_then_range_max_1;
-
- public static String raw_and_original_must_use_same_range_inclusion_0;
-
- public static String raw_element_can_not_have_pad_value;
-
- public static String raw_element_expected_0;
-
- public static String string_can_not_have_pad_value;
-
- public static String syntax_error_in_version_format_0_1_2;
-
- public static String syntax_error_in_version_format_0_1_found_2_expected_3;
-
- public static String unbalanced_format_parenthesis;
-
- public static String no_expression_factory;
-
- public static String no_expression_parser;
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.messages"; //$NON-NLS-1$
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // Prevent instance creation
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java
deleted file mode 100644
index 94677c600..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/MetadataActivator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class MetadataActivator implements BundleActivator {
- public static final String PI_METADATA = "org.eclipse.equinox.p2.metadata"; //$NON-NLS-1$
-
- public static MetadataActivator instance;
-
- private BundleContext context;
-
- public static BundleContext getContext() {
- MetadataActivator activator = instance;
- return activator == null ? null : activator.context;
- }
-
- public void start(BundleContext aContext) throws Exception {
- context = aContext;
- instance = this;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- instance = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java
deleted file mode 100644
index 5704d4da3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OSGiVersion.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.List;
-import org.eclipse.equinox.p2.metadata.IVersionFormat;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class OSGiVersion extends BasicVersion {
-
- private static final long serialVersionUID = -4530178927569560877L;
-
- private static final boolean[] allowedOSGiChars;
-
- private final int major;
-
- private final int minor;
-
- private final int micro;
-
- private final Comparable<?> qualifier;
-
- static {
- allowedOSGiChars = new boolean[128];
- for (int c = '0'; c <= '9'; ++c)
- allowedOSGiChars[c] = true;
- for (int c = 'A'; c <= 'Z'; ++c)
- allowedOSGiChars[c] = true;
- for (int c = 'a'; c <= 'z'; ++c)
- allowedOSGiChars[c] = true;
- allowedOSGiChars['_'] = true;
- allowedOSGiChars['-'] = true;
- }
-
- public static boolean isValidOSGiQualifier(Comparable<?> e) {
- if (e == VersionVector.MAXS_VALUE)
- return true;
-
- if (!(e instanceof String))
- return false;
-
- String s = (String) e;
- int idx = s.length();
- boolean[] allowed = allowedOSGiChars;
- while (--idx >= 0) {
- int c = s.charAt(idx);
- if (c < '-' || c > 'z' || !allowed[c])
- return false;
- }
- return true;
- }
-
- static BasicVersion fromVector(List<Comparable<?>> vector) {
- int vtop = vector.size() - 1;
- Comparable<?> pad = vector.get(vtop);
- if (vtop != 4) {
- if (vtop == 0) {
- if (pad == null)
- return (BasicVersion) emptyVersion;
- if (pad == VersionVector.MAX_VALUE)
- return (BasicVersion) MAX_VERSION;
- }
- throw new IllegalArgumentException();
- }
- int major = ((Integer) vector.get(0)).intValue();
- int minor = ((Integer) vector.get(1)).intValue();
- int micro = ((Integer) vector.get(2)).intValue();
- Comparable<?> qualifier = vector.get(3);
- return (major == 0 && minor == 0 && micro == 0 && qualifier == VersionVector.MINS_VALUE) ? (BasicVersion) emptyVersion : new OSGiVersion(major, minor, micro, qualifier);
- }
-
- public OSGiVersion(int major, int minor, int micro, Comparable<? extends Object> qualifier) {
- this.major = major;
- this.minor = minor;
- this.micro = micro;
- if (!isValidOSGiQualifier(qualifier))
- throw new IllegalArgumentException(NLS.bind(Messages._0_is_not_a_valid_qualifier_in_osgi_1, "qualifier", this)); //$NON-NLS-1$
- //intern the qualifier string to avoid duplication
- if (qualifier instanceof String)
- qualifier = ((String) qualifier).intern();
- this.qualifier = qualifier;
- }
-
- public int compareTo(Version v) {
- int result;
- if (!(v instanceof OSGiVersion)) {
- BasicVersion ov = (BasicVersion) v;
- result = VersionVector.compare(getVector(), null, ov.getVector(), ov.getPad());
- } else {
- OSGiVersion ov = (OSGiVersion) v;
- result = major - ov.major;
- if (result == 0) {
- result = minor - ov.minor;
- if (result == 0) {
- result = micro - ov.micro;
- if (result == 0)
- result = VersionVector.compareSegments(qualifier, ov.qualifier);
- }
- }
- }
- return result;
- }
-
- public boolean equals(Object object) {
- if (object == this)
- return true;
-
- if (!(object instanceof OSGiVersion)) {
- if (object instanceof BasicVersion) {
- BasicVersion ov = (BasicVersion) object;
- return VersionVector.equals(getVector(), null, ov.getVector(), ov.getPad());
- }
- return false;
- }
-
- OSGiVersion other = (OSGiVersion) object;
- return micro == other.micro && minor == other.minor && major == other.major && qualifier.equals(other.qualifier);
- }
-
- public IVersionFormat getFormat() {
- return VersionFormat.OSGI_FORMAT;
- }
-
- public int getMajor() {
- return major;
- }
-
- public int getMicro() {
- return micro;
- }
-
- public int getMinor() {
- return minor;
- }
-
- public String getOriginal() {
- return toString();
- }
-
- public String getQualifier() {
- return qualifier == VersionVector.MAXS_VALUE ? IVersionFormat.DEFAULT_MAX_STRING_TRANSLATION : (String) qualifier;
- }
-
- public int hashCode() {
- return (major << 24) + (minor << 16) + (micro << 8) + qualifier.hashCode();
- }
-
- public boolean isOSGiCompatible() {
- return true;
- }
-
- public void originalToString(StringBuffer sb, boolean rangeSafe) {
- toString(sb);
- }
-
- public void rawToString(StringBuffer sb, boolean rangeSafe) {
- sb.append(major);
- sb.append('.');
- sb.append(minor);
- sb.append('.');
- sb.append(micro);
- sb.append('.');
- sb.append('\'');
- sb.append(qualifier);
- sb.append('\'');
- }
-
- public void toString(StringBuffer sb) {
- sb.append(major);
- sb.append('.');
- sb.append(minor);
- sb.append('.');
- sb.append(micro);
- if (qualifier != VersionVector.MINS_VALUE) {
- sb.append('.');
- sb.append(getQualifier());
- }
- }
-
- public Comparable<?>[] getVector() {
- return new Comparable[] {VersionParser.valueOf(major), VersionParser.valueOf(minor), VersionParser.valueOf(micro), qualifier};
- }
-
- public Comparable<?> getPad() {
- return null;
- }
-
- public Comparable<?> getSegment(int index) {
- switch (index) {
- case 0 :
- return VersionParser.valueOf(major);
- case 1 :
- return VersionParser.valueOf(minor);
- case 2 :
- return VersionParser.valueOf(micro);
- case 3 :
- return qualifier;
- }
- throw new ArrayIndexOutOfBoundsException(index); // Not in the imaginary vector array
- }
-
- public int getSegmentCount() {
- return 4;
- }
-
- private Object readResolve() {
- OSGiVersion v = this;
- // Preserve the empty string singleton.
- if (qualifier.equals(VersionVector.MINS_VALUE))
- v = new OSGiVersion(major, minor, micro, VersionVector.MINS_VALUE);
- return v;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java
deleted file mode 100644
index 48ca355e9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/OmniVersion.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.Collections;
-import java.util.List;
-import org.eclipse.equinox.p2.metadata.IVersionFormat;
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- * <p>The Generic Omni Version is composed of a vector of Comparable objects and a pad value. The pad
- * might be <code>null</code>. The vector can contain integers, strings, {@link VersionVector}
- * instances, or one of the special objects {@link VersionVector#MAX_VALUE MAX_VALUE},
- * {@link VersionVector#MAXS_VALUE MAXS_VALUE}, or {@link VersionVector#MIN_VALUE MIN_VALUE}.</p>
- *
- * <p>When two versions are compared, they are always considered padded to infinity by their
- * pad value or by {@link VersionVector#MIN_VALUE MIN_VALUE} in case the pad value is
- * <code>null</code>. The comparison is type sensitive so that:</p><pre>
- * MAX_VALUE &gt; Integer &gt; VersionVector &gt; MAXS_VALUE &gt; String &gt; MIN_VALUE<br/>
- * </pre>
- *
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class OmniVersion extends BasicVersion {
- private static final long serialVersionUID = 1996212688810048879L;
-
- private static OmniVersion minimumVersion;
-
- private static OmniVersion maximumVersion;
-
- private static final Comparable<?>[] emptyVector = new Comparable<?>[0];
-
- private final Comparable<?>[] vector;
-
- private final Comparable<?> padValue;
-
- /**
- * The optional format
- */
- private final IVersionFormat format;
-
- /**
- * The optional original string
- */
- private final String original;
-
- static BasicVersion fromVector(List<Comparable<?>> vector, IVersionFormat format, String original) {
- int vtop = vector.size() - 1;
- Comparable<?> padValue = vector.get(vtop);
- if (vtop == 0) {
- if (padValue == null)
- return (BasicVersion) emptyVersion;
- if (padValue == VersionVector.MAX_VALUE)
- return (BasicVersion) MAX_VERSION;
- }
- if (vtop == 3 && padValue == null && vector.get(0) == VersionParser.ZERO_INT && vector.get(1) == VersionParser.ZERO_INT && vector.get(2) == VersionParser.ZERO_INT)
- return (BasicVersion) emptyVersion;
-
- return new OmniVersion(vector, format, original);
- }
-
- public static Version createMinVersion() {
- if (minimumVersion == null)
- minimumVersion = new OmniVersion(Collections.<Comparable<?>> singletonList(null), null, null);
- return minimumVersion;
- }
-
- public static Version createMaxVersion() {
- if (maximumVersion == null)
- maximumVersion = new OmniVersion(Collections.<Comparable<?>> singletonList(VersionVector.MAX_VALUE), null, null);
- return maximumVersion;
- }
-
- private OmniVersion(List<Comparable<?>> vector, IVersionFormat format, String original) {
- int vtop = vector.size() - 1;
- if (vtop > 0) {
- Comparable<?>[] v = new Comparable<?>[vtop];
- for (int idx = 0; idx < vtop; ++idx)
- v[idx] = vector.get(idx);
- this.vector = v;
- } else
- this.vector = emptyVector;
- this.padValue = vector.get(vtop);
- this.format = format;
- this.original = original;
- }
-
- public boolean equals(Object o) {
- if (o == this)
- return true;
-
- if (!(o instanceof BasicVersion))
- return false;
-
- BasicVersion ov = (BasicVersion) o;
- return VersionVector.equals(vector, padValue, ov.getVector(), ov.getPad());
- }
-
- public IVersionFormat getFormat() {
- return format;
- }
-
- public int getMajor() {
- return getIntElement(0);
- }
-
- public int getMicro() {
- return getIntElement(2);
- }
-
- public int getMinor() {
- return getIntElement(1);
- }
-
- public String getOriginal() {
- return original;
- }
-
- public String getQualifier() {
- if (vector.length == 3)
- return VersionVector.MINS_VALUE;
-
- if (vector.length != 4)
- throw new UnsupportedOperationException();
-
- Comparable<?> qualifier = vector[3];
- if (qualifier == VersionVector.MAXS_VALUE)
- return IVersionFormat.DEFAULT_MAX_STRING_TRANSLATION;
- if (!(qualifier instanceof String))
- throw new UnsupportedOperationException();
- return (String) qualifier;
- }
-
- public int hashCode() {
- return VersionVector.hashCode(vector, padValue);
- }
-
- /**
- * Checks if this version is in compliance with the OSGi version spec.
- * @return A flag indicating whether the version is OSGi compatible or not.
- */
- public boolean isOSGiCompatible() {
- if (vector.length < 3 || vector.length > 4)
- return (this == emptyVersion || this == MAX_VERSION);
-
- if (getPad() != null)
- return false;
-
- for (int i = 0; i < 3; ++i) {
- Object e = vector[i];
- if (!(e instanceof Integer && ((Integer) e).intValue() >= 0))
- return false;
- }
-
- if (vector.length == 3)
- return true; // No qualifier. Still compatible
- return OSGiVersion.isValidOSGiQualifier(vector[3]);
- }
-
- /**
- * Appends the original for this version onto the <code>sb</code> StringBuffer
- * if present.
- * @param sb The buffer that will receive the raw string format
- * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
- */
- public void originalToString(StringBuffer sb, boolean rangeSafe) {
- if (original != null) {
- if (rangeSafe) {
- // Escape all range delimiters while appending
- String s = original;
- int end = s.length();
- for (int idx = 0; idx < end; ++idx) {
- char c = s.charAt(idx);
- if (c == '\\' || c == '[' || c == '(' || c == ']' || c == ')' || c == ',' || c <= ' ')
- sb.append('\\');
- sb.append(c);
- }
- } else
- sb.append(original);
- }
- }
-
- /**
- * Appends the raw format for this version onto the <code>sb</code> StringBuffer.
- * @param sb The buffer that will receive the raw string format
- * @param rangeSafe Set to <code>true</code> if range delimiters should be escaped
- */
- public void rawToString(StringBuffer sb, boolean rangeSafe) {
- VersionVector.toString(sb, vector, padValue, rangeSafe);
- }
-
- /**
- * Appends the string representation of this version onto the
- * <code>sb</code> StringBuffer.
- * @param sb The buffer that will receive the version string
- */
- public void toString(StringBuffer sb) {
- if (this == emptyVersion)
- sb.append("0.0.0"); //$NON-NLS-1$
- else {
- sb.append(RAW_PREFIX);
- VersionVector.toString(sb, vector, padValue, false);
- if (format != null || original != null) {
- sb.append('/');
- if (format != null)
- format.toString(sb);
- if (original != null) {
- sb.append(':');
- originalToString(sb, false);
- }
- }
- }
- }
-
- private int getIntElement(int i) {
- if (!(vector.length > i && vector[i] instanceof Integer))
- throw new UnsupportedOperationException();
- return ((Integer) vector[i]).intValue();
- }
-
- // Preserve singletons during deserialization
- private Object readResolve() {
- Version v = this;
- if (equals(MAX_VERSION))
- v = MAX_VERSION;
- else if (equals(emptyVersion))
- v = emptyVersion;
- return v;
- }
-
- public Comparable<?> getPad() {
- return padValue;
- }
-
- public Comparable<?> getSegment(int index) {
- return vector[index];
- }
-
- public int getSegmentCount() {
- return vector.length;
- }
-
- Comparable<?>[] getVector() {
- return vector;
- }
-
- public int compareTo(Version v) {
- BasicVersion ov = (BasicVersion) v;
- return VersionVector.compare(vector, padValue, ov.getVector(), ov.getPad());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
deleted file mode 100644
index eec34bfe2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ProvidedCapability.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
-
-/**
- * Describes a capability as exposed or required by an installable unit
- */
-public class ProvidedCapability implements IProvidedCapability, IMemberProvider {
- public static final String MEMBER_NAME = "name"; //$NON-NLS-1$
- public static final String MEMBER_VERSION = "version"; //$NON-NLS-1$
- public static final String MEMBER_NAMESPACE = "namespace"; //$NON-NLS-1$
-
- private final String name;
- private final String namespace;
- private final Version version;
-
- public ProvidedCapability(String namespace, String name, Version version) {
- Assert.isNotNull(namespace);
- Assert.isNotNull(name);
- this.namespace = namespace;
- this.name = name;
- this.version = version == null ? Version.emptyVersion : version;
- }
-
- public boolean equals(Object other) {
- if (other == null)
- return false;
- if (!(other instanceof IProvidedCapability))
- return false;
- IProvidedCapability otherCapability = (IProvidedCapability) other;
- if (!(namespace.equals(otherCapability.getNamespace())))
- return false;
- if (!(name.equals(otherCapability.getName())))
- return false;
- return version.equals(otherCapability.getVersion());
- }
-
- public String getName() {
- return name;
- }
-
- public String getNamespace() {
- return namespace;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public int hashCode() {
- return namespace.hashCode() * name.hashCode() * version.hashCode();
- }
-
- public String toString() {
- return namespace + '/' + name + '/' + version;
- }
-
- public Object getMember(String memberName) {
- // It is OK to use identity comparisons here since
- // a) All constant valued strings are always interned
- // b) The Member constructor always interns the name
- //
- if (MEMBER_NAME == memberName)
- return name;
- if (MEMBER_VERSION == memberName)
- return version;
- if (MEMBER_NAMESPACE == memberName)
- return namespace;
- throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
deleted file mode 100644
index 9829dc71b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequiredCapability.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * A required capability represents some external constraint on an {@link IInstallableUnit}.
- * Each capability represents something an {@link IInstallableUnit} needs that
- * it expects to be provided by another {@link IInstallableUnit}. Capabilities are
- * entirely generic, and are intended to be capable of representing anything that
- * an {@link IInstallableUnit} may need either at install time, or at runtime.
- * <p>
- * Capabilities are segmented into namespaces. Anyone can introduce new
- * capability namespaces. Some well-known namespaces are introduced directly
- * by the provisioning framework.
- *
- * @see IInstallableUnit#NAMESPACE_IU_ID
- */
-public class RequiredCapability implements IRequiredCapability, IMemberProvider {
- private final IMatchExpression<IInstallableUnit> filter;
- private final IMatchExpression<IInstallableUnit> matchExpression;
-
- public static final String MEMBER_FILTER = "filter"; //$NON-NLS-1$
- public static final String MEMBER_MIN = "min"; //$NON-NLS-1$
- public static final String MEMBER_MAX = "max"; //$NON-NLS-1$
- public static final String MEMBER_GREEDY = "greedy"; //$NON-NLS-1$
- public static final String MEMBER_MATCH = "match"; //$NON-NLS-1$
-
- private final boolean greedy;
- private final int min;
- private final int max;
- private String description;
-
- private static final IExpression allVersionsExpression;
- private static final IExpression range_II_Expression;
- private static final IExpression range_IN_Expression;
- private static final IExpression range_NI_Expression;
- private static final IExpression range_NN_Expression;
- private static final IExpression strictVersionExpression;
- private static final IExpression openEndedExpression;
- private static final IExpression openEndedNonInclusiveExpression;
-
- static {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression xVar = factory.variable("x"); //$NON-NLS-1$
- IExpression nameEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAME), factory.indexedParameter(0));
- IExpression namespaceEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAMESPACE), factory.indexedParameter(1));
-
- IExpression versionMember = factory.member(xVar, ProvidedCapability.MEMBER_VERSION);
-
- IExpression versionCmpLow = factory.indexedParameter(2);
- IExpression versionEqual = factory.equals(versionMember, versionCmpLow);
- IExpression versionGt = factory.greater(versionMember, versionCmpLow);
- IExpression versionGtEqual = factory.greaterEqual(versionMember, versionCmpLow);
-
- IExpression versionCmpHigh = factory.indexedParameter(3);
- IExpression versionLt = factory.less(versionMember, versionCmpHigh);
- IExpression versionLtEqual = factory.lessEqual(versionMember, versionCmpHigh);
-
- IExpression pvMember = factory.member(factory.thisVariable(), InstallableUnit.MEMBER_PROVIDED_CAPABILITIES);
- allVersionsExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual)));
- strictVersionExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionEqual)));
- openEndedExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual)));
- openEndedNonInclusiveExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt)));
- range_II_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLtEqual)));
- range_IN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLt)));
- range_NI_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLtEqual)));
- range_NN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLt)));
- }
-
- /**
- * TODO replace booleans with int options flag.
- */
- public RequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple) {
- this(namespace, name, range, filter, optional, multiple, true);
- }
-
- public RequiredCapability(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int min, int max, boolean greedy, String description) {
- this.matchExpression = requirement;
- this.filter = filter;
- this.min = min;
- this.max = max;
- this.greedy = greedy;
- this.description = description;
- }
-
- public RequiredCapability(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
- this(namespace, name, range, filter == null ? (IMatchExpression<IInstallableUnit>) null : InstallableUnit.parseFilter(filter), optional ? 0 : 1, multiple ? Integer.MAX_VALUE : 1, greedy, null);
- }
-
- public RequiredCapability(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int min, int max, boolean greedy, String description) {
- Assert.isNotNull(namespace);
- Assert.isNotNull(name);
- IExpressionFactory factory = ExpressionUtil.getFactory();
- if (range == null || range.equals(VersionRange.emptyRange)) {
- matchExpression = factory.matchExpression(allVersionsExpression, name, namespace);
- } else {
- if (range.getMinimum().equals(range.getMaximum())) {
- // Explicit version appointed
- matchExpression = factory.matchExpression(strictVersionExpression, name, namespace, range.getMinimum());
- } else {
- if (range.getMaximum().equals(Version.MAX_VERSION)) {
- // Open ended
- matchExpression = factory.matchExpression(range.getIncludeMinimum() ? openEndedExpression : openEndedNonInclusiveExpression, name, namespace, range.getMinimum());
- } else {
- matchExpression = factory.matchExpression(//
- range.getIncludeMinimum() ? (range.getIncludeMaximum() ? range_II_Expression : range_IN_Expression) //
- : (range.getIncludeMaximum() ? range_NI_Expression : range_NN_Expression), //
- name, namespace, range.getMinimum(), range.getMaximum());
- }
- }
- }
- this.min = min;
- this.max = max;
- this.greedy = greedy;
- this.filter = filter;
- this.description = description;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (!(obj instanceof IRequirement))
- return false;
-
- IRequirement other = (IRequirement) obj;
- if (filter == null) {
- if (other.getFilter() != null)
- return false;
- } else if (!filter.equals(other.getFilter()))
- return false;
-
- return min == other.getMin() && max == other.getMax() && greedy == other.isGreedy() && matchExpression.equals(other.getMatches());
- }
-
- public String getName() {
- return (String) matchExpression.getParameters()[0];
- }
-
- public String getNamespace() {
- return (String) matchExpression.getParameters()[1];
- }
-
- /**
- * Returns the range of versions that satisfy this required capability. Returns
- * an empty version range ({@link VersionRange#emptyRange} if any version
- * will satisfy the capability.
- * @return the range of versions that satisfy this required capability.
- */
- public VersionRange getRange() {
- return extractRange(matchExpression);
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((filter == null) ? 0 : filter.hashCode());
- result = prime * result + matchExpression.hashCode();
- return result;
- }
-
- public boolean isGreedy() {
- return greedy;
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
- if (matchExpression.getParameters().length == 0)
- return matchExpression.toString();
- if (IInstallableUnit.NAMESPACE_IU_ID.equals(getNamespace())) {
- //print nothing for an IU id dependency because this is the default (most common) case
- result.append(""); //$NON-NLS-1$
- } else if ("osgi.bundle".equals(getNamespace())) { //$NON-NLS-1$
- result.append("bundle"); //$NON-NLS-1$
- } else if ("java.package".equals(getNamespace())) { //$NON-NLS-1$
- result.append("package"); //$NON-NLS-1$
- } else {
- result.append(getNamespace());
- }
- if (result.length() > 0)
- result.append(' ');
- result.append(getName());
- result.append(' ');
- VersionRange range = getRange();
- //for an exact version match, print a simpler expression
- if (range.getMinimum().equals(range.getMaximum()))
- result.append('[').append(range.getMinimum()).append(']');
- else
- result.append(range);
- return result.toString();
- }
-
- public int getMin() {
- return min;
- }
-
- public int getMax() {
- return max;
- }
-
- public IMatchExpression<IInstallableUnit> getMatches() {
- return matchExpression;
- }
-
- public IMatchExpression<IInstallableUnit> getFilter() {
- return filter;
- }
-
- public boolean isMatch(IInstallableUnit candidate) {
- return matchExpression.isMatch(candidate);
- }
-
- public static boolean isVersionStrict(IMatchExpression<IInstallableUnit> matchExpression) {
- return ExpressionUtil.getOperand(matchExpression) == strictVersionExpression;
- }
-
- public static String extractName(IMatchExpression<IInstallableUnit> matchExpression) {
- assertValid(matchExpression);
- return (String) matchExpression.getParameters()[0];
- }
-
- public static String extractNamespace(IMatchExpression<IInstallableUnit> matchExpression) {
- assertValid(matchExpression);
- return (String) matchExpression.getParameters()[1];
- }
-
- public static VersionRange extractRange(IMatchExpression<IInstallableUnit> matchExpression) {
- IExpression expr = assertValid(matchExpression);
- Object[] params = matchExpression.getParameters();
- if (params.length < 3)
- return VersionRange.emptyRange;
- Version v = (Version) params[2];
- if (params.length < 4) {
- if (expr.equals(strictVersionExpression))
- return new VersionRange(v, true, v, true);
- return new VersionRange(v, expr.equals(openEndedExpression), Version.MAX_VERSION, true);
- }
- Version h = (Version) params[3];
- return new VersionRange(v, expr.equals(range_II_Expression) || expr.equals(range_IN_Expression), h, expr.equals(range_II_Expression) || expr.equals(range_NI_Expression));
- }
-
- public static boolean isSimpleRequirement(IMatchExpression<IInstallableUnit> matchExpression) {
- return isPredefined(ExpressionUtil.getOperand(matchExpression));
- }
-
- private static IExpression assertValid(IMatchExpression<IInstallableUnit> matchExpression) {
- IExpression expr = ExpressionUtil.getOperand(matchExpression);
- if (!isPredefined(expr))
- throw new IllegalArgumentException();
- return expr;
- }
-
- private static boolean isPredefined(IExpression expr) {
- return expr.equals(allVersionsExpression) || expr.equals(range_II_Expression) || expr.equals(range_IN_Expression) || expr.equals(range_NI_Expression) || expr.equals(range_NN_Expression) || expr.equals(strictVersionExpression) || expr.equals(openEndedExpression) || expr.equals(openEndedNonInclusiveExpression);
- }
-
- public Object getMember(String memberName) {
- // It is OK to use identity comparisons here since
- // a) All constant valued strings are always interned
- // b) The Member constructor always interns the name
- //
- if (MEMBER_FILTER == memberName)
- return filter;
- if (MEMBER_MIN == memberName)
- return new Integer(min);
- if (MEMBER_MAX == memberName)
- return new Integer(max);
- if (MEMBER_GREEDY == memberName)
- return Boolean.valueOf(greedy);
- if (MEMBER_MATCH == memberName)
- return matchExpression;
- throw new IllegalArgumentException("No such member: " + memberName); //$NON-NLS-1$
- }
-
- public String getDescription() {
- return description;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java
deleted file mode 100644
index d67a1ca39..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/RequirementChange.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.IRequirementChange;
-
-public class RequirementChange implements IRequirementChange {
- private IRequiredCapability applyOn;
- private IRequiredCapability newValue;
-
- public RequirementChange(IRequiredCapability applyOn2, IRequiredCapability newValue2) {
- if (applyOn2 == null && newValue2 == null)
- throw new IllegalArgumentException();
- this.applyOn = applyOn2;
- this.newValue = newValue2;
- }
-
- public IRequiredCapability applyOn() {
- return applyOn;
- }
-
- public IRequiredCapability newValue() {
- return newValue;
- }
-
- public boolean matches(IRequiredCapability toMatch) {
- if (!toMatch.getNamespace().equals(applyOn.getNamespace()))
- return false;
- if (!toMatch.getName().equals(applyOn.getName()))
- return false;
- if (toMatch.getRange().equals(applyOn.getRange()))
- return true;
-
- return toMatch.getRange().intersect(applyOn.getRange()) != null;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((applyOn == null) ? 0 : applyOn.hashCode());
- result = prime * result + ((newValue == null) ? 0 : newValue.hashCode());
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof IRequirementChange))
- return false;
- final IRequirementChange other = (IRequirementChange) obj;
- if (applyOn == null) {
- if (other.applyOn() != null)
- return false;
- } else if (!applyOn.equals(other.applyOn()))
- return false;
- if (newValue == null) {
- if (other.newValue() != null)
- return false;
- } else if (!newValue.equals(other.newValue()))
- return false;
- return true;
- }
-
- public String toString() {
- return applyOn + " --> " + newValue; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
deleted file mode 100644
index bc508ec89..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/ResolvedInstallableUnit.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-public class ResolvedInstallableUnit implements IInstallableUnit {
- private static IInstallableUnitFragment[] NO_IU = new IInstallableUnitFragment[0];
-
- private final IInstallableUnitFragment[] fragments;
- protected final IInstallableUnit original;
-
- public ResolvedInstallableUnit(IInstallableUnit resolved) {
- this(resolved, null);
- }
-
- public ResolvedInstallableUnit(IInstallableUnit resolved, IInstallableUnitFragment[] fragments) {
- this.original = resolved;
- this.fragments = fragments == null ? NO_IU : fragments;
- }
-
- public Collection<IInstallableUnitFragment> getFragments() {
- int fcount = fragments.length;
- if (fcount == 0)
- return CollectionUtils.emptyList();
-
- ArrayList<IInstallableUnitFragment> result = new ArrayList<IInstallableUnitFragment>(fcount);
- result.addAll(Arrays.asList(fragments));
- for (int i = 0; i < fcount; i++) {
- IInstallableUnit fragment = fragments[i];
- if (fragment.isResolved())
- result.addAll(fragment.getFragments());
- }
- return result;
- }
-
- public Collection<IArtifactKey> getArtifacts() {
- return original.getArtifacts();
- }
-
- public IMatchExpression<IInstallableUnit> getFilter() {
- return original.getFilter();
- }
-
- public String getId() {
- return original.getId();
- }
-
- public String getProperty(String key) {
- return original.getProperty(key);
- }
-
- public Map<String, String> getProperties() {
- return original.getProperties();
- }
-
- public String getProperty(String key, String locale) {
- return original.getProperty(key, locale);
- }
-
- public Collection<IProvidedCapability> getProvidedCapabilities() {
- Collection<IProvidedCapability> originalCapabilities = original.getProvidedCapabilities();
- if (fragments.length == 0)
- return originalCapabilities;
-
- ArrayList<IProvidedCapability> result = new ArrayList<IProvidedCapability>(originalCapabilities);
- for (int i = 0; i < fragments.length; i++)
- result.addAll(fragments[i].getProvidedCapabilities());
- return result;
- }
-
- public Collection<IRequirement> getRequirements() {
- Collection<IRequirement> originalCapabilities = original.getRequirements();
- if (fragments.length == 0)
- return originalCapabilities;
-
- ArrayList<IRequirement> result = new ArrayList<IRequirement>(originalCapabilities);
- for (int i = 0; i < fragments.length; i++)
- result.addAll(fragments[i].getRequirements());
- return result;
- }
-
- public Collection<IRequirement> getMetaRequirements() {
- Collection<IRequirement> originalCapabilities = original.getMetaRequirements();
- if (fragments.length == 0)
- return originalCapabilities;
-
- ArrayList<IRequirement> result = new ArrayList<IRequirement>(originalCapabilities);
- for (int i = 0; i < fragments.length; i++)
- result.addAll(fragments[i].getMetaRequirements());
- return result;
- }
-
- public Collection<ITouchpointData> getTouchpointData() {
- Collection<ITouchpointData> originalTouchpointData = original.getTouchpointData();
- if (fragments.length == 0)
- return originalTouchpointData;
-
- ArrayList<ITouchpointData> result = new ArrayList<ITouchpointData>(originalTouchpointData);
- for (int i = 0; i < fragments.length; i++)
- result.addAll(fragments[i].getTouchpointData());
- return result;
- }
-
- public ITouchpointType getTouchpointType() {
- return original.getTouchpointType();
- }
-
- public Version getVersion() {
- return original.getVersion();
- }
-
- public boolean isSingleton() {
- return original.isSingleton();
- }
-
- public boolean equals(Object obj) {
- //TODO This is pretty ugly....
- boolean result = original.equals(obj);
- if (result)
- return true;
- if (obj instanceof ResolvedInstallableUnit)
- return original.equals(((ResolvedInstallableUnit) obj).original);
- return false;
- }
-
- public int hashCode() {
- // TODO Auto-generated method stub
- return original.hashCode();
- }
-
- public String toString() {
- return "[R]" + original.toString(); //$NON-NLS-1$
- }
-
- public IInstallableUnit getOriginal() {
- return original;
- }
-
- public int compareTo(IInstallableUnit other) {
- int cmp = getId().compareTo(other.getId());
- if (cmp == 0)
- cmp = getVersion().compareTo(other.getVersion());
- return cmp;
- }
-
- public boolean isResolved() {
- return true;
- }
-
- public IInstallableUnit unresolved() {
- return original.unresolved();
- }
-
- public IUpdateDescriptor getUpdateDescriptor() {
- return original.getUpdateDescriptor();
- }
-
- public Collection<ILicense> getLicenses() {
- return original.getLicenses();
- }
-
- public Collection<ILicense> getLicenses(String locale) {
- return original.getLicenses(locale);
- }
-
- public ICopyright getCopyright() {
- return original.getCopyright();
- }
-
- public ICopyright getCopyright(String locale) {
- return original.getCopyright(locale);
- }
-
- public boolean satisfies(IRequirement candidate) {
- return candidate.isMatch(this);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
deleted file mode 100644
index 7bcc16c60..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointData.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-
-import java.util.Collections;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.eclipse.equinox.p2.metadata.ITouchpointData;
-import org.eclipse.equinox.p2.metadata.ITouchpointInstruction;
-
-/**
- * Touchpoint data instances contain the additional information needed by a touchpoint
- * to execute each engine phase it participates in. This includes the sequence of
- * instruction statements to be executed during each phase, and any additional
- * supporting data needed to perform the phase.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @see MetadataFactory#createTouchpointData(Map)
- */
-public class TouchpointData implements ITouchpointData {
-
- /**
- * Map of (String->TouchpointInstruction). The set
- * of keys supported is up to the touchpoint that will process these
- * instructions. This map is never null.
- */
- private Map<String, ITouchpointInstruction> instructions;
-
- public int hashCode() {
- return 31 * 1 + ((instructions == null) ? 0 : instructions.hashCode());
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof ITouchpointData))
- return false;
- final ITouchpointData other = (ITouchpointData) obj;
- if (instructions == null) {
- if (other.getInstructions() != null)
- return false;
- } else if (!instructions.equals(other.getInstructions()))
- return false;
- return true;
- }
-
- /**
- * Clients must use the factory method on {@link MetadataFactory}.
- */
- public TouchpointData(Map<String, ITouchpointInstruction> instructions) {
- this.instructions = instructions;
- }
-
- /**
- * Returns the touchpoint instruction corresponding to the given key.
- */
- public ITouchpointInstruction getInstruction(String instructionKey) {
- return instructions.get(instructionKey);
- }
-
- /**
- * Returns an unmodifiable map of the touchpoint instructions. The map
- * keys are strings, and the values are instances of {@link ITouchpointInstruction}.
- *
- * @return the touchpoint instructions
- */
- public Map<String, ITouchpointInstruction> getInstructions() {
- return Collections.unmodifiableMap(instructions);
- }
-
- /**
- * Returns a string representation of the touchpoint data for debugging purposes only.
- */
- public String toString() {
- StringBuffer result = new StringBuffer();
- for (Entry<String, ITouchpointInstruction> instruction : instructions.entrySet()) {
- result.append(instruction.getKey()).append(" -> ").append(instruction.getValue()).append('\n'); //$NON-NLS-1$
- }
- return result.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java
deleted file mode 100644
index 44bbe1bb2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointInstruction.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import org.eclipse.equinox.p2.metadata.ITouchpointInstruction;
-
-/**
- * A touchpoint instruction contains either a sequence of instruction statements
- * to be executed during a particular engine phase, or some simple string value
- * that is needed by a touchpoint to execute its phases.
- * <p>
- * The format of a touchpoint instruction statement sequence is as follows:
- *
- * statement-sequence :
- * | statement ';'
- * | statement-sequence statement
- * ;
- *
- *Where a statement is of the format:
- *
- * statement :
- * | actionName '(' parameters ')'
- * ;
- *
- * parameters :
- * | // empty
- * | parameter
- * | parameters ',' parameter
- * ;
- *
- * parameter :
- * | paramName ':' paramValue
- * ;
- *
- * actionName, paramName, paramValue :
- * | String
- * ;
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @see MetadataFactory#createTouchpointInstruction(String, String)
- */
-public class TouchpointInstruction implements ITouchpointInstruction {
-
- private final String body;
- private final String importAttribute;
-
- /**
- * Encodes an action statement in string form. This method will
- * take care of escaping any illegal characters in function parameter values.
- *
- * @param actionName The name of the action.
- * @param parameters The function's parameters. This is a Map<String,String>
- * where the keys are parameter names, and the values are parameter values
- * @return An encoded touchpoint instruction statement
- */
- public static String encodeAction(String actionName, Map<String, String> parameters) {
- StringBuffer result = new StringBuffer(actionName);
- result.append('(');
- boolean first = true;
- for (Entry<String, String> entry : parameters.entrySet()) {
- if (first)
- first = false;
- else
- result.append(',');
- result.append(entry.getKey());
- result.append(':');
- appendEncoded(result, entry.getValue());
- }
- result.append(')').append(';');
- return result.toString();
- }
-
- /**
- * Append the given value to the given buffer, encoding any illegal characters
- * with appropriate escape sequences.
- */
- private static void appendEncoded(StringBuffer buf, String value) {
- char[] chars = value.toCharArray();
- for (int i = 0; i < chars.length; i++) {
- switch (chars[i]) {
- case '$' :
- case ',' :
- case ':' :
- case ';' :
- case '{' :
- case '}' :
- buf.append("${#").append(Integer.toString(chars[i])).append('}'); //$NON-NLS-1$
- break;
- default :
- buf.append(chars[i]);
- }
- }
- }
-
- /**
- * Clients must use the factory method on {@link MetadataFactory}.
- */
- public TouchpointInstruction(String body, String importAttribute) {
- this.body = body;
- this.importAttribute = importAttribute;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof ITouchpointInstruction))
- return false;
- ITouchpointInstruction other = (ITouchpointInstruction) obj;
- if (body == null) {
- if (other.getBody() != null)
- return false;
- } else if (!body.equals(other.getBody()))
- return false;
- if (importAttribute == null) {
- if (other.getImportAttribute() != null)
- return false;
- } else if (!importAttribute.equals(other.getImportAttribute()))
- return false;
- return true;
- }
-
- /**
- * Returns the body of this touchpoint instruction. The body is either a sequence
- * of instruction statements, or a simple string value.
- *
- * @return The body of this touchpoint instruction
- */
- public String getBody() {
- return body;
- }
-
- //TODO What is this? Please doc
- public String getImportAttribute() {
- return importAttribute;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((body == null) ? 0 : body.hashCode());
- result = prime * result + ((importAttribute == null) ? 0 : importAttribute.hashCode());
- return result;
- }
-
- /**
- * Returns a string representation of this instruction for debugging purposes only.
- */
- public String toString() {
- return "Instruction[" + body + ',' + importAttribute + ']'; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java
deleted file mode 100644
index 86bb05b87..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TouchpointType.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing Development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-import org.eclipse.equinox.p2.metadata.ITouchpointType;
-
-/**
- * Identifies a particular touchpoint. A touchpoint is identified by an id
- * and a version.
- */
-public class TouchpointType implements ITouchpointType {
- private String id;//never null
- private Version version;//never null
-
- public TouchpointType(String id, Version aVersion) {
- this.id = id;
- this.version = aVersion;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (super.equals(obj))
- return true;
- if (obj == null || !(obj instanceof ITouchpointType))
- return false;
- ITouchpointType other = (ITouchpointType) obj;
- return id.equals(other.getId()) && version.equals(other.getVersion());
- }
-
- public String getId() {
- return id;
- }
-
- public Version getVersion() {
- return version;
- }
-
- public int hashCode() {
- return 31 * id.hashCode() + version.hashCode();
- }
-
- public String toString() {
- return "Touchpoint: " + id + ' ' + getVersion(); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java
deleted file mode 100644
index 571abd70d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/TranslationSupport.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * EclipseSource - ongoing development
- * Cloudsmith Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.lang.ref.SoftReference;
-import java.util.*;
-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.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.osgi.service.localization.LocaleProvider;
-
-/**
- * TranslationSupport provides string translations for properties of an
- * IInstallableUnit. Clients can specify an {@link IQueryable} that should be used
- * to obtain the translation fragment IU's, as well as the locale that
- * should be used for translations.
- *
- * @since 2.0
- */
-public class TranslationSupport {
- // TODO: these constants should come from API, eg. IInstallableUnit or ???
- static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
- private static TranslationSupport instance;
-
- static final String NAMESPACE_IU_LOCALIZATION = "org.eclipse.equinox.p2.localization"; //$NON-NLS-1$
- private IQueryable<IInstallableUnit> fragmentSource;
-
- private static IExpression capabilityMatch = ExpressionUtil.parse("providedCapabilities.exists(x | x.namespace == $0 && $1.exists(n | x.name == n))"); //$NON-NLS-1$
- private static IExpression haveHostMatch = ExpressionUtil.parse("host.exists(h | $0 ~= h)"); //$NON-NLS-1$
-
- // Cache the IU fragments that provide localizations for a given locale.
- // Map<String,SoftReference<IQueryResult>>: locale => soft reference to a queryResult
- private final Map<String, SoftReference<IQueryResult<IInstallableUnit>>> localeCollectorCache = new HashMap<String, SoftReference<IQueryResult<IInstallableUnit>>>(2);
-
- private LocaleProvider localeProvider;
- private boolean loggedMissingSource = false;;
-
- public synchronized static TranslationSupport getInstance() {
- if (instance == null)
- instance = new TranslationSupport();
- return instance;
- }
-
- /**
- * Create an instance of TranslationSupport for the current locale.
- * Unless otherwise specified, the currently running profile will serve
- * as the source of the translation fragments.
- *
- * @since 2.0
- */
- public TranslationSupport() {
- super();
- }
-
- /**
- * Create an instance of TranslationSupport for the current locale.
- * using the <code>fragmentSource</code> as the source of the translation fragments.
- *
- * @since 2.0
- */
- public TranslationSupport(IQueryable<IInstallableUnit> fragmentSource) {
- this.fragmentSource = fragmentSource;
- }
-
- /**
- */
- private List<String> buildLocaleVariants(String locale) {
- ArrayList<String> result = new ArrayList<String>(4);
- int lastSeparator;
- while (true) {
- result.add(locale);
- lastSeparator = locale.lastIndexOf('_');
- if (lastSeparator == -1)
- break;
- locale = locale.substring(0, lastSeparator);
- }
- // Add the default locale (most general)
- result.add(DEFAULT_LOCALE.toString());
- return result;
- }
-
- /**
- * Cache the translated property value to optimize future retrieval of the same value.
- * Currently we just cache on the installable unit object in memory. In future
- * we should push support for localized property retrieval into IInstallableUnit
- * so we aren't required to reach around the API here.
- */
- private String cacheResult(IInstallableUnit iu, String localizedKey, String localizedValue) {
- if (iu instanceof InstallableUnit)
- ((InstallableUnit) iu).setLocalizedProperty(localizedKey, localizedValue);
- return localizedValue;
- }
-
- /**
- * Return the copyright for the specified IInstallableUnit,
- * localized for the receiver's locale.
- *
- * @param iu the IInstallableUnit in question
- * @return the localized copyright defined by the IInstallableUnit
- */
- public ICopyright getCopyright(IInstallableUnit iu, String locale) {
- if (locale == null)
- locale = getCurrentLocale();
- ICopyright copyright = iu.getCopyright();
- String body = (copyright != null ? copyright.getBody() : null);
- if (body == null || body.length() <= 1 || body.charAt(0) != '%')
- return copyright;
- final String actualKey = body.substring(1); // Strip off the %
- body = getLocalizedIUProperty(iu, actualKey, locale);
- return MetadataFactory.createCopyright(copyright.getLocation(), body);
- }
-
- private String getCurrentLocale() {
- if (localeProvider != null)
- return localeProvider.getLocale().toString();
- return Locale.getDefault().toString();
- }
-
- /**
- * Return the localized value for the specified IInstallableUnit
- * property.
- *
- * @param iu the IInstallableUnit in question
- * @param propertyKey the name of the property to be retrieved
- * @param locale The locale to return the property for
- * @return the localized property value, or <code>null</code> if no
- * such property is defined.
- */
- public String getIUProperty(IInstallableUnit iu, String propertyKey, String locale) {
- if (locale == null)
- locale = getCurrentLocale();
- String value = iu.getProperty(propertyKey);
- if (value == null || value.length() <= 1 || value.charAt(0) != '%')
- return value;
- // else have a localizable property
- final String actualKey = value.substring(1); // Strip off the %
- return getLocalizedIUProperty(iu, actualKey, locale);
- }
-
- /**
- * Return the localized value for the specified IInstallableUnit
- * property using the locale specified in the <code>propertyKey</code>.
- *
- * @param iu the IInstallableUnit in question
- * @param propertyKey the name and locale of the property to be retrieved
- * @return the localized property value, or <code>null</code> if no
- * such property is defined.
- */
- public String getIUProperty(IInstallableUnit iu, KeyWithLocale propertyKey) {
- return getIUProperty(iu, propertyKey.getKey(), propertyKey.getLocale().toString());
- }
-
- /**
- * Return the localized value for the specified IInstallableUnit
- * property using the default locale.
- *
- * @param iu the IInstallableUnit in question
- * @param propertyKey the name of the property to be retrieved
- * @return the localized property value, or <code>null</code> if no
- * such property is defined.
- */
- public String getIUProperty(IInstallableUnit iu, String propertyKey) {
- return getIUProperty(iu, propertyKey, null);
- }
-
- private ILicense getLicense(IInstallableUnit iu, ILicense license, String locale) {
- String body = (license != null ? license.getBody() : null);
- if (body == null || body.length() <= 1 || body.charAt(0) != '%')
- return license;
- final String actualKey = body.substring(1); // Strip off the %
- body = getLocalizedIUProperty(iu, actualKey, locale);
- return MetadataFactory.createLicense(license.getLocation(), body);
- }
-
- /**
- * Return an array of licenses for the specified IInstallableUnit,
- * localized for the receiver's locale.
- *
- * @param iu the IInstallableUnit in question
- * @return the localized licenses defined by the IInstallableUnit
- */
- public ILicense[] getLicenses(IInstallableUnit iu, String locale) {
- if (locale == null)
- locale = getCurrentLocale();
- Collection<ILicense> licenses = iu.getLicenses();
- ILicense[] translatedLicenses = new ILicense[licenses.size()];
- int i = 0;
- for (ILicense iLicense : licenses) {
- translatedLicenses[i++] = getLicense(iu, iLicense, locale);
- }
- return translatedLicenses;
- }
-
- /**
- * Return an update descriptor localized for the receiver's locale.
- *
- * @param iu the IInstallableUnit in question
- * @return the localized update descriptor defined by the IInstallableUnit
- */
- public IUpdateDescriptor getUpdateDescriptor(IInstallableUnit iu, String locale) {
- if (locale == null)
- locale = getCurrentLocale();
-
- IUpdateDescriptor descriptor = iu.getUpdateDescriptor();
- String body = (descriptor != null ? descriptor.getDescription() : null);
- if (body == null || body.length() <= 1 || body.charAt(0) != '%')
- return descriptor;
- final String actualKey = body.substring(1); // Strip off the %
- body = getLocalizedIUProperty(iu, actualKey, locale);
- return MetadataFactory.createUpdateDescriptor(descriptor.getIUsBeingUpdated(), descriptor.getSeverity(), body, descriptor.getLocation());
- }
-
- /**
- * Collects the installable unit fragments that contain locale data for the given locales.
- */
- private synchronized IQueryResult<IInstallableUnit> getLocalizationFragments(List<String> localeVariants, String locale) {
- if (fragmentSource == null) {
- if (!loggedMissingSource) {
- loggedMissingSource = true;
- LogHelper.log(new Status(IStatus.INFO, MetadataActivator.PI_METADATA, "No translation source unavailable. Default language will be used.")); //$NON-NLS-1$
- }
- return Collector.emptyCollector();
- }
-
- SoftReference<IQueryResult<IInstallableUnit>> queryResultReference = localeCollectorCache.get(locale);
- if (queryResultReference != null) {
- IQueryResult<IInstallableUnit> cached = queryResultReference.get();
- if (cached != null)
- return cached;
- }
-
- IQuery<IInstallableUnit> iuQuery = QueryUtil.<IInstallableUnit> createMatchQuery(IInstallableUnitFragment.class, capabilityMatch, NAMESPACE_IU_LOCALIZATION, localeVariants);
- IQueryResult<IInstallableUnit> collected = fragmentSource.query(iuQuery, null);
- localeCollectorCache.put(locale, new SoftReference<IQueryResult<IInstallableUnit>>(collected));
- return collected;
- }
-
- private String getLocalizedIUProperty(IInstallableUnit iu, String actualKey, String locale) {
- String localizedKey = makeLocalizedKey(actualKey, locale);
- String localizedValue = null;
-
- //first check for a cached localized value
- if (iu instanceof InstallableUnit)
- localizedValue = ((InstallableUnit) iu).getLocalizedProperty(localizedKey);
- //next check if the localized value is stored in the same IU (common case)
- if (localizedValue == null)
- localizedValue = iu.getProperty(localizedKey);
- if (localizedValue != null)
- return localizedValue;
-
- final List<String> locales = buildLocaleVariants(locale);
- final IInstallableUnit theUnit = iu;
-
- IQueryResult<IInstallableUnit> localizationFragments = getLocalizationFragments(locales, locale);
-
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IQuery<IInstallableUnit> iuQuery = QueryUtil.<IInstallableUnit> createMatchQuery(IInstallableUnitFragment.class, factory.matchExpression(haveHostMatch, theUnit));
- IQueryResult<IInstallableUnit> collected = iuQuery.perform(localizationFragments.iterator());
- if (!collected.isEmpty()) {
- String translation = null;
- for (Iterator<IInstallableUnit> iter = collected.iterator(); iter.hasNext() && translation == null;) {
- IInstallableUnit localizationIU = iter.next();
- for (Iterator<String> jter = locales.iterator(); jter.hasNext();) {
- String localeKey = makeLocalizedKey(actualKey, jter.next());
- translation = localizationIU.getProperty(localeKey);
- if (translation != null)
- return cacheResult(iu, localizedKey, translation);
- }
- }
- }
-
- for (String nextLocale : locales) {
- String localeKey = makeLocalizedKey(actualKey, nextLocale);
- String nextValue = iu.getProperty(localeKey);
- if (nextValue != null)
- return cacheResult(iu, localizedKey, nextValue);
- }
-
- return cacheResult(iu, localizedKey, actualKey);
- }
-
- private String makeLocalizedKey(String actualKey, String localeImage) {
- return localeImage + '.' + actualKey;
- }
-
- /**
- * Set the locale that should be used when obtaining translations.
- * @param provider the locale for which translations should be retrieved.
- */
- public synchronized void setLocaleProvider(LocaleProvider provider) {
- if (provider != this.localeProvider) {
- this.localeProvider = provider;
- localeCollectorCache.clear();
- }
- }
-
- /**
- * Set the {@link IQueryable} that should be used to obtain translation fragment
- * IUs. Returns the previous translation source.
- *
- * @param queryable an {@link IQueryable} that can supply the appropriate NLS
- * translation fragments
- */
- public synchronized IQueryable<IInstallableUnit> setTranslationSource(IQueryable<IInstallableUnit> queryable) {
- IQueryable<IInstallableUnit> previous = fragmentSource;
- if (previous != queryable) {
- this.fragmentSource = queryable;
- localeCollectorCache.clear();
- }
- return previous;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java
deleted file mode 100644
index eab12ed37..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/UpdateDescriptor.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.net.URI;
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-public class UpdateDescriptor implements IUpdateDescriptor {
- private Collection<IMatchExpression<IInstallableUnit>> descriptors;
-
- private String description;
- private int severity;
- private URI location;
-
- public UpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors, int severity, String description, URI location) {
- this.descriptors = descriptors;
- this.severity = severity;
- this.description = description;
- this.location = location;
- }
-
- public String getDescription() {
- return description;
- }
-
- public int getSeverity() {
- return severity;
- }
-
- public boolean isUpdateOf(IInstallableUnit iu) {
- return descriptors.iterator().next().isMatch(iu);
- }
-
- public Collection<IMatchExpression<IInstallableUnit>> getIUsBeingUpdated() {
- return descriptors;
- }
-
- public URI getLocation() {
- return location;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java
deleted file mode 100644
index daf056b64..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormat.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.io.Serializable;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.VersionFormatParser.Fragment;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * <p>The VersionFormat represents the Omni Version Format in compiled form. It
- * is also a parser for versions of that format.</p>
- * <p>An instance of VersionFormat is immutable and thus thread safe. The parser
- * does not maintain any state.</p>
- *
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class VersionFormat implements IVersionFormat, Serializable {
-
- /**
- * The string representation of the Omni Version format used for parsing OSGi versions.
- */
- public static final String OSGI_FORMAT_STRING = "n[.n=0;[.n=0;[.S='';=[A-Za-z0-9_-];]]]"; //$NON-NLS-1$
-
- /**
- * The string representation of the Omni Version format used for parsing raw versions.
- */
- public static final String RAW_FORMAT_STRING = "r(.r)*p?"; //$NON-NLS-1$
-
- private static final long serialVersionUID = -5689435955091405520L;
-
- private static class StateInfo {
- Fragment fragment;
- int position;
- int segmentCount;
-
- StateInfo(int position, int segmentCount, Fragment fragment) {
- this.fragment = fragment;
- this.position = position;
- this.segmentCount = segmentCount;
- }
- }
-
- static class TreeInfo extends ArrayList<StateInfo> {
- private static final long serialVersionUID = 4474591345244587260L;
-
- private Comparable<?> padValue;
- private int top;
-
- TreeInfo(Fragment frag, int pos) {
- add(new StateInfo(pos, 0, frag));
- top = 0;
- }
-
- Comparable<?> getPadValue() {
- return padValue;
- }
-
- int getPosition() {
- return get(top).position;
- }
-
- void popState(List<Comparable<?>> segments, Fragment frag) {
- int idx = top;
- while (idx > 0) {
- StateInfo si = get(idx);
- if (si.fragment == frag) {
- int nsegs = segments.size();
- int segMax = si.segmentCount;
- while (nsegs > segMax)
- segments.remove(--nsegs);
- top = idx - 1;
- break;
- }
- }
- }
-
- void pushState(int segCount, Fragment fragment) {
- int pos = get(top).position;
- if (++top == size())
- add(new StateInfo(pos, segCount, fragment));
- else {
- StateInfo si = get(top);
- si.fragment = fragment;
- si.position = pos;
- si.segmentCount = segCount;
- }
- }
-
- void setPadValue(Comparable<?> pad) {
- padValue = pad;
- }
-
- void setPosition(int pos) {
- get(top).position = pos;
- }
- }
-
- private static final Map<String, VersionFormat> formatCache = Collections.synchronizedMap(new HashMap<String, VersionFormat>());
-
- /**
- * The predefined OSGi format that is used when parsing OSGi
- * versions.
- */
- public static final VersionFormat OSGI_FORMAT;
-
- /**
- * The predefined OSGi format that is used when parsing raw
- * versions.
- */
- public static final VersionFormat RAW_FORMAT;
-
- static {
- try {
- VersionFormatParser parser = new VersionFormatParser();
- OSGI_FORMAT = new VersionFormat(parser.compile(OSGI_FORMAT_STRING, 0, OSGI_FORMAT_STRING.length()));
- formatCache.put(OSGI_FORMAT_STRING, OSGI_FORMAT);
- RAW_FORMAT = new RawFormat(parser.compile(RAW_FORMAT_STRING, 0, RAW_FORMAT_STRING.length()));
- formatCache.put(RAW_FORMAT_STRING, RAW_FORMAT);
- } catch (VersionFormatException e) {
- // If this happens, something is wrong with the actual
- // implementation of the FormatCompiler.
- //
- throw new ExceptionInInitializerError(e);
- }
- }
-
- /**
- * Compile a version format string into a compiled format. This method is
- * shorthand for:<pre>CompiledFormat.compile(format, 0, format.length())</pre>.
- *
- * @param format The format to compile.
- * @return The compiled format
- * @throws VersionFormatException If the format could not be compiled
- */
- public static IVersionFormat compile(String format) throws VersionFormatException {
- return compile(format, 0, format.length());
- }
-
- /**
- * Compile a version format string into a compiled format. The parsing starts
- * at position start and ends at position end. The returned format is cached so
- * subsequent calls to this method using the same format string will yield the
- * same compiled format instance.
- *
- * @param format The format string to compile.
- * @param start Start position in the format string
- * @param end End position in the format string
- * @return The compiled format
- * @throws VersionFormatException If the format could not be compiled
- */
- public static VersionFormat compile(String format, int start, int end) throws VersionFormatException {
- String fmtString = format.substring(start, end).intern();
- synchronized (fmtString) {
- VersionFormat fmt = formatCache.get(fmtString);
- if (fmt == null) {
- VersionFormatParser parser = new VersionFormatParser();
- fmt = new VersionFormat(parser.compile(format, start, end));
- formatCache.put(fmtString, fmt);
- }
- return fmt;
- }
- }
-
- /**
- * Parse a version string using the {@link #RAW_FORMAT} parser.
- *
- * @param version The version to parse.
- * @param originalFormat The original format to assign to the created version. Can be <code>null</code>.
- * @param original The original version string to assign to the created version. Can be <code>null</code>.
- * @return A created version
- * @throws IllegalArgumentException If the version string could not be parsed.
- */
- public static BasicVersion parseRaw(String version, IVersionFormat originalFormat, String original) {
- List<Comparable<?>> vector = RAW_FORMAT.parse(version, 0, version.length());
- return (originalFormat == OSGI_FORMAT) ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, originalFormat, original);
- }
-
- static void rawToString(StringBuffer sb, boolean forRange, Comparable<?> e) {
- if (e instanceof String) {
- writeQuotedString(sb, forRange, (String) e, '\'', 0, false);
- } else if (e instanceof VersionVector) {
- sb.append('<');
- ((VersionVector) e).toString(sb, forRange);
- sb.append('>');
- } else if (e instanceof EnumDefinition.EnumSegment)
- ((EnumDefinition.EnumSegment) e).toString(sb);
- else
- sb.append(e);
- }
-
- /**
- * Write a string within quotes. If the string is found to contain the quote, an attempt is made
- * to flip quote character (single quote becomes double quote and vice versa). A string that contains
- * both will be written as several adjacent quoted strings so that each string is quoted with a
- * quote character that it does not contain.
- * @param sb The buffer that will receive the string
- * @param rangeSafe Set to <code>true</code> if the resulting string will be used in a range string
- * and hence need to escape the range delimiter characters
- * @param s The string to be written
- * @param quote The quote character to start with. Must be the single or double quote character.
- * @param startPos The start position
- * @param didFlip True if the call is recursive and thus, cannot switch quotes in the first string.
- */
- private static void writeQuotedString(StringBuffer sb, boolean rangeSafe, String s, char quote, int startPos, boolean didFlip) {
- int quotePos = sb.length();
- sb.append(quote);
- boolean otherSeen = false;
- int top = s.length();
- for (int idx = startPos; idx < top; ++idx) {
- char c = s.charAt(idx);
- if (c == '\'' || c == '"') {
- if (c == quote) {
- char otherQuote = quote == '\'' ? '"' : '\'';
- if (didFlip || otherSeen) {
- // We can only flip once
- sb.append(quote);
- writeQuotedString(sb, rangeSafe, s, otherQuote, idx, true);
- return;
- }
- quote = otherQuote;
- sb.setCharAt(quotePos, quote);
- didFlip = true;
- } else
- otherSeen = true;
- }
- if (rangeSafe && (c == '\\' || c == '[' || c == '(' || c == ']' || c == ')' || c == ',' || c <= ' '))
- sb.append('\\');
- sb.append(c);
- }
- sb.append(quote);
- }
-
- private String fmtString;
-
- private final Fragment topFragment;
-
- VersionFormat(Fragment topFragment) {
- this.topFragment = topFragment;
- }
-
- TreeInfo createInfo(int start) {
- return new TreeInfo(topFragment, start);
- }
-
- public boolean equals(Object o) {
- return this == o || o instanceof VersionFormat && toString().equals(o.toString());
- }
-
- public int hashCode() {
- return 11 * toString().hashCode();
- }
-
- public Version parse(String version) {
- List<Comparable<?>> vector = parse(version, 0, version.length());
- return (this == OSGI_FORMAT) ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, this, version);
- }
-
- List<Comparable<?>> parse(String version, int start, int maxPos) {
- if (start == maxPos)
- throw new IllegalArgumentException(NLS.bind(Messages.format_0_unable_to_parse_empty_version, this, version.substring(start, maxPos)));
- TreeInfo info = new TreeInfo(topFragment, start);
- ArrayList<Comparable<?>> entries = new ArrayList<Comparable<?>>(5);
- if (!(topFragment.parse(entries, version, maxPos, info) && info.getPosition() == maxPos))
- throw new IllegalArgumentException(NLS.bind(Messages.format_0_unable_to_parse_1, this, version.substring(start, maxPos)));
- entries.add(VersionParser.removeRedundantTrail(entries, info.getPadValue()));
- return entries;
- }
-
- // Preserve cache during deserialization
- private Object readResolve() {
- synchronized (formatCache) {
- String string = toString();
- string = string.substring(7, string.length() - 1); // Strip of "format(" and ")"
- VersionFormat fmt = formatCache.get(string);
- if (fmt == null) {
- fmt = this;
- formatCache.put(string, fmt);
- }
- return fmt;
- }
- }
-
- /**
- * Returns the string representation of this compiled format
- */
- public synchronized String toString() {
- if (fmtString == null) {
- StringBuffer sb = new StringBuffer();
- toString(sb);
- }
- return fmtString;
- }
-
- public synchronized void toString(StringBuffer sb) {
- if (fmtString != null)
- sb.append(fmtString);
- else {
- int start = sb.length();
- sb.append("format"); //$NON-NLS-1$
- if (topFragment.getPadValue() != null) {
- sb.append('(');
- topFragment.toString(sb);
- sb.append(')');
- } else
- topFragment.toString(sb);
- fmtString = sb.substring(start);
- }
- }
-}
-
-class RawFormat extends VersionFormat {
- private static final long serialVersionUID = -6070590518921019745L;
-
- RawFormat(Fragment topFragment) {
- super(topFragment);
- }
-
- /**
- * Parse but do not assign this format as the Version format nor the version
- * string as the original.
- */
- public Version parse(String version) {
- List<Comparable<?>> vector = parse(version, 0, version.length());
- return OmniVersion.fromVector(vector, null, null);
- }
-
- // Preserve singleton when deserialized
- private Object readResolve() {
- return RAW_FORMAT;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
deleted file mode 100644
index 2bef09a81..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionFormatParser.java
+++ /dev/null
@@ -1,1734 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.io.Serializable;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.EnumDefinition.EnumSegment;
-import org.eclipse.equinox.internal.p2.metadata.VersionFormat.TreeInfo;
-import org.eclipse.equinox.p2.metadata.VersionFormatException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This is the Omni Version Format parser. It will parse a version format in string form
- * into a group of {@link VersionFormatParser.Fragment} elements. That group, wrapped in a
- * {@link VersionFormat}, becomes the parser for versions corresponding to the format.
- *
- * The class is not intended to included in a public API. Instead VersionFormats should
- * be created using {@link VersionFormat#parse(String)}
- *
- */
-class VersionFormatParser {
-
- private static class EnumInstruction {
- private final EnumDefinition definition;
- private final boolean caseSensitive;
- private final boolean optional;
- private final boolean begins;
-
- EnumInstruction(EnumDefinition definition, boolean caseSensitive, boolean optional, boolean begins) {
- this.definition = definition;
- this.caseSensitive = caseSensitive;
- this.optional = optional;
- this.begins = begins;
- }
-
- EnumSegment getEnumSegment(RangeFragment fragment, String version, int[] posHolder, int maxPos) {
- int pos = posHolder[0];
- int len = maxPos - pos;
- int minLen = definition.getShortestLength();
- if (minLen > len)
- return null;
-
- int maxLen = definition.getLongestLength();
- if (maxLen < len)
- len = maxLen;
-
- ++len;
- while (--len >= minLen) {
- int last = pos + len;
- if (!begins && last < maxPos) {
- char c = version.charAt(last);
- if (VersionParser.isLetter(c) && fragment.isAllowed(c)) {
- // We are not allowed to truncate at this point
- continue;
- }
- }
- String identifier = version.substring(pos, last);
- if (!caseSensitive)
- identifier = identifier.toLowerCase();
- int ordinal = definition.getOrdinal(identifier);
- if (ordinal >= 0) {
- posHolder[0] = pos + len;
- return definition.getSegment(ordinal);
- }
- }
- return null;
- }
-
- void toString(StringBuffer bld) {
- bld.append('=');
- definition.toString(bld);
- if (begins)
- bld.append('b');
- if (!caseSensitive)
- bld.append('i');
- if (optional)
- bld.append('?');
- bld.append(';');
- }
-
- public boolean isOptional() {
- return optional;
- }
- }
-
- static class Instructions {
- char[] characters = null;
- Comparable<?> defaultValue = null;
- char oppositeTranslationChar = 0;
- int oppositeTranslationRepeat = 0;
- boolean ignore = false;
- boolean inverted = false;
- Comparable<?> padValue = null;
- int rangeMax = Integer.MAX_VALUE;
- int rangeMin = 0;
- EnumInstruction enumInstruction = null;
- }
-
- static final Qualifier EXACT_ONE_QUALIFIER = new Qualifier(1, 1);
-
- static final Qualifier ONE_OR_MANY_QUALIFIER = new Qualifier(1, Integer.MAX_VALUE);
-
- static final Qualifier ZERO_OR_MANY_QUALIFIER = new Qualifier(0, Integer.MAX_VALUE);
-
- static final Qualifier ZERO_OR_ONE_QUALIFIER = new Qualifier(0, 1);
-
- /**
- * Represents one fragment of a format (i.e. auto, number, string, delimiter, etc.)
- */
- static abstract class Fragment implements Serializable {
- private static final long serialVersionUID = 4109185333058622681L;
-
- private final Qualifier qualifier;
-
- Fragment(Qualifier qualifier) {
- this.qualifier = qualifier;
- }
-
- public final boolean equals(Object f) {
- return f == this || getClass().equals(f.getClass()) && qualifier.equals(((Fragment) f).qualifier);
- }
-
- public final int hashCode() {
- return 11 * qualifier.hashCode();
- }
-
- public boolean isGroup() {
- return false;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- toString(sb);
- return sb.toString();
- }
-
- Comparable<?> getDefaultValue() {
- return null;
- }
-
- Fragment getFirstLeaf() {
- return this;
- }
-
- Comparable<?> getPadValue() {
- return null;
- }
-
- Qualifier getQualifier() {
- return qualifier;
- }
-
- boolean parse(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- return qualifier.parse(new Fragment[] {this}, 0, segments, version, maxPos, info);
- }
-
- abstract boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info);
-
- void setDefaults(List<Comparable<?>> segments) {
- // No-op at this level
- }
-
- void toString(StringBuffer sb) {
- if (!(qualifier == VersionFormatParser.EXACT_ONE_QUALIFIER || (qualifier == VersionFormatParser.ZERO_OR_ONE_QUALIFIER && this.isGroup())))
- qualifier.toString(sb);
- }
- }
-
- /**
- * Specifies the min and max occurrences of a fragment
- */
- static class Qualifier implements Serializable {
- private static final long serialVersionUID = 7494021832824671685L;
-
- private final int max;
- private final int min;
-
- Qualifier(int min, int max) {
- this.min = min;
- this.max = max;
- }
-
- public boolean equals(Object o) {
- if (o == this)
- return true;
- if (!(o instanceof Qualifier))
- return false;
- Qualifier oq = (Qualifier) o;
- return min == oq.min && max == oq.max;
- }
-
- public int hashCode() {
- return 31 * min + 67 * max;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- toString(sb);
- return sb.toString();
- }
-
- int getMax() {
- return max;
- }
-
- int getMin() {
- return min;
- }
-
- boolean parse(Fragment[] fragments, int fragIdx, List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- Fragment fragment = fragments[fragIdx++];
- int idx = 0;
-
- // Do the required parsing. I.e. iterate this fragment
- // min number of times.
- //
- for (; idx < min; ++idx)
- if (!fragment.parseOne(segments, version, maxPos, info))
- return false;
-
- for (; idx < max; ++idx) {
- // We are greedy. Continue parsing until we get an exception
- // and remember the state before each parse is performed.
- //
- info.pushState(segments.size(), fragment);
- if (!fragment.parseOne(segments, version, maxPos, info)) {
- info.popState(segments, fragment);
- break;
- }
- }
- int maxParsed = idx;
-
- for (;;) {
- // Pad with default values unless the max is unbounded
- //
- if (idx < max) {
- if (max != Integer.MAX_VALUE) {
- for (; idx < max; ++idx)
- fragment.setDefaults(segments);
- }
- } else {
- if (fragment instanceof StringFragment) {
- // Check for translations if we default to for MINS or MAXS
- StringFragment stringFrag = (StringFragment) fragment;
- Comparable<?> opposite = stringFrag.getOppositeDefaultValue();
- if (opposite != null) {
- idx = segments.size() - 1;
- if (stringFrag.isOppositeTranslation(segments.get(idx)))
- segments.set(idx, opposite);
- }
- }
- }
-
- if (fragIdx == fragments.length)
- // We are the last segment
- //
- return true;
-
- // Try to parse the next segment. If it fails, pop the state of
- // this segment (or a child thereof) and try again
- //
- if (fragments[fragIdx].getQualifier().parse(fragments, fragIdx, segments, version, maxPos, info))
- return true;
-
- // Be less greedy, step back one position and try again.
- //
- if (maxParsed <= min)
- // We have no more states to pop. Tell previous that we failed.
- //
- return false;
-
- info.popState(segments, fragment);
- idx = --maxParsed; // segments now have room for one more default value
- }
- }
-
- void toString(StringBuffer sb) {
- if (min == 0) {
- if (max == 1)
- sb.append('?');
- else if (max == Integer.MAX_VALUE)
- sb.append('*');
- else {
- sb.append('{');
- sb.append(min);
- sb.append(',');
- sb.append(max);
- sb.append('}');
- }
- } else if (max == Integer.MAX_VALUE) {
- if (min == 1)
- sb.append('+');
- else {
- sb.append('{');
- sb.append(min);
- sb.append(",}"); //$NON-NLS-1$
- }
- } else {
- sb.append('{');
- sb.append(min);
- if (min != max) {
- sb.append(',');
- sb.append(max);
- }
- sb.append('}');
- }
- }
-
- // Preserve singleton when deserialized
- private Object readResolve() {
- Qualifier q = this;
- if (min == 0) {
- if (max == 1)
- q = VersionFormatParser.ZERO_OR_ONE_QUALIFIER;
- else if (max == Integer.MAX_VALUE)
- q = VersionFormatParser.ZERO_OR_MANY_QUALIFIER;
- } else if (min == 1) {
- if (max == 1)
- q = VersionFormatParser.EXACT_ONE_QUALIFIER;
- else if (max == Integer.MAX_VALUE)
- q = VersionFormatParser.ONE_OR_MANY_QUALIFIER;
- }
- return q;
- }
- }
-
- private static class AutoFragment extends RangeFragment {
- private static final long serialVersionUID = -1016534328164247755L;
-
- AutoFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- super(instr, qualifier);
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- maxPos = checkRange(pos, maxPos);
- if (maxPos < 0)
- return false;
-
- char c = version.charAt(pos);
- if (VersionParser.isDigit(c) && isAllowed(c) && (enumInstruction == null || enumInstruction.isOptional())) {
- // Parse to next non-digit
- //
- int start = pos;
- int value = c - '0';
- while (++pos < maxPos) {
- c = version.charAt(pos);
- if (!(VersionParser.isDigit(c) && isAllowed(c)))
- break;
- value *= 10;
- value += (c - '0');
- }
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(VersionParser.valueOf(value));
- info.setPosition(pos);
- return true;
- }
-
- int start = pos;
- if (enumInstruction != null) {
- int[] posHolder = new int[] {pos};
- EnumSegment es = enumInstruction.getEnumSegment(this, version, posHolder, maxPos);
- if (es != null) {
- pos = posHolder[0];
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
- if (!isIgnored())
- segments.add(es);
- info.setPosition(pos);
- return true;
- }
- if (!enumInstruction.isOptional())
- return false;
- }
-
- if (!(VersionParser.isLetter(c) && isAllowed(c)))
- return false;
-
- // Parse to next non-letter or next delimiter
- //
- for (++pos; pos < maxPos; ++pos) {
- c = version.charAt(pos);
- if (!(VersionParser.isLetter(c) && isAllowed(c)))
- break;
- }
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(version.substring(start, pos));
- info.setPosition(pos);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append('a');
- super.toString(sb);
- }
- }
-
- private static class DelimiterFragment extends Fragment {
- private static final long serialVersionUID = 8173654376143370605L;
- private final char[] delimChars;
- private final boolean inverted;
-
- DelimiterFragment(VersionFormatParser.Instructions ep, Qualifier qualifier) {
- super(qualifier);
- if (ep == null) {
- delimChars = null;
- inverted = false;
- } else {
- inverted = ep.inverted;
- delimChars = ep.characters;
- }
- }
-
- boolean isMatch(String version, int pos) {
- char c = version.charAt(pos);
- if (delimChars != null) {
- for (int idx = 0; idx < delimChars.length; ++idx)
- if (c == delimChars[idx])
- return !inverted;
- return inverted;
- } else if (VersionParser.isLetterOrDigit(c))
- return false;
-
- return true;
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- if (pos < maxPos && isMatch(version, pos)) {
- // Just swallow, a delimiter does not contribute to the vector.
- //
- info.setPosition(pos + 1);
- return true;
- }
- return false;
- }
-
- void toString(StringBuffer sb) {
- sb.append('d');
- if (delimChars != null)
- appendCharacterRange(sb, delimChars, inverted);
- super.toString(sb);
- }
- }
-
- static void appendCharacterRange(StringBuffer sb, char[] range, boolean inverted) {
- sb.append('=');
- sb.append('[');
- if (inverted)
- sb.append('^');
- int top = range.length;
- for (int idx = 0; idx < top; ++idx) {
- char b = range[idx];
- if (b == '\\' || b == ']' || (b == '-' && idx + 1 < top))
- sb.append('\\');
-
- sb.append(b);
- int ndx = idx + 1;
- if (ndx + 2 < top) {
- char c = b;
- for (; ndx < top; ++ndx) {
- char n = range[ndx];
- if (c + 1 != n)
- break;
- c = n;
- }
- if (ndx <= idx + 3)
- continue;
-
- sb.append('-');
- if (c == '\\' || c == ']' || (c == '-' && idx + 1 < top))
- sb.append('\\');
- sb.append(c);
- idx = ndx - 1;
- }
- }
- sb.append(']');
- sb.append(';');
- }
-
- static Fragment createAutoFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- return new AutoFragment(instr, qualifier);
- }
-
- static Fragment createDelimiterFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- return new DelimiterFragment(instr, qualifier);
- }
-
- static Fragment createGroupFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, Fragment[] fragments, boolean array) {
- return new GroupFragment(instr, qualifier, fragments, array);
- }
-
- static Fragment createLiteralFragment(Qualifier qualifier, String literal) {
- return new LiteralFragment(qualifier, literal);
- }
-
- static Fragment createNumberFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean signed) {
- return new NumberFragment(instr, qualifier, signed);
- }
-
- static Fragment createPadFragment(Qualifier qualifier) {
- return new PadFragment(qualifier);
- }
-
- static Fragment createQuotedFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- return new QuotedFragment(instr, qualifier);
- }
-
- static Fragment createRawFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- return new RawFragment(instr, qualifier);
- }
-
- static Fragment createStringFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean unbound) {
- return new StringFragment(instr, qualifier, unbound);
- }
-
- static boolean equalsAllowNull(Object a, Object b) {
- return (a == null) ? (b == null) : (b != null && a.equals(b));
- }
-
- private static abstract class ElementFragment extends Fragment {
- private static final long serialVersionUID = -6834591415456539713L;
- private final Comparable<?> defaultValue;
- private final boolean ignored;
- private final Comparable<?> padValue;
-
- ElementFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- super(qualifier);
- if (instr != null) {
- ignored = instr.ignore;
- defaultValue = instr.defaultValue;
- padValue = instr.padValue;
- } else {
- ignored = false;
- defaultValue = null;
- padValue = null;
- }
- }
-
- Comparable<?> getDefaultValue() {
- return defaultValue;
- }
-
- Comparable<?> getPadValue() {
- return padValue;
- }
-
- boolean isIgnored() {
- return ignored;
- }
-
- void setDefaults(List<Comparable<?>> segments) {
- Comparable<?> defaultVal = getDefaultValue();
- if (defaultVal != null)
- segments.add(defaultVal);
- }
-
- void toString(StringBuffer sb) {
- if (ignored) {
- sb.append('=');
- sb.append('!');
- sb.append(';');
- }
- if (defaultValue != null) {
- sb.append('=');
- VersionFormat.rawToString(sb, false, defaultValue);
- sb.append(';');
- }
- if (padValue != null) {
- sb.append('=');
- sb.append('p');
- VersionFormat.rawToString(sb, false, padValue);
- sb.append(';');
- }
- super.toString(sb);
- }
- }
-
- private static class GroupFragment extends ElementFragment {
- private static final long serialVersionUID = 9219978678087669699L;
- private final boolean array;
- private final Fragment[] fragments;
-
- GroupFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, Fragment[] fragments, boolean array) {
- super(instr, qualifier);
- this.fragments = fragments;
- this.array = array;
- }
-
- public boolean isGroup() {
- return !array;
- }
-
- Fragment getFirstLeaf() {
- return fragments[0].getFirstLeaf();
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- if (array) {
- ArrayList<Comparable<?>> subSegs = new ArrayList<Comparable<?>>();
- boolean success = fragments[0].getQualifier().parse(fragments, 0, subSegs, version, maxPos, info);
- if (!success || subSegs.isEmpty())
- return false;
-
- Comparable<?> padValue = info.getPadValue();
- if (padValue != null)
- info.setPadValue(null); // Prevent outer group from getting this.
- else
- padValue = getPadValue();
-
- padValue = VersionParser.removeRedundantTrail(segments, padValue);
- segments.add(new VersionVector(subSegs.toArray(new Comparable[subSegs.size()]), padValue));
- return true;
- }
-
- if (fragments[0].getQualifier().parse(fragments, 0, segments, version, maxPos, info)) {
- Comparable<?> padValue = getPadValue();
- if (padValue != null)
- info.setPadValue(padValue);
- return true;
- }
- return false;
- }
-
- void setDefaults(List<Comparable<?>> segments) {
- Comparable<?> dflt = getDefaultValue();
- if (dflt != null) {
- // A group default overrides any defaults within the
- // group fragments
- super.setDefaults(segments);
- } else {
- // Assign defaults for all fragments
- for (int idx = 0; idx < fragments.length; ++idx)
- fragments[idx].setDefaults(segments);
- }
- }
-
- void toString(StringBuffer sb) {
- if (array) {
- sb.append('<');
- for (int idx = 0; idx < fragments.length; ++idx)
- fragments[idx].toString(sb);
- sb.append('>');
- } else {
- if (getQualifier() == VersionFormatParser.ZERO_OR_ONE_QUALIFIER) {
- sb.append('[');
- for (int idx = 0; idx < fragments.length; ++idx)
- fragments[idx].toString(sb);
- sb.append(']');
- } else {
- sb.append('(');
- for (int idx = 0; idx < fragments.length; ++idx)
- fragments[idx].toString(sb);
- sb.append(')');
- }
- }
- super.toString(sb);
- }
- }
-
- private static class LiteralFragment extends Fragment {
- private static final long serialVersionUID = 6210696245839471802L;
- private final String string;
-
- LiteralFragment(Qualifier qualifier, String string) {
- super(qualifier);
- this.string = string;
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- int litLen = string.length();
- if (pos + litLen > maxPos)
- return false;
-
- for (int idx = 0; idx < litLen; ++idx, ++pos) {
- if (string.charAt(idx) != version.charAt(pos))
- return false;
- }
- info.setPosition(pos);
- return true;
- }
-
- void toString(StringBuffer sb) {
- String str = string;
- if (str.length() != 1) {
- sb.append('\'');
- VersionFormatParser.toStringEscaped(sb, str, "\'"); //$NON-NLS-1$
- sb.append('\'');
- } else {
- char c = str.charAt(0);
- switch (c) {
- case '\'' :
- case '\\' :
- case '<' :
- case '[' :
- case '(' :
- case '{' :
- case '?' :
- case '*' :
- case '+' :
- case '=' :
- sb.append('\\');
- sb.append(c);
- break;
- default :
- if (VersionParser.isLetterOrDigit(c)) {
- sb.append('\\');
- sb.append(c);
- } else
- sb.append(c);
- }
- }
- super.toString(sb);
- }
- }
-
- private static class NumberFragment extends RangeFragment {
- private static final long serialVersionUID = -8552754381106711507L;
- private final boolean signed;
-
- NumberFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean signed) {
- super(instr, qualifier);
- this.signed = signed;
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- maxPos = checkRange(pos, maxPos);
- if (maxPos < 0)
- return false;
-
- // Parse to next non-digit
- //
- int start = pos;
- int value;
-
- char c = version.charAt(pos);
- if (signed || characters != null) {
- boolean negate = false;
- if (signed && c == '-' && pos + 1 < maxPos) {
- negate = true;
- c = version.charAt(++pos);
- }
-
- if (!(c >= '0' && c <= '9' && isAllowed(c)))
- return false;
-
- // Parse to next non-digit
- //
- value = c - '0';
- while (++pos < maxPos) {
- c = version.charAt(pos);
- if (!(c >= '0' && c <= '9' && isAllowed(c)))
- break;
- value *= 10;
- value += (c - '0');
- }
- if (negate)
- value = -value;
- } else {
- if (c < '0' || c > '9')
- return false;
-
- // Parse to next non-digit
- //
- value = c - '0';
- while (++pos < maxPos) {
- c = version.charAt(pos);
- if (c < '0' || c > '9')
- break;
- value *= 10;
- value += (c - '0');
- }
- }
-
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(VersionParser.valueOf(value));
- info.setPosition(pos);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append(signed ? 'N' : 'n');
- super.toString(sb);
- }
- }
-
- private static class PadFragment extends ElementFragment {
- private static final long serialVersionUID = 5052010199974380170L;
-
- PadFragment(Qualifier qualifier) {
- super(null, qualifier);
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- if (pos >= maxPos || version.charAt(pos) != 'p')
- return false;
-
- int[] position = new int[] {++pos};
- Comparable<?> v = VersionParser.parseRawElement(version, position, maxPos);
- if (v == null)
- return false;
-
- if (!isIgnored())
- info.setPadValue(v);
- info.setPosition(position[0]);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append('p');
- super.toString(sb);
- }
- }
-
- private static class QuotedFragment extends RangeFragment {
- private static final long serialVersionUID = 6057751133533608969L;
-
- QuotedFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- super(instr, qualifier);
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- if (pos >= maxPos)
- return false;
-
- char endQuote;
- char quote = version.charAt(pos);
- switch (quote) {
- case '<' :
- endQuote = '>';
- break;
- case '{' :
- endQuote = '}';
- break;
- case '(' :
- endQuote = ')';
- break;
- case '[' :
- endQuote = ']';
- break;
- case '>' :
- endQuote = '<';
- break;
- case '}' :
- endQuote = '{';
- break;
- case ')' :
- endQuote = '(';
- break;
- case ']' :
- endQuote = '[';
- break;
- default :
- if (VersionParser.isLetterOrDigit(quote))
- return false;
- endQuote = quote;
- }
- int start = ++pos;
- char c = version.charAt(pos);
- while (c != endQuote && isAllowed(c) && ++pos < maxPos)
- c = version.charAt(pos);
-
- if (c != endQuote || rangeMin > pos - start)
- // End quote not found
- return false;
-
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(version.substring(start, pos));
- info.setPosition(++pos); // Skip quote
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append('q');
- super.toString(sb);
- }
- }
-
- private static abstract class RangeFragment extends ElementFragment {
- private static final long serialVersionUID = -6680402803630334708L;
- final char[] characters;
- final boolean inverted;
- final int rangeMax;
- final int rangeMin;
- final EnumInstruction enumInstruction;
-
- RangeFragment(VersionFormatParser.Instructions instr, Qualifier qualifier) {
- super(instr, qualifier);
- if (instr == null) {
- characters = null;
- inverted = false;
- rangeMin = 0;
- rangeMax = Integer.MAX_VALUE;
- enumInstruction = null;
- } else {
- characters = instr.characters;
- inverted = instr.inverted;
- rangeMin = instr.rangeMin;
- rangeMax = instr.rangeMax;
- enumInstruction = instr.enumInstruction;
- }
- }
-
- /**
- * Checks that pos is at a valid character position, that we
- * have at least the required minimum characters left, and
- * if a maximum number of characters is set, limits the
- * returned value to a maxPos that reflects that maximum.
- * @param pos the current position
- * @param maxPos the current maxPos
- * @return maxPos, possibly limited by rangeMax
- */
- int checkRange(int pos, int maxPos) {
- int check = pos;
- if (rangeMin == 0)
- check++; // Verify one character
- else
- check += rangeMin;
-
- if (check > maxPos)
- // Less then min characters left
- maxPos = -1;
- else {
- if (rangeMax != Integer.MAX_VALUE) {
- check = pos + rangeMax;
- if (check < maxPos)
- maxPos = check;
- }
- }
- return maxPos;
- }
-
- boolean isAllowed(char c) {
- char[] crs = characters;
- if (crs != null) {
- int idx = crs.length;
- while (--idx >= 0)
- if (c == crs[idx])
- return !inverted;
- return inverted;
- }
- return true;
- }
-
- void toString(StringBuffer sb) {
- if (characters != null)
- appendCharacterRange(sb, characters, inverted);
- if (rangeMin != 0 || rangeMax != Integer.MAX_VALUE) {
- sb.append('=');
- sb.append('{');
- sb.append(rangeMin);
- if (rangeMin != rangeMax) {
- sb.append(',');
- if (rangeMax != Integer.MAX_VALUE)
- sb.append(rangeMax);
- }
- sb.append('}');
- sb.append(';');
- }
- if (enumInstruction != null)
- enumInstruction.toString(sb);
- super.toString(sb);
- }
- }
-
- private static class RawFragment extends ElementFragment {
- private static final long serialVersionUID = 4107448125256042602L;
-
- RawFragment(VersionFormatParser.Instructions processing, Qualifier qualifier) {
- super(processing, qualifier);
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int[] position = new int[] {info.getPosition()};
- Comparable<?> v = VersionParser.parseRawElement(version, position, maxPos);
- if (v == null)
- return false;
-
- if (!isIgnored())
- segments.add(v);
- info.setPosition(position[0]);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append('r');
- super.toString(sb);
- }
- }
-
- private static class StringFragment extends RangeFragment {
- private static final long serialVersionUID = -2265924553606430164L;
- final boolean anyChar;
- private final char oppositeTranslationChar;
- private final int oppositeTranslationRepeat;
-
- StringFragment(VersionFormatParser.Instructions instr, Qualifier qualifier, boolean noLimit) {
- super(instr, qualifier);
- anyChar = noLimit;
- char otc = 0;
- int otr = 0;
- if (instr != null) {
- otc = instr.oppositeTranslationChar;
- otr = instr.oppositeTranslationRepeat;
- if (instr.defaultValue == VersionVector.MINS_VALUE) {
- if (otc == 0)
- otc = 'z';
- if (otr == 0)
- otr = 3;
- } else if (instr.defaultValue == VersionVector.MAXS_VALUE) {
- if (otc == 0)
- otc = '-';
- otr = 1;
- }
- }
- oppositeTranslationChar = otc;
- oppositeTranslationRepeat = otr;
- }
-
- Comparable<?> getOppositeDefaultValue() {
- Comparable<?> dflt = getDefaultValue();
- return dflt == VersionVector.MAXS_VALUE ? VersionVector.MINS_VALUE : (dflt == VersionVector.MINS_VALUE ? VersionVector.MAXS_VALUE : null);
- }
-
- public boolean isOppositeTranslation(Object val) {
- if (val instanceof String) {
- String str = (String) val;
- int idx = oppositeTranslationRepeat;
- if (str.length() == idx) {
- while (--idx >= 0)
- if (str.charAt(idx) != oppositeTranslationChar)
- break;
- return idx < 0;
- }
- }
- return false;
- }
-
- boolean parseOne(List<Comparable<?>> segments, String version, int maxPos, TreeInfo info) {
- int pos = info.getPosition();
- maxPos = checkRange(pos, maxPos);
- if (maxPos < 0)
- return false;
-
- int start = pos;
- if (enumInstruction != null) {
- int[] posHolder = new int[] {pos};
- EnumSegment es = enumInstruction.getEnumSegment(this, version, posHolder, maxPos);
- if (es != null) {
- pos = posHolder[0];
- int len = pos - start;
- if (rangeMin > len || len > rangeMax)
- return false;
- if (!isIgnored())
- segments.add(es);
- info.setPosition(pos);
- return true;
- }
- if (!enumInstruction.isOptional())
- return false;
- }
-
- // Parse to next delimiter or end of string
- //
- if (characters != null) {
- if (anyChar) {
- // Swallow everything that matches the allowed characters
- for (; pos < maxPos; ++pos) {
- if (!isAllowed(version.charAt(pos)))
- break;
- }
- } else {
- // Swallow letters that matches the allowed characters
- for (; pos < maxPos; ++pos) {
- char c = version.charAt(pos);
- if (!(VersionParser.isLetter(c) && isAllowed(c)))
- break;
- }
- }
- } else {
- if (anyChar)
- // Swallow all characters
- pos = maxPos;
- else {
- // Swallow all letters
- for (; pos < maxPos; ++pos) {
- if (!VersionParser.isLetter(version.charAt(pos)))
- break;
- }
- }
- }
- int len = pos - start;
- if (len == 0 || rangeMin > len || len > rangeMax)
- return false;
-
- if (!isIgnored())
- segments.add(version.substring(start, pos));
- info.setPosition(pos);
- return true;
- }
-
- void toString(StringBuffer sb) {
- sb.append(anyChar ? 'S' : 's');
- super.toString(sb);
- }
- }
-
- private int current;
-
- private List<Fragment> currentList;
-
- private int eos;
-
- private String format;
-
- private int start;
-
- Fragment compile(String fmt, int pos, int maxPos) throws VersionFormatException {
- format = fmt;
- if (start >= maxPos)
- throw new VersionFormatException(Messages.format_is_empty);
-
- start = pos;
- current = pos;
- eos = maxPos;
- currentList = new ArrayList<Fragment>();
- while (current < eos)
- parseFragment();
-
- Fragment topFrag;
- switch (currentList.size()) {
- case 0 :
- throw new VersionFormatException(Messages.format_is_empty);
- case 1 :
- Fragment frag = currentList.get(0);
- if (frag.isGroup()) {
- topFrag = frag;
- break;
- }
- // Fall through to default
- default :
- topFrag = createGroupFragment(null, EXACT_ONE_QUALIFIER, currentList.toArray(new Fragment[currentList.size()]), false);
- }
- currentList = null;
- return topFrag;
- }
-
- private void assertChar(char expected) throws VersionFormatException {
- if (current >= eos)
- throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, new String(new char[] {expected})));
-
- char c = format.charAt(current);
- if (c != expected)
- throw formatException(c, new String(new char[] {expected}));
- ++current;
- }
-
- private VersionFormatException formatException(char found, String expected) {
- return formatException(new String(new char[] {found}), expected);
- }
-
- private VersionFormatException formatException(String message) {
- return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_2, new Object[] {format.substring(start, eos), new Integer(current), message}));
- }
-
- private VersionFormatException formatException(String found, String expected) {
- return new VersionFormatException(NLS.bind(Messages.syntax_error_in_version_format_0_1_found_2_expected_3, new Object[] {format.substring(start, eos), new Integer(current), found, expected}));
- }
-
- private VersionFormatException illegalControlCharacter(char c) {
- return formatException(NLS.bind(Messages.illegal_character_encountered_ascii_0, VersionParser.valueOf(c)));
- }
-
- private String parseAndConsiderEscapeUntil(char endChar) throws VersionFormatException {
- StringBuffer sb = new StringBuffer();
- while (current < eos) {
- char c = format.charAt(current++);
- if (c == endChar)
- break;
-
- if (c < 32)
- throw illegalControlCharacter(c);
-
- if (c == '\\') {
- if (current == eos)
- throw formatException(Messages.EOS_after_escape);
- c = format.charAt(current++);
- if (c < 32)
- throw illegalControlCharacter(c);
- }
- sb.append(c);
- }
- return sb.toString();
- }
-
- private void parseAuto() throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.auto_can_not_have_pad_value);
- }
- currentList.add(createAutoFragment(ep, parseQualifier()));
- }
-
- private void parseBracketGroup() throws VersionFormatException {
- List<Fragment> saveList = currentList;
- currentList = new ArrayList<Fragment>();
- while (current < eos && format.charAt(current) != ']')
- parseFragment();
-
- if (current == eos)
- throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, "]")); //$NON-NLS-1$
-
- ++current;
- VersionFormatParser.Instructions ep = parseProcessing();
- saveList.add(createGroupFragment(ep, ZERO_OR_ONE_QUALIFIER, currentList.toArray(new Fragment[currentList.size()]), false));
- currentList = saveList;
- }
-
- private void parseCharacterGroup(VersionFormatParser.Instructions ep) throws VersionFormatException {
- assertChar('[');
-
- StringBuffer sb = new StringBuffer();
- outer: for (; current < eos; ++current) {
- char c = format.charAt(current);
- switch (c) {
- case '\\' :
- if (current + 1 < eos) {
- sb.append(format.charAt(++current));
- continue;
- }
- throw formatException(Messages.premature_end_of_format);
- case '^' :
- if (sb.length() == 0)
- ep.inverted = true;
- else
- sb.append(c);
- continue;
- case ']' :
- break outer;
- case '-' :
- if (sb.length() > 0 && current + 1 < eos) {
- char rangeEnd = format.charAt(++current);
- if (rangeEnd == ']') {
- // Use dash verbatim when last in range
- sb.append(c);
- break outer;
- }
-
- char rangeStart = sb.charAt(sb.length() - 1);
- if (rangeEnd < rangeStart)
- throw formatException(Messages.negative_character_range);
- while (++rangeStart <= rangeEnd)
- sb.append(rangeStart);
- continue;
- }
- // Fall through to default
- default :
- if (c < 32)
- throw illegalControlCharacter(c);
- sb.append(c);
- }
- }
- assertChar(']');
- int top = sb.length();
- char[] chars = new char[top];
- sb.getChars(0, top, chars, 0);
- ep.characters = chars;
- }
-
- private void parseDelimiter() throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.rangeMin != 0 || ep.rangeMax != Integer.MAX_VALUE)
- throw formatException(Messages.delimiter_can_not_have_range);
- if (ep.ignore)
- throw formatException(Messages.delimiter_can_not_be_ignored);
- if (ep.defaultValue != null)
- throw formatException(Messages.delimiter_can_not_have_default_value);
- if (ep.padValue != null)
- throw formatException(Messages.delimiter_can_not_have_pad_value);
- }
- currentList.add(createDelimiterFragment(ep, parseQualifier()));
- }
-
- private void parseEnum(Instructions processing) throws VersionFormatException {
- ++current;
- ArrayList<List<String>> identifiers = new ArrayList<List<String>>();
- ArrayList<String> idents = new ArrayList<String>();
- StringBuffer sb = new StringBuffer();
- for (;;) {
- if (current >= eos)
- throw formatException(Messages.bad_enum_definition);
-
- char c = format.charAt(current++);
- while (c != '}' && c != ',' && c != '=') {
- if (current >= eos || c <= ' ')
- throw formatException(Messages.bad_enum_definition);
- if (c == '\\') {
- c = format.charAt(current++);
- if (current >= eos)
- throw formatException(Messages.bad_enum_definition);
- }
- sb.append(c);
- c = format.charAt(current++);
- }
- idents.add(sb.toString());
- sb.setLength(0);
- if (c == '=')
- continue;
-
- identifiers.add(idents);
- if (c == '}')
- break;
-
- // c must be ',' at this point
- idents = new ArrayList<String>();
- }
-
- boolean enumCaseSensitive = true;
- boolean enumOptional = false;
- boolean enumBegins = false;
- while (current < eos) {
- char c = format.charAt(current);
- if (c == 'i') {
- enumCaseSensitive = false;
- current++;
- } else if (c == 'b') {
- enumBegins = true;
- current++;
- } else if (c == '?') {
- enumOptional = true;
- current++;
- } else
- break;
- }
-
- // Ensure that all identifiers are unique and make them
- // lower case if necessary
- HashSet<String> unique = new HashSet<String>();
- int ordinal = identifiers.size();
- while (--ordinal >= 0) {
- List<String> ids = identifiers.get(ordinal);
- int idx = ids.size();
- while (--idx >= 0) {
- String id = ids.get(idx);
- if (!enumCaseSensitive)
- id = id.toLowerCase();
- if (!unique.add(id))
- throw formatException(Messages.bad_enum_definition);
- ids.set(idx, id);
- }
- }
- EnumDefinition enumDefinition = EnumDefinition.getEnumDefinition(identifiers);
- processing.enumInstruction = new EnumInstruction(enumDefinition, enumCaseSensitive, enumOptional, enumBegins);
- }
-
- private void parseFragment() throws VersionFormatException {
- if (current == eos)
- throw formatException(Messages.premature_end_of_format);
- char c = format.charAt(current++);
- switch (c) {
- case '(' :
- parseGroup(false);
- break;
- case '<' :
- parseGroup(true);
- break;
- case '[' :
- parseBracketGroup();
- break;
- case 'a' :
- parseAuto();
- break;
- case 'r' :
- parseRaw();
- break;
- case 'n' :
- parseNumber(false);
- break;
- case 'N' :
- parseNumber(true);
- break;
- case 's' :
- parseString(false);
- break;
- case 'S' :
- parseString(true);
- break;
- case 'd' :
- parseDelimiter();
- break;
- case 'q' :
- parseQuotedString();
- break;
- case 'p' :
- parsePad();
- break;
- default :
- parseLiteral(c);
- }
- }
-
- private void parseGroup(boolean array) throws VersionFormatException {
- List<Fragment> saveList = currentList;
- currentList = new ArrayList<Fragment>();
- char expectedEnd = array ? '>' : ')';
- while (current < eos && format.charAt(current) != expectedEnd)
- parseFragment();
- assertChar(expectedEnd);
-
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.characters != null)
- throw formatException(Messages.array_can_not_have_character_group);
- if (ep.rangeMax != Integer.MAX_VALUE && ep.padValue != null)
- throw formatException(Messages.cannot_combine_range_upper_bound_with_pad_value);
- if (ep.enumInstruction != null)
- throw formatException(Messages.array_can_not_have_enum);
- }
-
- if (currentList.isEmpty())
- throw formatException(array ? Messages.array_can_not_be_empty : Messages.group_can_not_be_empty);
- saveList.add(createGroupFragment(ep, parseQualifier(), currentList.toArray(new Fragment[currentList.size()]), array));
- currentList = saveList;
- }
-
- private int parseIntegerLiteral() throws VersionFormatException {
- if (current == eos)
- throw formatException(NLS.bind(Messages.premature_end_of_format_expected_0, "<integer>")); //$NON-NLS-1$
-
- char c = format.charAt(current);
- if (!VersionParser.isDigit(c))
- throw formatException(c, "<integer>"); //$NON-NLS-1$
-
- int value = c - '0';
- while (++current < eos) {
- c = format.charAt(current);
- if (!VersionParser.isDigit(c))
- break;
- value *= 10;
- value += (c - '0');
- }
- return value;
- }
-
- private void parseLiteral(char c) throws VersionFormatException {
- String value;
- switch (c) {
- case '\'' :
- value = parseAndConsiderEscapeUntil(c);
- break;
- case ')' :
- case ']' :
- case '{' :
- case '}' :
- case '?' :
- case '*' :
- throw formatException(c, "<literal>"); //$NON-NLS-1$
- default :
- if (VersionParser.isLetterOrDigit(c))
- throw formatException(c, "<literal>"); //$NON-NLS-1$
-
- if (c < 32)
- throw illegalControlCharacter(c);
-
- if (c == '\\') {
- if (current == eos)
- throw formatException(Messages.EOS_after_escape);
- c = format.charAt(current++);
- if (c < 32)
- throw illegalControlCharacter(c);
- }
- value = new String(new char[] {c});
- }
- currentList.add(createLiteralFragment(parseQualifier(), value));
- }
-
- private int[] parseMinMax() throws VersionFormatException {
-
- int max = Integer.MAX_VALUE;
- ++current;
- int min = parseIntegerLiteral();
- char c = format.charAt(current);
- if (c == '}') {
- max = min;
- if (max == 0)
- throw formatException(Messages.range_max_cannot_be_zero);
- ++current;
- } else if (c == ',' && current + 1 < eos) {
- if (format.charAt(++current) != '}') {
- max = parseIntegerLiteral();
- if (max == 0)
- throw formatException(Messages.range_max_cannot_be_zero);
- if (max < min)
- throw formatException(Messages.range_max_cannot_be_less_then_range_min);
- }
- assertChar('}');
- } else
- throw formatException(c, "},"); //$NON-NLS-1$
- return new int[] {min, max};
- }
-
- private void parseNumber(boolean signed) throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.number_can_not_have_pad_value);
- }
- currentList.add(createNumberFragment(ep, parseQualifier(), signed));
- }
-
- private void parsePad() throws VersionFormatException {
- currentList.add(createPadFragment(parseQualifier()));
- }
-
- private VersionFormatParser.Instructions parseProcessing() throws VersionFormatException {
- if (current >= eos)
- return null;
-
- char c = format.charAt(current);
- if (c != '=')
- return null;
-
- VersionFormatParser.Instructions ep = new VersionFormatParser.Instructions();
- do {
- current++;
- parseProcessingInstruction(ep);
- } while (current < eos && format.charAt(current) == '=');
- return ep;
- }
-
- private void parseProcessingInstruction(VersionFormatParser.Instructions processing) throws VersionFormatException {
- if (current == eos)
- throw formatException(Messages.premature_end_of_format);
-
- char c = format.charAt(current);
- if (c == 'p') {
- // =pad(<raw-element>);
- //
- if (processing.padValue != null)
- throw formatException(Messages.pad_defined_more_then_once);
- if (processing.ignore)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- ++current;
- processing.padValue = parseRawElement();
- } else if (c == '!') {
- // =ignore;
- //
- if (processing.ignore)
- throw formatException(Messages.ignore_defined_more_then_once);
- if (processing.padValue != null || processing.characters != null || processing.rangeMin != 0 || processing.rangeMax != Integer.MAX_VALUE || processing.defaultValue != null)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- ++current;
- processing.ignore = true;
- } else if (c == '[') {
- // =[<character group];
- //
- if (processing.characters != null)
- throw formatException(Messages.character_group_defined_more_then_once);
- if (processing.ignore)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- parseCharacterGroup(processing);
- } else if (c == '{') {
- if (current + 1 == eos)
- throw formatException(Messages.premature_end_of_format);
-
- if (VersionParser.isDigit(format.charAt(current + 1))) {
- // ={min,max};
- //
- if (processing.rangeMin != 0 || processing.rangeMax != Integer.MAX_VALUE)
- throw formatException(Messages.range_defined_more_then_once);
- if (processing.ignore)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- int[] minMax = parseMinMax();
- processing.rangeMin = minMax[0];
- processing.rangeMax = minMax[1];
- } else {
- // ={enum1,enum2,...};
- //
- if (processing.enumInstruction != null)
- throw formatException(Messages.enum_defined_more_then_once);
- parseEnum(processing);
- }
- } else {
- // =<raw-element>;
- if (processing.defaultValue != null)
- throw formatException(Messages.default_defined_more_then_once);
- if (processing.ignore)
- throw formatException(Messages.cannot_combine_ignore_with_other_instruction);
- Comparable<?> dflt = parseRawElement();
- processing.defaultValue = dflt;
- if (current < eos && format.charAt(current) == '{') {
- // =m{<translated min char>}
- // =''{<translated max char>,<max char repeat>}
- if (++current == eos)
- throw formatException(Messages.premature_end_of_format);
- processing.oppositeTranslationChar = format.charAt(current++);
- if (current == eos)
- throw formatException(Messages.premature_end_of_format);
-
- if (dflt == VersionVector.MINS_VALUE) {
- processing.oppositeTranslationRepeat = 3;
- if (format.charAt(current) == ',') {
- ++current;
- processing.oppositeTranslationRepeat = parseIntegerLiteral();
- }
- } else if (dflt != VersionVector.MAXS_VALUE) {
- current -= 2;
- throw formatException(Messages.only_max_and_empty_string_defaults_can_have_translations);
- }
- assertChar('}');
- }
- }
- assertChar(';');
- }
-
- private Qualifier parseQualifier() throws VersionFormatException {
- if (current >= eos)
- return EXACT_ONE_QUALIFIER;
-
- char c = format.charAt(current);
- if (c == '?') {
- ++current;
- return ZERO_OR_ONE_QUALIFIER;
- }
-
- if (c == '*') {
- ++current;
- return ZERO_OR_MANY_QUALIFIER;
- }
-
- if (c == '+') {
- ++current;
- return ONE_OR_MANY_QUALIFIER;
- }
-
- if (c != '{')
- return EXACT_ONE_QUALIFIER;
-
- int[] minMax = parseMinMax();
- int min = minMax[0];
- int max = minMax[1];
-
- // Use singletons for commonly used ranges
- //
- if (min == 0) {
- if (max == 1)
- return ZERO_OR_ONE_QUALIFIER;
- if (max == Integer.MAX_VALUE)
- return ZERO_OR_MANY_QUALIFIER;
- } else if (min == 1) {
- if (max == 1)
- return EXACT_ONE_QUALIFIER;
- if (max == Integer.MAX_VALUE)
- return ONE_OR_MANY_QUALIFIER;
- }
- return new Qualifier(min, max);
- }
-
- private void parseQuotedString() throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.string_can_not_have_pad_value);
- }
- currentList.add(createQuotedFragment(ep, parseQualifier()));
- }
-
- private void parseRaw() throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.raw_element_can_not_have_pad_value);
- }
- currentList.add(createRawFragment(ep, parseQualifier()));
- }
-
- private Comparable<?> parseRawElement() throws VersionFormatException {
- int[] position = new int[] {current};
- Comparable<?> v = VersionParser.parseRawElement(format, position, eos);
- if (v == null)
- throw new VersionFormatException(NLS.bind(Messages.raw_element_expected_0, format));
- current = position[0];
- return v;
- }
-
- private void parseString(boolean unlimited) throws VersionFormatException {
- VersionFormatParser.Instructions ep = parseProcessing();
- if (ep != null) {
- if (ep.padValue != null)
- throw formatException(Messages.string_can_not_have_pad_value);
- }
- currentList.add(createStringFragment(ep, parseQualifier(), unlimited));
- }
-
- static void toStringEscaped(StringBuffer sb, String value, String escapes) {
- for (int idx = 0; idx < value.length(); ++idx) {
- char c = value.charAt(idx);
- if (c == '\\' || escapes.indexOf(c) >= 0)
- sb.append('\\');
- sb.append(c);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java
deleted file mode 100644
index 77eeabc8b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java
+++ /dev/null
@@ -1,428 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionFormatException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The Omni Version parser. Not intended for public API. Instead use
- * {@link Version#create(String)} or {@link Version#parseVersion(String)}.
- *
- * The class also contains some general purpose parser support methods
- *
- * @noextend This class is not intended to be subclassed by clients.
- */
-public abstract class VersionParser {
- public static final Integer ZERO_INT = new Integer(0);
-
- public static final Integer MAX_INT_OBJ = new Integer(Integer.MAX_VALUE);
-
- private static final Integer cache[] = new Integer[100];
-
- static {
- cache[0] = ZERO_INT;
- for (int i = 1; i < cache.length; i++)
- cache[i] = new Integer(i);
- }
-
- public static Integer valueOf(int i) {
- if (i >= 0 && i < cache.length)
- return cache[i];
-
- return (i == Integer.MAX_VALUE) ? MAX_INT_OBJ : new Integer(i);
- }
-
- static Comparable<?> removeRedundantTrail(List<Comparable<?>> segments, Comparable<?> padValue) {
- Comparable<?> redundantTrail;
- if (padValue == null)
- redundantTrail = VersionVector.MIN_VALUE;
- else {
- redundantTrail = padValue;
- if (padValue == VersionVector.MIN_VALUE)
- padValue = null;
- }
-
- int idx = segments.size();
- while (--idx >= 0 && segments.get(idx).equals(redundantTrail))
- segments.remove(idx);
-
- return padValue;
- }
-
- private VersionParser() {
- // Prevent class from being instantiated
- }
-
- /**
- * Parse the <code>version</code> string and assing the parsed portions to the <code>receiver</code>.
- * This method is called from the version string constructor.
- *
- * @param version The string to be parsed
- * @param start Start position in the <code>version</code> string
- * @param maxPos End position in the <code>version</code> string
- * @returns a version if one indeed was parsed or <code>null</code> if the string
- * contained only whitespace.
- * @throws IllegalArgumentException if the version is malformed
- */
- public static Version parse(String version, int start, int maxPos) throws IllegalArgumentException {
- // trim leading and trailing whitespace
- int pos = skipWhite(version, start);
- maxPos = skipTrailingWhite(version, start, maxPos);
- if (pos == maxPos)
- return null;
-
- List<Comparable<?>> vector = null;
- VersionFormat fmt = null;
- char c = version.charAt(pos);
- if (isDigit(c)) {
- return OSGiVersion.fromVector(VersionFormat.OSGI_FORMAT.parse(version, pos, maxPos));
- }
-
- if (!isLetter(c))
- throw new IllegalArgumentException();
-
- if (version.startsWith(Version.RAW_PREFIX, pos)) {
- VersionFormat rawFmt = VersionFormat.RAW_FORMAT;
- pos += 4;
-
- // Find ending '/' that is neither quoted or escaped
- int end = maxPos;
- for (int idx = pos; idx < maxPos; ++idx) {
- c = version.charAt(idx);
- switch (c) {
- case '/' :
- end = idx;
- break;
- case '\\' :
- ++idx;
- continue;
- case '\'' :
- case '"' :
- for (++idx; idx < maxPos; ++idx) {
- char e = version.charAt(idx);
- if (e == c) {
- break;
- }
- if (e == '\\')
- ++idx;
- }
- // fall through to default
- default :
- continue;
- }
- break;
- }
-
- vector = rawFmt.parse(version, pos, end);
- pos = end;
- if (pos == maxPos)
- // This was a pure raw version
- //
- return OmniVersion.fromVector(vector, null, null);
-
- if (version.charAt(pos) != '/')
- throw new IllegalArgumentException(NLS.bind(Messages.expected_slash_after_raw_vector_0, version.substring(start, maxPos)));
- ++pos;
-
- if (pos == maxPos)
- throw new IllegalArgumentException(NLS.bind(Messages.expected_orignal_after_slash_0, version.substring(start, maxPos)));
- }
-
- if (version.startsWith("format(", pos)) { //$NON-NLS-1$
- // Parse the format
- //
- pos += 7;
- try {
- // Find matching ')' that is neither quoted or escaped
- //
- int end = findEndOfFormat(version, pos, maxPos);
- fmt = VersionFormat.compile(version, pos, end);
- pos = end + 1;
- } catch (VersionFormatException e) {
- throw new IllegalArgumentException(e.getMessage());
- }
- if (pos == maxPos) {
- // This was a raw version with format but no original
- //
- if (vector == null)
- throw new IllegalArgumentException(NLS.bind(Messages.only_format_specified_0, version.substring(start, maxPos)));
- return fmt == VersionFormat.OSGI_FORMAT ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, fmt, null);
- }
- }
-
- if (fmt == null && vector == null)
- throw new IllegalArgumentException(NLS.bind(Messages.neither_raw_vector_nor_format_specified_0, version.substring(start, maxPos)));
-
- if (version.charAt(pos) != ':')
- throw new IllegalArgumentException(NLS.bind(Messages.colon_expected_before_original_version_0, version.substring(start, maxPos)));
-
- pos++;
- if (pos == maxPos)
- throw new IllegalArgumentException(NLS.bind(Messages.expected_orignal_after_colon_0, version.substring(start, maxPos)));
-
- if (vector == null) {
- // Vector and pad must be created by parsing the original
- //
- vector = fmt.parse(version, pos, maxPos);
- }
- return fmt == VersionFormat.OSGI_FORMAT ? OSGiVersion.fromVector(vector) : OmniVersion.fromVector(vector, fmt, version.substring(pos));
- }
-
- static boolean isDigit(char c) {
- return c >= '0' && c <= '9';
- }
-
- public static boolean isLetter(char c) {
- return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
- }
-
- static boolean isLetterOrDigit(char c) {
- return isDigit(c) || isLetter(c);
- }
-
- public static int findEndOfFormat(String string, int pos, int maxPos) {
- int end = -1;
- int depth = 1;
- for (int idx = pos; idx < maxPos; ++idx) {
- char c = string.charAt(idx);
- switch (c) {
- case ')' :
- if (--depth == 0) {
- end = idx;
- break;
- }
- continue;
- case '(' :
- ++depth;
- continue;
- case '\\' :
- ++idx;
- continue;
- case '\'' :
- case '"' :
- for (++idx; idx < maxPos; ++idx) {
- char e = string.charAt(idx);
- if (e == c) {
- break;
- }
- if (e == '\\')
- ++idx;
- }
- // fall through to default
- default :
- continue;
- }
- break;
- }
- if (depth != 0)
- throw new IllegalArgumentException(NLS.bind(Messages.unbalanced_format_parenthesis, string.substring(pos - 1, maxPos)));
- return end;
- }
-
- static Comparable<?> parseRawElement(String value, int[] position, int maxPos) {
- int current = position[0];
- if (current >= maxPos)
- return null;
-
- boolean negate = false;
- char c = value.charAt(current);
- Comparable<?> v;
- switch (c) {
- case '\'' :
- case '"' : {
- StringBuffer sb = new StringBuffer();
- for (;;) {
- char q = c;
- if (++current == maxPos)
- return null;
- c = value.charAt(current);
- while (c != q) {
- if (c < 32)
- return null;
- sb.append(c);
- if (++current == maxPos)
- return null;
- c = value.charAt(current);
- }
- if (++current == maxPos)
- break;
- c = value.charAt(current);
- if (c != '\'' && c != '"')
- break;
- }
- v = sb.length() == 0 ? VersionVector.MINS_VALUE : sb.toString();
- break;
- }
- case '{' : {
- if (++current == maxPos)
- return null;
-
- position[0] = current;
- v = parseRawEnum(value, position, maxPos);
- if (v == null)
- return null;
- current = position[0];
- break;
- }
- case '<' : {
- if (++current == maxPos)
- return null;
-
- position[0] = current;
- v = parseRawVector(value, position, maxPos);
- if (v == null)
- return null;
- current = position[0];
- break;
- }
- case 'm' :
- v = VersionVector.MAXS_VALUE;
- ++current;
- break;
- case 'M' :
- v = VersionVector.MAX_VALUE;
- ++current;
- break;
- case '-' :
- if (++current >= maxPos)
- return null;
-
- c = value.charAt(current);
- if (c == 'M') {
- ++current;
- v = VersionVector.MIN_VALUE;
- break;
- }
- negate = true;
- // Fall through to default
- default : {
- if (isDigit(c)) {
- int start = current++;
- while (current < maxPos && isDigit(value.charAt(current)))
- ++current;
- int val = Integer.parseInt(value.substring(start, current));
- if (negate)
- val = -val;
- v = valueOf(val);
- break;
- }
- return null;
- }
- }
- position[0] = current;
- return v;
- }
-
- private static Comparable<?> parseRawVector(String value, int[] position, int maxPos) {
- int pos = position[0];
- if (pos >= maxPos)
- return null;
-
- char c = value.charAt(pos);
- if (c == '>')
- return null;
-
- ArrayList<Comparable<?>> rawList = new ArrayList<Comparable<?>>();
- boolean padMarkerSeen = (c == 'p');
- if (padMarkerSeen) {
- if (++pos >= maxPos)
- return null;
- position[0] = pos;
- }
-
- Comparable<?> pad = null;
- for (;;) {
- Comparable<?> elem = parseRawElement(value, position, maxPos);
- if (elem == null)
- return null;
-
- if (padMarkerSeen)
- pad = elem;
- else
- rawList.add(elem);
-
- pos = position[0];
- if (pos >= maxPos)
- return null;
-
- c = value.charAt(pos);
- position[0] = ++pos;
- if (c == '>')
- break;
-
- if (padMarkerSeen || pos >= maxPos)
- return null;
-
- if (c == 'p') {
- padMarkerSeen = true;
- continue;
- }
-
- if (c != '.')
- return null;
- }
- pad = removeRedundantTrail(rawList, pad);
- return new VersionVector(rawList.toArray(new Comparable[rawList.size()]), pad);
- }
-
- private static Comparable<?> parseRawEnum(String value, int[] position, int maxPos) {
- int pos = position[0];
- ArrayList<List<String>> identifiers = new ArrayList<List<String>>();
- int ordinal = -1;
- StringBuffer sb = new StringBuffer();
- for (;;) {
- if (pos >= maxPos)
- return null;
-
- char c = value.charAt(pos++);
- while (c != '}' && c != ',') {
- if (pos == maxPos)
- return null;
- if (c <= ' ')
- return null;
- if (c == '\\' || c == '^') {
- if (c == '^')
- ordinal = identifiers.size();
- c = value.charAt(pos++);
- if (pos == maxPos)
- return null;
- }
- sb.append(c);
- c = value.charAt(pos++);
- }
- identifiers.add(Collections.singletonList(sb.toString()));
- if (c == '}')
- break;
- // c must be ',' at this point
- sb.setLength(0);
- }
- if (ordinal == -1)
- return null;
- position[0] = pos;
- return EnumDefinition.getSegment(identifiers, ordinal);
- }
-
- public static int skipWhite(String string, int pos) {
- int top = string.length();
- while (pos < top && string.charAt(pos) <= ' ')
- ++pos;
- return pos;
- }
-
- public static int skipTrailingWhite(String string, int start, int end) {
- while (end > start && string.charAt(end - 1) <= ' ')
- --end;
- return end;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java
deleted file mode 100644
index acf47a96f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionVector.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata;
-
-import java.io.Serializable;
-
-/**
- * The VersionVector represents an array of Comparable objects. The array can be
- * nested since a VersionVector is Comparable in itself.
- *
- * @Immutable
- */
-public class VersionVector implements Comparable<VersionVector>, Serializable {
-
- interface MinMaxComparable extends Comparable<Object>, Serializable {
- //
- }
-
- private static final class MaxStringValue implements MinMaxComparable {
- private static final long serialVersionUID = -4936252230441132767L;
-
- MaxStringValue() {
- // Empty constructor
- }
-
- public int compareTo(Object o) {
- return o == this ? 0 : (o == MAX_VALUE || o instanceof Integer || o instanceof EnumDefinition.EnumSegment || o instanceof VersionVector ? -1 : 1);
- }
-
- // For singleton deserialization
- private Object readResolve() {
- return MAXS_VALUE;
- }
-
- public String toString() {
- return "m"; //$NON-NLS-1$
- }
- }
-
- private static final class MaxValue implements MinMaxComparable {
- private static final long serialVersionUID = -5889641741635253589L;
-
- MaxValue() {
- // Empty constructor
- }
-
- public int compareTo(Object o) {
- return o == this ? 0 : 1;
- }
-
- // For singleton deserialization
- private Object readResolve() {
- return MAX_VALUE;
- }
-
- public String toString() {
- return "M"; //$NON-NLS-1$
- }
- }
-
- private static class MinValue implements MinMaxComparable {
- private static final long serialVersionUID = -1066323980049812226L;
-
- MinValue() {
- // Empty constructor
- }
-
- public int compareTo(Object o) {
- return o == this ? 0 : -1;
- }
-
- private Object readResolve() {
- return MIN_VALUE;
- }
-
- public String toString() {
- return "-M"; //$NON-NLS-1$
- }
- }
-
- /**
- * A value that is greater then any other value
- */
- public static final Comparable<Object> MAX_VALUE = new MaxValue();
-
- /**
- * A value that is greater then any string but less then {@link #MAX_VALUE} and
- * any Integer or VersionVector.
- */
- public static final Comparable<Object> MAXS_VALUE = new MaxStringValue();
-
- /**
- * A value that is less then any other value
- */
- public static final Comparable<Object> MIN_VALUE = new MinValue();
-
- /**
- * A value that is greater then {@link #MIN_VALUE} and less then any string,
- * Integer, or VersionVector (a.k.a. empty_string)
- */
- public static final String MINS_VALUE = ""; //$NON-NLS-1$
-
- private static final long serialVersionUID = -8385373304298723744L;
-
- static int compare(Comparable<?>[] vectorA, Comparable<?> padA, Comparable<?>[] vectorB, Comparable<?> padB) {
- int top = vectorA.length;
- if (top > vectorB.length)
- top = vectorB.length;
-
- for (int idx = 0; idx < top; ++idx) {
- int cmp = compareSegments(vectorA[idx], vectorB[idx]);
- if (cmp != 0)
- return cmp;
- }
-
- // All elements compared equal up to this point. Check
- // pad values
- if (top < vectorA.length)
- return (padB == null) ? 1 : compareReminder(top, vectorA, padA, padB);
-
- if (top < vectorB.length)
- return (padA == null) ? -1 : -compareReminder(top, vectorB, padB, padA);
-
- // Lengths are equal. Compare pad values
- return padA == null ? (padB == null ? 0 : -1) : (padB == null ? 1 : compareSegments(padA, padB));
- }
-
- static boolean equals(Comparable<?>[] vectorA, Comparable<?> padValueA, Comparable<?>[] vectorB, Comparable<?> padValueB) {
- // We compare pad first since it is impossible for versions with
- // different pad to be equal (versions are padded to infinity)
- if (padValueA == null) {
- if (padValueB != null)
- return false;
- } else {
- if (padValueB == null || !padValueA.equals(padValueB))
- return false;
- }
-
- int idx = vectorA.length;
-
- // If the length of the vector differs, the versions cannot be equal
- // since segments equal to pad are stripped by the parser
- if (idx != vectorB.length)
- return false;
-
- while (--idx >= 0)
- if (!vectorA[idx].equals(vectorB[idx]))
- return false;
-
- return true;
- }
-
- static int hashCode(Comparable<?>[] vector, Comparable<?> padValue) {
- int hashCode = padValue == null ? 31 : padValue.hashCode();
- int idx = vector.length;
- while (--idx >= 0) {
- Object elem = vector[idx];
- if (elem != null)
- hashCode += elem.hashCode();
- hashCode = hashCode * 31;
- }
- return hashCode;
- }
-
- static void toString(StringBuffer sb, Comparable<?>[] vector, Comparable<?> padValue, boolean rangeSafe) {
- int top = vector.length;
- if (top == 0)
- // Write one pad value as explicit. It will be considered
- // redundant and removed by the parser but the raw format
- // does not allow zero elements
- VersionFormat.rawToString(sb, rangeSafe, padValue == null ? MIN_VALUE : padValue);
- else {
- for (int idx = 0; idx < top; ++idx) {
- if (idx > 0)
- sb.append('.');
- VersionFormat.rawToString(sb, rangeSafe, vector[idx]);
- }
- }
- if (padValue != null) {
- sb.append('p');
- VersionFormat.rawToString(sb, rangeSafe, padValue);
- }
- }
-
- private static int compareReminder(int idx, Comparable<?>[] vector, Comparable<?> padValue, Comparable<?> othersPad) {
- int cmp;
- for (cmp = 0; idx < vector.length && cmp == 0; ++idx)
- cmp = compareSegments(vector[idx], othersPad);
- if (cmp == 0)
- cmp = (padValue == null) ? -1 : compareSegments(padValue, othersPad);
- return cmp;
- }
-
- static int compareSegments(Comparable<?> a, Comparable<?> b) {
- if (a == b)
- return 0;
-
- if (a instanceof Integer && b instanceof Integer) {
- int ai = ((Integer) a).intValue();
- int bi = ((Integer) b).intValue();
- return ai > bi ? 1 : (ai < bi ? -1 : 0);
- }
-
- if (a instanceof String && b instanceof String)
- return ((String) a).compareTo((String) b);
-
- if (a == MAX_VALUE || a == MIN_VALUE || a == MAXS_VALUE)
- return ((MinMaxComparable) a).compareTo(b);
-
- if (b == MAX_VALUE || b == MIN_VALUE || b == MAXS_VALUE)
- return -((MinMaxComparable) b).compareTo(a);
-
- if (a instanceof Integer)
- return 1;
- if (b instanceof Integer)
- return -1;
-
- if (a instanceof VersionVector)
- return (b instanceof VersionVector) ? ((VersionVector) a).compareTo((VersionVector) b) : 1;
- if (b instanceof VersionVector)
- return -1;
-
- if (a instanceof EnumDefinition.EnumSegment)
- return (b instanceof EnumDefinition.EnumSegment) ? ((EnumDefinition.EnumSegment) a).compareTo((EnumDefinition.EnumSegment) b) : 1;
- if (b instanceof EnumDefinition.EnumSegment)
- return -1;
-
- throw new IllegalArgumentException();
- }
-
- private final Comparable<?> padValue;
-
- private final Comparable<?>[] vector;
-
- public VersionVector(Comparable<?>[] vector, Comparable<?> pad) {
- this.vector = vector;
- this.padValue = (pad == MIN_VALUE) ? null : pad;
- }
-
- public int compareTo(VersionVector ov) {
- if (ov == this)
- return 0;
-
- return compare(vector, padValue, ov.vector, ov.padValue);
- }
-
- public boolean equals(Object o) {
- if (o == this)
- return true;
-
- if (!(o instanceof VersionVector))
- return false;
-
- VersionVector ov = (VersionVector) o;
- return equals(vector, padValue, ov.vector, ov.padValue);
- }
-
- /**
- * Returns the pad value used when comparing this versions to
- * versions that has a raw vector with a larger number of elements
- * @return The pad value or <code>null</code> if not set.
- */
- public Comparable<?> getPad() {
- return padValue;
- }
-
- /**
- * An element from the raw vector
- * @param index The zero based index of the desired element
- * @return An element from the raw vector
- */
- public Comparable<?> getSegment(int index) {
- return vector[index];
- }
-
- /**
- * Returns the number of elements in the raw vector
- * @return The element count
- */
- public int getSegmentCount() {
- return vector.length;
- }
-
- /**
- * This method is package protected since it violates the immutable
- * contract.
- * @return The raw vector. Must be treated as read-only
- */
- Comparable<?>[] getVector() {
- return vector;
- }
-
- public int hashCode() {
- return hashCode(vector, padValue);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- toString(sb);
- return sb.toString();
- }
-
- /**
- * Append the string representation of this instance to the
- * <code>sb</code> buffer.
- * @param sb The buffer to append to
- */
- public void toString(StringBuffer sb) {
- toString(sb, vector, padValue, false);
- }
-
- /**
- * Append the string representation of this instance to the
- * <code>sb</code> buffer.
- * @param sb The buffer to append to
- * @param rangeSafe If <code>true</code>, the range delimiters will be escaped
- * with backslash.
- */
- void toString(StringBuffer sb, boolean rangeSafe) {
- toString(sb, vector, padValue, rangeSafe);
- }
-
- private Object readResolve() {
- VersionVector vv = this;
- // Preserve the emptyString singleton
- int idx = vector.length;
- while (--idx >= 0)
- if (MINS_VALUE.equals(vector[idx]))
- vector[idx] = MINS_VALUE;
- if (MINS_VALUE.equals(padValue))
- vv = new VersionVector(vector, MINS_VALUE);
- return vv;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java
deleted file mode 100644
index 4de975525..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/All.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * A collection filter that yields true if the <code>filter</code> yields true for
- * all of the elements of the <code>collection</code>
- */
-final class All extends CollectionFilter {
- All(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- Variable variable = lambda.getItemVariable();
- while (itor.hasNext()) {
- variable.setValue(context, itor.next());
- if (lambda.evaluate(context) != Boolean.TRUE)
- return Boolean.FALSE;
- }
- return Boolean.TRUE;
- }
-
- public int getExpressionType() {
- return TYPE_ALL;
- }
-
- public String getOperator() {
- return KEYWORD_ALL;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java
deleted file mode 100644
index 7e8adf20e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/And.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * n-ary AND operator. The full evaluation is <code>true</code> if all its operands evaluate to
- * <code>true</code>.
- */
-final class And extends NAry {
- And(Expression[] operands) {
- super(assertLength(operands, 2, OPERATOR_AND));
- }
-
- public Object evaluate(IEvaluationContext context) {
- for (int idx = 0; idx < operands.length; ++idx) {
- if (operands[idx].evaluate(context) != Boolean.TRUE)
- return Boolean.FALSE;
- }
- return Boolean.TRUE;
- }
-
- public int getExpressionType() {
- return TYPE_AND;
- }
-
- public String getOperator() {
- return OPERATOR_AND;
- }
-
- public int getPriority() {
- return PRIORITY_AND;
- }
-
- public void toLDAPString(StringBuffer buf) {
- buf.append("(&"); //$NON-NLS-1$
- for (int idx = 0; idx < operands.length; ++idx)
- operands[idx].toLDAPString(buf);
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java
deleted file mode 100644
index 9095f5522..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Array.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An array of expressions
- */
-final class Array extends NAry {
- final class ArrayIterator implements Iterator<Object> {
- private final IEvaluationContext context;
-
- private int pos = -1;
-
- public ArrayIterator(IEvaluationContext context) {
- this.context = context;
- }
-
- public boolean hasNext() {
- return pos + 1 < operands.length;
- }
-
- public Object next() {
- if (++pos >= operands.length) {
- --pos;
- throw new NoSuchElementException();
- }
- return operands[pos].evaluate(context);
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- Array(Expression[] operands) {
- super(assertLength(operands, 0, OPERATOR_ARRAY));
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- return new ArrayIterator(context);
- }
-
- public int getExpressionType() {
- return TYPE_ARRAY;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append('[');
- elementsToString(bld, rootVariable, operands);
- bld.append(']');
- }
-
- public String getOperator() {
- return OPERATOR_ARRAY;
- }
-
- public int getPriority() {
- return PRIORITY_FUNCTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java
deleted file mode 100644
index 130f1f531..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Assignment.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression representing a variable stack in the current thread.
- */
-class Assignment extends Binary {
- Assignment(Variable variable, Expression expression) {
- super(variable, expression);
- }
-
- public final Object evaluate(IEvaluationContext context) {
- Object value = rhs.evaluate(context);
- context.setValue(lhs, value);
- return value;
- }
-
- public int getExpressionType() {
- return TYPE_ASSIGNMENT;
- }
-
- public int getPriority() {
- return IExpressionConstants.PRIORITY_ASSIGNMENT;
- }
-
- public String getOperator() {
- return OPERATOR_ASSIGN;
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Iterator<?> value = rhs.evaluateAsIterator(context);
- context.setValue(lhs, value);
- return value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java
deleted file mode 100644
index dddcdb9fb..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/At.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.expression.Member.DynamicMember;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * This class represents indexed or keyed access to an indexed collection
- * or a map.
- */
-class At extends Binary {
- protected At(Expression lhs, Expression rhs) {
- super(lhs, rhs);
- }
-
- public Object evaluate(org.eclipse.equinox.p2.metadata.expression.IEvaluationContext context) {
- Object lval;
- if (lhs instanceof DynamicMember) {
- DynamicMember lm = (DynamicMember) lhs;
- Object instance = lm.operand.evaluate(context);
- if (instance instanceof IInstallableUnit) {
- String name = lm.getName();
- if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES == name || InstallableUnit.MEMBER_PROFILE_PROPERTIES == name) {
- IIndexProvider<?> indexProvider = context.getIndexProvider();
- if (indexProvider == null)
- throw new UnsupportedOperationException("No managed properties available to QL"); //$NON-NLS-1$
- return indexProvider.getManagedProperty(instance, name, rhs.evaluate(context));
- }
- if (InstallableUnit.MEMBER_PROPERTIES == name) {
- // Avoid full copy of the properties map just to get one member
- return ((IInstallableUnit) instance).getProperty((String) rhs.evaluate(context));
- }
- }
- lval = lm.invoke(instance);
- } else
- lval = lhs.evaluate(context);
-
- Object rval = rhs.evaluate(context);
- if (lval == null)
- throw new IllegalArgumentException("Unable to use [] on null"); //$NON-NLS-1$
-
- if (lval instanceof Map<?, ?>)
- return ((Map<?, ?>) lval).get(rval);
-
- if (rval instanceof Number) {
- if (lval instanceof List<?>)
- return ((List<?>) lval).get(((Number) rval).intValue());
- if (lval != null && lval.getClass().isArray())
- return ((Object[]) lval)[((Number) rval).intValue()];
- }
-
- if (lval instanceof Dictionary<?, ?>)
- return ((Dictionary<?, ?>) lval).get(rval);
-
- throw new IllegalArgumentException("Unable to use [] on a " + lval.getClass().getName()); //$NON-NLS-1$
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object value = evaluate(context);
- if (!(value instanceof Iterator<?>))
- value = RepeatableIterator.create(value);
- return (Iterator<?>) value;
- }
-
- public int getExpressionType() {
- return TYPE_AT;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendOperand(bld, rootVariable, lhs, getPriority());
- bld.append('[');
- appendOperand(bld, rootVariable, rhs, PRIORITY_MAX);
- bld.append(']');
- }
-
- public String getOperator() {
- return OPERATOR_AT;
- }
-
- public int getPriority() {
- return PRIORITY_MEMBER;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java
deleted file mode 100644
index 546ebf564..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Binary.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.internal.p2.metadata.expression.Member.DynamicMember;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * The abstract base class for all binary operations
- */
-public abstract class Binary extends Expression {
- public final Expression lhs;
-
- public final Expression rhs;
-
- protected Binary(Expression lhs, Expression rhs) {
- this.lhs = lhs;
- this.rhs = rhs;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && lhs.accept(visitor) && rhs.accept(visitor);
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0) {
- Binary be = (Binary) e;
- cmp = lhs.compareTo(be.lhs);
- if (cmp == 0)
- cmp = rhs.compareTo(be.rhs);
- }
- return cmp;
- }
-
- public boolean equals(Object o) {
- if (super.equals(o)) {
- Binary bo = (Binary) o;
- return lhs.equals(bo.lhs) && rhs.equals(bo.rhs);
- }
- return false;
- }
-
- public int getPriority() {
- return PRIORITY_BINARY; // Default priority
- }
-
- public int hashCode() {
- int result = 31 + lhs.hashCode();
- return 31 * result + rhs.hashCode();
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendOperand(bld, rootVariable, lhs, getPriority());
- bld.append(' ');
- bld.append(getOperator());
- bld.append(' ');
- appendOperand(bld, rootVariable, rhs, getPriority());
- }
-
- /**
- * Appends the LDAP filter attribute name from the lhs expression if
- * possible.
- * @throws UnsupportedOperationException when this expression does not conform to an
- * LDAP filter binary expression
- */
- void appendLDAPAttribute(StringBuffer buf) {
- if (lhs instanceof DynamicMember) {
- DynamicMember attr = (DynamicMember) lhs;
- if (attr.operand instanceof Variable) {
- buf.append(attr.getName());
- return;
- }
- }
- throw new UnsupportedOperationException();
- }
-
- private static char hexChar(int value) {
- return (char) (value < 10 ? ('0' + value) : ('a' + (value - 10)));
- }
-
- static void appendLDAPEscaped(StringBuffer bld, String str) {
- appendLDAPEscaped(bld, str, true);
- }
-
- static void appendLDAPEscaped(StringBuffer bld, String str, boolean escapeWild) {
- int top = str.length();
- for (int idx = 0; idx < top; ++idx) {
- char c = str.charAt(idx);
- if (!escapeWild) {
- if (c == '*') {
- bld.append(c);
- continue;
- } else if (c == '\\' && idx + 1 < top && str.charAt(idx + 1) == '*') {
- bld.append("\\2a"); //$NON-NLS-1$
- ++idx;
- continue;
- }
- }
- if (c == '(' || c == ')' || c == '*' || c == '\\' || c < ' ' || c > 127) {
- short cs = (short) c;
- bld.append('\\');
- bld.append(hexChar((cs & 0x00f0) >> 4));
- bld.append(hexChar(cs & 0x000f));
- } else
- bld.append(c);
- }
- }
-
- /**
- * Appends the LDAP filter value from the rhs expression if
- * possible.
- * @throws UnsupportedOperationException when this expression does not conform to an
- * LDAP filter binary expression
- */
- void appendLDAPValue(StringBuffer buf) {
- if (rhs instanceof Literal) {
- Object value = rhs.evaluate(null);
- if (value instanceof String || value instanceof Version) {
- appendLDAPEscaped(buf, value.toString());
- return;
- }
- }
- throw new UnsupportedOperationException();
- }
-
- int countAccessToEverything() {
- return lhs.countAccessToEverything() + rhs.countAccessToEverything();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java
deleted file mode 100644
index 6749180f1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/BooleanFunction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-
-/**
- * A function that obtains a class based on a String
- */
-public final class BooleanFunction extends Function {
-
- public BooleanFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_BOOLEAN));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String || v instanceof Boolean;
- }
-
- Object createInstance(Object arg) {
- if (arg instanceof String)
- return Boolean.valueOf("true".equalsIgnoreCase((String) arg)); //$NON-NLS-1$
- if (arg instanceof Boolean)
- return arg;
- return Boolean.FALSE;
- }
-
- public String getOperator() {
- return KEYWORD_BOOLEAN;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java
deleted file mode 100644
index ddef52293..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ClassFunction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-
-/**
- * A function that obtains a class based on a String
- */
-public final class ClassFunction extends Function {
-
- public ClassFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_CLASS));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String;
- }
-
- Object createInstance(Object arg) {
- try {
- return Class.forName((String) arg);
- } catch (ClassNotFoundException e) {
- throw new IllegalArgumentException(e.getMessage());
- }
- }
-
- public String getOperator() {
- return KEYWORD_CLASS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
deleted file mode 100644
index 6a017aea3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CoercingComparator.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Constructor;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Comparator;
-import org.eclipse.equinox.internal.p2.metadata.MetadataActivator;
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- * A comparator that performs coercion if needed before comparison.
- * @param <T> The type for the comparator.
- */
-public abstract class CoercingComparator<T> {
- static class BooleanCoercer extends CoercingComparator<Boolean> {
- public int compare(Boolean o1, Boolean o2) {
- return o1.booleanValue() == o2.booleanValue() ? 0 : (o1.booleanValue() ? 1 : -1);
- }
-
- @Override
- Boolean coerce(Object v) {
- if (v instanceof Boolean)
- return (Boolean) v;
- if (v instanceof String) {
- String sv = ((String) v).trim();
- if (sv.equalsIgnoreCase("true")) //$NON-NLS-1$
- return Boolean.TRUE;
- if (sv.equalsIgnoreCase("false")) //$NON-NLS-1$
- return Boolean.FALSE;
- }
- throw uncoercable(v);
- }
-
- @Override
- Class<Boolean> getCoerceClass() {
- return Boolean.class;
- }
-
- @Override
- int getCoercePrio() {
- return 7;
- }
- }
-
- static class ClassCoercer extends CoercingComparator<Class<?>> {
- public int compare(Class<?> o1, Class<?> o2) {
- return o1.getName().compareTo(o2.getName());
- }
-
- @Override
- Class<?> coerce(Object v) {
- if (v instanceof Class<?>)
- return (Class<?>) v;
- if (v instanceof String) {
- try {
- return MetadataActivator.getContext().getBundle().loadClass(((String) v).trim());
- } catch (Exception e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- Class<Class<?>> getCoerceClass() {
- Class<?> cls = Class.class;
- return (Class<Class<?>>) cls;
- }
-
- @Override
- int getCoercePrio() {
- return 11;
- }
- }
-
- static class FromStringCoercer<T extends Comparable<Object>> extends CoercingComparator<T> {
- private final Class<T> coerceClass;
- private final Constructor<T> constructor;
-
- public FromStringCoercer(Class<T> coerceClass, Constructor<T> constructor) {
- this.coerceClass = coerceClass;
- this.constructor = constructor;
- }
-
- @Override
- T coerce(Object v) {
- if (v instanceof String) {
- try {
- return constructor.newInstance(new Object[] {((String) v).trim()});
- } catch (Exception e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @Override
- int compare(T o1, T o2) {
- return o1.compareTo(o2);
- }
-
- @Override
- Class<T> getCoerceClass() {
- return coerceClass;
- }
-
- @Override
- int getCoercePrio() {
- return 0;
- }
- }
-
- static class IntegerCoercer extends CoercingComparator<Integer> {
- public int compare(Integer o1, Integer o2) {
- return o1.compareTo(o2);
- }
-
- @Override
- Integer coerce(Object v) {
- if (v instanceof Integer)
- return (Integer) v;
- if (v instanceof Number)
- return new Integer(((Number) v).intValue());
- if (v instanceof String) {
- try {
- return Integer.valueOf(((String) v).trim());
- } catch (NumberFormatException e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @Override
- Class<Integer> getCoerceClass() {
- return Integer.class;
- }
-
- @Override
- int getCoercePrio() {
- return 6;
- }
- }
-
- static class LongCoercer extends CoercingComparator<Long> {
- public int compare(Long o1, Long o2) {
- return o1.compareTo(o2);
- }
-
- @Override
- Long coerce(Object v) {
- if (v instanceof Long)
- return (Long) v;
- if (v instanceof Number)
- return new Long(((Number) v).longValue());
- if (v instanceof String) {
- try {
- return Long.valueOf(((String) v).trim());
- } catch (NumberFormatException e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @Override
- Class<Long> getCoerceClass() {
- return Long.class;
- }
-
- @Override
- int getCoercePrio() {
- return 5;
- }
- }
-
- static class StringCoercer extends CoercingComparator<String> {
- public int compare(String o1, String o2) {
- return o1.compareTo(o2);
- }
-
- @Override
- String coerce(Object v) {
- if (v instanceof Class<?>)
- return ((Class<?>) v).getName();
- return v.toString();
- }
-
- @Override
- Class<String> getCoerceClass() {
- return String.class;
- }
-
- @Override
- int getCoercePrio() {
- return 10;
- }
- }
-
- static class VersionCoercer extends CoercingComparator<Version> {
- public int compare(Version o1, Version o2) {
- return o1.compareTo(o2);
- }
-
- boolean canCoerceTo(Class<?> cls) {
- return Version.class.isAssignableFrom(cls);
- }
-
- @Override
- Version coerce(Object v) {
- if (v instanceof Version)
- return (Version) v;
- if (v instanceof String)
- return Version.create((String) v);
- if (v instanceof String) {
- try {
- return Version.create((String) v);
- } catch (NumberFormatException e) {
- //
- }
- }
- throw uncoercable(v);
- }
-
- @Override
- Class<Version> getCoerceClass() {
- return Version.class;
- }
-
- @Override
- int getCoercePrio() {
- return 1;
- }
- }
-
- private static class SetAccessibleAction implements PrivilegedAction<Object> {
- private final AccessibleObject accessible;
-
- SetAccessibleAction(AccessibleObject accessible) {
- this.accessible = accessible;
- }
-
- public Object run() {
- accessible.setAccessible(true);
- return null;
- }
- }
-
- private static CoercingComparator<?>[] coercers = {new ClassCoercer(), new BooleanCoercer(), new LongCoercer(), new IntegerCoercer(), new VersionCoercer(), new StringCoercer()};
-
- private static final Class<?>[] constructorType = new Class<?>[] {String.class};
-
- /**
- * Finds the comparator for <code>a</code> and <code>b</code> and delegates the coercion/comparison to the comparator
- * according to priority.
- * @param o1 the first object to be compared.
- * @param o2 the second object to be compared.
- * @return The result of the comparison
- * @throws IllegalArgumentException if no comparator was found or if coercion was impossible
- * @see Comparator#compare(Object, Object)
- */
- @SuppressWarnings({"unchecked", "rawtypes"})
- public static <TA extends Object, TB extends Object> int coerceAndCompare(TA o1, TB o2) throws IllegalArgumentException {
- if (o1 == null || o2 == null)
- throw new IllegalArgumentException("Cannot compare null to anything"); //$NON-NLS-1$
-
- if (o1 instanceof Comparable && o1.getClass().isAssignableFrom(o2.getClass()))
- return ((Comparable) o1).compareTo(o2);
-
- if (o2 instanceof Comparable && o2.getClass().isAssignableFrom(o1.getClass()))
- return -((Comparable) o2).compareTo(o1);
-
- CoercingComparator<TA> ca = getComparator(o1, o2);
- CoercingComparator<TB> cb = getComparator(o2, o1);
- return ca.getCoercePrio() <= cb.getCoercePrio() ? ca.compare(o1, ca.coerce(o2)) : cb.compare(cb.coerce(o1), o2);
- }
-
- /**
- * Finds the comparator for <code>a</code> and <code>b</code> and delegates the coercion/equal to the comparator
- * according to priority.
- * @param o1 the first object to be compared.
- * @param o2 the second object to be compared.
- * @return The result of the equality test
- * @throws IllegalArgumentException if no comparator was found or if coercion was impossible
- * @see Object#equals(Object)
- */
- public static <TA extends Object, TB extends Object> boolean coerceAndEquals(TA o1, TB o2) throws IllegalArgumentException {
- if (o1 == o2)
- return true;
-
- if (o1 == null || o2 == null)
- return false;
-
- if (o1.getClass() != o2.getClass()) {
- if (o1.getClass().isAssignableFrom(o2.getClass()))
- return o1.equals(o2);
- if (o2.getClass().isAssignableFrom(o1.getClass()))
- return o2.equals(o1);
- try {
- CoercingComparator<TA> ca = getComparator(o1, o2);
- CoercingComparator<TB> cb = getComparator(o2, o1);
- return ca.getCoercePrio() <= cb.getCoercePrio() ? o1.equals(ca.coerce(o2)) : o2.equals(cb.coerce(o1));
- } catch (IllegalArgumentException e) {
- //
- }
- }
- return o1.equals(o2);
- }
-
- /**
- * Obtains the coercing comparator for the given <code>value</code>.
- * @param value The value
- * @return The coercing comparator
- */
- @SuppressWarnings("unchecked")
- public static <V extends Object> CoercingComparator<V> getComparator(V value, Object v2) {
- Class<V> vClass = (Class<V>) value.getClass();
- CoercingComparator<?>[] carr = coercers;
- int idx = carr.length;
- while (--idx >= 0) {
- CoercingComparator<?> c = carr[idx];
- if (c.canCoerceTo(vClass)) {
- CoercingComparator<V> cv = (CoercingComparator<V>) c;
- return cv;
- }
- }
-
- if (value instanceof Comparable<?> && v2 instanceof String) {
- Class<Comparable<Object>> cClass = (Class<Comparable<Object>>) vClass;
- Constructor<Comparable<Object>> constructor;
- try {
- constructor = cClass.getConstructor(constructorType);
- if (!constructor.isAccessible())
- AccessController.doPrivileged(new SetAccessibleAction(constructor));
- synchronized (CoercingComparator.class) {
- int top = coercers.length;
- CoercingComparator<?>[] nc = new CoercingComparator<?>[top + 1];
- System.arraycopy(coercers, 0, nc, 1, top);
- CoercingComparator<V> cv = (CoercingComparator<V>) new FromStringCoercer<Comparable<Object>>(cClass, constructor);
- nc[0] = cv;
- coercers = nc;
- return cv;
- }
- } catch (Exception e) {
- //
- }
- }
- throw new IllegalArgumentException("No comparator for " + vClass.getName()); //$NON-NLS-1$
- }
-
- protected IllegalArgumentException uncoercable(Object v) {
- StringBuffer sb = new StringBuffer("Cannot coerce "); //$NON-NLS-1$
- if (v instanceof String) {
- sb.append('\'');
- sb.append(v);
- sb.append('\'');
- } else if (v instanceof Number) {
- sb.append("number "); //$NON-NLS-1$
- sb.append(v);
- } else {
- sb.append("an object of instance "); //$NON-NLS-1$
- sb.append(v.getClass().getName());
- }
- sb.append(" into a "); //$NON-NLS-1$
- sb.append(getCoerceClass().getName());
- return new IllegalArgumentException(sb.toString());
- }
-
- boolean canCoerceTo(Class<?> cls) {
- return cls == getCoerceClass();
- }
-
- abstract T coerce(Object v);
-
- abstract int compare(T o1, T o2);
-
- abstract Class<T> getCoerceClass();
-
- abstract int getCoercePrio();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java
deleted file mode 100644
index 5cd8a4177..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Collect.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- */
-final class Collect extends CollectionFilter {
- final class CollectIterator implements Iterator<Object> {
- private final IEvaluationContext context;
-
- private final IExpression variable;
-
- private final Iterator<?> innerIterator;
-
- public CollectIterator(IEvaluationContext context, Iterator<?> iterator) {
- this.context = context;
- this.variable = lambda.getItemVariable();
- this.innerIterator = iterator;
- }
-
- public boolean hasNext() {
- return innerIterator.hasNext();
- }
-
- public Object next() {
- context.setValue(variable, innerIterator.next());
- return lambda.evaluate(context);
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- Collect(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- public Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- return evaluateAsIterator(context, itor);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context, Iterator<?> itor) {
- return new CollectIterator(context, itor);
- }
-
- public int getExpressionType() {
- return TYPE_COLLECT;
- }
-
- public String getOperator() {
- return KEYWORD_COLLECT;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java
deleted file mode 100644
index 5a1e43fb9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CollectionFilter.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * Some kind of operation that is performed for each element of a collection. I.e.
- * <code>x.&lt;operation&gt;(y | &lt;expression&rt;)</code>
- */
-public abstract class CollectionFilter extends Unary {
- public static void appendProlog(StringBuffer bld, Variable rootVariable, Expression lhs, String operator) {
- if (lhs != rootVariable) {
- appendOperand(bld, rootVariable, lhs, PRIORITY_COLLECTION);
- bld.append('.');
- }
- bld.append(operator);
- bld.append('(');
- }
-
- public final LambdaExpression lambda;
-
- protected CollectionFilter(Expression collection, LambdaExpression lambda) {
- super(collection);
- this.lambda = lambda;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && lambda.accept(visitor);
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = lambda.compareTo(((CollectionFilter) e).lambda);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && lambda.equals(((CollectionFilter) o).lambda);
- }
-
- public final Object evaluate(IEvaluationContext context) {
- Iterator<?> lval = getInnerIterator(context);
- context = lambda.prolog(context);
- return evaluate(context, lval);
- }
-
- public final Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Iterator<?> lval = getInnerIterator(context);
- context = lambda.prolog(context);
- return evaluateAsIterator(context, lval);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendProlog(bld, rootVariable, operand, getOperator());
- appendOperand(bld, rootVariable, lambda, PRIORITY_LAMBDA);
- bld.append(')');
- }
-
- public int hashCode() {
- int result = 31 + operand.hashCode();
- return 31 * result + lambda.hashCode();
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-
- protected abstract Object evaluate(final IEvaluationContext context, Iterator<?> iterator);
-
- protected Iterator<?> evaluateAsIterator(IEvaluationContext context, Iterator<?> iterator) {
- throw new UnsupportedOperationException();
- }
-
- private transient IIndexProvider<?> lastIndexProvider;
- private transient IIndex<?> lastIndex;
-
- private IIndex<?> getIndex(Class<?> elementClass, IIndexProvider<?> indexProvider) {
- if (lastIndexProvider == indexProvider)
- return lastIndex;
-
- for (String member : getIndexCandidateMembers(elementClass, lambda.getItemVariable(), lambda.getOperand())) {
- IIndex<?> index = indexProvider.getIndex(member);
- if (index != null)
- lastIndex = index;
- }
- lastIndexProvider = indexProvider;
- return lastIndex;
- }
-
- protected Iterator<?> getInnerIterator(IEvaluationContext context) {
- Object collection = operand.evaluate(context);
- if (collection instanceof Everything<?>) {
- // Try to find an index
- //
- IIndexProvider<?> indexProvider = context.getIndexProvider();
- if (indexProvider != null) {
- Class<?> elementClass = ((Everything<?>) collection).getElementClass();
- IIndex<?> index = getIndex(elementClass, indexProvider);
- if (index != null) {
- Iterator<?> indexed = index.getCandidates(context, lambda.getItemVariable(), lambda.getOperand());
- if (indexed != null)
- return indexed;
- }
- }
- }
-
- // No index. We need every element
- if (collection instanceof IRepeatableIterator<?>)
- return ((IRepeatableIterator<?>) collection).getCopy();
-
- Iterator<?> itor = RepeatableIterator.create(collection);
- if (operand instanceof Variable)
- ((Variable) operand).setValue(context, itor);
- return itor;
- }
-
- int countAccessToEverything() {
- return operand.countAccessToEverything() + lambda.countAccessToEverything();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java
deleted file mode 100644
index 7e958e41d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Compare.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * Comparisons for magnitude.
- */
-final class Compare extends Binary {
- static IllegalArgumentException uncomparable(Object lval, Object rval) {
- return new IllegalArgumentException("Cannot compare a " + lval.getClass().getName() + " to a " + rval.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- final boolean compareLess;
-
- final boolean equalOK;
-
- Compare(Expression lhs, Expression rhs, boolean compareLess, boolean equalOK) {
- super(lhs, rhs);
- this.compareLess = compareLess;
- this.equalOK = equalOK;
- }
-
- public Object evaluate(IEvaluationContext context) {
- int cmpResult = CoercingComparator.coerceAndCompare(lhs.evaluate(context), rhs.evaluate(context));
- return Boolean.valueOf(cmpResult == 0 ? equalOK : (cmpResult < 0 ? compareLess : !compareLess));
- }
-
- public int getExpressionType() {
- return compareLess ? (equalOK ? TYPE_LESS_EQUAL : TYPE_LESS) : (equalOK ? TYPE_GREATER_EQUAL : TYPE_GREATER);
- }
-
- public String getOperator() {
- return compareLess ? (equalOK ? OPERATOR_LT_EQUAL : OPERATOR_LT) : (equalOK ? OPERATOR_GT_EQUAL : OPERATOR_GT);
- }
-
- public void toLDAPString(StringBuffer buf) {
- if (!equalOK)
- buf.append("(!"); //$NON-NLS-1$
- buf.append('(');
- appendLDAPAttribute(buf);
- if (equalOK)
- buf.append(compareLess ? OPERATOR_LT_EQUAL : OPERATOR_GT_EQUAL);
- else
- buf.append(compareLess ? OPERATOR_GT_EQUAL : OPERATOR_LT_EQUAL);
- appendLDAPValue(buf);
- buf.append(')');
- if (!equalOK)
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java
deleted file mode 100644
index 4aaf2a417..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CompoundIterator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * A CompoundIterator will assume that its contained iterator that will produce
- * elements that in turn can be represented as iterators. The elements of those
- * iterators will be returned in sequence, thus removing one iterator dimension.
- * Elements of the contained iterator that are not iterators will be coerced
- * into iterators using {@link RepeatableIterator#create(Object)}.
- */
-public class CompoundIterator<T> implements Iterator<T> {
- private static final Object NO_ELEMENT = new Object();
- private final Iterator<? extends Object> iteratorIterator;
- private Iterator<T> currentIterator;
-
- private T nextObject = noElement();
-
- /**
- * Creates a compound iterator that will iterated over the elements
- * of the provided <code>iterator</code>. Each element will be coerced
- * into an iterator and its elements in turn are returned
- * in succession by the compound iterator.
- *
- * @param iterator
- */
- public CompoundIterator(Iterator<? extends Object> iterator) {
- this.iteratorIterator = iterator;
- }
-
- public boolean hasNext() {
- return positionNext();
- }
-
- public T next() {
- if (!positionNext())
- throw new NoSuchElementException();
-
- T nxt = nextObject;
- nextObject = noElement();
- return nxt;
- }
-
- /**
- * Remove is not supported by this iterator so calling this method
- * will always yield an exception.
- * @throws UnsupportedOperationException
- */
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- @SuppressWarnings("unchecked")
- private boolean positionNext() {
- if (nextObject != NO_ELEMENT)
- return true;
-
- while (currentIterator == null || !currentIterator.hasNext()) {
- if (!iteratorIterator.hasNext())
- return false;
-
- Object nextItor = iteratorIterator.next();
- currentIterator = (nextItor instanceof Iterator<?>) ? (Iterator<T>) nextItor : RepeatableIterator.<T> create(nextItor);
- }
- nextObject = currentIterator.next();
- return true;
- }
-
- @SuppressWarnings("unchecked")
- private static <T> T noElement() {
- return (T) NO_ELEMENT;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java
deleted file mode 100644
index a2b7cf224..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Condition.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * Comparisons for magnitude.
- */
-final class Condition extends Binary {
- final Expression ifFalse;
-
- Condition(Expression test, Expression ifTrue, Expression ifFalse) {
- super(test, ifTrue);
- this.ifFalse = ifFalse;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && ifFalse.equals(((Condition) o).ifFalse);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return lhs.evaluate(context) == Boolean.TRUE ? rhs.evaluate(context) : ifFalse.evaluate(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- return lhs.evaluate(context) == Boolean.TRUE ? rhs.evaluateAsIterator(context) : ifFalse.evaluateAsIterator(context);
- }
-
- public int hashCode() {
- return super.hashCode() * 31 + ifFalse.hashCode();
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- super.toString(bld, rootVariable);
- bld.append(' ');
- bld.append(OPERATOR_ELSE);
- bld.append(' ');
- appendOperand(bld, rootVariable, ifFalse, getPriority());
- }
-
- public int getExpressionType() {
- return TYPE_CONDITION;
- }
-
- public String getOperator() {
- return OPERATOR_IF;
- }
-
- public int getPriority() {
- return IExpressionConstants.PRIORITY_CONDITION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java
deleted file mode 100644
index a57431126..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ContextExpression.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * The context expression is the top expression in context queries. It introduces the
- * variable 'everything' and initialized it with the iterator that represents all
- * available items.
- */
-public class ContextExpression<T> extends Unary implements IContextExpression<T> {
- private static final Object[] noParams = new Object[0];
- protected final Object[] parameters;
-
- public ContextExpression(Expression expression, Object[] parameters) {
- super(expression);
- this.parameters = parameters == null ? noParams : parameters;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && operand.accept(visitor);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- operand.toString(bld, rootVariable);
- }
-
- public IEvaluationContext createContext(Class<? extends T> elementClass, IIndexProvider<T> indexProvider) {
- Variable everything = ExpressionFactory.EVERYTHING;
- IEvaluationContext context = EvaluationContext.create(parameters, everything);
- context.setValue(everything, new Everything<T>(elementClass, indexProvider));
- context.setIndexProvider(indexProvider);
- return context;
- }
-
- public IEvaluationContext createContext(Class<? extends T> elementClass, Iterator<T> iterator) {
- Variable everything = ExpressionFactory.EVERYTHING;
- IEvaluationContext context = EvaluationContext.create(parameters, everything);
- context.setValue(everything, new Everything<T>(elementClass, iterator, operand));
- return context;
- }
-
- public Object evaluate(IEvaluationContext context) {
- return operand.evaluate(parameters.length == 0 ? context : EvaluationContext.create(context, parameters));
- }
-
- public int getExpressionType() {
- return 0;
- }
-
- public String getOperator() {
- throw new UnsupportedOperationException();
- }
-
- public int getPriority() {
- return operand.getPriority();
- }
-
- public Object[] getParameters() {
- return parameters;
- }
-
- public int hashCode() {
- return operand.hashCode();
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<T> iterator(IEvaluationContext context) {
- return (Iterator<T>) operand.evaluateAsIterator(context);
- }
-
- public void toString(StringBuffer bld) {
- toString(bld, ExpressionFactory.EVERYTHING);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java
deleted file mode 100644
index 2de0b9501..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/CurryedLambdaExpression.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * A function that executes some code
- */
-final class CurryedLambdaExpression extends LambdaExpression {
- private static final Assignment[] emptyAssignmentArray = new Assignment[0];
- private final Assignment[] assignments;
-
- CurryedLambdaExpression(Variable each, Assignment[] assignments, Expression body) {
- super(each, body);
- if (assignments == null)
- assignments = emptyAssignmentArray;
- this.assignments = assignments;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- if (super.accept(visitor) && each.accept(visitor)) {
- for (int idx = 0; idx < assignments.length; ++idx)
- if (!assignments[idx].accept(visitor))
- return false;
- return true;
- }
- return false;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = compare(assignments, ((CurryedLambdaExpression) e).assignments);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && equals(assignments, ((CurryedLambdaExpression) o).assignments);
- }
-
- public int hashCode() {
- return 31 * super.hashCode() + hashCode(assignments);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- int top = assignments.length;
- if (top > 0) {
- for (int idx = 0; idx < top; ++idx) {
- appendOperand(bld, rootVariable, assignments[idx].rhs, IExpressionConstants.PRIORITY_COMMA);
- bld.append(", "); //$NON-NLS-1$
- }
- bld.append(OPERATOR_EACH);
- bld.append(", {"); //$NON-NLS-1$
- for (int idx = 0; idx < top; ++idx) {
- appendOperand(bld, rootVariable, assignments[idx].lhs, IExpressionConstants.PRIORITY_COMMA);
- bld.append(", "); //$NON-NLS-1$
- }
- }
- super.toString(bld, rootVariable);
- if (top > 0)
- bld.append('}');
- }
-
- public IEvaluationContext prolog(IEvaluationContext context) {
- IEvaluationContext lambdaContext;
- int top = assignments.length + 1;
- Variable[] vars = new Variable[top];
- vars[0] = getItemVariable();
- for (int idx = 1; idx < top; ++idx)
- vars[idx] = (Variable) assignments[idx - 1].lhs;
- lambdaContext = EvaluationContext.create(context, vars);
- for (int idx = 1; idx < top; ++idx)
- lambdaContext.setValue(vars[idx], assignments[idx - 1].rhs.evaluate(context));
- return lambdaContext;
- }
-
- int countAccessToEverything() {
- int cnt = 0;
- for (int idx = 0; idx < assignments.length; ++idx)
- cnt += assignments[idx].countAccessToEverything();
- cnt += super.countAccessToEverything();
- return cnt;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java
deleted file mode 100644
index 7452c3165..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Equals.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that performs the == and != comparisons
- */
-final class Equals extends Binary {
- final boolean negate;
-
- Equals(Expression lhs, Expression rhs, boolean negate) {
- super(lhs, rhs);
- this.negate = negate;
- }
-
- public Object evaluate(IEvaluationContext context) {
- boolean result = CoercingComparator.coerceAndEquals(lhs.evaluate(context), rhs.evaluate(context));
- if (negate)
- result = !result;
- return Boolean.valueOf(result);
- }
-
- public int getExpressionType() {
- return negate ? TYPE_NOT_EQUALS : TYPE_EQUALS;
- }
-
- public String getOperator() {
- return negate ? OPERATOR_NOT_EQUALS : OPERATOR_EQUALS;
- }
-
- public void toLDAPString(StringBuffer buf) {
- if (negate)
- buf.append("(!"); //$NON-NLS-1$
- buf.append('(');
- appendLDAPAttribute(buf);
- buf.append('=');
- appendLDAPValue(buf);
- buf.append(')');
- if (negate)
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java
deleted file mode 100644
index 49e9bbcac..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/EvaluationContext.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * Highly specialized evaluation contexts optimized for misc purposes
- */
-public class EvaluationContext implements IEvaluationContext {
- public static class SingleVariableContext extends EvaluationContext {
- private Object value;
-
- private final IExpression variable;
-
- public SingleVariableContext(EvaluationContext parentContext, IExpression variable, Object[] parameters) {
- super(parentContext, parameters);
- this.variable = variable;
- }
-
- public Object getValue(IExpression var) {
- return variable == var ? value : parentContext.getValue(var);
- }
-
- public void setValue(IExpression var, Object val) {
- if (variable == var)
- value = val;
- else
- parentContext.setValue(var, val);
- }
- }
-
- public static class MultiVariableContext extends EvaluationContext {
- private final Object[] values;
-
- public MultiVariableContext(EvaluationContext parentContext, IExpression[] variables, Object[] parameters) {
- super(parentContext, parameters);
- values = new Object[variables.length * 2];
- for (int idx = 0, ndx = 0; ndx < variables.length; ++ndx, idx += 2)
- values[idx] = variables[ndx];
- }
-
- public Object getValue(IExpression variable) {
- for (int idx = 0; idx < values.length; ++idx)
- if (values[idx++] == variable)
- return values[idx];
- return parentContext.getValue(variable);
- }
-
- public void setValue(IExpression variable, Object value) {
- for (int idx = 0; idx < values.length; ++idx)
- if (values[idx++] == variable) {
- values[idx] = value;
- return;
- }
- parentContext.setValue(variable, value);
- }
- }
-
- private static final Object[] noParameters = new Object[0];
-
- private static final EvaluationContext INSTANCE = new EvaluationContext(null, noParameters);
-
- public static IEvaluationContext create() {
- return INSTANCE;
- }
-
- public static IEvaluationContext create(IEvaluationContext parent, IExpression variable) {
- return new SingleVariableContext((EvaluationContext) parent, variable, ((EvaluationContext) parent).parameters);
- }
-
- public static IEvaluationContext create(IEvaluationContext parent, IExpression[] variables) {
- return create(parent, ((EvaluationContext) parent).parameters, variables);
- }
-
- public static IEvaluationContext create(IEvaluationContext parent, Object[] parameters, IExpression[] variables) {
- if (variables == null || variables.length == 0)
- return create(parent, parameters);
- if (parameters == null)
- parameters = noParameters;
- return variables.length == 1 ? new SingleVariableContext((EvaluationContext) parent, variables[0], parameters) : new MultiVariableContext((EvaluationContext) parent, variables, parameters);
- }
-
- public static IEvaluationContext create(IEvaluationContext parent, Object[] parameters) {
- if (parameters == null)
- parameters = noParameters;
- return new EvaluationContext((EvaluationContext) parent, parameters);
- }
-
- public static IEvaluationContext create(IExpression variable) {
- return new SingleVariableContext(INSTANCE, variable, noParameters);
- }
-
- public static IEvaluationContext create(IExpression[] variables) {
- return create(INSTANCE, noParameters, variables);
- }
-
- public static IEvaluationContext create(Object[] parameters, IExpression variable) {
- if (parameters == null)
- parameters = noParameters;
- return new SingleVariableContext(INSTANCE, variable, parameters);
- }
-
- public static IEvaluationContext create(Object[] parameters, IExpression[] variables) {
- return create(INSTANCE, parameters, variables);
- }
-
- final EvaluationContext parentContext;
-
- private final Object[] parameters;
-
- private IIndexProvider<?> indexProvider;
-
- EvaluationContext(EvaluationContext parentContext, Object[] parameters) {
- this.parentContext = parentContext;
- this.parameters = parameters;
- }
-
- public final Object getParameter(int position) {
- return parameters[position];
- }
-
- public Object getValue(IExpression variable) {
- if (parentContext == null)
- throw new IllegalArgumentException("No such variable: " + variable); //$NON-NLS-1$
- return parentContext.getValue(variable);
- }
-
- public void setValue(IExpression variable, Object value) {
- if (parentContext == null)
- throw new IllegalArgumentException("No such variable: " + variable); //$NON-NLS-1$
- parentContext.setValue(variable, value);
- }
-
- public IIndexProvider<?> getIndexProvider() {
- if (indexProvider == null) {
- if (parentContext == null)
- return null;
- return parentContext.getIndexProvider();
- }
- return indexProvider;
- }
-
- public void setIndexProvider(IIndexProvider<?> indexProvider) {
- this.indexProvider = indexProvider;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java
deleted file mode 100644
index 0b3a1cf6f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Everything.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Collection;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * The immutable context used when evaluating an expression.
- */
-public final class Everything<T> extends MatchIteratorFilter<T> implements IRepeatableIterator<T> {
- private boolean atStart = true;
-
- private final Class<? extends T> elementClass;
-
- public Everything(Class<? extends T> elementClass, Collection<T> collection) {
- super(RepeatableIterator.<T> create(collection == null ? CollectionUtils.<T> emptyList() : collection));
- this.elementClass = elementClass;
- }
-
- public Everything(Class<? extends T> elementClass, Iterator<? extends T> iterator, Expression expression) {
- this(elementClass, iterator, needsRepeadedAccessToEverything(expression));
- }
-
- public Everything(Class<? extends T> elementClass, IIndexProvider<? extends T> indexProvider) {
- super(RepeatableIterator.<T> create(indexProvider));
- this.elementClass = elementClass;
- }
-
- Everything(Class<? extends T> elementClass, Iterator<? extends T> iterator, boolean needsRepeat) {
- super(needsRepeat ? RepeatableIterator.create(iterator) : iterator);
- this.elementClass = elementClass;
- }
-
- public IRepeatableIterator<T> getCopy() {
- Iterator<? extends T> iterator = getInnerIterator();
- if (iterator instanceof IRepeatableIterator<?>)
- return new Everything<T>(elementClass, ((IRepeatableIterator<? extends T>) iterator).getCopy(), false);
- if (atStart)
- return this;
- throw new UnsupportedOperationException();
- }
-
- public T next() {
- atStart = false;
- return super.next();
- }
-
- public Class<? extends T> getElementClass() {
- return elementClass;
- }
-
- public Object getIteratorProvider() {
- Iterator<? extends T> iterator = getInnerIterator();
- if (iterator instanceof IRepeatableIterator<?>)
- return ((IRepeatableIterator<?>) iterator).getIteratorProvider();
- return this;
- }
-
- protected boolean isMatch(T val) {
- return elementClass.isInstance(val);
- }
-
- /**
- * Checks if the expression will make repeated requests for the 'everything' iterator.
- * @return <code>true</code> if repeated requests will be made, <code>false</code> if not.
- */
- private static boolean needsRepeadedAccessToEverything(Expression expression) {
- return expression.countAccessToEverything() > 1;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java
deleted file mode 100644
index 14fbc5df4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Exists.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * A collection filter that yields true if the <code>filter</code> yields true for
- * any of the elements of the <code>collection</code>
- */
-final class Exists extends CollectionFilter {
- Exists(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- Variable variable = lambda.getItemVariable();
- while (itor.hasNext()) {
- variable.setValue(context, itor.next());
- if (lambda.evaluate(context) == Boolean.TRUE)
- return Boolean.TRUE;
- }
- return Boolean.FALSE;
- }
-
- public int getExpressionType() {
- return TYPE_EXISTS;
- }
-
- public String getOperator() {
- return KEYWORD_EXISTS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java
deleted file mode 100644
index d8b5ac77a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Expression.java
+++ /dev/null
@@ -1,490 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-/**
- * The base class of the expression tree.
- */
-public abstract class Expression implements IExpression, Comparable<Expression>, IExpressionConstants {
-
- static final Expression[] emptyArray = new Expression[0];
-
- public static void appendOperand(StringBuffer bld, Variable rootVariable, Expression operand, int priority) {
- if (priority < operand.getPriority()) {
- bld.append('(');
- operand.toString(bld, rootVariable);
- bld.append(')');
- } else
- operand.toString(bld, rootVariable);
- }
-
- public static Expression[] assertLength(Expression[] operands, int minLength, int maxLength, String operand) {
- if (operands == null)
- operands = emptyArray;
- if (operands.length < minLength)
- throw new IllegalArgumentException("Not enough operands for " + operand); //$NON-NLS-1$
- if (operands.length > maxLength)
- throw new IllegalArgumentException("Too many operands for " + operand); //$NON-NLS-1$
- return operands;
- }
-
- public static Expression[] assertLength(Expression[] operands, int length, String operand) {
- if (operands == null)
- operands = emptyArray;
- if (operands.length < length)
- throw new IllegalArgumentException("Not enough operands for " + operand); //$NON-NLS-1$
- return operands;
- }
-
- public static int compare(Expression[] arr1, Expression[] arr2) {
- int max = arr1.length;
- if (max > arr2.length)
- max = arr2.length;
- for (int idx = 0; idx < max; ++idx) {
- int cmp = arr1[idx].compareTo(arr2[idx]);
- if (cmp != 0)
- return cmp;
- }
- if (max == arr2.length) {
- if (max < arr1.length)
- return 1;
- return 0;
- }
- return -1;
- }
-
- public static boolean equals(Expression[] arr1, Expression[] arr2) {
- int idx = arr1.length;
- if (idx != arr2.length)
- return false;
- while (--idx >= 0)
- if (!arr1[idx].equals(arr2[idx]))
- return false;
- return true;
- }
-
- public static int hashCode(Expression[] arr) {
- int idx = arr.length;
- int result = 1;
- while (--idx >= 0)
- result = 31 * result + arr[idx].hashCode();
- return result;
- }
-
- public static void elementsToString(StringBuffer bld, Variable rootVariable, Expression[] elements) {
- int top = elements.length;
- if (top > 0) {
- elements[0].toString(bld, rootVariable);
- for (int idx = 1; idx < top; ++idx) {
- bld.append(", "); //$NON-NLS-1$
- appendOperand(bld, rootVariable, elements[idx], PRIORITY_MAX);
- }
- }
- }
-
- public static List<String> getIndexCandidateMembers(Class<?> elementClass, Variable itemVariable, Expression operand) {
- MembersFinder finder = new MembersFinder(elementClass, itemVariable);
- operand.accept(finder);
- return finder.getMembers();
- }
-
- /**
- * Let the visitor visit this instance and all expressions that this
- * instance contains.
- * @param visitor The visiting visitor.
- * @return <code>true</code> if the visitor should continue visiting, <code>false</code> otherwise.
- */
- public boolean accept(IExpressionVisitor visitor) {
- return visitor.visit(this);
- }
-
- public int compareTo(Expression e) {
- int cmp = getPriority() - e.getPriority();
- if (cmp == 0) {
- int e1 = getExpressionType();
- int e2 = e.getExpressionType();
- cmp = e1 > e2 ? 1 : (e1 == e2 ? 0 : -1);
- }
- return cmp;
- }
-
- public boolean equals(Object e) {
- if (e == this)
- return true;
- if (e == null || getClass() != e.getClass())
- return false;
- return getExpressionType() == ((Expression) e).getExpressionType();
- }
-
- /**
- * Evaluate this expression with given context and variables.
- * @param context The evaluation context
- * @return The result of the evaluation.
- */
- public abstract Object evaluate(IEvaluationContext context);
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object value = evaluate(context);
- if (!(value instanceof Iterator<?>))
- value = RepeatableIterator.create(value);
- return (Iterator<?>) value;
- }
-
- public abstract String getOperator();
-
- public abstract int getPriority();
-
- public boolean isReferenceTo(Variable variable) {
- return this == variable;
- }
-
- public final String toLDAPString() {
- StringBuffer bld = new StringBuffer();
- toLDAPString(bld);
- return bld.toString();
- }
-
- public void toLDAPString(StringBuffer buf) {
- throw new UnsupportedOperationException();
- }
-
- public final String toString() {
- StringBuffer bld = new StringBuffer();
- toString(bld);
- return bld.toString();
- }
-
- public void toString(StringBuffer bld) {
- toString(bld, ExpressionFactory.THIS);
- }
-
- public abstract void toString(StringBuffer bld, Variable rootVariable);
-
- private static class Compacter {
- private Expression base;
-
- private List<Expression> parts;
-
- private int op;
-
- Compacter(Expression base, int op) {
- this.base = base;
- this.op = op;
- }
-
- Expression getResultingFilter() {
- if (parts == null)
- return base;
-
- int partsOp = op == TYPE_AND ? TYPE_OR : TYPE_AND;
- return addFilter(base, normalize(parts, partsOp), op);
- }
-
- boolean merge(Expression b) {
- Expression[] aArr;
- Expression[] bArr;
- if (base.getExpressionType() == op)
- aArr = getFilterImpls(base);
- else
- aArr = new Expression[] {base};
-
- if (b.getExpressionType() == op)
- bArr = getFilterImpls(b);
- else
- bArr = new Expression[] {b};
-
- List<Expression> common = null;
- List<Expression> onlyA = null;
-
- int atop = aArr.length;
- int btop = bArr.length;
- int aidx;
- int bidx;
- for (aidx = 0; aidx < atop; ++aidx) {
- Expression af = aArr[aidx];
- for (bidx = 0; bidx < btop; ++bidx) {
- Expression bf = bArr[bidx];
- if (af.equals(bf)) {
- if (common == null)
- common = new ArrayList<Expression>();
- common.add(af);
- break;
- }
- }
- if (bidx == btop) {
- if (onlyA == null)
- onlyA = new ArrayList<Expression>();
- onlyA.add(af);
- }
- }
- if (common == null)
- // Nothing in common
- return false;
-
- if (onlyA == null && parts == null)
- return true;
-
- List<Expression> onlyB = null;
- for (bidx = 0; bidx < btop; ++bidx) {
- Expression bf = bArr[bidx];
- for (aidx = 0; aidx < atop; ++aidx)
- if (bf.equals(aArr[aidx]))
- break;
- if (aidx == atop) {
- if (onlyB == null)
- onlyB = new ArrayList<Expression>();
- onlyB.add(bf);
- }
- }
-
- if (onlyB == null && parts == null) {
- // All of B is already covered by base
- base = b;
- return true;
- }
-
- if (parts == null)
- parts = new ArrayList<Expression>();
-
- if (onlyA != null) {
- base = normalize(common, op);
- Expression af = normalize(onlyA, op);
- if (!parts.contains(af))
- parts.add(af);
- }
- Expression bf = normalize(onlyB, op);
- if (!parts.contains(bf))
- parts.add(bf);
- return true;
- }
- }
-
- public static class VariableFinder implements IExpressionVisitor {
- private boolean found = false;
- private final Variable variable;
-
- public VariableFinder(Variable variable) {
- this.variable = variable;
- }
-
- public boolean visit(IExpression expression) {
- if (((Expression) expression).isReferenceTo(variable))
- found = true;
- return !found;
- }
-
- public void reset() {
- found = false;
- }
-
- public boolean isFound() {
- return found;
- }
- }
-
- private static class MembersFinder implements IExpressionVisitor {
- private List<String> members;
- private final Class<?> elementClass;
- private final IExpression operand;
-
- MembersFinder(Class<?> elementClass, IExpression operand) {
- this.elementClass = elementClass;
- this.operand = operand;
- }
-
- public boolean visit(IExpression expression) {
- if (expression instanceof Matches) {
- if (IInstallableUnit.class.isAssignableFrom(elementClass)) {
- // This one is a bit special since an
- // IInstallableUnit ~= IRequirement often
- // means that we can reuse the requirement
- // expression.
- Matches matches = (Matches) expression;
- if (matches.lhs == operand) {
- if (members == null)
- members = new ArrayList<String>();
- if (!members.contains(InstallableUnit.MEMBER_PROVIDED_CAPABILITIES))
- members.add(InstallableUnit.MEMBER_PROVIDED_CAPABILITIES);
- }
- }
-
- // No point in scanning for more index candidates in a matches expression
- return false;
- }
-
- if (expression instanceof Member) {
- Member member = (Member) expression;
- if (member.getOperand() == operand) {
- String name = member.getName();
- if (members == null)
- members = new ArrayList<String>();
- if (!members.contains(name))
- members.add(member.getName());
- return false;
- }
- }
- return true;
- }
-
- List<String> getMembers() {
- return members == null ? CollectionUtils.<String> emptyList() : members;
- }
- }
-
- static Expression addFilter(Expression base, Expression subFilter, int expressionType) {
- if (base.equals(subFilter))
- return base;
-
- ArrayList<Expression> filters = new ArrayList<Expression>(2);
- filters.add(base);
- filters.add(subFilter);
- return normalize(filters, expressionType);
- }
-
- static Expression normalize(List<Expression> operands, int op) {
- int top = operands.size();
- if (top == 1)
- return operands.get(0);
-
- // a | (b | c) becomes a | b | c
- // a & (b & c) becomes a & b & c
- //
- for (int idx = 0; idx < top; ++idx) {
- Expression f = operands.get(idx);
- if (f.getExpressionType() != op)
- continue;
-
- Expression[] sfs = getFilterImpls(f);
- operands.remove(idx);
- --top;
- for (int ndx = 0; ndx < sfs.length; ++ndx) {
- Expression nf = sfs[ndx];
- if (!operands.contains(nf))
- operands.add(nf);
- }
- }
- top = operands.size();
- if (top == 1)
- return operands.get(0);
-
- Collections.sort(operands);
- List<Compacter> splits = new ArrayList<Compacter>();
- int reverseOp = op == TYPE_AND ? TYPE_OR : TYPE_AND;
-
- for (int idx = 0; idx < top; ++idx)
- merge(splits, operands.get(idx), reverseOp);
-
- operands.clear();
- top = splits.size();
- for (int idx = 0; idx < top; ++idx) {
- Expression filter = splits.get(idx).getResultingFilter();
- if (!operands.contains(filter))
- operands.add(filter);
- }
- top = operands.size();
- if (top == 1)
- return operands.get(0);
-
- Collections.sort(operands);
- Expression[] expArray = operands.toArray(new Expression[top]);
- return op == TYPE_AND ? new And(expArray) : new Or(expArray);
- }
-
- static void merge(List<Compacter> splits, Expression base, int op) {
- int top = splits.size();
- for (int idx = 0; idx < top; ++idx) {
- Compacter split = splits.get(idx);
- if (split.merge(base))
- return;
- }
- splits.add(new Compacter(base, op));
- }
-
- static Expression[] getFilterImpls(Expression expression) {
- if (expression instanceof NAry)
- return ((NAry) expression).operands;
- throw new IllegalArgumentException();
- }
-
- static Set<?> asSet(Object val, boolean forcePrivateCopy) {
- if (val == null)
- throw new IllegalArgumentException("Cannot convert null into an set"); //$NON-NLS-1$
-
- if (val instanceof IRepeatableIterator<?>) {
- Object provider = ((IRepeatableIterator<?>) val).getIteratorProvider();
- if (!forcePrivateCopy) {
- if (provider instanceof Set<?>)
- return (Set<?>) provider;
- if (provider instanceof IQueryResult<?>)
- return ((IQueryResult<?>) provider).toUnmodifiableSet();
- }
-
- if (provider instanceof Collection<?>)
- val = provider;
- } else {
- if (!forcePrivateCopy) {
- if (val instanceof Set<?>)
- return (Set<?>) val;
- if (val instanceof IQueryResult<?>)
- return ((IQueryResult<?>) val).toUnmodifiableSet();
- }
- }
-
- HashSet<Object> result;
- if (val instanceof Collection<?>)
- result = new HashSet<Object>((Collection<?>) val);
- else {
- result = new HashSet<Object>();
- Iterator<?> iterator = RepeatableIterator.create(val);
- while (iterator.hasNext())
- result.add(iterator.next());
- }
- return result;
- }
-
- private static class TranslationSupportFinder implements IExpressionVisitor {
- private boolean found;
-
- TranslationSupportFinder() { //
- }
-
- public boolean visit(IExpression expression) {
- if (expression.getExpressionType() == TYPE_MEMBER && InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(((Member) expression).getName()))
- found = true;
- return !found;
- }
-
- boolean isFound() {
- return found;
- }
- }
-
- /**
- * Checks if the expression will make repeated requests for the 'everything' iterator.
- * @return <code>true</code> if repeated requests will be made, <code>false</code> if not.
- */
- public boolean needsTranslationSupport() {
- TranslationSupportFinder tsFinder = new TranslationSupportFinder();
- accept(tsFinder);
- return tsFinder.isFound();
- }
-
- int countAccessToEverything() {
- return 0;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java
deleted file mode 100644
index ec8abf2b1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/ExpressionFactory.java
+++ /dev/null
@@ -1,293 +0,0 @@
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.query.IQuery;
-
-public class ExpressionFactory implements IExpressionFactory, IExpressionConstants {
- public static final Variable EVERYTHING = new Variable(VARIABLE_EVERYTHING);
- protected static final Map<String, Constructor<?>> functionMap;
- public static final IExpressionFactory INSTANCE = new ExpressionFactory();
-
- public static final Variable THIS = new Variable(VARIABLE_THIS);
-
- static {
- Class<?>[] args = new Class[] {Expression[].class};
- Map<String, Constructor<?>> f = new HashMap<String, Constructor<?>>();
- try {
- f.put(KEYWORD_BOOLEAN, BooleanFunction.class.getConstructor(args));
- f.put(KEYWORD_FILTER, FilterFunction.class.getConstructor(args));
- f.put(KEYWORD_VERSION, VersionFunction.class.getConstructor(args));
- f.put(KEYWORD_RANGE, RangeFunction.class.getConstructor(args));
- f.put(KEYWORD_CLASS, ClassFunction.class.getConstructor(args));
- f.put(KEYWORD_SET, SetFunction.class.getConstructor(args));
- f.put(KEYWORD_IQUERY, WrappedIQuery.class.getConstructor(args));
- functionMap = Collections.unmodifiableMap(f);
- } catch (Exception e) {
- throw new ExceptionInInitializerError(e);
- }
- }
-
- protected static Expression[] convertArray(IExpression[] operands) {
- Expression[] ops = new Expression[operands.length];
- System.arraycopy(operands, 0, ops, 0, operands.length);
- return ops;
- }
-
- public IExpression all(IExpression collection, IExpression lambda) {
- return new All((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression and(IExpression... operands) {
- if (operands.length == 0)
- return Literal.TRUE_CONSTANT;
- if (operands.length == 1)
- return operands[0];
- return new And(convertArray(operands));
- }
-
- public IExpression array(IExpression... operands) {
- return new Array(convertArray(operands));
- }
-
- public IExpression assignment(IExpression variable, IExpression expression) {
- return new Assignment((Variable) variable, (Expression) expression);
- }
-
- public IExpression at(IExpression target, IExpression key) {
- return new At((Expression) target, (Expression) key);
- }
-
- public IExpression collect(IExpression collection, IExpression lambda) {
- return new Collect((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression condition(IExpression test, IExpression ifTrue, IExpression ifFalse) {
- return new Condition((Expression) test, (Expression) ifTrue, (Expression) ifFalse);
- }
-
- public IExpression constant(Object value) {
- return Literal.create(value);
- }
-
- @SuppressWarnings("unchecked")
- public <T> IContextExpression<T> contextExpression(IExpression expression, Object... parameters) {
-
- if (expression instanceof IContextExpression<?>) {
- if (parameters.length > 0)
- // Not good.
- throw new IllegalArgumentException("IContextExpression cannot be parameterized (it already is)"); //$NON-NLS-1$
- return (IContextExpression<T>) expression;
- }
- if (expression instanceof IMatchExpression<?>)
- throw new IllegalArgumentException("IMatchExpression cannot be turned into a context expression"); //$NON-NLS-1$
- return new ContextExpression<T>((Expression) expression, parameters);
- }
-
- public IEvaluationContext createContext(IExpression[] variables, Object... parameters) {
- return EvaluationContext.create(parameters, variables);
- }
-
- public IEvaluationContext createContext(Object... parameters) {
- return EvaluationContext.create(parameters, (Variable[]) null);
- }
-
- public IExpression equals(IExpression lhs, IExpression rhs) {
- return new Equals((Expression) lhs, (Expression) rhs, false);
- }
-
- public IExpression exists(IExpression collection, IExpression lambda) {
- return new Exists((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IFilterExpression filterExpression(IExpression expression) {
- return new LDAPFilter((Expression) expression);
- }
-
- public IExpression first(IExpression collection, IExpression lambda) {
- return new First((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression flatten(IExpression collection) {
- return new Flatten((Expression) collection);
- }
-
- public IExpression function(Object function, IExpression... args) {
- try {
- return (IExpression) ((Constructor<?>) function).newInstance(new Object[] {convertArray(args)});
- } catch (IllegalArgumentException e) {
- throw e;
- } catch (InvocationTargetException e) {
- Throwable t = e.getCause();
- if (t instanceof RuntimeException)
- throw (RuntimeException) t;
- throw new RuntimeException(t);
- } catch (InstantiationException e) {
- throw new RuntimeException(e);
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- }
- }
-
- public Map<String, ? extends Object> getFunctionMap() {
- return functionMap;
- }
-
- public IExpression greater(IExpression lhs, IExpression rhs) {
- return new Compare((Expression) lhs, (Expression) rhs, false, false);
- }
-
- public IExpression greaterEqual(IExpression lhs, IExpression rhs) {
- return new Compare((Expression) lhs, (Expression) rhs, false, true);
- }
-
- public IExpression indexedParameter(int index) {
- return new Parameter(index);
- }
-
- public IExpression intersect(IExpression c1, IExpression c2) {
- return new Intersect((Expression) c1, (Expression) c2);
- }
-
- public IExpression lambda(IExpression variable, IExpression body) {
- return new LambdaExpression((Variable) variable, (Expression) body);
- }
-
- public IExpression lambda(IExpression variable, IExpression[] assignments, IExpression body) {
- if (assignments.length == 0)
- return lambda(variable, body);
- Assignment[] asgns = new Assignment[assignments.length];
- System.arraycopy(assignments, 0, asgns, 0, assignments.length);
- return new CurryedLambdaExpression((Variable) variable, asgns, (Expression) body);
- }
-
- public IExpression latest(IExpression collection) {
- return new Latest((Expression) collection);
- }
-
- public IExpression less(IExpression lhs, IExpression rhs) {
- return new Compare((Expression) lhs, (Expression) rhs, true, false);
- }
-
- public IExpression lessEqual(IExpression lhs, IExpression rhs) {
- return new Compare((Expression) lhs, (Expression) rhs, true, true);
- }
-
- public IExpression limit(IExpression collection, IExpression limit) {
- return new Limit((Expression) collection, (Expression) limit);
- }
-
- public IExpression limit(IExpression collection, int count) {
- return new Limit((Expression) collection, Literal.create(new Integer(count)));
- }
-
- public IExpression matches(IExpression lhs, IExpression rhs) {
- return new Matches((Expression) lhs, (Expression) rhs);
- }
-
- @SuppressWarnings("unchecked")
- public <T> IMatchExpression<T> matchExpression(IExpression expression, Object... parameters) {
- if (expression instanceof IMatchExpression<?>) {
- if (parameters.length > 0)
- // Not good.
- throw new IllegalArgumentException("IMatchExpression cannot be parameterized (it already is)"); //$NON-NLS-1$
- return (IMatchExpression<T>) expression;
- }
- if (expression instanceof IContextExpression<?>)
- throw new IllegalArgumentException("IContextExpression cannot be turned into a match expression"); //$NON-NLS-1$
- return new MatchExpression<T>((Expression) expression, parameters);
- }
-
- public IExpression member(IExpression target, String name) {
- if ("empty".equals(name)) //$NON-NLS-1$
- return new Member.EmptyMember((Expression) target);
- if ("length".equals(name)) //$NON-NLS-1$
- return new Member.LengthMember((Expression) target);
- return new Member.DynamicMember((Expression) target, name);
- }
-
- public IExpression memberCall(IExpression target, String name, IExpression... args) {
- if (args.length == 0)
- return member(target, name);
-
- Expression[] eargs = convertArray(args);
-
- // Insert functions that takes arguments here
-
- //
- StringBuffer bld = new StringBuffer();
- bld.append("Don't know how to do a member call with "); //$NON-NLS-1$
- bld.append(name);
- bld.append('(');
- Expression.elementsToString(bld, null, eargs);
- bld.append(')');
- throw new IllegalArgumentException(bld.toString());
- }
-
- @SuppressWarnings("unchecked")
- public IExpression normalize(List<? extends IExpression> operands, int expressionType) {
- return Expression.normalize((List<Expression>) operands, expressionType);
- }
-
- public IExpression not(IExpression operand) {
- if (operand instanceof Equals) {
- Equals eq = (Equals) operand;
- return new Equals(eq.lhs, eq.rhs, !eq.negate);
- }
- if (operand instanceof Compare) {
- Compare cmp = (Compare) operand;
- return new Compare(cmp.lhs, cmp.rhs, !cmp.compareLess, !cmp.equalOK);
- }
- if (operand instanceof Not)
- return ((Not) operand).operand;
-
- return new Not((Expression) operand);
- }
-
- public IExpression or(IExpression... operands) {
- if (operands.length == 0)
- return Literal.TRUE_CONSTANT;
- if (operands.length == 1)
- return operands[0];
- return new Or(convertArray(operands));
- }
-
- public IExpression pipe(IExpression... operands) {
- return Pipe.createPipe(convertArray(operands));
- }
-
- public IExpression select(IExpression collection, IExpression lambda) {
- return new Select((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression thisVariable() {
- return THIS;
- }
-
- public IExpression toExpression(IQuery<?> query) {
- Literal queryConstant = Literal.create(query);
- return new WrappedIQuery(new Expression[] {queryConstant});
- }
-
- public IExpression traverse(IExpression collection, IExpression lambda) {
- return new Traverse((Expression) collection, (LambdaExpression) lambda);
- }
-
- public IExpression union(IExpression c1, IExpression c2) {
- return new Union((Expression) c1, (Expression) c2);
- }
-
- public IExpression unique(IExpression collection, IExpression cache) {
- return new Unique((Expression) collection, (Expression) cache);
- }
-
- public IExpression variable(String name) {
- if (VARIABLE_EVERYTHING.equals(name))
- return EVERYTHING;
- if (VARIABLE_THIS.equals(name))
- return THIS;
- return new Variable(name);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java
deleted file mode 100644
index 07fa92350..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/FilterFunction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-
-/**
- * A function that creates an OSGi filter based on a String
- */
-public final class FilterFunction extends Function {
- public FilterFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_FILTER));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String;
- }
-
- Object createInstance(Object arg) {
- return ExpressionUtil.parseLDAP((String) arg);
- }
-
- public String getOperator() {
- return KEYWORD_FILTER;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java
deleted file mode 100644
index de5c8b51b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/First.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * A collection filter that yields the first element of the <code>collection</code> for which
- * the <code>filter</code> yields <code>true</code>
- */
-final class First extends CollectionFilter {
- First(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- Variable variable = lambda.getItemVariable();
- while (itor.hasNext()) {
- Object each = itor.next();
- variable.setValue(context, each);
- if (lambda.evaluate(context) == Boolean.TRUE)
- return each;
- }
- return null;
- }
-
- public int getExpressionType() {
- return TYPE_FIRST;
- }
-
- public String getOperator() {
- return KEYWORD_FIRST;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java
deleted file mode 100644
index 181caa24e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Flatten.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that yields a new collection consisting of all elements of the
- * <code>collection</code> for which the <code>filter</code> yields <code>true</code>.
- */
-final class Flatten extends UnaryCollectionFilter {
- Flatten(Expression collection) {
- super(collection);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- return new CompoundIterator<Object>(operand.evaluateAsIterator(context));
- }
-
- public int getExpressionType() {
- return TYPE_FLATTEN;
- }
-
- public String getOperator() {
- return IExpressionConstants.KEYWORD_FLATTEN;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java
deleted file mode 100644
index 49908cb7f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Function.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that represents a function such as filter(&lt;expr&gt;) or version(&lt;expr&gt;)
- */
-public abstract class Function extends NAry {
-
- private Object instance;
-
- protected Function(Expression[] operands) {
- super(operands);
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return true;
- }
-
- Object createInstance(Object arg) {
- throw new UnsupportedOperationException();
- }
-
- final Object createInstance(String arg) {
- throw new UnsupportedOperationException();
- }
-
- public Object evaluate(IEvaluationContext context) {
- if (instance != null)
- return instance;
-
- Expression operand = operands[0];
- Object arg = operand.evaluate(context);
- if (assertSingleArgumentClass(arg)) {
- Object result = createInstance(arg);
- if (operand instanceof Literal || operand instanceof Parameter)
- // operand won't change over time so we can cache this instance.
- instance = result;
- return result;
- }
- String what = arg == null ? "null" : ("a " + arg.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
- throw new IllegalArgumentException("Cannot create a " + getOperator() + " from " + what); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object value = evaluate(context);
- if (!(value instanceof Iterator<?>))
- value = RepeatableIterator.create(value);
- return (Iterator<?>) value;
- }
-
- public int getExpressionType() {
- return TYPE_FUNCTION;
- }
-
- public int getPriority() {
- return PRIORITY_FUNCTION;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append(getOperator());
- bld.append('(');
- elementsToString(bld, rootVariable, operands);
- bld.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java
deleted file mode 100644
index 033a5945a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IExpressionConstants.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-public interface IExpressionConstants {
- String KEYWORD_ALL = "all"; //$NON-NLS-1$
-
- String KEYWORD_BOOLEAN = "boolean"; //$NON-NLS-1$
- String KEYWORD_CLASS = "class"; //$NON-NLS-1$
- String KEYWORD_EXISTS = "exists"; //$NON-NLS-1$
- String KEYWORD_FALSE = "false"; //$NON-NLS-1$
- String KEYWORD_FILTER = "filter"; //$NON-NLS-1$
- String KEYWORD_NULL = "null"; //$NON-NLS-1$
- String KEYWORD_RANGE = "range"; //$NON-NLS-1$
- String KEYWORD_TRUE = "true"; //$NON-NLS-1$
- String KEYWORD_COLLECT = "collect"; //$NON-NLS-1$
- String KEYWORD_FIRST = "first"; //$NON-NLS-1$
- String KEYWORD_FLATTEN = "flatten"; //$NON-NLS-1$
- String KEYWORD_INTERSECT = "intersect"; //$NON-NLS-1$
- String KEYWORD_IQUERY = "iquery"; //$NON-NLS-1$
- String KEYWORD_LATEST = "latest"; //$NON-NLS-1$
- String KEYWORD_LIMIT = "limit"; //$NON-NLS-1$
- String KEYWORD_LOCALIZED_KEYS = "localizedKeys"; //$NON-NLS-1$
- String KEYWORD_LOCALIZED_MAP = "localizedMap"; //$NON-NLS-1$
- String KEYWORD_LOCALIZED_PROPERTY = "localizedProperty"; //$NON-NLS-1$
- String KEYWORD_SATISFIES_ALL = "satisfiesAll"; //$NON-NLS-1$
- String KEYWORD_SATISFIES_ANY = "satisfiesAny"; //$NON-NLS-1$
- String KEYWORD_SELECT = "select"; //$NON-NLS-1$
- String KEYWORD_SET = "set"; //$NON-NLS-1$
- String KEYWORD_TRAVERSE = "traverse"; //$NON-NLS-1$
- String KEYWORD_UNION = "union"; //$NON-NLS-1$
- String KEYWORD_UNIQUE = "unique"; //$NON-NLS-1$
- String KEYWORD_VERSION = "version"; //$NON-NLS-1$
-
- String OPERATOR_AND = "&&"; //$NON-NLS-1$
- String OPERATOR_AT = "[]"; //$NON-NLS-1$
- String OPERATOR_EQUALS = "=="; //$NON-NLS-1$
- String OPERATOR_GT = ">"; //$NON-NLS-1$
- String OPERATOR_GT_EQUAL = ">="; //$NON-NLS-1$
- String OPERATOR_LT = "<"; //$NON-NLS-1$
- String OPERATOR_LT_EQUAL = "<="; //$NON-NLS-1$
- String OPERATOR_MATCHES = "~="; //$NON-NLS-1$
- String OPERATOR_MEMBER = "."; //$NON-NLS-1$
- String OPERATOR_NOT = "!"; //$NON-NLS-1$
- String OPERATOR_NOT_EQUALS = "!="; //$NON-NLS-1$
- String OPERATOR_OR = "||"; //$NON-NLS-1$
- String OPERATOR_PARAMETER = "$"; //$NON-NLS-1$
- String OPERATOR_ARRAY = "[]"; //$NON-NLS-1$
- String OPERATOR_ASSIGN = "="; //$NON-NLS-1$
- String OPERATOR_EACH = "_"; //$NON-NLS-1$
- String OPERATOR_ELSE = ":"; //$NON-NLS-1$
- String OPERATOR_IF = "?"; //$NON-NLS-1$
-
- int PRIORITY_LITERAL = 1;
- int PRIORITY_VARIABLE = 1;
- int PRIORITY_FUNCTION = 2; // for extend query expressions
- int PRIORITY_MEMBER = 3;
- int PRIORITY_COLLECTION = 4;
- int PRIORITY_NOT = 5;
- int PRIORITY_BINARY = 6;
- int PRIORITY_AND = 7;
- int PRIORITY_OR = 8;
- int PRIORITY_CONDITION = 9;
- int PRIORITY_ASSIGNMENT = 10;
- int PRIORITY_LAMBDA = 11;
- int PRIORITY_COMMA = 12;
- int PRIORITY_MAX = 20;
-
- String VARIABLE_EVERYTHING = "everything"; //$NON-NLS-1$
- String VARIABLE_THIS = "this"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java
deleted file mode 100644
index f20e266bf..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/IRepeatableIterator.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-
-public interface IRepeatableIterator<T> extends Iterator<T> {
- /**
- * Returns a copy that will iterate over the same elements
- * as this iterator. The contents or position of this iterator
- * is left unchanged.
- * @return A re-initialized copy of this iterator.
- */
- IRepeatableIterator<T> getCopy();
-
- Object getIteratorProvider();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java
deleted file mode 100644
index 2ebbe0fef..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Intersect.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * n-ary <code>intersect</code> operator. The result is the set of elements that were found in all operands.
- */
-final class Intersect extends Binary {
- Intersect(Expression operand, Expression param) {
- super(operand, param);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Set<?> resultSet = asSet(lhs.evaluate(context), false); // Safe since it will not be modified
- Iterator<?> itor = rhs.evaluateAsIterator(context);
- Set<Object> retained = new HashSet<Object>();
- while (itor.hasNext()) {
- Object value = itor.next();
- if (resultSet.contains(value))
- retained.add(value);
- }
- return RepeatableIterator.create(retained);
- }
-
- public int getExpressionType() {
- return TYPE_INTERSECT;
- }
-
- public String getOperator() {
- return KEYWORD_INTERSECT;
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java
deleted file mode 100644
index 291a6ef6c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPApproximation.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.io.Serializable;
-
-/**
- * Map a string for an LDAP APPROX (~=) comparison.
- * This implementation removes white spaces and transforms everything to lower case.
- */
-public final class LDAPApproximation implements Serializable, Comparable<LDAPApproximation> {
- private static final long serialVersionUID = 4782295637798543587L;
- private final String pattern;
- private transient String approxPattern;
-
- public LDAPApproximation(String pattern) {
- this.pattern = pattern;
- }
-
- public int compareTo(LDAPApproximation o) {
- return pattern.compareTo(o.pattern);
- }
-
- public boolean equals(Object o) {
- return o == this || (o instanceof LDAPApproximation && ((LDAPApproximation) o).pattern.equals(pattern));
- }
-
- public int hashCode() {
- return 3 * pattern.hashCode();
- }
-
- /**
- * Matches the <code>value</code> with the compiled expression. The value
- * is considered matching if all characters are matched by the expression. A
- * partial match is not enough.
- * @param value The value to match
- * @return <code>true</code> if the value was a match.
- */
- public boolean isMatch(CharSequence value) {
- if (value == null)
- return false;
- if (approxPattern == null)
- approxPattern = approxString(pattern);
- return approxString(value).equals(approxPattern);
- }
-
- public String toString() {
- return pattern;
- }
-
- private static String approxString(CharSequence input) {
- boolean changed = false;
- char[] output = new char[input.length()];
- int cursor = 0;
- for (int i = 0, length = output.length; i < length; i++) {
- char c = input.charAt(i);
- if (Character.isWhitespace(c)) {
- changed = true;
- continue;
- }
- if (Character.isUpperCase(c)) {
- changed = true;
- c = Character.toLowerCase(c);
- }
- output[cursor++] = c;
- }
- return changed ? new String(output, 0, cursor) : input.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java
deleted file mode 100644
index a96fe329d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LDAPFilter.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- * IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Dictionary;
-import java.util.Map;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.osgi.framework.Filter;
-import org.osgi.framework.ServiceReference;
-
-public class LDAPFilter extends Unary implements IFilterExpression {
-
- LDAPFilter(Expression expression) {
- super(expression);
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return operand.accept(visitor);
- }
-
- public boolean equals(Object o) {
- return (o instanceof Filter && !(o instanceof LDAPFilter)) ? equals(ExpressionUtil.parseLDAP(o.toString())) : super.equals(o);
- }
-
- @Override
- public String getOperator() {
- return operand.getOperator();
- }
-
- @Override
- public int getPriority() {
- return operand.getPriority();
- }
-
- public int getExpressionType() {
- return 0;
- }
-
- public boolean match(Map<String, ? extends Object> map) {
- return isMatch(MemberProvider.create(map, true));
- }
-
- @SuppressWarnings("rawtypes")
- public boolean match(Dictionary dictionary) {
- return isMatch(dictionary == null ? MemberProvider.emptyProvider() : MemberProvider.create(dictionary, true));
- }
-
- public boolean isMatch(Object candidate) {
- Variable self = ExpressionFactory.THIS;
- IEvaluationContext ctx = EvaluationContext.create(self);
- self.setValue(ctx, candidate);
- return Boolean.TRUE == operand.evaluate(ctx);
- }
-
- public boolean match(ServiceReference<?> reference) {
- return isMatch(reference == null ? MemberProvider.emptyProvider() : MemberProvider.create(reference, true));
- }
-
- public boolean matchCase(Map<String, ? extends Object> map) {
- return isMatch(map == null ? MemberProvider.emptyProvider() : MemberProvider.create(map, false));
- }
-
- public boolean matches(Map<String, ?> map) {
- return matchCase(map);
- }
-
- @SuppressWarnings("rawtypes")
- public boolean matchCase(Dictionary dictionary) {
- return isMatch(dictionary == null ? MemberProvider.emptyProvider() : MemberProvider.create(dictionary, false));
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- operand.toLDAPString(bld);
- }
-
- @Override
- public Object evaluate(IEvaluationContext context) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java
deleted file mode 100644
index f4973194d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/LambdaExpression.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * A function that executes some code
- */
-public class LambdaExpression extends Unary {
- protected final Variable each;
-
- protected LambdaExpression(Variable each, Expression body) {
- super(body);
- this.each = each;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && each.accept(visitor);
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = each.compareTo(((LambdaExpression) e).each);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && each.equals(((LambdaExpression) o).each);
- }
-
- public int hashCode() {
- int result = 31 + operand.hashCode();
- return 31 * result + each.hashCode();
- }
-
- public int getExpressionType() {
- return TYPE_LAMBDA;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- each.toString(bld, rootVariable);
- bld.append(" | "); //$NON-NLS-1$
- appendOperand(bld, rootVariable, operand, IExpressionConstants.PRIORITY_COMMA);
- }
-
- public Variable getItemVariable() {
- return each;
- }
-
- public String getOperator() {
- return "|"; //$NON-NLS-1$
- }
-
- public int getPriority() {
- return IExpressionConstants.PRIORITY_LAMBDA;
- }
-
- public IEvaluationContext prolog(IEvaluationContext context) {
- return EvaluationContext.create(context, each);
- }
-
- int countAccessToEverything() {
- return 2 * super.countAccessToEverything();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java
deleted file mode 100644
index cf96f0604..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Latest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that is especially targeted towards {@link IVersionedId} instances. It will
- * reject any objects that is not an <code>IVersionedId</code> and it will ensure that the
- * resulting iterator only iterates over the latest version of any found id.
- */
-final class Latest extends UnaryCollectionFilter {
-
- Latest(Expression collection) {
- super(collection);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- HashMap<String, IVersionedId> greatestIUVersion;
- if (operand instanceof Select) {
- // Inline element evaluation here so that we don't build a map that is
- // larger then it has to be
- Select select = (Select) operand;
- Iterator<?> iterator = select.operand.evaluateAsIterator(context);
- if (!iterator.hasNext())
- return Collections.EMPTY_SET.iterator();
-
- greatestIUVersion = new HashMap<String, IVersionedId>();
- LambdaExpression lambda = select.lambda;
- context = lambda.prolog(context);
- Variable variable = lambda.getItemVariable();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (!(next instanceof IVersionedId))
- continue;
-
- variable.setValue(context, next);
- if (lambda.evaluate(context) != Boolean.TRUE)
- continue;
-
- IVersionedId versionedID = (IVersionedId) next;
- String id = versionedID.getId();
- IVersionedId prev = greatestIUVersion.put(id, versionedID);
- if (prev == null)
- continue;
- if (prev.getVersion().compareTo(versionedID.getVersion()) > 0)
- greatestIUVersion.put(id, prev);
- }
- } else {
- Iterator<?> iterator = operand.evaluateAsIterator(context);
- if (iterator == null)
- return null;
- if (!iterator.hasNext())
- return Collections.EMPTY_SET.iterator();
-
- greatestIUVersion = new HashMap<String, IVersionedId>();
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (!(next instanceof IVersionedId))
- continue;
-
- IVersionedId versionedID = (IVersionedId) next;
- String id = versionedID.getId();
-
- IVersionedId prev = greatestIUVersion.put(id, versionedID);
- if (prev == null)
- continue;
-
- if (prev.getVersion().compareTo(versionedID.getVersion()) > 0)
- greatestIUVersion.put(id, prev);
- }
- }
- return greatestIUVersion.values().iterator();
- }
-
- public int getExpressionType() {
- return TYPE_LATEST;
- }
-
- public String getOperator() {
- return IExpressionConstants.KEYWORD_LATEST;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java
deleted file mode 100644
index d4776755b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Limit.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * A collection filter that limits the number of entries in the collection
- */
-final class Limit extends Binary {
-
- /**
- * An iterator that stops iterating after a given number of iterations.
- */
- static final class CountingIterator<T> implements Iterator<T> {
- private final Iterator<? extends T> innerIterator;
- private int counter;
-
- public CountingIterator(Iterator<? extends T> iterator, int count) {
- this.innerIterator = iterator;
- this.counter = count;
- }
-
- public boolean hasNext() {
- return counter > 0 && innerIterator.hasNext();
- }
-
- public T next() {
- if (counter > 0) {
- --counter;
- return innerIterator.next();
- }
- throw new NoSuchElementException();
- }
-
- public void remove() {
- innerIterator.remove();
- }
- }
-
- Limit(Expression operand, Expression param) {
- super(operand, param);
- }
-
- Limit(Expression operand, int limit) {
- this(operand, (Expression) ExpressionFactory.INSTANCE.constant(new Integer(limit)));
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object rval = rhs.evaluate(context);
- int limit = -1;
- if (rval instanceof Integer)
- limit = ((Integer) rval).intValue();
- if (limit < 0)
- throw new IllegalArgumentException("limit expression did not evalutate to a positive integer"); //$NON-NLS-1$
- return limit == 0 ? CollectionUtils.emptySet().iterator() : new CountingIterator<Object>(lhs.evaluateAsIterator(context), limit);
- }
-
- public int getExpressionType() {
- return TYPE_LIMIT;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- CollectionFilter.appendProlog(bld, rootVariable, lhs, getOperator());
- appendOperand(bld, rootVariable, rhs, IExpressionConstants.PRIORITY_COMMA);
- bld.append(')');
- }
-
- public String getOperator() {
- return KEYWORD_LIMIT;
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java
deleted file mode 100644
index fffdf96a2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Literal.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.SimplePattern;
-import org.osgi.framework.Filter;
-
-/**
- * An expression that represents a constant value.
- */
-public final class Literal extends Expression {
- public static final Literal FALSE_CONSTANT = new Literal(Boolean.FALSE);
-
- public static final Literal NULL_CONSTANT = new Literal(null);
-
- public static final Literal TRUE_CONSTANT = new Literal(Boolean.TRUE);
-
- public static Literal create(Object value) {
- if (value == null)
- return NULL_CONSTANT;
- if (value == Boolean.TRUE)
- return TRUE_CONSTANT;
- if (value == Boolean.FALSE)
- return FALSE_CONSTANT;
- return new Literal(value);
- }
-
- public final Object value;
-
- private Literal(Object value) {
- this.value = value;
- }
-
- @SuppressWarnings({"unchecked", "rawtypes"})
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp != 0)
- return cmp;
-
- Object eValue = ((Literal) e).value;
- if (value == null)
- return eValue == null ? 0 : -1;
-
- if (eValue == null)
- return 1;
-
- if (eValue.getClass() == value.getClass())
- return ((Comparable) value).compareTo(eValue);
-
- return eValue.getClass().getName().compareTo(value.getClass().getName());
- }
-
- public boolean equals(Object o) {
- if (super.equals(o)) {
- Literal bo = (Literal) o;
- return value == null ? bo.value == null : value.equals(bo.value);
- }
- return false;
- }
-
- public Object evaluate(IEvaluationContext context) {
- return value;
- }
-
- public int getExpressionType() {
- return TYPE_LITERAL;
- }
-
- public String getOperator() {
- return "<literal>"; //$NON-NLS-1$
- }
-
- public int getPriority() {
- return PRIORITY_LITERAL;
- }
-
- public int hashCode() {
- return 31 + value.hashCode();
- }
-
- public void toLDAPString(StringBuffer buf) {
- if (!(value instanceof Filter))
- throw new UnsupportedOperationException();
- buf.append(value.toString());
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendValue(bld, value);
- }
-
- private static void appendValue(StringBuffer bld, Object value) {
- if (value == null)
- bld.append("null"); //$NON-NLS-1$
- else if (value == Boolean.TRUE)
- bld.append("true"); //$NON-NLS-1$
- else if (value == Boolean.FALSE)
- bld.append("false"); //$NON-NLS-1$
- else if (value instanceof String)
- appendQuotedString(bld, (String) value);
- else if (value instanceof Number)
- bld.append(value.toString());
- else if (value instanceof SimplePattern) {
- appendEscaped(bld, '/', value.toString());
- } else if (value instanceof Version) {
- bld.append("version("); //$NON-NLS-1$
- appendQuotedString(bld, value.toString());
- bld.append(')');
- } else if (value instanceof VersionRange) {
- bld.append("range("); //$NON-NLS-1$
- appendQuotedString(bld, value.toString());
- bld.append(')');
- } else if (value instanceof Class<?>) {
- bld.append("class("); //$NON-NLS-1$
- appendQuotedString(bld, value.toString());
- bld.append(')');
- } else if (value instanceof Filter) {
- bld.append("filter("); //$NON-NLS-1$
- appendQuotedString(bld, value.toString());
- bld.append(')');
- } else if (value instanceof Set<?>) {
- bld.append("set("); //$NON-NLS-1$
- appendLiteralCollection(bld, (Collection<?>) value);
- bld.append(')');
- } else if (value instanceof Collection<?>)
- appendLiteralCollection(bld, (Collection<?>) value);
- else
- bld.append(value);
-
- }
-
- private static void appendLiteralCollection(StringBuffer bld, Collection<?> collection) {
- bld.append('[');
- Iterator<?> iter = collection.iterator();
- if (iter.hasNext()) {
- appendValue(bld, iter.next());
- while (iter.hasNext()) {
- bld.append(',');
- appendValue(bld, iter.next());
- }
- }
- bld.append(']');
- }
-
- private static void appendQuotedString(StringBuffer bld, String str) {
- if (str.indexOf('\'') < 0) {
- bld.append('\'');
- bld.append(str);
- bld.append('\'');
- } else
- appendEscaped(bld, '"', str);
- }
-
- private static void appendEscaped(StringBuffer bld, char delimiter, String str) {
- bld.append(delimiter);
- int top = str.length();
- for (int idx = 0; idx < top; ++idx) {
- char c = str.charAt(idx);
- if (c == delimiter || c == '\\')
- bld.append('\\');
- bld.append(c);
- }
- bld.append(delimiter);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java
deleted file mode 100644
index dfdf61999..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchExpression.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Arrays;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * The MatchExpression is a wrapper for an {@link IExpression} that is expected
- * to return a boolean value. The wrapper provides the evaluation context needed
- * to evaluate the expression.
- */
-public class MatchExpression<T> extends Unary implements IMatchExpression<T> {
- private static final Object[] noParams = new Object[0];
- private final Object[] parameters;
-
- MatchExpression(Expression expression, Object[] parameters) {
- super(expression);
- this.parameters = parameters == null ? noParams : parameters;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return operand.accept(visitor);
- }
-
- public IEvaluationContext createContext() {
- return EvaluationContext.create(parameters, ExpressionFactory.THIS);
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && Arrays.equals(parameters, ((MatchExpression<?>) o).parameters);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return operand.evaluate(parameters.length == 0 ? context : EvaluationContext.create(context, parameters));
- }
-
- public int getExpressionType() {
- return 0;
- }
-
- public String getOperator() {
- throw new UnsupportedOperationException();
- }
-
- public Object[] getParameters() {
- return parameters;
- }
-
- /**
- * Returns the predicate expression that is used for the match
- * @return The predicate expression
- */
- IExpression getPredicate() {
- return operand;
- }
-
- public int getPriority() {
- return operand.getPriority();
- }
-
- public int hashCode() {
- return operand.hashCode() * 31 + CollectionUtils.hashCode(parameters);
- }
-
- public boolean isMatch(IEvaluationContext context, T value) {
- ExpressionFactory.THIS.setValue(context, value);
- return Boolean.TRUE == operand.evaluate(context);
- }
-
- public boolean isMatch(T value) {
- return isMatch(createContext(), value);
- }
-
- public void toLDAPString(StringBuffer bld) {
- operand.toLDAPString(bld);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- operand.toString(bld, rootVariable);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java
deleted file mode 100644
index 8d21ed8f7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MatchIteratorFilter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * An iterator filter using a boolean {@link #isMatch(Object)} method.
- */
-public abstract class MatchIteratorFilter<T> implements Iterator<T> {
- private static final Object NO_ELEMENT = new Object();
-
- private final Iterator<? extends T> innerIterator;
-
- private T nextObject = noElement();
-
- public MatchIteratorFilter(Iterator<? extends T> iterator) {
- this.innerIterator = iterator;
- }
-
- public boolean hasNext() {
- return positionNext();
- }
-
- public T next() {
- if (!positionNext())
- throw new NoSuchElementException();
-
- T nxt = nextObject;
- nextObject = noElement();
- return nxt;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- protected Iterator<? extends T> getInnerIterator() {
- return innerIterator;
- }
-
- protected abstract boolean isMatch(T val);
-
- private boolean positionNext() {
- if (nextObject != NO_ELEMENT)
- return true;
-
- while (innerIterator.hasNext()) {
- T nxt = innerIterator.next();
- if (isMatch(nxt)) {
- nextObject = nxt;
- return true;
- }
- }
- return false;
- }
-
- @SuppressWarnings("unchecked")
- private static <T> T noElement() {
- return (T) NO_ELEMENT;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java
deleted file mode 100644
index 2033b3875..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Matches.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.osgi.framework.Filter;
-
-/**
- * <p>A class that performs &quot;matching&quot; The actual algorithm used for
- * performing the match varies depending on the types of the items to match.</p>
- * <p>The following things can be matched:</p>
- * <table border="1" cellpadding="3">
- * <tr><th>LHS</th><th>RHS</th><th>Implemented as</th></tr>
- * <tr><td>{@link String}</td><td>{@link SimplePattern}</td><td>rhs.isMatch(lhs)</td></tr>
- * <tr><td>{@link String}</td><td>{@link LDAPApproximation}</td><td>rhs.isMatch(lhs)</td></tr>
- * <tr><td>&lt;any&gt;</td><td>{@link Class}</td><td>rhs.isInstance(lhs)</td></tr>
- * <tr><td>{@link Class}</td><td>{@link Class}</td><td>rhs.isAssignableFrom(lhs)</td></tr>
- * </table>
- */
-public class Matches extends Binary {
- protected Matches(Expression lhs, Expression rhs) {
- super(lhs, rhs);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return Boolean.valueOf(match(lhs.evaluate(context), rhs.evaluate(context)));
- }
-
- @SuppressWarnings({"unchecked", "rawtypes"})
- protected boolean match(Object lval, Object rval) {
- if (lval == null || rval == null)
- return false;
-
- if (rval instanceof IRequirement) {
- IRequirement requirement = (IRequirement) rval;
- if (lval instanceof IInstallableUnit)
- return Boolean.valueOf(((IInstallableUnit) lval).satisfies(requirement));
- } else if (rval instanceof VersionRange) {
- VersionRange range = (VersionRange) rval;
- if (lval instanceof Version)
- return Boolean.valueOf(range.isIncluded((Version) lval));
- if (lval instanceof String)
- return range.isIncluded(Version.create((String) lval));
- } else if (rval instanceof SimplePattern) {
- if (lval instanceof CharSequence)
- return ((SimplePattern) rval).isMatch((CharSequence) lval);
- if (lval instanceof Character || lval instanceof Number || lval instanceof Boolean)
- return ((SimplePattern) rval).isMatch(lval.toString());
- } else if (rval instanceof LDAPFilter) {
- return ((LDAPFilter) rval).isMatch(MemberProvider.create(lval, true));
- } else if (rval instanceof Filter) {
- if (lval instanceof IInstallableUnit)
- return Boolean.valueOf(((Filter) rval).match(new Hashtable<String, String>(((IInstallableUnit) lval).getProperties())));
- // TODO Below we use raw types for simplicity;
- // we could convert to Dictionary<String, ?> but that is work and the filter impl
- // must still handle (and ignore) non String keys.
- if (lval instanceof Dictionary<?, ?>)
- return Boolean.valueOf(((Filter) rval).match((Dictionary<String, ?>) lval));
- if (lval instanceof Map<?, ?>)
- return Boolean.valueOf(((Filter) rval).match(new Hashtable((Map<?, ?>) lval)));
- } else if (rval instanceof Locale) {
- if (lval instanceof String)
- return Boolean.valueOf(matchLocaleVariants((Locale) rval, (String) lval));
- } else if (rval instanceof IMatchExpression<?>) {
- IMatchExpression<Object> me = (IMatchExpression<Object>) rval;
- return me.isMatch(lval);
- } else if (rval instanceof IUpdateDescriptor) {
- if (lval instanceof IInstallableUnit)
- return Boolean.valueOf(((IUpdateDescriptor) rval).isUpdateOf((IInstallableUnit) lval));
- } else if (rval instanceof LDAPApproximation) {
- if (lval instanceof CharSequence)
- return ((LDAPApproximation) rval).isMatch((CharSequence) lval);
- if (lval instanceof Character || lval instanceof Number || lval instanceof Boolean)
- return ((LDAPApproximation) rval).isMatch(lval.toString());
- } else if (rval instanceof Class<?>) {
- Class<?> rclass = (Class<?>) rval;
- return lval instanceof Class<?> ? rclass.isAssignableFrom((Class<?>) lval) : rclass.isInstance(lval);
- }
- throw new IllegalArgumentException("Cannot match a " + lval.getClass().getName() + " with a " + rval.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- public int getExpressionType() {
- return TYPE_MATCHES;
- }
-
- public String getOperator() {
- return OPERATOR_MATCHES;
- }
-
- public void toLDAPString(StringBuffer buf) {
- if (!(rhs instanceof Literal))
- throw new UnsupportedOperationException();
-
- boolean escapeWild = true;
- Object val = rhs.evaluate(null);
- buf.append('(');
- appendLDAPAttribute(buf);
- if (val instanceof LDAPApproximation) {
- buf.append(getOperator());
- } else if (val instanceof SimplePattern) {
- buf.append('=');
- escapeWild = false;
- } else
- throw new UnsupportedOperationException();
- appendLDAPEscaped(buf, val.toString(), escapeWild);
- buf.append(')');
- }
-
- private static boolean equals(String a, String b, int startPos, int endPos) {
- if (endPos - startPos != b.length())
- return false;
-
- int bidx = 0;
- while (startPos < endPos)
- if (a.charAt(startPos++) != b.charAt(bidx++))
- return false;
- return true;
- }
-
- private static boolean matchLocaleVariants(Locale rval, String lval) {
- int uscore = lval.indexOf('_');
- if (uscore < 0)
- // No country and no variant. Just match language
- return lval.equals(rval.getLanguage());
-
- if (!equals(lval, rval.getLanguage(), 0, uscore))
- // Language part doesn't match. Give up.
- return false;
-
- // Check country and variant
- int countryStart = uscore + 1;
- uscore = lval.indexOf('_', countryStart);
- return uscore < 0 ? equals(lval, rval.getCountry(), countryStart, lval.length()) //
- : equals(lval, rval.getCountry(), countryStart, uscore) && equals(lval, rval.getVariant(), uscore + 1, lval.length());
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java
deleted file mode 100644
index d9a975cd0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Member.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.lang.reflect.*;
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * <p>An expression that performs member calls to obtain some value
- * from some object instance. It uses standard bean semantics so
- * that an attempt to obtain &quot;value&quot; will cause an
- * attempt to call <code>getValue()</code> and if no such method
- * exists, <code>isValue()</code> and if that doesn't work either,
- * <code>value()</code>.</p>
- */
-public abstract class Member extends Unary {
-
- public static final class DynamicMember extends Member {
- private static final String GET_PREFIX = "get"; //$NON-NLS-1$
- private static final String IS_PREFIX = "is"; //$NON-NLS-1$
- private static final Class<?>[] NO_ARG_TYPES = new Class[0];
-
- private Class<?> lastClass;
-
- private transient Method method;
- private transient String methodName;
-
- DynamicMember(Expression operand, String name) {
- super(operand, name, Expression.emptyArray);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return invoke(operand.evaluate(context));
- }
-
- public final Object invoke(Object self) {
- if (self instanceof IMemberProvider)
- return ((IMemberProvider) self).getMember(name);
-
- if (self == null)
- throw new IllegalArgumentException("Cannot access member \'" + name + "\' in null"); //$NON-NLS-1$//$NON-NLS-2$
-
- Class<?> c = self.getClass();
- synchronized (this) {
- if (methodName == null) {
- String n = name;
- if (!(n.startsWith(GET_PREFIX) || n.startsWith(IS_PREFIX)))
- n = GET_PREFIX + Character.toUpperCase(n.charAt(0)) + n.substring(1);
- methodName = n;
- }
- if (lastClass == null || !lastClass.isAssignableFrom(c)) {
- Method m;
- for (;;) {
- try {
- m = c.getMethod(methodName, NO_ARG_TYPES);
- if (!Modifier.isPublic(m.getModifiers()))
- throw new NoSuchMethodException();
- break;
- } catch (NoSuchMethodException e) {
- if (methodName.startsWith(GET_PREFIX))
- // Switch from using getXxx() to isXxx()
- methodName = IS_PREFIX + Character.toUpperCase(name.charAt(0)) + name.substring(1);
- else if (methodName.startsWith(IS_PREFIX))
- // Switch from using isXxx() to xxx()
- methodName = name;
- else
- throw new IllegalArgumentException("Cannot find a public member \'" + name + "\' in a " + self.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
- }
- }
-
- // Since we already checked that it's public. This will speed
- // up the calls a bit.
- m.setAccessible(true);
- lastClass = c;
- method = m;
- }
-
- Exception checked;
- try {
- return method.invoke(self, NO_ARGS);
- } catch (IllegalArgumentException e) {
- throw e;
- } catch (IllegalAccessException e) {
- checked = e;
- } catch (InvocationTargetException e) {
- Throwable cause = e.getTargetException();
- if (cause instanceof RuntimeException)
- throw (RuntimeException) cause;
- if (cause instanceof Error)
- throw (Error) cause;
- checked = (Exception) cause;
- }
- throw new RuntimeException("Problem invoking " + methodName + " on a " + self.getClass().getName(), checked); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- public static class LengthMember extends Member {
- private static final Integer ZERO = new Integer(0);
-
- LengthMember(Expression operand) {
- super(operand, "length", Expression.emptyArray); //$NON-NLS-1$
- }
-
- public Object evaluate(IEvaluationContext context) {
- int len = getLength(operand.evaluate(context));
- return len == 0 ? ZERO : new Integer(len);
- }
-
- int getLength(Object val) {
- if (val == null)
- return 0;
-
- if (val.getClass().isArray())
- return java.lang.reflect.Array.getLength(val);
-
- if (val instanceof Collection<?>)
- return ((Collection<?>) val).size();
-
- if (val instanceof String)
- return ((String) val).length();
-
- if (val instanceof Map<?, ?>)
- return ((Map<?, ?>) val).size();
-
- return 0;
- }
- }
-
- public static class EmptyMember extends LengthMember {
- EmptyMember(Expression operand) {
- super(operand);
- }
-
- public Object evaluate(IEvaluationContext context) {
- Object val = operand.evaluate(context);
- boolean empty = (val instanceof Iterator<?>) ? !((Iterator<?>) val).hasNext() : getLength(val) == 0;
- return Boolean.valueOf(empty);
- }
- }
-
- static final Object[] NO_ARGS = new Object[0];
-
- static Member createDynamicMember(Expression operand, String name) {
- return new DynamicMember(operand, name);
- }
-
- protected final Expression[] argExpressions;
-
- final String name;
-
- protected Member(Expression operand, String name, Expression[] args) {
- super(operand);
- this.name = name.intern();
- this.argExpressions = args;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- if (super.accept(visitor))
- for (int idx = 0; idx < argExpressions.length; ++idx)
- if (!argExpressions[idx].accept(visitor))
- return false;
- return true;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0) {
- cmp = name.compareTo(((Member) e).name);
- if (cmp == 0)
- cmp = compare(argExpressions, ((Member) e).argExpressions);
- }
- return cmp;
- }
-
- public boolean equals(Object o) {
- if (super.equals(o)) {
- Member mo = (Member) o;
- return name.equals(mo.name) && equals(argExpressions, mo.argExpressions);
- }
- return false;
- }
-
- public int getExpressionType() {
- return TYPE_MEMBER;
- }
-
- public String getName() {
- return name;
- }
-
- public String getOperator() {
- return OPERATOR_MEMBER;
- }
-
- public int getPriority() {
- return PRIORITY_MEMBER;
- }
-
- public int hashCode() {
- int result = 31 + name.hashCode();
- result = 31 * result + operand.hashCode();
- return 31 * result + hashCode(argExpressions);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- if (operand != rootVariable) {
- appendOperand(bld, rootVariable, operand, getPriority());
- bld.append('.');
- }
- bld.append(name);
- if (argExpressions.length > 0) {
- bld.append('(');
- elementsToString(bld, rootVariable, argExpressions);
- bld.append(')');
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java
deleted file mode 100644
index 0ab0d5bed..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/MemberProvider.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.expression.IMemberProvider;
-import org.osgi.framework.ServiceReference;
-
-public abstract class MemberProvider implements IMemberProvider {
-
- static class DictionaryMemberProvider extends MemberProvider {
- private final Dictionary<String, ? extends Object> dictionary;
-
- public DictionaryMemberProvider(Dictionary<String, ? extends Object> dictionary) {
- this.dictionary = dictionary;
- }
-
- public Object getMember(String memberName) {
- return dictionary.get(memberName);
- }
- }
-
- static class CIDictionaryMemberProvider extends DictionaryMemberProvider {
- public CIDictionaryMemberProvider(Dictionary<String, ? extends Object> dictionary) {
- super(lowerCaseKeys(dictionary));
- }
-
- @Override
- public Object getMember(String memberName) {
- return super.getMember(memberName == null ? null : memberName.toLowerCase());
- }
-
- private static Dictionary<String, ? extends Object> lowerCaseKeys(Dictionary<String, ? extends Object> dictionary) {
- boolean hasUpperCase = false;
- for (Enumeration<String> keys = dictionary.keys(); keys.hasMoreElements();) {
- String key = keys.nextElement();
- if (key.toLowerCase() != key) {
- hasUpperCase = true;
- break;
- }
- }
- if (!hasUpperCase)
- return dictionary;
-
- Dictionary<String, Object> lcMap = new Hashtable<String, Object>(dictionary.size());
- for (Enumeration<String> keys = dictionary.keys(); keys.hasMoreElements();) {
- String key = keys.nextElement();
- if (lcMap.put(key.toLowerCase(), dictionary.get(key)) != null)
- throw new IllegalArgumentException("case variants of the same key name: '" + key + '\''); //$NON-NLS-1$
- }
- return lcMap;
- }
- }
-
- static class MapMemberProvider extends MemberProvider {
- private final Map<String, ? extends Object> map;
-
- public MapMemberProvider(Map<String, ? extends Object> map) {
- this.map = map;
- }
-
- public Object getMember(String memberName) {
- return map.get(memberName);
- }
- }
-
- static class CIMapMemberProvider extends MapMemberProvider {
- public CIMapMemberProvider(Map<String, ? extends Object> map) {
- super(lowerCaseKeys(map));
- }
-
- @Override
- public Object getMember(String memberName) {
- return super.getMember(memberName == null ? null : memberName.toLowerCase());
- }
-
- private static Map<String, ? extends Object> lowerCaseKeys(Map<String, ? extends Object> map) {
- boolean hasUpperCase = false;
- Set<? extends Entry<String, ? extends Object>> entrySet = map.entrySet();
- for (Entry<String, ?> entry : entrySet) {
- String key = entry.getKey();
- String lowKey = key.toLowerCase();
- if (key != lowKey) {
- hasUpperCase = true;
- break;
- }
- }
- if (!hasUpperCase)
- return map;
-
- Map<String, Object> lcMap = new HashMap<String, Object>(map.size());
- for (Entry<String, ?> entry : entrySet) {
- if (lcMap.put(entry.getKey().toLowerCase(), entry.getValue()) != null)
- throw new IllegalArgumentException("case variants of the same key name: '" + entry.getKey() + '\''); //$NON-NLS-1$
- }
- return lcMap;
- }
- }
-
- static class ServiceRefMemberProvider extends MemberProvider {
- private final ServiceReference<?> serviceRef;
-
- public ServiceRefMemberProvider(ServiceReference<?> serviceRef) {
- this.serviceRef = serviceRef;
- }
-
- public Object getMember(String memberName) {
- return serviceRef.getProperty(memberName);
- }
- }
-
- private static final MemberProvider emptyProvider = create(CollectionUtils.emptyMap(), false);
-
- /**
- * Create a new member provider on the given value. The value can be an instance of a {@link Map}, {@link Dictionary},
- * or {@link ServiceReference}.
- * @param value The value that provides the members
- * @param caseInsensitive <code>true</code> if the members should be retrievable in a case insensitive way.
- * @return A member provided that is backed by <code>value</code>.
- */
- @SuppressWarnings("unchecked")
- public static MemberProvider create(Object value, boolean caseInsensitive) {
- if (value instanceof Map<?, ?>)
- return caseInsensitive ? new CIMapMemberProvider((Map<String, ?>) value) : new MapMemberProvider((Map<String, ?>) value);
- if (value instanceof Dictionary<?, ?>)
- return caseInsensitive ? new CIDictionaryMemberProvider((Dictionary<String, ?>) value) : new DictionaryMemberProvider((Dictionary<String, ?>) value);
- if (value instanceof ServiceReference)
- return new ServiceRefMemberProvider((ServiceReference<?>) value);
- throw new IllegalArgumentException();
- }
-
- public static MemberProvider emptyProvider() {
- return emptyProvider;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java
deleted file mode 100644
index da8491e92..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/NAry.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * The abstract baseclass for all N-ary expressions
- */
-public abstract class NAry extends Expression {
- public final Expression[] operands;
-
- protected NAry(Expression[] operands) {
- this.operands = operands;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- if (super.accept(visitor))
- for (int idx = 0; idx < operands.length; ++idx)
- if (!operands[idx].accept(visitor))
- return false;
- return true;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = compare(operands, ((NAry) e).operands);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && equals(operands, ((NAry) o).operands);
- }
-
- public abstract String getOperator();
-
- public int hashCode() {
- return hashCode(operands);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- appendOperand(bld, rootVariable, operands[0], getPriority());
- for (int idx = 1; idx < operands.length; ++idx) {
- bld.append(' ');
- bld.append(getOperator());
- bld.append(' ');
- appendOperand(bld, rootVariable, operands[idx], getPriority());
- }
- }
-
- int countAccessToEverything() {
- int cnt = 0;
- for (int idx = 0; idx < operands.length; ++idx)
- cnt += operands[idx].countAccessToEverything();
- return cnt;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java
deleted file mode 100644
index 5246859a3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Not.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that yields <code>true</code> when its operand does not.
- */
-final class Not extends Unary {
- Not(Expression operand) {
- super(operand);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return Boolean.valueOf(operand.evaluate(context) != Boolean.TRUE);
- }
-
- public int getExpressionType() {
- return TYPE_NOT;
- }
-
- public String getOperator() {
- return OPERATOR_NOT;
- }
-
- public int getPriority() {
- return PRIORITY_NOT;
- }
-
- public int hashCode() {
- return 3 * operand.hashCode();
- }
-
- public void toLDAPString(StringBuffer buf) {
- buf.append("(!"); //$NON-NLS-1$
- operand.toLDAPString(buf);
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java
deleted file mode 100644
index 32805042e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Or.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * n-ary OR operator. The full evaluation is <code>false</code> if none of its operands
- * evaluate to <code>true</code>.
- */
-final class Or extends NAry {
- public Or(Expression[] operands) {
- super(assertLength(operands, 2, OPERATOR_OR));
- }
-
- public Object evaluate(IEvaluationContext context) {
- for (int idx = 0; idx < operands.length; ++idx) {
- if (operands[idx].evaluate(context) == Boolean.TRUE)
- return Boolean.TRUE;
- }
- return Boolean.FALSE;
- }
-
- public int getExpressionType() {
- return TYPE_OR;
- }
-
- public String getOperator() {
- return OPERATOR_OR;
- }
-
- public int getPriority() {
- return PRIORITY_OR;
- }
-
- public void toLDAPString(StringBuffer buf) {
- buf.append("(|"); //$NON-NLS-1$
- for (int idx = 0; idx < operands.length; ++idx)
- operands[idx].toLDAPString(buf);
- buf.append(')');
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java
deleted file mode 100644
index b4c56346e..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Parameter.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * The abstract base class for the indexed and keyed parameters
- */
-public class Parameter extends Expression {
- final int position;
-
- Parameter(int position) {
- this.position = position;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = position - ((Parameter) e).position;
- return cmp;
- }
-
- public boolean equals(Object o) {
- if (o == this)
- return true;
- if (o == null)
- return false;
- return getClass() == o.getClass() && position == ((Parameter) o).position;
- }
-
- public Object evaluate(IEvaluationContext context) {
- return context.getParameter(position);
- }
-
- public int getExpressionType() {
- return TYPE_PARAMETER;
- }
-
- public String getOperator() {
- return OPERATOR_PARAMETER;
- }
-
- public int getPriority() {
- return PRIORITY_VARIABLE;
- }
-
- public int hashCode() {
- return 31 * (1 + position);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append('$');
- bld.append(position);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java
deleted file mode 100644
index 6da2c9301..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Pipe.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-public class Pipe extends NAry {
-
- private class NoIndexProvider implements IIndexProvider<Object> {
- private final IIndexProvider<?> indexProvider;
- private Everything<Object> everything;
-
- NoIndexProvider(IIndexProvider<?> indexProvider) { //
- this.indexProvider = indexProvider;
- }
-
- public IIndex<Object> getIndex(String memberName) {
- return null;
- }
-
- public Iterator<Object> everything() {
- return everything.getCopy();
- }
-
- public Object getManagedProperty(Object client, String memberName, Object key) {
- if (indexProvider != null)
- return indexProvider.getManagedProperty(client, memberName, key);
- if (client instanceof IInstallableUnit && memberName.equals(InstallableUnit.MEMBER_TRANSLATED_PROPERTIES)) {
- IInstallableUnit iu = (IInstallableUnit) client;
- return key instanceof KeyWithLocale ? iu.getProperty(((KeyWithLocale) key).getKey()) : iu.getProperty(key.toString());
- }
- return null;
- }
-
- @SuppressWarnings("unchecked")
- void setEverything(Everything<?> everything) {
- this.everything = (Everything<Object>) everything;
- }
- }
-
- public static Expression createPipe(Expression[] operands) {
- // We expect two types of expressions. The ones that act on THIS
- // i.e. boolean match expressions or the ones that act EVERYTHING
- // by iterating a collection.
- //
- // Our task here is to convert all booleans into collections so
- // that:
- // <boolean expression> becomes select(x | <boolean expression)
- //
- // If we find consecutive boolean expressions, we can actually
- // make one more optimization:
- // <expr1>, <expr2> becomes select(x | <expr1> && <expr2>)
-
- IExpressionFactory factory = ExpressionUtil.getFactory();
- ArrayList<Expression> pipeables = new ArrayList<Expression>();
- ArrayList<Expression> booleans = new ArrayList<Expression>();
- VariableFinder finder = new VariableFinder(ExpressionFactory.EVERYTHING);
- for (int idx = 0; idx < operands.length; ++idx) {
- Expression operand = operands[idx];
- finder.reset();
- operand.accept(finder);
- if (finder.isFound()) {
- if (!booleans.isEmpty()) {
- // Concatenate all found booleans.
- pipeables.add(makePipeableOfBooleans(factory, booleans));
- booleans.clear();
- }
- pipeables.add(operand);
- } else
- booleans.add(operand);
- }
-
- if (!booleans.isEmpty()) {
- if (pipeables.isEmpty())
- return normalizeBoolean(factory, booleans);
- pipeables.add(makePipeableOfBooleans(factory, booleans));
- }
- int top = pipeables.size();
- if (top > 1)
- return new Pipe(pipeables.toArray(new Expression[top]));
- return (top == 1) ? pipeables.get(0) : Literal.TRUE_CONSTANT;
- }
-
- private static Expression normalizeBoolean(IExpressionFactory factory, ArrayList<Expression> booleans) {
- int top = booleans.size();
- Expression boolExpr;
- if (top > 1)
- boolExpr = (Expression) factory.and(booleans.toArray(new IExpression[top]));
- else if (top == 1)
- boolExpr = booleans.get(0);
- else
- boolExpr = Literal.TRUE_CONSTANT;
- return boolExpr;
- }
-
- private static Expression makePipeableOfBooleans(IExpressionFactory factory, ArrayList<Expression> booleans) {
- Expression boolExpr = normalizeBoolean(factory, booleans);
- Object[] params = null;
- if (boolExpr instanceof MatchExpression<?>) {
- MatchExpression<?> matchExpr = (MatchExpression<?>) boolExpr;
- boolExpr = (Expression) matchExpr.getPredicate();
- params = matchExpr.getParameters();
- if (params.length == 0)
- params = null;
- }
- Expression expr = (Expression) factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, boolExpr));
- if (params != null)
- expr = new ContextExpression<Object>(expr, params);
- return expr;
- }
-
- private Pipe(Expression[] operands) {
- super(operands);
- }
-
- public int getExpressionType() {
- return TYPE_PIPE;
- }
-
- @Override
- public String getOperator() {
- return "pipe"; //$NON-NLS-1$
- }
-
- @Override
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- @Override
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Iterator<?> iterator = operands[0].evaluateAsIterator(context);
- if (operands.length == 0 || !iterator.hasNext())
- return iterator;
-
- Class<Object> elementClass = Object.class;
- Variable everything = ExpressionFactory.EVERYTHING;
- IEvaluationContext nextContext = EvaluationContext.create(context, everything);
- NoIndexProvider noIndexProvider = new NoIndexProvider(context.getIndexProvider());
- everything.setValue(nextContext, noIndexProvider);
- nextContext.setIndexProvider(noIndexProvider);
- for (int idx = 1; idx < operands.length; ++idx) {
- Expression expr = operands[idx];
- noIndexProvider.setEverything(new Everything<Object>(elementClass, iterator, expr));
- iterator = expr.evaluateAsIterator(nextContext);
- if (!iterator.hasNext())
- break;
- }
- return iterator;
- }
-
- @Override
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java
deleted file mode 100644
index 2c2619a01..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/QueryResult.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.lang.reflect.Array;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-/**
- * A result optimized for dealing with iterators returned from
- * expression evaluation.
- */
-public class QueryResult<T> implements IQueryResult<T> {
-
- private final IRepeatableIterator<T> iterator;
- private boolean firstUse = true;
-
- /**
- * Create an QueryResult based on the given iterator. The <code>oneShot</code> parameter
- * can be set to <code>true</code> if the returned instance is expected to be perused
- * only once. This will allow some optimizations since the result of the iteration doesn't
- * need to be copied in preparation for a second iteration.
- *
- * @param iterator The iterator to use as the result iterator.
- */
- public QueryResult(Iterator<T> iterator) {
- this.iterator = (iterator instanceof IRepeatableIterator<?>) ? (IRepeatableIterator<T>) iterator : RepeatableIterator.create(iterator);
- }
-
- public QueryResult(Collection<T> collection) {
- this.iterator = RepeatableIterator.create(collection);
- }
-
- public boolean isEmpty() {
- return !iterator.hasNext();
- }
-
- public Iterator<T> iterator() {
- if (firstUse) {
- firstUse = false;
- return iterator;
- }
- return iterator.getCopy();
- }
-
- @SuppressWarnings("unchecked")
- public T[] toArray(Class<T> clazz) {
- Object provider = iterator.getIteratorProvider();
- if (provider.getClass().isArray())
- return (T[]) provider;
-
- Collection<T> c = toUnmodifiableSet();
- return c.toArray((T[]) Array.newInstance(clazz, c.size()));
- }
-
- @SuppressWarnings("unchecked")
- public Set<T> toSet() {
- Object provider = iterator.getIteratorProvider();
- if (provider instanceof Collection<?>)
- return new HashSet<T>((Collection<T>) provider);
- if (provider instanceof IIndexProvider<?>)
- return iteratorToSet(((IIndexProvider<T>) provider).everything());
- if (provider.getClass().isArray()) {
- T[] elems = (T[]) provider;
- int idx = elems.length;
- HashSet<T> copy = new HashSet<T>(idx);
- while (--idx >= 0)
- copy.add(elems[idx]);
- return copy;
- }
- if (provider instanceof Map<?, ?>)
- return new HashSet<T>((Set<T>) ((Map<?, ?>) provider).entrySet());
- return iteratorToSet(iterator());
- }
-
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
- return query.perform(iterator());
- }
-
- @SuppressWarnings("unchecked")
- public Set<T> toUnmodifiableSet() {
- Object provider = iterator.getIteratorProvider();
- if (provider instanceof Set<?>)
- return Collections.unmodifiableSet((Set<T>) provider);
- if (provider instanceof Map<?, ?>)
- return Collections.unmodifiableSet((Set<T>) ((Map<?, ?>) provider).entrySet());
- return toSet();
- }
-
- private Set<T> iteratorToSet(Iterator<T> iter) {
- HashSet<T> set = new HashSet<T>();
- while (iter.hasNext())
- set.add(iter.next());
- return set;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java
deleted file mode 100644
index 068dc13d0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RangeFunction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
-/**
- * A function that creates a {@link VersionRange} from a String
- */
-public final class RangeFunction extends Function {
-
- public RangeFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_RANGE));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String;
- }
-
- Object createInstance(Object arg) {
- return new VersionRange((String) arg);
- }
-
- public String getOperator() {
- return KEYWORD_RANGE;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java
deleted file mode 100644
index 5f94dabd7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/RepeatableIterator.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-public class RepeatableIterator<T> implements IRepeatableIterator<T> {
- private final Collection<T> values;
- private final Iterator<T> iterator;
-
- @SuppressWarnings("unchecked")
- public static <T> IRepeatableIterator<T> create(Object unknown) {
- if (unknown.getClass().isArray())
- return create((T[]) unknown);
- if (unknown instanceof Iterator<?>)
- return create((Iterator<T>) unknown);
- if (unknown instanceof List<?>)
- return create((List<T>) unknown);
- if (unknown instanceof Collection<?>)
- return create((Collection<T>) unknown);
- if (unknown instanceof Map<?, ?>)
- return create((Set<T>) ((Map<?, ?>) unknown).entrySet());
- if (unknown instanceof IQueryResult<?>)
- return create((IQueryResult<T>) unknown);
- if (unknown instanceof IIndexProvider<?>)
- return create((IIndexProvider<T>) unknown);
- throw new IllegalArgumentException("Cannot convert a " + unknown.getClass().getName() + " into an iterator"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static <T> IRepeatableIterator<T> create(Iterator<T> iterator) {
- return iterator instanceof IRepeatableIterator<?> ? ((IRepeatableIterator<T>) iterator).getCopy() : new RepeatableIterator<T>(iterator);
- }
-
- public static <T> IRepeatableIterator<T> create(Collection<T> values) {
- return new RepeatableIterator<T>(values);
- }
-
- public static <T> IRepeatableIterator<T> create(IQueryResult<T> values) {
- return new QueryResultIterator<T>(values);
- }
-
- public static <T> IRepeatableIterator<T> create(T[] values) {
- return new ArrayIterator<T>(values);
- }
-
- public static <T> IRepeatableIterator<T> create(IIndexProvider<T> values) {
- return new IndexProviderIterator<T>(values);
- }
-
- RepeatableIterator(Iterator<T> iterator) {
- HashSet<T> v = new HashSet<T>();
- while (iterator.hasNext())
- v.add(iterator.next());
- values = v;
- this.iterator = v.iterator();
- }
-
- RepeatableIterator(Collection<T> values) {
- this.values = values;
- this.iterator = values.iterator();
- }
-
- public IRepeatableIterator<T> getCopy() {
- return new RepeatableIterator<T>(values);
- }
-
- public boolean hasNext() {
- return iterator.hasNext();
- }
-
- public T next() {
- return iterator.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public Object getIteratorProvider() {
- return values;
- }
-
- static class ArrayIterator<T> implements IRepeatableIterator<T> {
- private final T[] array;
- private int position = -1;
-
- public ArrayIterator(T[] array) {
- this.array = array;
- }
-
- public Object getIteratorProvider() {
- return array;
- }
-
- public boolean hasNext() {
- return position + 1 < array.length;
- }
-
- public T next() {
- if (++position >= array.length)
- throw new NoSuchElementException();
- return array[position];
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
-
- public IRepeatableIterator<T> getCopy() {
- return new ArrayIterator<T>(array);
- }
- }
-
- static class IndexProviderIterator<T> implements IRepeatableIterator<T> {
- private final IIndexProvider<T> indexProvider;
- private final Iterator<T> iterator;
-
- IndexProviderIterator(IIndexProvider<T> indexProvider) {
- this.iterator = indexProvider.everything();
- this.indexProvider = indexProvider;
- }
-
- public IRepeatableIterator<T> getCopy() {
- return new IndexProviderIterator<T>(indexProvider);
- }
-
- public Object getIteratorProvider() {
- return indexProvider;
- }
-
- public boolean hasNext() {
- return iterator.hasNext();
- }
-
- public T next() {
- return iterator.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- static class QueryResultIterator<T> implements IRepeatableIterator<T> {
- private final IQueryResult<T> queryResult;
-
- private final Iterator<T> iterator;
-
- QueryResultIterator(IQueryResult<T> queryResult) {
- this.queryResult = queryResult;
- this.iterator = queryResult.iterator();
- }
-
- public IRepeatableIterator<T> getCopy() {
- return new QueryResultIterator<T>(queryResult);
- }
-
- public Object getIteratorProvider() {
- return queryResult;
- }
-
- public boolean hasNext() {
- return iterator.hasNext();
- }
-
- public T next() {
- return iterator.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java
deleted file mode 100644
index 771dfeb03..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Select.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that yields a new collection consisting of all elements of the
- * <code>collection</code> for which the <code>filter</code> yields <code>true</code>.
- */
-final class Select extends CollectionFilter {
- Select(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- protected Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- return evaluateAsIterator(context, itor);
- }
-
- protected Iterator<?> evaluateAsIterator(final IEvaluationContext context, Iterator<?> itor) {
- return new MatchIteratorFilter<Object>(itor) {
- protected boolean isMatch(Object val) {
- lambda.getItemVariable().setValue(context, val);
- return lambda.evaluate(context) == Boolean.TRUE;
- }
- };
- }
-
- public int getExpressionType() {
- return TYPE_SELECT;
- }
-
- public String getOperator() {
- return KEYWORD_SELECT;
- }
-
- boolean isCollection() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java
deleted file mode 100644
index fc4bf5a19..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/SetFunction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.HashSet;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-public final class SetFunction extends Function {
-
- public SetFunction(Expression[] operands) {
- super(operands);
- }
-
- public Object evaluate(IEvaluationContext context) {
- HashSet<Object> result = new HashSet<Object>();
- for (int idx = 0; idx < operands.length; ++idx)
- result.add(operands[idx].evaluate(context));
- return result;
- }
-
- public String getOperator() {
- return KEYWORD_SET;
- }
-
- boolean isCollection() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java
deleted file mode 100644
index a35e3c760..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Traverse.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that will collect items recursively based on a <code>rule</code>.
- * The <code>rule</code> is applied for each item in the <code>collection</code> and
- * is supposed to create a new collection. The <code>rule</code> is then applied for each item
- * in the new collection. All items are collected into a set and items that are already
- * in that set will not be perused again. The set becomes the result of the traversal.
- */
-final class Traverse extends CollectionFilter {
-
- Traverse(Expression collection, LambdaExpression lambda) {
- super(collection, lambda);
- }
-
- public Object evaluate(IEvaluationContext context, Iterator<?> itor) {
- return evaluateAsIterator(context, itor);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context, Iterator<?> iterator) {
- HashSet<Object> collector = new HashSet<Object>();
- while (iterator.hasNext())
- traverse(collector, iterator.next(), context);
- return collector.iterator();
- }
-
- public int getExpressionType() {
- return TYPE_TRAVERSE;
- }
-
- public String getOperator() {
- return KEYWORD_TRAVERSE;
- }
-
- void traverse(Set<Object> collector, Object parent, IEvaluationContext context) {
- if (collector.add(parent)) {
- Variable variable = lambda.getItemVariable();
- context = EvaluationContext.create(context, variable);
- variable.setValue(context, parent);
- Iterator<?> subIterator = lambda.evaluateAsIterator(context);
- while (subIterator.hasNext())
- traverse(collector, subIterator.next(), context);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java
deleted file mode 100644
index 7299a0953..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unary.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionVisitor;
-
-/**
- * The abstract base class for all unary expressions
- */
-public abstract class Unary extends Expression {
- public final Expression operand;
-
- protected Unary(Expression operand) {
- this.operand = operand;
- }
-
- public boolean accept(IExpressionVisitor visitor) {
- return super.accept(visitor) && operand.accept(visitor);
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = operand.compareTo(((Unary) e).operand);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && operand.equals(((Unary) o).operand);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return operand.evaluate(context);
- }
-
- public int hashCode() {
- return operand.hashCode() * 3 + operand.getExpressionType();
- }
-
- public Expression getOperand() {
- return operand;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append(getOperator());
- appendOperand(bld, rootVariable, operand, getPriority());
- }
-
- int countAccessToEverything() {
- return operand.countAccessToEverything();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java
deleted file mode 100644
index dbf141b21..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/UnaryCollectionFilter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-abstract class UnaryCollectionFilter extends Unary {
-
- UnaryCollectionFilter(Expression collection) {
- super(collection);
- }
-
- public int hashCode() {
- return 5 * operand.hashCode();
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- if (operand instanceof Select) {
- Select select = (Select) operand;
- CollectionFilter.appendProlog(bld, rootVariable, select.operand, getOperator());
- appendOperand(bld, rootVariable, select.lambda, getPriority());
- } else
- CollectionFilter.appendProlog(bld, rootVariable, operand, getOperator());
- bld.append(')');
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java
deleted file mode 100644
index 8c731fd66..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Union.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import java.util.Set;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- */
-final class Union extends Binary {
- Union(Expression operand, Expression param) {
- super(operand, param);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- @SuppressWarnings("unchecked")
- Set<Object> resultSet = (Set<Object>) asSet(lhs.evaluate(context), true);
- Iterator<?> itor = rhs.evaluateAsIterator(context);
- while (itor.hasNext())
- resultSet.add(itor.next());
- return RepeatableIterator.create(resultSet);
- }
-
- public int getExpressionType() {
- return TYPE_UNION;
- }
-
- public String getOperator() {
- return KEYWORD_UNION;
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java
deleted file mode 100644
index 58d1e5b0a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Unique.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression that ensures that the elements of its collection is only returned
- * once throughout the whole query.
- */
-final class Unique extends Binary {
- /**
- * A UniqueIterator that uses a set as a discriminator, ensuring that
- * no element is returned twice.
- */
- static class UniqueIterator<T> extends MatchIteratorFilter<T> {
- final Set<T> uniqueSet;
-
- public UniqueIterator(Iterator<? extends T> iterator, Set<T> uniqueSet) {
- super(iterator);
- this.uniqueSet = uniqueSet;
- }
-
- protected boolean isMatch(T val) {
- synchronized (uniqueSet) {
- return uniqueSet.add(val);
- }
- }
- }
-
- Unique(Expression collection, Expression explicitCache) {
- super(collection, explicitCache);
- }
-
- public Object evaluate(IEvaluationContext context) {
- return evaluateAsIterator(context);
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object explicitCache = rhs.evaluate(context);
- Set<Object> uniqueSet;
- if (explicitCache == null)
- // No cache, we just ensure that the iteration is unique
- uniqueSet = new HashSet<Object>();
- else {
- if (!(explicitCache instanceof Set<?>))
- throw new IllegalArgumentException("Unique cache must be a java.util.Set"); //$NON-NLS-1$
- uniqueSet = (Set<Object>) explicitCache;
- }
- return new UniqueIterator<Object>(lhs.evaluateAsIterator(context), uniqueSet);
- }
-
- public int getExpressionType() {
- return TYPE_UNIQUE;
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- CollectionFilter.appendProlog(bld, rootVariable, lhs, getOperator());
- if (rhs != Literal.NULL_CONSTANT)
- appendOperand(bld, rootVariable, rhs, IExpressionConstants.PRIORITY_COMMA);
- bld.append(')');
- }
-
- public String getOperator() {
- return KEYWORD_UNIQUE;
- }
-
- public int getPriority() {
- return PRIORITY_COLLECTION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java
deleted file mode 100644
index dc26267fe..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/Variable.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-
-/**
- * An expression representing a variable stack in the current thread.
- */
-public class Variable extends Expression {
-
- private final String name;
-
- public Variable(String name) {
- this.name = name;
- }
-
- public int compareTo(Expression e) {
- int cmp = super.compareTo(e);
- if (cmp == 0)
- cmp = name.compareTo(((Variable) e).name);
- return cmp;
- }
-
- public boolean equals(Object o) {
- return super.equals(o) && name.equals(((Variable) o).name);
- }
-
- public final Object evaluate(IEvaluationContext context) {
- return context.getValue(this);
- }
-
- public Iterator<?> evaluateAsIterator(IEvaluationContext context) {
- Object value = context.getValue(this);
- if (value instanceof IRepeatableIterator<?>)
- return ((IRepeatableIterator<?>) value).getCopy();
-
- Iterator<?> itor = RepeatableIterator.create(value);
- setValue(context, itor);
- return itor;
- }
-
- public int getExpressionType() {
- return TYPE_VARIABLE;
- }
-
- public String getName() {
- return name;
- }
-
- public String getOperator() {
- return "<variable>"; //$NON-NLS-1$
- }
-
- public int getPriority() {
- return PRIORITY_VARIABLE;
- }
-
- public int hashCode() {
- return name.hashCode();
- }
-
- public final void setValue(IEvaluationContext context, Object value) {
- context.setValue(this, value);
- }
-
- public void toString(StringBuffer bld, Variable rootVariable) {
- bld.append(name);
- }
-
- int countAccessToEverything() {
- return this == ExpressionFactory.EVERYTHING ? 1 : 0;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java
deleted file mode 100644
index afd9099d4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/VersionFunction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- * A function that creates a {@link Version} from a string
- */
-public final class VersionFunction extends Function {
-
- public VersionFunction(Expression[] operands) {
- super(assertLength(operands, 1, 1, KEYWORD_VERSION));
- }
-
- boolean assertSingleArgumentClass(Object v) {
- return v instanceof String;
- }
-
- Object createInstance(Object arg) {
- return Version.create((String) arg);
- }
-
- public String getOperator() {
- return KEYWORD_VERSION;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java
deleted file mode 100644
index 827de3580..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/WrappedIQuery.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.query.IMatchQuery;
-import org.eclipse.equinox.p2.query.IQuery;
-
-public final class WrappedIQuery extends Function {
-
- /**
- * <p>The WrappedIQuery constructor takes an array with one or two arguments.
- * The first argument must evaluate to an instance of {@link IQuery}. The second
- * argument is optional. The following applies:</p><ul>
- * <li>If first argument evaluates to an instance of {@link IMatchQuery}, then
- * a provided second argument assumed to be the candidate to match. The
- * variable <code>this</code> will be used if no second argument is not provided.</li>
- * <li>For all other types of queries the second argument must evaluate
- * to an iterator. If it is not provided, it defaults to the variable
- * <code>everything</code>.
- * </ul>
- * @param operands
- */
- public WrappedIQuery(Expression[] operands) {
- super(assertLength(operands, 1, 2, KEYWORD_IQUERY));
- }
-
- @SuppressWarnings("unchecked")
- public Object evaluate(IEvaluationContext context) {
- Object query = operands[0].evaluate(context);
-
- if (query instanceof IMatchQuery<?>) {
- Object value = null;
- if (operands.length > 1)
- value = operands[1].evaluate(context);
- else
- value = ExpressionFactory.THIS.evaluate(context);
- return Boolean.valueOf(((IMatchQuery<Object>) query).isMatch(value));
- }
-
- if (!(query instanceof IQuery<?>))
- throw new IllegalArgumentException("iquery first argument must be an IQuery instance"); //$NON-NLS-1$
-
- Iterator<?> iterator = null;
- if (operands.length > 1)
- iterator = operands[1].evaluateAsIterator(context);
- else
- iterator = ExpressionFactory.EVERYTHING.evaluateAsIterator(context);
-
- return ((IQuery<Object>) query).perform((Iterator<Object>) iterator);
- }
-
- public String getOperator() {
- return KEYWORD_IQUERY;
- }
-
- @Override
- public boolean isReferenceTo(Variable variable) {
- Object firstOp = operands[0];
- if (firstOp instanceof Literal) {
- Object query = ((Literal) firstOp).value;
- return (query instanceof IMatchQuery<?>) ? variable == ExpressionFactory.THIS : variable == ExpressionFactory.EVERYTHING;
- }
- return false;
- }
-
- int countAccessToEverything() {
- return isReferenceTo(ExpressionFactory.EVERYTHING) ? 1 : 0;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
deleted file mode 100644
index f86a657a1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/ExpressionParser.java
+++ /dev/null
@@ -1,631 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression.parser;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.IExpressionConstants;
-import org.eclipse.equinox.internal.p2.metadata.expression.LDAPApproximation;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-public class ExpressionParser extends Stack<IExpression> implements IExpressionConstants, IExpressionParser {
- private static final long serialVersionUID = 5481439062356612378L;
-
- protected static final int TOKEN_OR = 1;
- protected static final int TOKEN_AND = 2;
-
- protected static final int TOKEN_EQUAL = 10;
- protected static final int TOKEN_NOT_EQUAL = 11;
- protected static final int TOKEN_LESS = 12;
- protected static final int TOKEN_LESS_EQUAL = 13;
- protected static final int TOKEN_GREATER = 14;
- protected static final int TOKEN_GREATER_EQUAL = 15;
- protected static final int TOKEN_MATCHES = 16;
-
- protected static final int TOKEN_NOT = 20;
- protected static final int TOKEN_DOT = 21;
- protected static final int TOKEN_COMMA = 22;
- protected static final int TOKEN_PIPE = 23;
- protected static final int TOKEN_DOLLAR = 24;
- protected static final int TOKEN_IF = 25;
- protected static final int TOKEN_ELSE = 26;
-
- protected static final int TOKEN_LP = 30;
- protected static final int TOKEN_RP = 31;
- protected static final int TOKEN_LB = 32;
- protected static final int TOKEN_RB = 33;
- protected static final int TOKEN_LC = 34;
- protected static final int TOKEN_RC = 35;
-
- protected static final int TOKEN_IDENTIFIER = 40;
- protected static final int TOKEN_LITERAL = 41;
-
- protected static final int TOKEN_NULL = 50;
- protected static final int TOKEN_TRUE = 51;
- protected static final int TOKEN_FALSE = 52;
-
- private static final int TOKEN_ALL = 60;
- private static final int TOKEN_EXISTS = 61;
-
- protected static final int TOKEN_END = 0;
- protected static final int TOKEN_ERROR = -1;
-
- protected static final Map<String, Integer> keywords;
- static {
- keywords = new HashMap<String, Integer>();
- keywords.put(KEYWORD_FALSE, new Integer(TOKEN_FALSE));
- keywords.put(KEYWORD_NULL, new Integer(TOKEN_NULL));
- keywords.put(KEYWORD_TRUE, new Integer(TOKEN_TRUE));
- keywords.put(KEYWORD_ALL, new Integer(TOKEN_ALL));
- keywords.put(KEYWORD_EXISTS, new Integer(TOKEN_EXISTS));
- }
-
- protected final IExpressionFactory factory;
-
- protected String expression;
- protected int tokenPos;
- protected int currentToken;
- protected int lastTokenPos;
- protected Object tokenValue;
- protected String rootVariable;
-
- public ExpressionParser(IExpressionFactory factory) {
- this.factory = factory;
- }
-
- public synchronized IExpression parse(String exprString) {
- expression = exprString;
- tokenPos = 0;
- currentToken = 0;
- tokenValue = null;
- IExpression thisVariable = factory.thisVariable();
- rootVariable = ExpressionUtil.getName(thisVariable);
- push(thisVariable);
- try {
- nextToken();
- IExpression expr = currentToken == TOKEN_END ? factory.constant(Boolean.TRUE) : parseCondition();
- assertToken(TOKEN_END);
- return expr;
- } finally {
- clear(); // pop all items
- }
- }
-
- public synchronized IExpression parseQuery(String exprString) {
- expression = exprString;
- tokenPos = 0;
- currentToken = 0;
- tokenValue = null;
- rootVariable = VARIABLE_EVERYTHING;
- IExpression everythingVariable = factory.variable(VARIABLE_EVERYTHING);
- push(everythingVariable);
- try {
- nextToken();
- IExpression expr = parseCondition();
- assertToken(TOKEN_END);
- return expr;
- } finally {
- clear(); // pop all items
- }
- }
-
- protected Map<String, Integer> keywordToTokenMap() {
- return keywords;
- }
-
- protected IExpression parseCondition() {
- // Just a hook in this parser. Conditions are not supported
- return parseOr();
- }
-
- protected IExpression parseOr() {
- IExpression expr = parseAnd();
- if (currentToken != TOKEN_OR)
- return expr;
-
- ArrayList<IExpression> exprs = new ArrayList<IExpression>();
- exprs.add(expr);
- do {
- nextToken();
- exprs.add(parseAnd());
- } while (currentToken == TOKEN_OR);
- return factory.or(exprs.toArray(new IExpression[exprs.size()]));
- }
-
- protected IExpression parseAnd() {
- IExpression expr = parseBinary();
- if (currentToken != TOKEN_AND)
- return expr;
-
- ArrayList<IExpression> exprs = new ArrayList<IExpression>();
- exprs.add(expr);
- do {
- nextToken();
- exprs.add(parseBinary());
- } while (currentToken == TOKEN_AND);
- return factory.and(exprs.toArray(new IExpression[exprs.size()]));
- }
-
- protected IExpression parseBinary() {
- IExpression expr = parseNot();
- for (;;) {
- switch (currentToken) {
- case TOKEN_OR :
- case TOKEN_AND :
- case TOKEN_RP :
- case TOKEN_RB :
- case TOKEN_RC :
- case TOKEN_COMMA :
- case TOKEN_IF :
- case TOKEN_ELSE :
- case TOKEN_END :
- break;
- case TOKEN_EQUAL :
- case TOKEN_NOT_EQUAL :
- case TOKEN_GREATER :
- case TOKEN_GREATER_EQUAL :
- case TOKEN_LESS :
- case TOKEN_LESS_EQUAL :
- case TOKEN_MATCHES :
- int realToken = currentToken;
- nextToken();
- IExpression rhs;
- if (realToken == TOKEN_MATCHES && currentToken == TOKEN_LITERAL && tokenValue instanceof String)
- rhs = factory.constant(new LDAPApproximation((String) tokenValue));
- else
- rhs = parseNot();
- switch (realToken) {
- case TOKEN_EQUAL :
- expr = factory.equals(expr, rhs);
- break;
- case TOKEN_NOT_EQUAL :
- expr = factory.not(factory.equals(expr, rhs));
- break;
- case TOKEN_GREATER :
- expr = factory.greater(expr, rhs);
- break;
- case TOKEN_GREATER_EQUAL :
- expr = factory.greaterEqual(expr, rhs);
- break;
- case TOKEN_LESS :
- expr = factory.less(expr, rhs);
- break;
- case TOKEN_LESS_EQUAL :
- expr = factory.lessEqual(expr, rhs);
- break;
- default :
- expr = factory.matches(expr, rhs);
- }
- continue;
- default :
- throw syntaxError();
- }
- break;
- }
- return expr;
- }
-
- protected IExpression parseNot() {
- if (currentToken == TOKEN_NOT) {
- nextToken();
- IExpression expr = parseNot();
- return factory.not(expr);
- }
- return parseCollectionExpression();
- }
-
- protected IExpression parseCollectionExpression() {
- IExpression expr = parseCollectionLHS();
- if (expr == null) {
- expr = parseMember();
- if (currentToken != TOKEN_DOT)
- return expr;
- nextToken();
- }
- for (;;) {
- int funcToken = currentToken;
- nextToken();
- assertToken(TOKEN_LP);
- nextToken();
- expr = parseCollectionRHS(expr, funcToken);
- if (currentToken != TOKEN_DOT)
- break;
- nextToken();
- }
- return expr;
- }
-
- protected IExpression parseCollectionLHS() {
- IExpression expr = null;
- switch (currentToken) {
- case TOKEN_EXISTS :
- case TOKEN_ALL :
- expr = getVariableOrRootMember(rootVariable);
- break;
- }
- return expr;
- }
-
- protected IExpression parseCollectionRHS(IExpression expr, int funcToken) {
- switch (funcToken) {
- case TOKEN_EXISTS :
- expr = factory.exists(expr, parseLambdaDefinition());
- break;
- case TOKEN_ALL :
- expr = factory.all(expr, parseLambdaDefinition());
- break;
- default :
- throw syntaxError();
- }
- return expr;
- }
-
- protected IExpression parseLambdaDefinition() {
- assertToken(TOKEN_IDENTIFIER);
- IExpression each = factory.variable((String) tokenValue);
- push(each);
- try {
- nextToken();
- assertToken(TOKEN_PIPE);
- nextToken();
- IExpression body = parseCondition();
- assertToken(TOKEN_RP);
- nextToken();
- return factory.lambda(each, body);
- } finally {
- pop();
- }
- }
-
- protected IExpression parseMember() {
- IExpression expr = parseUnary();
- String name;
- while (currentToken == TOKEN_DOT || currentToken == TOKEN_LB) {
- int savePos = tokenPos;
- int saveToken = currentToken;
- Object saveTokenValue = tokenValue;
- nextToken();
- if (saveToken == TOKEN_DOT) {
- switch (currentToken) {
- case TOKEN_IDENTIFIER :
- name = (String) tokenValue;
- nextToken();
- expr = factory.member(expr, name);
- break;
-
- default :
- tokenPos = savePos;
- currentToken = saveToken;
- tokenValue = saveTokenValue;
- return expr;
- }
- } else {
- IExpression atExpr = parseMember();
- assertToken(TOKEN_RB);
- nextToken();
- expr = factory.at(expr, atExpr);
- }
- }
- return expr;
- }
-
- protected IExpression parseUnary() {
- IExpression expr;
- switch (currentToken) {
- case TOKEN_LP :
- nextToken();
- expr = parseCondition();
- assertToken(TOKEN_RP);
- nextToken();
- break;
- case TOKEN_LITERAL :
- expr = factory.constant(tokenValue);
- nextToken();
- break;
- case TOKEN_IDENTIFIER :
- expr = getVariableOrRootMember((String) tokenValue);
- nextToken();
- break;
- case TOKEN_NULL :
- expr = factory.constant(null);
- nextToken();
- break;
- case TOKEN_TRUE :
- expr = factory.constant(Boolean.TRUE);
- nextToken();
- break;
- case TOKEN_FALSE :
- expr = factory.constant(Boolean.FALSE);
- nextToken();
- break;
- case TOKEN_DOLLAR :
- expr = parseParameter();
- break;
- default :
- throw syntaxError();
- }
- return expr;
- }
-
- private IExpression parseParameter() {
- if (currentToken == TOKEN_DOLLAR) {
- nextToken();
- if (currentToken == TOKEN_LITERAL && tokenValue instanceof Integer) {
- IExpression param = factory.indexedParameter(((Integer) tokenValue).intValue());
- nextToken();
- return param;
- }
- }
- throw syntaxError();
- }
-
- protected IExpression[] parseArray() {
- IExpression expr = parseCondition();
- if (currentToken != TOKEN_COMMA)
- return new IExpression[] {expr};
-
- ArrayList<IExpression> operands = new ArrayList<IExpression>();
- operands.add(expr);
- do {
- nextToken();
- if (currentToken == TOKEN_LC)
- // We don't allow lambdas in the array
- break;
- operands.add(parseCondition());
- } while (currentToken == TOKEN_COMMA);
- return operands.toArray(new IExpression[operands.size()]);
- }
-
- protected void assertToken(int token) {
- if (currentToken != token)
- throw syntaxError();
- }
-
- protected IExpression getVariableOrRootMember(String id) {
- int idx = size();
- while (--idx >= 0) {
- IExpression v = get(idx);
- if (id.equals(v.toString()))
- return v;
- }
-
- if (rootVariable == null || rootVariable.equals(id))
- throw syntaxError("No such variable: " + id); //$NON-NLS-1$
-
- return factory.member(getVariableOrRootMember(rootVariable), id);
- }
-
- protected void nextToken() {
- tokenValue = null;
- int top = expression.length();
- char c = 0;
- while (tokenPos < top) {
- c = expression.charAt(tokenPos);
- if (!Character.isWhitespace(c))
- break;
- ++tokenPos;
- }
- if (tokenPos >= top) {
- lastTokenPos = top;
- currentToken = TOKEN_END;
- return;
- }
-
- lastTokenPos = tokenPos;
- switch (c) {
- case '|' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '|') {
- tokenValue = OPERATOR_OR;
- currentToken = TOKEN_OR;
- tokenPos += 2;
- } else {
- currentToken = TOKEN_PIPE;
- ++tokenPos;
- }
- break;
-
- case '&' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '&') {
- tokenValue = OPERATOR_AND;
- currentToken = TOKEN_AND;
- tokenPos += 2;
- } else
- currentToken = TOKEN_ERROR;
- break;
-
- case '=' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_EQUALS;
- currentToken = TOKEN_EQUAL;
- tokenPos += 2;
- } else
- currentToken = TOKEN_ERROR;
- break;
-
- case '!' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_NOT_EQUALS;
- currentToken = TOKEN_NOT_EQUAL;
- tokenPos += 2;
- } else {
- currentToken = TOKEN_NOT;
- ++tokenPos;
- }
- break;
-
- case '~' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_MATCHES;
- currentToken = TOKEN_MATCHES;
- tokenPos += 2;
- } else
- currentToken = TOKEN_ERROR;
- break;
-
- case '>' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_GT_EQUAL;
- currentToken = TOKEN_GREATER_EQUAL;
- tokenPos += 2;
- } else {
- currentToken = TOKEN_GREATER;
- ++tokenPos;
- }
- break;
-
- case '<' :
- if (tokenPos + 1 < top && expression.charAt(tokenPos + 1) == '=') {
- tokenValue = OPERATOR_LT_EQUAL;
- currentToken = TOKEN_LESS_EQUAL;
- tokenPos += 2;
- } else {
- currentToken = TOKEN_LESS;
- ++tokenPos;
- }
- break;
-
- case '?' :
- currentToken = TOKEN_IF;
- ++tokenPos;
- break;
-
- case ':' :
- currentToken = TOKEN_ELSE;
- ++tokenPos;
- break;
-
- case '.' :
- currentToken = TOKEN_DOT;
- ++tokenPos;
- break;
-
- case '$' :
- currentToken = TOKEN_DOLLAR;
- ++tokenPos;
- break;
-
- case '{' :
- currentToken = TOKEN_LC;
- ++tokenPos;
- break;
-
- case '}' :
- currentToken = TOKEN_RC;
- ++tokenPos;
- break;
-
- case '(' :
- currentToken = TOKEN_LP;
- ++tokenPos;
- break;
-
- case ')' :
- currentToken = TOKEN_RP;
- ++tokenPos;
- break;
-
- case '[' :
- currentToken = TOKEN_LB;
- ++tokenPos;
- break;
-
- case ']' :
- currentToken = TOKEN_RB;
- ++tokenPos;
- break;
-
- case ',' :
- currentToken = TOKEN_COMMA;
- ++tokenPos;
- break;
-
- case '"' :
- case '\'' :
- parseDelimitedString(c);
- break;
-
- case '/' :
- parseDelimitedString(c);
- if (currentToken == TOKEN_LITERAL)
- tokenValue = SimplePattern.compile((String) tokenValue);
- break;
-
- default :
- if (Character.isDigit(c)) {
- int start = tokenPos++;
- while (tokenPos < top && Character.isDigit(expression.charAt(tokenPos)))
- ++tokenPos;
- tokenValue = Integer.valueOf(expression.substring(start, tokenPos));
- currentToken = TOKEN_LITERAL;
- break;
- }
- if (Character.isJavaIdentifierStart(c)) {
- int start = tokenPos++;
- while (tokenPos < top && Character.isJavaIdentifierPart(expression.charAt(tokenPos)))
- ++tokenPos;
- String word = expression.substring(start, tokenPos);
- Integer token = keywordToTokenMap().get(word);
- if (token == null)
- currentToken = TOKEN_IDENTIFIER;
- else
- currentToken = token.intValue();
- tokenValue = word;
- break;
- }
- throw syntaxError();
- }
- }
-
- protected void popVariable() {
- if (isEmpty())
- throw syntaxError();
- pop();
- }
-
- protected ExpressionParseException syntaxError() {
- Object tv = tokenValue;
- if (tv == null) {
- if (lastTokenPos >= expression.length())
- return syntaxError("Unexpected end of expression"); //$NON-NLS-1$
- tv = expression.substring(lastTokenPos, lastTokenPos + 1);
- }
- return syntaxError("Unexpected token \"" + tv + '"'); //$NON-NLS-1$
- }
-
- protected ExpressionParseException syntaxError(String message) {
- return new ExpressionParseException(expression, message, tokenPos);
- }
-
- private void parseDelimitedString(char delim) {
- int start = ++tokenPos;
- StringBuffer buf = new StringBuffer();
- int top = expression.length();
- while (tokenPos < top) {
- char ec = expression.charAt(tokenPos);
- if (ec == delim)
- break;
- if (ec == '\\') {
- if (++tokenPos == top)
- break;
- ec = expression.charAt(tokenPos);
- }
- buf.append(ec);
- ++tokenPos;
- }
- if (tokenPos == top) {
- tokenPos = start - 1;
- currentToken = TOKEN_ERROR;
- } else {
- ++tokenPos;
- tokenValue = buf.toString();
- currentToken = TOKEN_LITERAL;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java
deleted file mode 100644
index 1878fe7b1..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/LDAPFilterParser.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression.parser;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.Messages;
-import org.eclipse.equinox.internal.p2.metadata.expression.IExpressionConstants;
-import org.eclipse.equinox.internal.p2.metadata.expression.LDAPApproximation;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Parser class for OSGi filter strings. This class parses the complete filter string and builds a tree of Filter
- * objects rooted at the parent.
- */
-public class LDAPFilterParser {
- @SuppressWarnings("serial")
- private static final Map<String, IFilterExpression> filterCache = Collections.<String, IFilterExpression> synchronizedMap(new LinkedHashMap<String, IFilterExpression>() {
- public boolean removeEldestEntry(Map.Entry<String, IFilterExpression> expr) {
- return size() > 64;
- }
- });
-
- private final IExpressionFactory factory;
-
- private final IExpression self;
-
- private final StringBuffer sb = new StringBuffer();
-
- private String filterString;
-
- private int position;
-
- public LDAPFilterParser(IExpressionFactory factory) {
- this.factory = factory;
- self = factory.variable(IExpressionConstants.VARIABLE_THIS);
- position = 0;
- }
-
- public IFilterExpression parse(String filterStr) {
- IFilterExpression filter = filterCache.get(filterStr);
- if (filter != null)
- return filter;
-
- synchronized (this) {
- filterString = filterStr;
- position = 0;
- try {
- IExpression expr = parseFilter();
- if (position != filterString.length())
- throw syntaxException(Messages.filter_trailing_characters);
- filter = factory.filterExpression(expr);
- filterCache.put(filterStr, filter);
- return filter;
- } catch (StringIndexOutOfBoundsException e) {
- throw syntaxException(Messages.filter_premature_end);
- }
- }
- }
-
- private IExpression parseAnd() {
- skipWhiteSpace();
- char c = filterString.charAt(position);
- if (c != '(')
- throw syntaxException(Messages.filter_missing_leftparen);
-
- ArrayList<IExpression> operands = new ArrayList<IExpression>();
- while (c == '(') {
- IExpression child = parseFilter();
- if (!operands.contains(child))
- operands.add(child);
- c = filterString.charAt(position);
- }
- // int sz = operands.size();
- // return sz == 1 ? operands.get(0) : factory.and(operands.toArray(new IExpression[sz]));
- return factory.normalize(operands, IExpression.TYPE_AND);
- }
-
- private IExpression parseAttr() {
- skipWhiteSpace();
-
- int begin = position;
- int end = position;
-
- char c = filterString.charAt(begin);
- while (!(c == '~' || c == '<' || c == '>' || c == '=' || c == '(' || c == ')')) {
- position++;
- if (!Character.isWhitespace(c))
- end = position;
- c = filterString.charAt(position);
- }
- if (end == begin)
- throw syntaxException(Messages.filter_missing_attr);
- return factory.member(self, filterString.substring(begin, end));
- }
-
- private IExpression parseFilter() {
- IExpression filter;
- skipWhiteSpace();
-
- if (filterString.charAt(position) != '(')
- throw syntaxException(Messages.filter_missing_leftparen);
-
- position++;
- filter = parseFiltercomp();
-
- skipWhiteSpace();
-
- if (filterString.charAt(position) != ')')
- throw syntaxException(Messages.filter_missing_rightparen);
-
- position++;
- skipWhiteSpace();
-
- return filter;
- }
-
- private IExpression parseFiltercomp() {
- skipWhiteSpace();
-
- char c = filterString.charAt(position);
-
- switch (c) {
- case '&' : {
- position++;
- return parseAnd();
- }
- case '|' : {
- position++;
- return parseOr();
- }
- case '!' : {
- position++;
- return parseNot();
- }
- }
- return parseItem();
- }
-
- private IExpression parseItem() {
- IExpression attr = parseAttr();
-
- skipWhiteSpace();
- String value;
-
- boolean[] hasWild = {false};
- char c = filterString.charAt(position);
- switch (c) {
- case '~' :
- case '>' :
- case '<' :
- if (filterString.charAt(position + 1) != '=')
- throw syntaxException(Messages.filter_invalid_operator);
- position += 2;
- int savePos = position;
- value = parseValue(hasWild);
- if (hasWild[0]) {
- // Unescaped wildcard found. This is not legal for the given operator
- position = savePos;
- throw syntaxException(Messages.filter_invalid_value);
- }
- switch (c) {
- case '>' :
- return factory.greaterEqual(attr, factory.constant(value));
- case '<' :
- return factory.lessEqual(attr, factory.constant(value));
- }
- return factory.matches(attr, factory.constant(new LDAPApproximation(value)));
- case '=' :
- position++;
- value = parseValue(hasWild);
- return hasWild[0] ? factory.matches(attr, factory.constant(SimplePattern.compile(value))) : factory.equals(attr, factory.constant(value));
- }
- throw syntaxException(Messages.filter_invalid_operator);
- }
-
- private IExpression parseNot() {
- skipWhiteSpace();
-
- if (filterString.charAt(position) != '(')
- throw syntaxException(Messages.filter_missing_leftparen);
- return factory.not(parseFilter());
- }
-
- private IExpression parseOr() {
- skipWhiteSpace();
- char c = filterString.charAt(position);
- if (c != '(')
- throw syntaxException(Messages.filter_missing_leftparen);
-
- ArrayList<IExpression> operands = new ArrayList<IExpression>();
- while (c == '(') {
- IExpression child = parseFilter();
- operands.add(child);
- c = filterString.charAt(position);
- }
- // int sz = operands.size();
- // return sz == 1 ? operands.get(0) : factory.or(operands.toArray(new IExpression[sz]));
- return factory.normalize(operands, IExpression.TYPE_OR);
- }
-
- private static int hexValue(char c) {
- int v;
- if (c <= '9')
- v = c - '0';
- else if (c <= 'F')
- v = (c - 'A') + 10;
- else
- v = (c - 'a') + 10;
- return v;
- }
-
- private String parseValue(boolean[] hasWildBin) {
- sb.setLength(0);
- int savePos = position;
- boolean hasEscapedWild = false;
- parseloop: while (true) {
- char c = filterString.charAt(position);
- switch (c) {
- case '*' :
- if (hasEscapedWild && !hasWildBin[0]) {
- // We must redo the parse.
- position = savePos;
- hasWildBin[0] = true;
- return parseValue(hasWildBin);
- }
- hasWildBin[0] = true;
- sb.append(c);
- position++;
- break;
-
- case ')' :
- break parseloop;
-
- case '(' :
- throw syntaxException(Messages.filter_invalid_value);
-
- case '\\' :
- c = filterString.charAt(++position);
- if (c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f' && position + 1 < filterString.length()) {
- char nc = filterString.charAt(position + 1);
- if (nc >= '0' && nc <= '9' || nc >= 'A' && nc <= 'F' || nc >= 'a' && nc <= 'f') {
- // Assume proper \xx escape where xx are hex digits
- ++position;
- c = (char) (((hexValue(c) << 4) & 0xf0) | (hexValue(nc) & 0x0f));
- if (c == '*' && hasWildBin != null) {
- hasEscapedWild = true;
- if (hasWildBin[0])
- sb.append('\\');
- }
- }
- }
- /* fall through into default */
-
- default :
- sb.append(c);
- position++;
- break;
- }
- }
- if (sb.length() == 0)
- throw syntaxException(Messages.filter_missing_value);
- return sb.toString();
- }
-
- private void skipWhiteSpace() {
- for (int top = filterString.length(); position < top; ++position)
- if (!Character.isWhitespace(filterString.charAt(position)))
- break;
- }
-
- protected ExpressionParseException syntaxException(String message) {
- return new ExpressionParseException(NLS.bind(message, filterString, Integer.toString(position)));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java
deleted file mode 100644
index b82dc651a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/expression/parser/QLParser.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.expression.parser;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.Variable;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.expression.IExpressionFactory;
-
-public class QLParser extends ExpressionParser {
- private static final long serialVersionUID = 882034383978853143L;
-
- private static final int TOKEN_ANY = 42;
-
- private static final int TOKEN_LATEST = 70;
- private static final int TOKEN_LIMIT = 71;
- private static final int TOKEN_FIRST = 72;
- private static final int TOKEN_FLATTEN = 73;
- private static final int TOKEN_UNIQUE = 74;
- private static final int TOKEN_SELECT = 75;
- private static final int TOKEN_COLLECT = 76;
- private static final int TOKEN_TRAVERSE = 77;
- private static final int TOKEN_INTERSECT = 78;
- private static final int TOKEN_UNION = 79;
-
- private static final Map<String, Integer> qlKeywords;
- static {
- qlKeywords = new HashMap<String, Integer>();
- qlKeywords.putAll(keywords);
- qlKeywords.put(KEYWORD_COLLECT, new Integer(TOKEN_COLLECT));
- qlKeywords.put(KEYWORD_FALSE, new Integer(TOKEN_FALSE));
- qlKeywords.put(KEYWORD_FIRST, new Integer(TOKEN_FIRST));
- qlKeywords.put(KEYWORD_FLATTEN, new Integer(TOKEN_FLATTEN));
- qlKeywords.put(KEYWORD_LATEST, new Integer(TOKEN_LATEST));
- qlKeywords.put(KEYWORD_LIMIT, new Integer(TOKEN_LIMIT));
- qlKeywords.put(KEYWORD_NULL, new Integer(TOKEN_NULL));
- qlKeywords.put(KEYWORD_SELECT, new Integer(TOKEN_SELECT));
- qlKeywords.put(KEYWORD_TRAVERSE, new Integer(TOKEN_TRAVERSE));
- qlKeywords.put(KEYWORD_TRUE, new Integer(TOKEN_TRUE));
- qlKeywords.put(KEYWORD_UNIQUE, new Integer(TOKEN_UNIQUE));
- qlKeywords.put(KEYWORD_INTERSECT, new Integer(TOKEN_INTERSECT));
- qlKeywords.put(KEYWORD_UNION, new Integer(TOKEN_UNION));
- qlKeywords.put(OPERATOR_EACH, new Integer(TOKEN_ANY));
- }
-
- public QLParser(IExpressionFactory factory) {
- super(factory);
- }
-
- protected Map<String, Integer> keywordToTokenMap() {
- return qlKeywords;
- }
-
- protected IExpression parseCondition() {
- IExpression expr = parseOr();
- if (currentToken == TOKEN_IF) {
- nextToken();
- IExpression ifTrue = parseOr();
- assertToken(TOKEN_ELSE);
- nextToken();
- expr = factory.condition(expr, ifTrue, parseOr());
- }
- return expr;
- }
-
- protected IExpression parseMember() {
- IExpression expr = parseFunction();
- String name;
- while (currentToken == TOKEN_DOT || currentToken == TOKEN_LB) {
- int savePos = tokenPos;
- int saveToken = currentToken;
- Object saveTokenValue = tokenValue;
- nextToken();
- if (saveToken == TOKEN_DOT) {
- switch (currentToken) {
- case TOKEN_IDENTIFIER :
- name = (String) tokenValue;
- nextToken();
- if (currentToken == TOKEN_LP) {
- nextToken();
- IExpression[] callArgs = parseArray();
- assertToken(TOKEN_RP);
- nextToken();
- expr = factory.memberCall(expr, name, callArgs);
- } else
- expr = factory.member(expr, name);
- break;
-
- default :
- tokenPos = savePos;
- currentToken = saveToken;
- tokenValue = saveTokenValue;
- return expr;
- }
- } else {
- IExpression atExpr = parseMember();
- assertToken(TOKEN_RB);
- nextToken();
- expr = factory.at(expr, atExpr);
- }
- }
- return expr;
- }
-
- protected IExpression parseFunction() {
- if (currentToken == TOKEN_IDENTIFIER) {
- Object function = factory.getFunctionMap().get(tokenValue);
- if (function != null) {
- int savePos = tokenPos;
- int saveToken = currentToken;
- Object saveTokenValue = tokenValue;
-
- nextToken();
- if (currentToken == TOKEN_LP) {
- nextToken();
- IExpression[] args = currentToken == TOKEN_RP ? IExpressionFactory.NO_ARGS : parseArray();
- assertToken(TOKEN_RP);
- nextToken();
- return factory.function(function, args);
- }
- tokenPos = savePos;
- currentToken = saveToken;
- tokenValue = saveTokenValue;
- }
- }
- return parseUnary();
- }
-
- protected IExpression parseCollectionLHS() {
- IExpression expr;
- switch (currentToken) {
- case TOKEN_SELECT :
- case TOKEN_COLLECT :
- case TOKEN_FIRST :
- case TOKEN_FLATTEN :
- case TOKEN_TRAVERSE :
- case TOKEN_LATEST :
- case TOKEN_LIMIT :
- case TOKEN_INTERSECT :
- case TOKEN_UNION :
- case TOKEN_UNIQUE :
- expr = getVariableOrRootMember(rootVariable);
- break;
- default :
- expr = super.parseCollectionLHS();
- }
- return expr;
- }
-
- protected IExpression parseCollectionRHS(IExpression expr, int funcToken) {
- switch (funcToken) {
- case TOKEN_SELECT :
- expr = factory.select(expr, parseLambdaDefinition());
- break;
- case TOKEN_COLLECT :
- expr = factory.collect(expr, parseLambdaDefinition());
- break;
- case TOKEN_FIRST :
- expr = factory.first(expr, parseLambdaDefinition());
- break;
- case TOKEN_TRAVERSE :
- expr = factory.traverse(expr, parseLambdaDefinition());
- break;
- case TOKEN_LATEST :
- if (currentToken == TOKEN_RP) {
- expr = factory.latest(expr);
- assertToken(TOKEN_RP);
- nextToken();
- } else
- expr = factory.latest(factory.select(expr, parseLambdaDefinition()));
- break;
- case TOKEN_FLATTEN :
- if (currentToken == TOKEN_RP) {
- expr = factory.flatten(expr);
- assertToken(TOKEN_RP);
- nextToken();
- } else
- expr = factory.flatten(factory.select(expr, parseLambdaDefinition()));
- break;
- case TOKEN_LIMIT :
- expr = factory.limit(expr, parseCondition());
- assertToken(TOKEN_RP);
- nextToken();
- break;
- case TOKEN_INTERSECT :
- expr = factory.intersect(expr, parseCondition());
- assertToken(TOKEN_RP);
- nextToken();
- break;
- case TOKEN_UNION :
- expr = factory.union(expr, parseCondition());
- assertToken(TOKEN_RP);
- nextToken();
- break;
- case TOKEN_UNIQUE :
- if (currentToken == TOKEN_RP)
- expr = factory.unique(expr, factory.constant(null));
- else {
- expr = factory.unique(expr, parseMember());
- assertToken(TOKEN_RP);
- nextToken();
- }
- break;
- default :
- expr = super.parseCollectionRHS(expr, funcToken);
- }
- return expr;
- }
-
- protected IExpression parseUnary() {
- IExpression expr;
- switch (currentToken) {
- case TOKEN_LB :
- nextToken();
- expr = factory.array(parseArray());
- assertToken(TOKEN_RB);
- nextToken();
- break;
- case TOKEN_ANY :
- expr = factory.variable(OPERATOR_EACH);
- nextToken();
- break;
- default :
- expr = super.parseUnary();
- }
- return expr;
- }
-
- protected IExpression parseLambdaDefinition() {
- boolean endingRC = false;
- int anyIndex = -1;
- IExpression[] initializers = IExpressionFactory.NO_ARGS;
- IExpression[] variables;
- if (currentToken == TOKEN_LC) {
- // Lambda starts without currying.
- endingRC = true;
- nextToken();
- anyIndex = 0;
- variables = parseVariables();
- if (variables == null)
- // empty means no pipe at the end.
- throw syntaxError();
- } else {
- anyIndex = 0;
- variables = parseVariables();
- if (variables == null) {
- anyIndex = -1;
- initializers = parseArray();
- assertToken(TOKEN_LC);
- nextToken();
- endingRC = true;
- for (int idx = 0; idx < initializers.length; ++idx) {
- IExpression initializer = initializers[idx];
- if (initializer instanceof Variable && OPERATOR_EACH.equals(initializer.toString())) {
- if (anyIndex == -1)
- anyIndex = idx;
- else
- anyIndex = -1; // Second Each. This is illegal
- break;
- }
- }
- if (anyIndex == -1)
- throw new IllegalArgumentException("Exaclty one _ must be present among the currying expressions"); //$NON-NLS-1$
-
- variables = parseVariables();
- if (variables == null)
- // empty means no pipe at the end.
- throw syntaxError();
- }
-
- }
- nextToken();
- IExpression body = parseCondition();
- if (endingRC) {
- assertToken(TOKEN_RC);
- nextToken();
- }
-
- assertToken(TOKEN_RP);
- nextToken();
- IExpression each;
- IExpression[] assignments;
- if (initializers.length == 0) {
- if (variables.length != 1)
- throw new IllegalArgumentException("Must have exactly one variable unless currying is used"); //$NON-NLS-1$
- each = variables[0];
- assignments = IExpressionFactory.NO_ARGS;
- } else {
- if (initializers.length != variables.length)
- throw new IllegalArgumentException("Number of currying expressions and variables differ"); //$NON-NLS-1$
-
- if (initializers.length == 1) {
- // This is just a map from _ to some variable
- each = variables[0];
- assignments = IExpressionFactory.NO_ARGS;
- } else {
- int idx;
- each = variables[anyIndex];
- assignments = new IExpression[initializers.length - 1];
- for (idx = 0; idx < anyIndex; ++idx)
- assignments[idx] = factory.assignment(variables[idx], initializers[idx]);
- for (++idx; idx < initializers.length; ++idx)
- assignments[idx] = factory.assignment(variables[idx], initializers[idx]);
- }
- }
- return factory.lambda(each, assignments, body);
- }
-
- private IExpression[] parseVariables() {
- int savePos = tokenPos;
- int saveToken = currentToken;
- Object saveTokenValue = tokenValue;
- List<Object> ids = null;
- while (currentToken == TOKEN_IDENTIFIER) {
- if (ids == null)
- ids = new ArrayList<Object>();
- ids.add(tokenValue);
- nextToken();
- if (currentToken == TOKEN_COMMA) {
- nextToken();
- continue;
- }
- break;
- }
-
- if (currentToken != TOKEN_PIPE) {
- // This was not a variable list
- tokenPos = savePos;
- currentToken = saveToken;
- tokenValue = saveTokenValue;
- return null;
- }
-
- if (ids == null)
- // Empty list but otherwise OK
- return IExpressionFactory.NO_ARGS;
-
- int top = ids.size();
- IExpression[] result = new IExpression[top];
- for (int idx = 0; idx < top; ++idx) {
- String name = (String) ids.get(idx);
- IExpression var = factory.variable(name);
- push(var);
- result[idx] = var;
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java
deleted file mode 100644
index 53943c842..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CapabilityIndex.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * An in-memory implementation of a CapabilityIndex based on a Map.
- */
-@SuppressWarnings("unchecked")
-public class CapabilityIndex extends Index<IInstallableUnit> {
-
- private final Map<String, Object> capabilityMap;
-
- public CapabilityIndex(Iterator<IInstallableUnit> itor) {
- HashMap<String, Object> index = new HashMap<String, Object>(300);
- while (itor.hasNext()) {
- IInstallableUnit iu = itor.next();
- Collection<IProvidedCapability> pcs = iu.getProvidedCapabilities();
- for (IProvidedCapability pc : pcs) {
- String name = pc.getName();
- Object prev = index.put(name, iu);
- if (prev == null || prev == iu)
- continue;
-
- ArrayList<IInstallableUnit> list;
- if (prev instanceof IInstallableUnit) {
- list = new ArrayList<IInstallableUnit>();
- list.add((IInstallableUnit) prev);
- } else
- list = (ArrayList<IInstallableUnit>) prev;
- list.add(iu);
- index.put(name, list);
- }
- }
- this.capabilityMap = index;
- }
-
- private Object getRequirementIDs(IEvaluationContext ctx, IExpression requirement, Object queriedKeys) {
- switch (requirement.getExpressionType()) {
- case IExpression.TYPE_AND :
- // AND is OK if at least one of the branches require the queried key
- for (IExpression expr : ExpressionUtil.getOperands(requirement)) {
- Object test = getRequirementIDs(ctx, expr, queriedKeys);
- if (test != null) {
- if (test == Boolean.FALSE)
- // Failing exists so the AND will fail altogether
- return test;
-
- // It's safe to break here since an and'ing several queries
- // for different keys and the same input will yield false anyway.
- return test;
- }
- }
- return null;
-
- case IExpression.TYPE_OR :
- // OR is OK if all the branches require the queried key
- for (IExpression expr : ExpressionUtil.getOperands(requirement)) {
- Object test = getRequirementIDs(ctx, expr, queriedKeys);
- if (test == null)
- // This branch did not require the key so index cannot be used
- return null;
-
- if (test == Boolean.FALSE)
- // Branch will always fail regardless of input, so just ignore
- continue;
-
- queriedKeys = test;
- }
- return queriedKeys;
-
- case IExpression.TYPE_ALL :
- case IExpression.TYPE_EXISTS :
- CollectionFilter cf = (CollectionFilter) requirement;
- if (isIndexedMember(cf.getOperand(), ExpressionFactory.THIS, InstallableUnit.MEMBER_PROVIDED_CAPABILITIES)) {
- LambdaExpression lambda = cf.lambda;
- return getQueriedIDs(ctx, lambda.getItemVariable(), ProvidedCapability.MEMBER_NAME, lambda.getOperand(), queriedKeys);
- }
- }
- return null;
- }
-
- @Override
- protected Object getQueriedIDs(IEvaluationContext ctx, IExpression variable, String memberName, IExpression booleanExpr, Object queriedKeys) {
- if (booleanExpr.getExpressionType() != IExpression.TYPE_MATCHES)
- return super.getQueriedIDs(ctx, variable, memberName, booleanExpr, queriedKeys);
-
- Matches matches = (Matches) booleanExpr;
- if (matches.lhs != variable)
- return null;
-
- Object rhsObj = matches.rhs.evaluate(ctx);
- if (!(rhsObj instanceof IRequirement))
- return null;
-
- // Let the requirement expression participate in the
- // index usage query
- //
- IMatchExpression<IInstallableUnit> rm = ((IRequirement) rhsObj).getMatches();
- return RequiredCapability.isSimpleRequirement(rm) ? concatenateUnique(queriedKeys, rm.getParameters()[0]) : getRequirementIDs(rm.createContext(), ((Unary) rm).operand, queriedKeys);
- }
-
- public Iterator<IInstallableUnit> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- Object queriedKeys = null;
-
- // booleanExpression must be a collection filter on providedCapabilities
- // or an IInstallableUnit used in a match expression.
- //
- IExpression expr = booleanExpr;
- int type = booleanExpr.getExpressionType();
- if (type == 0) {
- // wrapper
- expr = ((Unary) booleanExpr).operand;
- type = expr.getExpressionType();
- }
-
- switch (type) {
- case IExpression.TYPE_ALL :
- case IExpression.TYPE_EXISTS :
- CollectionFilter cf = (CollectionFilter) expr;
- if (isIndexedMember(cf.getOperand(), variable, InstallableUnit.MEMBER_PROVIDED_CAPABILITIES)) {
- // This is providedCapabilities.exists or providedCapabilites.all
- //
- LambdaExpression lambda = cf.lambda;
- queriedKeys = getQueriedIDs(ctx, lambda.getItemVariable(), ProvidedCapability.MEMBER_NAME, lambda.getOperand(), queriedKeys);
- } else {
- // Might be the requirements array.
- //
- Expression op = cf.getOperand();
- if (op instanceof Member && InstallableUnit.MEMBER_REQUIREMENTS.equals(((Member) op).getName())) {
- queriedKeys = getQueriedIDs(ctx, variable, ProvidedCapability.MEMBER_NAME, booleanExpr, queriedKeys);
- }
- }
- break;
-
- case IExpression.TYPE_MATCHES :
- Matches matches = (Matches) expr;
- if (matches.lhs != variable)
- break;
-
- Object rhsObj = matches.rhs.evaluate(ctx);
- if (!(rhsObj instanceof IRequirement))
- break;
-
- // Let the requirement expression participate in the
- // index usage query
- //
- IMatchExpression<IInstallableUnit> rm = ((IRequirement) rhsObj).getMatches();
- queriedKeys = RequiredCapability.isSimpleRequirement(rm) ? concatenateUnique(queriedKeys, rm.getParameters()[0]) : getRequirementIDs(rm.createContext(), ((Unary) rm).operand, queriedKeys);
- break;
-
- default :
- queriedKeys = null;
- }
-
- if (queriedKeys == null)
- // Index cannot be used.
- return null;
-
- Collection<IInstallableUnit> matchingIUs;
- if (queriedKeys == Boolean.FALSE) {
- // It has been determined that the expression has no chance
- // to succeed regardless of input
- matchingIUs = CollectionUtils.<IInstallableUnit> emptySet();
- } else if (queriedKeys instanceof Collection<?>) {
- matchingIUs = new HashSet<IInstallableUnit>();
- for (Object key : (Collection<Object>) queriedKeys)
- collectMatchingIUs((String) key, matchingIUs);
- } else {
- Object v = capabilityMap.get(queriedKeys);
- if (v == null)
- matchingIUs = CollectionUtils.<IInstallableUnit> emptySet();
- else if (v instanceof IInstallableUnit)
- matchingIUs = Collections.singleton((IInstallableUnit) v);
- else
- matchingIUs = (Collection<IInstallableUnit>) v;
- }
- return matchingIUs.iterator();
- }
-
- private void collectMatchingIUs(String name, Collection<IInstallableUnit> collector) {
- Object v = capabilityMap.get(name);
- if (v == null)
- return;
- if (v instanceof IInstallableUnit)
- collector.add((IInstallableUnit) v);
- else
- collector.addAll((Collection<IInstallableUnit>) v);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java
deleted file mode 100644
index 77e207f23..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/CompoundIndex.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-
-public class CompoundIndex<T> implements IIndex<T> {
-
- private final Collection<IIndex<T>> indexes;
-
- public CompoundIndex(Collection<IIndex<T>> indexes) {
- this.indexes = indexes;
- }
-
- public Iterator<T> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- Set<T> result = null;
- for (IIndex<T> index : indexes) {
- Iterator<T> indexResult = index.getCandidates(ctx, variable, booleanExpr);
- if (indexResult == null)
- return null;
- if (indexResult.hasNext()) {
- if (result == null)
- result = new HashSet<T>();
- do {
- result.add(indexResult.next());
- } while (indexResult.hasNext());
- }
- }
- if (result == null)
- result = CollectionUtils.emptySet();
- return result.iterator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java
deleted file mode 100644
index a415e8ca4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IdIndex.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.IUMap;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-public class IdIndex extends Index<IInstallableUnit> {
- private final IUMap iuMap;
-
- public IdIndex(IUMap iuMap) {
- this.iuMap = iuMap;
- }
-
- public IdIndex(Iterator<IInstallableUnit> ius) {
- iuMap = new IUMap();
- while (ius.hasNext())
- iuMap.add(ius.next());
- }
-
- public Iterator<IInstallableUnit> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- Object queriedKeys = getQueriedIDs(ctx, variable, InstallableUnit.MEMBER_ID, booleanExpr, null);
- if (queriedKeys == null)
- return null;
-
- if (queriedKeys instanceof Collection<?>) {
- HashSet<IInstallableUnit> collector = new HashSet<IInstallableUnit>();
- for (Object key : (Collection<?>) queriedKeys)
- collector.addAll(iuMap.getUnits((String) key));
- return collector.iterator();
- }
- return iuMap.getUnits((String) queriedKeys).iterator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java
deleted file mode 100644
index b5051bf3d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/Index.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-
-public abstract class Index<T> implements IIndex<T> {
-
- protected static boolean isIndexedMember(IExpression expr, IExpression variable, String memberName) {
- if (expr instanceof Member) {
- Member member = (Member) expr;
- return member.getOperand() == variable && member.getName().equals(memberName);
- }
- return false;
- }
-
- protected static Object concatenateUnique(Object previous, Object toAdd) {
- if (previous == null || toAdd == null || toAdd == Boolean.FALSE)
- return toAdd;
-
- if (previous instanceof ArrayList<?>) {
- @SuppressWarnings("unchecked")
- ArrayList<Object> prevArr = (ArrayList<Object>) previous;
- if (!prevArr.contains(toAdd))
- prevArr.add(toAdd);
- return previous;
- }
- if (previous.equals(toAdd))
- return previous;
-
- ArrayList<Object> arr = new ArrayList<Object>();
- arr.add(previous);
- arr.add(toAdd);
- return arr;
- }
-
- protected Object getQueriedIDs(IEvaluationContext ctx, IExpression variable, String memberName, IExpression booleanExpr, Object queriedKeys) {
- IExpression targetExpr = booleanExpr;
- if (booleanExpr instanceof IMatchExpression<?>) {
- targetExpr = ((Unary) targetExpr).operand;
- ctx = ((IMatchExpression<?>) booleanExpr).createContext();
- }
- int type = targetExpr.getExpressionType();
- switch (type) {
- case IExpression.TYPE_EQUALS :
- Binary eqExpr = (Binary) targetExpr;
- IExpression lhs = eqExpr.lhs;
- IExpression rhs = eqExpr.rhs;
- if (isIndexedMember(lhs, variable, memberName)) {
- Object val = safeEvaluate(ctx, rhs);
- if (val == null)
- return null;
- return concatenateUnique(queriedKeys, val);
- }
- if (isIndexedMember(rhs, variable, memberName)) {
- Object val = safeEvaluate(ctx, lhs);
- if (val == null)
- return null;
- return concatenateUnique(queriedKeys, val);
- }
-
- // Not applicable for indexing
- return null;
-
- case IExpression.TYPE_AND :
- // AND is OK if at least one of the branches require the queried key
- for (IExpression expr : ExpressionUtil.getOperands(targetExpr)) {
- Object test = getQueriedIDs(ctx, variable, memberName, expr, queriedKeys);
- if (test != null) {
- if (test == Boolean.FALSE)
- // Failing exists so the AND will fail altogether
- return test;
-
- // It's safe to break here since an and'ing several queries
- // for different keys and the same input will yield false anyway.
- return test;
- }
- }
- return null;
-
- case IExpression.TYPE_OR :
- // OR is OK if all the branches require the queried key
- for (IExpression expr : ExpressionUtil.getOperands(targetExpr)) {
- Object test = getQueriedIDs(ctx, variable, memberName, expr, queriedKeys);
- if (test == null)
- // This branch did not require the key so index cannot be used
- return null;
-
- if (test == Boolean.FALSE)
- // Branch will always fail regardless of input, so just ignore
- continue;
-
- queriedKeys = test;
- }
- return queriedKeys;
-
- case IExpression.TYPE_EXISTS :
- case IExpression.TYPE_ALL :
- // We must evaluate the lhs to find the referenced keys
- //
- CollectionFilter cf = (CollectionFilter) targetExpr;
- Iterator<?> values;
- try {
- values = cf.getOperand().evaluateAsIterator(ctx);
- } catch (IllegalArgumentException e) {
- return null;
- }
- if (!values.hasNext())
- // No keys are requested but we know that an exists must
- // fail at this point. An all will however succeed regardless
- // of what is used as input.
- return type == IExpression.TYPE_ALL ? null : Boolean.FALSE;
-
- LambdaExpression lambda = cf.lambda;
- IEvaluationContext lambdaCtx = lambda.prolog(ctx);
- Variable lambdaVar = lambda.getItemVariable();
- IExpression filterExpr = lambda.getOperand();
- do {
- lambdaVar.setValue(lambdaCtx, values.next());
- queriedKeys = getQueriedIDs(lambdaCtx, variable, memberName, filterExpr, queriedKeys);
- if (queriedKeys == null)
- // No use continuing. The expression does not require the key
- return null;
- } while (values.hasNext());
- return queriedKeys;
- }
- return null;
- }
-
- private static Object safeEvaluate(IEvaluationContext ctx, IExpression expr) {
- try {
- return expr.evaluate(ctx);
- } catch (IllegalArgumentException e) {
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java
deleted file mode 100644
index 9917f82e7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/index/IndexProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- * IBM Corporation - ongoing development and bug fixes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.index;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.metadata.index.IQueryWithIndex;
-import org.eclipse.equinox.p2.query.*;
-
-public abstract class IndexProvider<T> implements IIndexProvider<T>, IQueryable<T> {
- public static <Q> IQueryResult<Q> query(IIndexProvider<Q> indexProvider, IQuery<Q> query, IProgressMonitor monitor) {
- if (monitor != null)
- monitor.beginTask(null, IProgressMonitor.UNKNOWN);
- IQueryResult<Q> result = (query instanceof IQueryWithIndex<?>) ? ((IQueryWithIndex<Q>) query).perform(indexProvider) : query.perform(indexProvider.everything());
- if (monitor != null) {
- monitor.worked(1);
- monitor.done();
- }
- return result;
- }
-
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
- return query(this, query, monitor);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties
deleted file mode 100644
index 58b8904b0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/messages.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-###############################################################################
- # Copyright (c) 2009 Cloudsmith Inc. 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:
- # Cloudsmith Inc. - initial API and implementation
-###############################################################################
-_0_is_not_a_valid_qualifier_in_osgi_1=The {0} value is invalid in OSGi version: "{1}"
-array_can_not_be_empty=Array format can not be empty
-array_can_not_have_character_group=Array format can not have a character group
-array_can_not_have_enum=Array format can not have an enum specifier
-auto_can_not_have_pad_value=Auto format can not have a pad value
-bad_enum_definition=Bad definition of enumerator
-cannot_combine_ignore_with_other_instruction=Cannot combine ignore with other instruction
-cannot_combine_range_upper_bound_with_pad_value=Cannot combine range upper bound with pad value
-character_group_defined_more_then_once=Character group was defined more then once
-colon_expected_before_original_version_0=A colon was expected before original version: {0}
-default_defined_more_then_once=Default defined more then once
-delimiter_can_not_be_ignored=A delimiter cannot be ignored
-delimiter_can_not_have_default_value=A delimiter cannot have a default value
-delimiter_can_not_have_pad_value=A delimiter cannot have a pad value
-delimiter_can_not_have_range=A delimiter cannot have a range
-EOS_after_escape=End of string was encountere after the escape character
-enum_defined_more_then_once=Enumeration was defined more then once
-expected_orignal_after_colon_0=An original version was expected after colon: {0}
-expected_orignal_after_slash_0=A format or colon was expected after slash: {0}
-expected_slash_after_raw_vector_0=A slash was expected after a raw version: {0}
-filter_missing_leftparen=Filter "{0}" Missing ''('' at position {1}
-filter_missing_rightparen=Filter "{0}" Missing '')'' at position {1}
-filter_trailing_characters=Filter "{0}" Extraneous trailing characters at position {1}
-filter_invalid_operator=Filter "{0}" Invalid operator at position {1}
-filter_missing_attr=Filter "{0}" Missing attr at position {1}
-filter_missing_value=Filter "{0}" is missing value at position {1}
-filter_invalid_value=Filter "{0}" has invalid value at position {1}
-filter_premature_end=Filter "{0}" ends before it is complete
-format_0_unable_to_parse_1=Format "{0}" was unable to parse {1}
-format_0_unable_to_parse_empty_version=Format "{0}" was unable to parse an empty version
-format_is_empty=Format is empty
-format_must_be_delimited_by_colon_0=Format must be delimited by version range: {0}
-group_can_not_be_empty=A group can not be empty
-ignore_defined_more_then_once=More then one definition of ignore
-illegal_character_encountered_ascii_0=An illegal character was encountered. Code = {0}
-missing_comma_in_range_0=Missing comma in range "{0}"
-negative_character_range=The character range is negative
-neither_raw_vector_nor_format_specified_0=Neither raw version nor format was specified: {0}
-number_can_not_have_pad_value=A number cannot have a pad value
-only_format_specified_0=Only a format was specified: {0}
-only_max_and_empty_string_defaults_can_have_translations=Only max string and empty string defaults can have translations
-original_must_start_with_colon_0=Original version must start with colon: {0}
-original_stated_but_missing_0=Expected original version after colon: {0}
-no_expression_factory=No Expression Factory service has been registered
-no_expression_parser=No Expression Parser service has been registered
-pad_defined_more_then_once=Pad was defined more then once
-performing_subquery=Performing subquery
-premature_end_of_format=Premature end of format
-premature_end_of_format_expected_0=Premature end of format, "{0}" expected
-premature_EOS_0=Premature end of string in "{0}"
-range_defined_more_then_once=Range defined more then once
-range_max_cannot_be_less_then_range_min=The range maximum must not be less then its minimum
-range_max_cannot_be_zero=The range maximum cannot be zero
-range_min_0_is_not_less_then_range_max_1=Range minimum "{0}" is not less then range maximum "{1}" (inclusion is required at both ends if the versions are equal)
-range_boundaries_0_and_1_cannot_have_different_formats=Range boundaries "{0}" and "{1}" cannot have different formats
-raw_and_original_must_use_same_range_inclusion_0=Raw and original must use the same range inclusion markers in range "{0}"
-raw_element_can_not_have_pad_value=A raw element cannot have a pad value
-raw_element_expected_0=A raw element was expected: {0}
-string_can_not_have_pad_value=A string cannot have a pad value
-syntax_error_in_version_format_0_1_2=Syntax error in version format "{0}" at position {1}: {2}
-syntax_error_in_version_format_0_1_found_2_expected_3=Syntax error in version format "{0}" at position {1}: Found {2} when {3} was expected
-unbalanced_format_parenthesis=Unbalanced format parenthesis \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java
deleted file mode 100644
index 9ff724815..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/query/UpdateQuery.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Cloudsmith Inc. - converted into expression based query
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.query;
-
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IInstallableUnitPatch;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * A query that finds all IUs that are considered an "Update" of the
- * specified IU.
- */
-public final class UpdateQuery extends ExpressionMatchQuery<IInstallableUnit> {
- private static final IExpression expr1;
- private static final IExpression expr2;
-
- static {
- IExpressionParser parser = ExpressionUtil.getParser();
-
- // This expression is used in case the updateFrom is an IInstallableUnitPatch
- //
- expr1 = parser.parse("$0 ~= updateDescriptor && ($0.id != id || $0.version < version)"); //$NON-NLS-1$
-
- // When updateFrom is not an IInstallableUnitPatch, we need to do one of two things depending
- // on if the current item is an InstallableUnitPatch or not.
- //
- expr2 = parser.parse("this ~= class('org.eclipse.equinox.p2.metadata.IInstallableUnitPatch')" + // //$NON-NLS-1$
- "? $0 ~= lifeCycle" + // //$NON-NLS-1$
- ": $0 ~= updateDescriptor && ($0.id != id || $0.version < version)"); //$NON-NLS-1$
- }
-
- public UpdateQuery(IInstallableUnit updateFrom) {
- super(IInstallableUnit.class, updateFrom instanceof IInstallableUnitPatch ? expr1 : expr2, updateFrom, IInstallableUnitPatch.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java
deleted file mode 100644
index fdcba7a80..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IArtifactKey.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-
-/**
- * Provide standardised artifact information to uniquely identify the
- * corresponding bytes (perhaps not stored as a file).
- * <p>
- * Artifact keys represent both a unique opaque identifier as well as structured
- * and standardised pieces of information.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IArtifactKey extends IVersionedId {
-
- /**
- * Returns the classifier for this artifact key. The returned value can be empty.
- * @return the classifier segment of the key.
- */
- public String getClassifier();
-
- /**
- * Returns the id for this artifact key.
- * @return the id segment of the key.
- */
- public String getId();
-
- /**
- * Returns the version for this artifact key.
- * @return the version segment of the key.
- */
- public Version getVersion();
-
- /**
- * Returns the canonical string form of this artifact key.
- * @return the canonical string representing this key
- */
- public String toExternalForm();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java
deleted file mode 100644
index d8ad2bd43..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ICopyright.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.net.URI;
-
-/**
- * The <code>ICopyright</code> interface represents a software copyright. A copyright has
- * required body text which may be the full text or a summary. An optional location field can be specified
- * which links to full text.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ICopyright {
-
- /**
- * Returns the location of a document containing the copyright notice.
- *
- * @return The location of the copyright notice, or <code>null</code>
- */
- public URI getLocation();
-
- /**
- * Returns the license body.
- *
- * @return the license body, never <code>null</code>
- */
- public String getBody();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java
deleted file mode 100644
index fecc130d5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnit.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*******************************************************************************
- * 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
- * Genuitec, LLC - added license support
- * EclipseSource - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-/**
- * An installable unit represents an atomic, indivisible unit of installable functionality
- * in a provisioned system. Everything that can be installed or uninstalled in a system,
- * including both concrete artifacts and instructions describing steps to be performed
- * during install, must be expressed as one or more installable units. Thus the set of
- * installable units present in a system, together with the existing environment
- * (operating system, etc), completely describes the initial installed state of that system.
- * <p>
- * Installable units may have dependencies on functionality provided by other installable
- * units, such that the unit cannot be installed unless some other installable unit
- * is present in the installed system that provides a matching capability. Such
- * dependencies are referred to as <i>required capabilities</i>. Conversely,
- * installable units may declared <i>provided capabilities</i>, describing the
- * capabilities that they make available to other units in the system. Note the
- * weak coupling at work here: installable units never directly depend on each other,
- * but instead depend on abstract capabilities that any other installable unit may provide.
- * </p>
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IInstallableUnit extends IVersionedId, Comparable<IInstallableUnit> {
-
- /**
- * A capability namespace representing a particular InstallableUnit by id.
- * Each InstallableUnit automatically provides a capability in this namespace representing
- * itself, and other InstallableUnits can require such a capability to state that they
- * require a particular InstallableUnit to be present.
- *
- * @see IInstallableUnit#getId()
- */
- public static final String NAMESPACE_IU_ID = "org.eclipse.equinox.p2.iu"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.partial.iu"</code>) for a
- * boolean property indicating the IU is generated from incomplete information and
- * should be replaced by the complete IU if available.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_PARTIAL_IU = "org.eclipse.equinox.p2.partial.iu"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.contact"</code>) for a
- * String property containing a contact address where problems can be reported,
- * such as an email address.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_CONTACT = "org.eclipse.equinox.p2.contact"; //$NON-NLS-1$
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.description"</code>) for a
- * String property containing a human-readable description of the installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_DESCRIPTION = "org.eclipse.equinox.p2.description"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.description.url"</code>) for a
- * String property containing a URL to the description of the installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_DESCRIPTION_URL = "org.eclipse.equinox.p2.description.url"; //$NON-NLS-1$
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.doc.url"</code>) for a
- * String property containing a URL for documentation about the installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_DOC_URL = "org.eclipse.equinox.p2.doc.url"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.bundle.localization"</code>) for a String
- * property containing the bundle localization property file name
- */
- public static final String PROP_BUNDLE_LOCALIZATION = "org.eclipse.equinox.p2.bundle.localization"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.name"</code>) for a
- * String property containing a human-readable name for the installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_NAME = "org.eclipse.equinox.p2.name"; //$NON-NLS-1$
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.provider"</code>) for a
- * String property containing information about the vendor or provider of the
- * installable unit.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_PROVIDER = "org.eclipse.equinox.p2.provider"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.icon"</code>) for a String
- * property containing a URI for an icon that should be shown when displaying this
- * installable unit in a user interface.
- *
- * @see #getProperty(String)
- */
- public static final String PROP_ICON = "org.eclipse.equinox.p2.icon"; //$NON-NLS-1$
-
- /**
- * Returns the collection of artifacts associated with this installable unit.
- * Installing this unit into a system will cause these artifacts to be fetched from
- * a repository and applied to the installed system. Uninstalling this unit
- * will cause these artifacts to be removed from the system.
- *
- * @return The artifacts associated with this installable unit
- */
- public Collection<IArtifactKey> getArtifacts();
-
- /**
- * Returns the filter on this installable unit. The filter is matched against
- * the properties of the environment the unit is installed into. An installable
- * unit will not be installed if it has a filter condition that is not satisfied by the
- * properties of the environment.
- *
- * @return The installation filter for this unit, or <code>null</code>
- * @noreference This method is not intended to be referenced by clients.
- */
- public IMatchExpression<IInstallableUnit> getFilter();
-
- /**
- * Returns the fragments that have been bound to this installable unit, or
- * <code>null</code> if this unit is not resolved.
- *
- * @see #isResolved()
- * @return The fragments bound to this installable unit, or <code>null</code>
- */
- public Collection<IInstallableUnitFragment> getFragments();
-
- /**
- * Returns an <i>unmodifiable copy</i> of the properties
- * associated with the installable unit.
- *
- * @return an <i>unmodifiable copy</i> of the properties of this installable unit.
- */
- public Map<String, String> getProperties();
-
- /**
- * Returns the untranslated property of this installable unit associated with the given key.
- * Returns <code>null</code> if no such property is defined.
- * <p>
- * If the property value has been externalized, this method will return a string containing
- * the translation key rather than a human-readable string. For this reason, clients
- * wishing to obtain the value for a property that is typically translated should use
- * {@link #getProperty(String, String)} instead.
- * </p>
- *
- * @param key The property key to retrieve a property value for
- * @return the property that applies to this installable unit or <code>null</code>
- */
- public String getProperty(String key);
-
- /**
- * Returns the property of this installable unit associated with the given key.
- * Returns <code>null</code> if no such property is defined or no applicable
- * translation is available.
- *
- * @param key The property key to retrieve a property value for
- * @param locale The locale to translate the property for, or null to use the current locale.
- * @return the property that applies to this installable unit or <code>null</code>
- */
- public String getProperty(String key, String locale);
-
- /**
- * Returns the collection of capabilities provided by this installable unit.
- *
- * @return The collection of capabilities provided by this installable unit.
- */
- public Collection<IProvidedCapability> getProvidedCapabilities();
-
- public Collection<IRequirement> getRequirements();
-
- public Collection<IRequirement> getMetaRequirements();
-
- public Collection<ITouchpointData> getTouchpointData();
-
- public ITouchpointType getTouchpointType();
-
- /**
- * Returns whether this installable unit has been resolved. A resolved
- * installable unit represents the union of an installable unit and some
- * fragments.
- *
- * @see #getFragments()
- * @see #unresolved()
- * @return <code>true</code> if this installable unit is resolved, and
- * <code>false</code> otherwise.
- */
- public boolean isResolved();
-
- /**
- * Returns whether this installable unit is a singleton. Only one singleton
- * installable unit with a given id is allowed to exist in a given installed system.
- * Attempting to install multiple versions of a singleton will fail.
- * @return <code>true</code> if this unit is a singleton, and <code>false</code> otherwise
- * @noreference This method is not intended to be referenced by clients.
- */
- public boolean isSingleton();
-
- /**
- * Returns whether this unit has a provided capability that satisfies the given
- * requirement.
- * @return <code>true</code> if this unit satisfies the given requirement, and <code>false</code> otherwise.
- */
- public boolean satisfies(IRequirement candidate);
-
- /**
- * Returns the unresolved equivalent of this installable unit. If this unit is
- * already unresolved, this method returns the receiver. Otherwise, this
- * method returns an installable unit with the same id and version, but without
- * any fragments attached.
- *
- * @see #getFragments()
- * @see #isResolved()
- * @return The unresolved equivalent of this unit
- */
- public IInstallableUnit unresolved();
-
- /**
- * Returns information about what this installable unit is an update of.
- * @return The lineage information about the installable unit
- */
- public IUpdateDescriptor getUpdateDescriptor();
-
- /**
- * Returns the untranslated licenses that apply to this installable unit.
- * <p>
- * If the license text has been externalized, this method will return strings containing
- * the translation keys rather than human-readable strings. For this reason, clients
- * wishing to obtain a license for display to an end user should use {@link #getLicenses(String)}
- * instead.
- * </p>
- * @return the licenses that apply to this installable unit
- */
- public Collection<ILicense> getLicenses();
-
- /**
- * Returns the licenses that apply to this installable unit. Any translation of the
- * licenses for the given locale will be applied. Returns an empty collection if this
- * unit has no licenses, or if the available licenses are externalized and do not
- * have translations available for the given locale.
- *
- * @param locale The locale to translate the license for, or null to use the current locale.
- * @return the translated licenses that apply to this installable unit
- */
- public Collection<ILicense> getLicenses(String locale);
-
- /**
- * Returns the untranslated copyright that applies to this installable unit.
- * <p>
- * If the copyright text has been externalized, this method will return strings containing
- * the translation keys rather than human-readable strings. For this reason, clients
- * wishing to obtain a copyright for display to an end user should use {@link #getCopyright(String)}
- * instead.
- * </p>
- * @return the copyright that applies to this installable unit or <code>null</code>
- */
- public ICopyright getCopyright();
-
- /**
- * Returns the copyright that applies to this installable unit. Any translation of the
- * copyright for the given locale will be applied. Returns <code>null</code> if this
- * unit has no copyright, or if the copyright is externalized and no translations are
- * available for the given locale.
- *
- * @param locale The locale to translate the copyright for, or null to use the current locale.
- * @return the copyright that applies to this installable unit or <code>null</code>
- */
- public ICopyright getCopyright(String locale);
-
- /**
- * Returns whether this InstallableUnit is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type IInstallableUnit
- * <li> The result of <b>getId()</b> on both objects are equal
- * <li> The result of <b>getVersion()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java
deleted file mode 100644
index 1e00481e7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitFragment.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.util.Collection;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IInstallableUnitFragment extends IInstallableUnit {
- public Collection<IRequirement> getHost();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java
deleted file mode 100644
index 6f0a02971..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IInstallableUnitPatch.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.util.List;
-
-/**
- * An installable unit patch is an installable unit that alters the required capabilities of another
- * installable unit.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IInstallableUnitPatch extends IInstallableUnit {
- /**
- * The applicability scope of a patch describes the installable units that this
- * patch should be applied to. Specifically, this patch will be applied to all installable
- * units that satisfy all of the required capabilities in one or more of the given
- * required capability arrays.
- * <p>
- * The returned two-dimensional array can be considered
- * as a boolean expression, where items in the inner array are connected by
- * AND operators, and each of the arrays are separated by OR operators. For example
- * a scope of [[r1, r2, r3], [r4, r5]] will match any unit whose provided capabilities
- * satisfy the expression ((r1 ^ r2 ^ r3) | (r4 ^ r5)).
- * @noreference This method is not intended to be referenced by clients.
- */
- IRequirement[][] getApplicabilityScope();
-
- /**
- * Returns the requirement changes imposed by the patch.
- * @return The patch requirement changes.
- */
- List<IRequirementChange> getRequirementsChange();
-
- /**
- * Returns the required capability that defines the lifecycle of this patch. The
- * patch will be installed into a profile if and only if the lifecycle capability
- * is satisfied by some IU in the profile. If a future provisioning operation causes
- * the requirement to no longer be satisfied, the patch will be uninstalled.
- */
- IRequirement getLifeCycle();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java
deleted file mode 100644
index 5d613ad9b..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ILicense.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
- * IBM - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.net.URI;
-
-/**
- * The <code>ILicense</code> interface represents a software license. A license has required body text
- * which may be the full text or an annotation. An optional URL field can be specified
- * which links to full text. Licenses can be easily compared using their digests.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ILicense {
-
- /**
- * Returns the location of a document containing the full license.
- *
- * @return the location of the license document, or <code>null</code>
- */
- public URI getLocation();
-
- /**
- * Returns the license body.
- * @return the license body, never <code>null</code>
- */
- public String getBody();
-
- /**
- * Returns the message digest of the license body. The digest is calculated on a normalized
- * version of the license where all whitespace has been reduced to one space.
- *
- * @return the message digest as a <code>BigInteger</code>, never <code>null</code>
- */
- public String getUUID();
-
- /**
- * Returns whether this license is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type ILicense
- * <li> The result of <b>getDigest()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java
deleted file mode 100644
index 2d7cc12c5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IProvidedCapability.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
- * IBM - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-/**
- * Describes a capability as exposed or required by an installable unit
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IProvidedCapability {
-
- /**
- *
- * @return String
- * @noreference This method is not intended to be referenced by clients.
- */
- public String getName();
-
- /**
- *
- * @return String
- * @noreference This method is not intended to be referenced by clients.
- */
- public String getNamespace();
-
- /**
- *
- * @return String
- * @noreference This method is not intended to be referenced by clients.
- */
- public Version getVersion();
-
- /**
- * Returns whether this provided capability is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type IProvidedCapability
- * <li> The result of <b>getName()</b> on both objects are equal
- * <li> The result of <b>getNamespace()</b> on both objects are equal
- * <li> The result of <b>getVersion()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object other);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java
deleted file mode 100644
index 5338d47b2..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirement.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 2010 IBM 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 - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-/**
- * A requirement represents some external constraint on an {@link IInstallableUnit}.
- * Each requirement represents something an {@link IInstallableUnit} needs that
- * it expects to be provided by another {@link IInstallableUnit}. Requirements are
- * entirely generic, and are intended to be capable of representing anything that
- * an {@link IInstallableUnit} may need either at install time, or at runtime.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IRequirement {
-
- /**
- * Returns the minimum cardinality of the requirement. That is, the minimum
- * number of capabilities that must be provided that match this requirement before
- * this requirement is considered fully satisfied. A minimum cardinality of 0 indicates
- * that the requirement is optional.
- *
- * @return the minimum cardinality of this requirement
- */
- int getMin();
-
- /**
- * Returns the maximum cardinality of the requirement. That is, the maximum
- * number of capabilities that are permitted to be present that satisfy this requirement.
- * A maximum cardinality of 0 indicates that there must <em>not</em> be
- * any installable unit in the system that satisfies this requirement.
- *
- * @return the maximum cardinality of this requirement
- */
- int getMax();
-
- /**
- * @noreference This method is not intended to be referenced by clients.
- */
- IMatchExpression<IInstallableUnit> getFilter();
-
- /**
- * Returns a boolean match expression that will return true for any
- * {@link IInstallableUnit} that matches the requirement.
- * @return A boolean match expression for installable unit matching.
- */
- IMatchExpression<IInstallableUnit> getMatches();
-
- /**
- * Returns whether the provided capabilities of the given installable unit satisfy
- * this requirement.
- *
- * @param iu the installable unit to check for matching capabilities
- * @return <code>true</code> if the given installable unit satisfies this
- * requirement, and <code>false</code> otherwise.
- */
- boolean isMatch(IInstallableUnit iu);
-
- /**
- * Returns whether this requirement should cause extra installable units
- * to be installed in order to satisfy it.
- * @return <code>true</code> if additional installable units should be installed
- * to satisfy this requirement, and <code>false</code> otherwise
- */
- boolean isGreedy();
-
- /**
- * Returns a textual description of this requirement.
- *
- * @return a textual description of this requirement
- */
- String getDescription();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java
deleted file mode 100644
index 27d89bc7f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IRequirementChange.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IRequirementChange {
-
- /**
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public IRequiredCapability applyOn();
-
- /**
- *
- * @noreference This method is not intended to be referenced by clients.
- */
-
- public IRequiredCapability newValue();
-
- /**
- *
- * @noreference This method is not intended to be referenced by clients.
- */
-
- public boolean matches(IRequiredCapability toMatch);
-
- /**
- * Returns whether this requirement change is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type IRequiredCapability
- * <li> The result of <b>applyOn()</b> on both objects are equal
- * <li> The result of <b>newValue()</b> on both objects are equal
- * </ul>
- * @noreference This method is not intended to be referenced by clients.
- */
- public boolean equals(Object other);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java
deleted file mode 100644
index 89530b709..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointData.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.util.Map;
-
-/**
- * ITouchpoint data instances contain the additional information needed by a touchpoint
- * to execute each engine phase it participates in. This includes the sequence of
- * instruction statements to be executed during each phase, and any additional
- * supporting data needed to perform the phase.
- *
- * @see MetadataFactory#createTouchpointData(Map)
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ITouchpointData {
-
- /**
- * Returns the touchpoint instruction corresponding to the given key.
- */
- public ITouchpointInstruction getInstruction(String instructionKey);
-
- /**
- * Returns an unmodifiable map of the touchpoint instructions. The map
- * keys are strings, and the values are instances of {@link ITouchpointInstruction}.
- *
- * @return the touchpoint instructions
- */
- public Map<String, ITouchpointInstruction> getInstructions();
-
- /**
- * Returns whether this TouchpointData is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type ITouchpointData
- * <li> The result of <b>getInstructions()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java
deleted file mode 100644
index e7c9b49b9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointInstruction.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-/**
- * A touchpoint instruction contains either a sequence of instruction statements
- * to be executed during a particular engine phase, or some simple string value
- * that is needed by a touchpoint to execute its phases.
- * <p>
- * The format of a touchpoint instruction statement sequence is as follows:
- *
- * statement-sequence :
- * | statement ';'
- * | statement-sequence statement
- * ;
- *
- *Where a statement is of the format:
- *
- * statement :
- * | actionName '(' parameters ')'
- * ;
- *
- * parameters :
- * | // empty
- * | parameter
- * | parameters ',' parameter
- * ;
- *
- * parameter :
- * | paramName ':' paramValue
- * ;
- *
- * actionName, paramName, paramValue :
- * | String
- * ;
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ITouchpointInstruction {
-
- /**
- * Returns the body of this touchpoint instruction. The body is either a sequence
- * of instruction statements, or a simple string value.
- *
- * @return The body of this touchpoint instruction
- */
- public String getBody();
-
- //TODO What is this? Please doc
- public String getImportAttribute();
-
- /**
- * Returns whether this TouchpointInstruction is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type ITouchpointInstruction
- * <li> The result of <b>getBody()</b> on both objects are equal
- * <li> The result of <b>getImportAttribute()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java
deleted file mode 100644
index 02218f760..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/ITouchpointType.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2008, 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-
-/**
- * Identifies a particular touchpoint. A touchpoint is identified by an id
- * and a version.
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface ITouchpointType {
-
- /**
- * A touchpoint type indicating an undefined touchpoint type. Identity (==)
- * must be used to test for the <code>NONE</code> type.
- */
- public static final ITouchpointType NONE = new ITouchpointType() {
-
- public String getId() {
- return "null"; //$NON-NLS-1$
- }
-
- public Version getVersion() {
- return Version.emptyVersion;
- }
- };
-
- public String getId();
-
- public Version getVersion();
-
- /**
- * Returns whether this TouchpointInstruction is equal to the given object.
- *
- * This method returns <i>true</i> if:
- * <ul>
- * <li> Both this object and the given object are of type ITouchpointType
- * <li> The result of <b>getId()</b> on both objects are equal
- * <li> The result of <b>getVersion()</b> on both objects are equal
- * </ul>
- */
- public boolean equals(Object obj);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java
deleted file mode 100644
index 0fff4ebab..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IUpdateDescriptor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.net.URI;
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 2.0
- */
-public interface IUpdateDescriptor {
- public final int NORMAL = 0;
- public final int HIGH = 1;
-
- Collection<IMatchExpression<IInstallableUnit>> getIUsBeingUpdated();
-
- /**
- * The description of the update. This allows to explain what the update is about.
- * @return A description
- */
- public String getDescription();
-
- /**
- * Returns the location of a document containing the description.
- *
- * @return the location of the document, or <code>null</code>
- */
- public URI getLocation();
-
- /**
- * The importance of the update descriptor represented as a int.
- * @return The severity.
- */
- public int getSeverity();
-
- /**
- * Helper method indicating whether or not an installable unit is an update for the installable unit passed
- * @param iu the installable unit checked
- * @return A boolean indicating whether or not an installable unit is an update.
- */
- public boolean isUpdateOf(IInstallableUnit iu);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java
deleted file mode 100644
index 594621674..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionFormat.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-/**
- * <p>The IVersionFormat represents the Omni Version Format in compiled form. It
- * is also a parser for versions of that format.</p>
- * <p>An instance of IVersionFormat is immutable and thus thread safe. The parser
- * does not maintain any state.</p>
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- * @since 2.0
- */
-public interface IVersionFormat {
-
- /**
- * The string that by default will be interpreted as the logical max string when parsing
- * optional elements of type string and a default that is the empty string (i.e. OSGi)
- */
- static final String DEFAULT_MAX_STRING_TRANSLATION = "zzz"; //$NON-NLS-1$
-
- /**
- * The string that by default will be interpreted as the logical min string when parsing
- * optional elements of type string and a default that is the max string (i.e. Maven triplets)
- */
- static final String DEFAULT_MIN_STRING_TRANSLATION = "-"; //$NON-NLS-1$
-
- /**
- * Appends the string representation of this compiled format to
- * the given StringBuffer.
- * @param sb The buffer that will receive the string representation
- */
- void toString(StringBuffer sb);
-
- /**
- * Parse the given version string.
- * @param version The version string to parse.
- * @return A created version.
- * @throws IllegalArgumentException If the version string could not be parsed.
- */
- Version parse(String version);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java
deleted file mode 100644
index eb8aec341..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/IVersionedId.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- * IBM - Ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-
-/**
- * An interface representing a (id,version) pair.
- * @since 2.0
- */
-public interface IVersionedId {
- /**
- * Returns the id portion of this versioned id.
- *
- * @return The id portion of this versioned id.
- */
- String getId();
-
- /**
- * Returns the version portion of this versioned id.
- *
- * @return the version portion of this versioned id.
- */
- Version getVersion();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java
deleted file mode 100644
index 8892a7c67..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/KeyWithLocale.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.io.Serializable;
-import java.util.Locale;
-
-/**
- * A key that can be used to extract a localized property for a specified Locale
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public final class KeyWithLocale implements Serializable {
- private static final long serialVersionUID = 8818242663547645188L;
- private final String key;
- private final Locale locale;
-
- public KeyWithLocale(String key, Locale locale) {
- this.key = key;
- this.locale = locale;
- }
-
- public String getKey() {
- return key;
- }
-
- public Locale getLocale() {
- return locale;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java
deleted file mode 100644
index 587a1c77f..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/MetadataFactory.java
+++ /dev/null
@@ -1,774 +0,0 @@
-/*******************************************************************************
- * 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
- * Genuitec, LLC
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * A factory class for instantiating various p2 metadata objects.
- * @noextend
- * @noimplement
- * @since 2.0
- */
-public final class MetadataFactory {
- /**
- * A description containing information about an installable unit. Once created,
- * installable units are immutable. This description class allows a client to build
- * up the state for an installable unit incrementally, and then finally produce
- * the resulting immutable unit.
- */
- public static class InstallableUnitDescription {
- InstallableUnit unit;
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.type.patch"</code>) for a
- * boolean property indicating that an installable unit is a group.
- *
- */
- public static final String PROP_TYPE_GROUP = "org.eclipse.equinox.p2.type.group"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.type.patch"</code>) for a
- * boolean property indicating that an installable unit is a patch.
- *
- */
- public static final String PROP_TYPE_PATCH = "org.eclipse.equinox.p2.type.patch"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.type.fragment"</code>) for a
- * boolean property indicating that an installable unit is a fragment.
- *
- */
- public static final String PROP_TYPE_FRAGMENT = "org.eclipse.equinox.p2.type.fragment"; //$NON-NLS-1$
-
- /**
- * A property key (value <code>"org.eclipse.equinox.p2.type.category"</code>) for a
- * boolean property indicating that an installable unit is a category.
- *
- */
- public static final String PROP_TYPE_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$NON-NLS-1$
-
- public InstallableUnitDescription() {
- super();
- }
-
- /**
- * Add the specified capabilities to the installable unit.
- * @param additional the capabilities to add.
- */
- public void addProvidedCapabilities(Collection<IProvidedCapability> additional) {
- if (additional == null || additional.size() == 0)
- return;
- Collection<IProvidedCapability> current = unit().getProvidedCapabilities();
- ArrayList<IProvidedCapability> all = new ArrayList<IProvidedCapability>(additional.size() + current.size());
- all.addAll(current);
- all.addAll(additional);
- unit().setCapabilities(all.toArray(new IProvidedCapability[all.size()]));
- }
-
- /** @deprecated Use addRequirements(additional) instead */
- public void addRequiredCapabilities(Collection<IRequirement> additional) {
- addRequirements(additional);
- }
-
- /**
- * Add the specified requirements to the installable unit.
- * @param additional the requirements to add
- */
- public void addRequirements(Collection<IRequirement> additional) {
- if (additional == null || additional.size() == 0)
- return;
- List<IRequirement> current = unit().getRequirements();
- ArrayList<IRequirement> all = new ArrayList<IRequirement>(additional.size() + current.size());
- all.addAll(current);
- all.addAll(additional);
- unit().setRequiredCapabilities(all.toArray(new IRequirement[all.size()]));
- }
-
- public void addTouchpointData(ITouchpointData data) {
- Assert.isNotNull(data);
- unit().addTouchpointData(data);
- }
-
- /**
- * Returns the id of the installable unit.
- */
- public String getId() {
- return unit().getId();
- }
-
- /**
- * Return a collection of all the capabilities specified on this installable unit.
- */
- public Collection<IProvidedCapability> getProvidedCapabilities() {
- return unit().getProvidedCapabilities();
- }
-
- /** @deprecated Use getRequirements() instead */
- public List<IRequirement> getRequiredCapabilities() {
- return getRequirements();
- }
-
- /**
- * Return a collection of the requirements specified on this installable unit.
- */
- public List<IRequirement> getRequirements() {
- return unit().getRequirements();
- }
-
- /** @deprecated Use getMetaRequirements() instead */
- public Collection<IRequirement> getMetaRequiredCapabilities() {
- return getMetaRequirements();
- }
-
- /**
- * Return a collection of the meta requirements specified on this installable unit.
- */
- public Collection<IRequirement> getMetaRequirements() {
- return unit().getMetaRequirements();
- }
-
- /**
- * Returns the current touchpoint data on this installable unit description. The
- * touchpoint data may change if further data is added to the description.
- *
- * @return The current touchpoint data on this description
- */
- public Collection<ITouchpointData> getTouchpointData() {
- return unit().getTouchpointData();
-
- }
-
- /**
- * Return the versiono on this installable unit description.
- */
- public Version getVersion() {
- return unit().getVersion();
- }
-
- /**
- * Returns the UpdateDescriptor for this IU
- * @since 2.1
- */
- public IUpdateDescriptor getUpdateDescriptor() {
- return unit().getUpdateDescriptor();
- }
-
- /**
- * Set the artifact keys for the installable unit. Previous values will be overwritten.
- * @param value the artifacts to the used.
- */
- public void setArtifacts(IArtifactKey[] value) {
- unit().setArtifacts(value);
- }
-
- /**
- * Set the capabilities for the installable unit. Previous values will be overwritten.
- * @param exportedCapabilities the capabilities to be used.
- */
- public void setCapabilities(IProvidedCapability[] exportedCapabilities) {
- unit().setCapabilities(exportedCapabilities);
- }
-
- /**
- * Set the copyright for the installable unit. Previous values will be overwritten.
- * @param copyright the copyright to be used.
- */
- public void setCopyright(ICopyright copyright) {
- unit().setCopyright(copyright);
- }
-
- public void setFilter(IMatchExpression<IInstallableUnit> filter) {
- unit().setFilter(filter);
- }
-
- public void setFilter(String filter) {
- unit().setFilter(filter);
- }
-
- /**
- * Set the id of the installable unit.
- */
- public void setId(String id) {
- unit().setId(id);
- }
-
- /**
- * Set the licenses for the installable unit. Previous values will be overwritten.
- */
- public void setLicenses(ILicense[] licenses) {
- unit().setLicenses(licenses);
- }
-
- /**
- * Set a property with a specified value for this installable unit.
- * @param key key with which the specified value is to be associated
- * @param value value to be associated with the specified key
- */
- public void setProperty(String key, String value) {
- unit().setProperty(key, value);
- }
-
- /** @deprecated Use setRequirements(requirements) instead */
- public void setRequiredCapabilities(IRequirement[] requirements) {
- setRequirements(requirements);
- }
-
- /**
- * Set the requirements for the installable unit. Previous values will be overwritten.
- * @param requirements the requirements to be used.
- */
- public void setRequirements(IRequirement[] requirements) {
- unit().setRequiredCapabilities(requirements);
- }
-
- /** @deprecated Use setMetaRequirements(requirements) instead */
- public void setMetaRequiredCapabilities(IRequirement[] metaRequirements) {
- setMetaRequirements(metaRequirements);
- }
-
- /**
- * Set the meta requirements for the installable unit. Previous values will be overwritten.
- * @param metaRequirements the meta requirements to be used.
- */
- public void setMetaRequirements(IRequirement[] metaRequirements) {
- unit().setMetaRequiredCapabilities(metaRequirements);
- }
-
- /**
- * Change the singleton status of the installable unit.
- */
- public void setSingleton(boolean singleton) {
- unit().setSingleton(singleton);
- }
-
- /**
- * Set the touchpoint type for the installable unit.
- */
- public void setTouchpointType(ITouchpointType type) {
- unit().setTouchpointType(type);
- }
-
- /**
- * Set the update descriptor for the installable unit.
- */
- public void setUpdateDescriptor(IUpdateDescriptor updateInfo) {
- unit().setUpdateDescriptor(updateInfo);
- }
-
- /**
- * Set the version of this installable unit.
- * @param newVersion version to be set on the installable unit.
- */
- public void setVersion(Version newVersion) {
- unit().setVersion(newVersion);
- }
-
- InstallableUnit unit() {
- if (unit == null) {
- unit = new InstallableUnit();
- unit.setArtifacts(new IArtifactKey[0]);
- }
- return unit;
- }
-
- IInstallableUnit unitCreate() {
- IInstallableUnit result = unit();
- this.unit = null;
- return result;
- }
- }
-
- /**
- * A description containing information about an installable unit fragment. Once created,
- * installable units are immutable. This description class allows a client to build
- * up the state for an installable unit fragment incrementally, and then finally produce
- * the resulting immutable unit.
- */
- public static class InstallableUnitFragmentDescription extends InstallableUnitDescription {
- public InstallableUnitFragmentDescription() {
- super();
- setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- }
-
- /**
- * Specify the requirements identifying the host to which the installable unit fragment should be attached to.
- */
- public void setHost(IRequirement... hostRequirement) {
- ((InstallableUnitFragment) unit()).setHost(Arrays.asList(hostRequirement));
- }
-
- InstallableUnit unit() {
- if (unit == null)
- unit = new InstallableUnitFragment();
- return unit;
- }
- }
-
- /**
- * A description containing information about an installable unit patch. Once created,
- * installable units are immutable. This description class allows a client to build
- * up the state for an installable unit patch incrementally, and then finally produce
- * the resulting immutable unit.
- */
- public static class InstallableUnitPatchDescription extends InstallableUnitDescription {
-
- public InstallableUnitPatchDescription() {
- super();
- setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString());
- }
-
- /**
- * Set the applicability scope for the installable unit patch.
- */
- public void setApplicabilityScope(IRequirement[][] applyTo) {
- if (applyTo == null)
- throw new IllegalArgumentException("A patch scope can not be null"); //$NON-NLS-1$
- ((InstallableUnitPatch) unit()).setApplicabilityScope(applyTo);
- }
-
- /**
- * Set the lifecycle change for the installable unit patch.
- */
- public void setLifeCycle(IRequirement lifeCycle) {
- ((InstallableUnitPatch) unit()).setLifeCycle(lifeCycle);
- }
-
- /**
- * Set the requirement change for the installable unit patch.
- */
- public void setRequirementChanges(IRequirementChange[] changes) {
- ((InstallableUnitPatch) unit()).setRequirementsChange(changes);
- }
-
- InstallableUnit unit() {
- if (unit == null) {
- unit = new InstallableUnitPatch();
- ((InstallableUnitPatch) unit()).setApplicabilityScope(new IRequirement[0][0]);
- }
- return unit;
- }
- }
-
- /**
- * Singleton touchpoint data for a touchpoint with no instructions.
- */
- private static final ITouchpointData EMPTY_TOUCHPOINT_DATA = new TouchpointData(CollectionUtils.<String, ITouchpointInstruction> emptyMap());
-
- private static ITouchpointType[] typeCache = new ITouchpointType[5];
-
- private static int typeCacheOffset;
-
- /**
- * Returns an {@link IInstallableUnit} based on the given
- * description. Once the installable unit has been created, the information is
- * discarded from the description object.
- *
- * @param description The description of the unit to create
- * @return The created installable unit
- */
- public static IInstallableUnit createInstallableUnit(InstallableUnitDescription description) {
- Assert.isNotNull(description);
- return description.unitCreate();
- }
-
- /**
- * Returns an {@link IInstallableUnitFragment} based on the given
- * description. Once the fragment has been created, the information is
- * discarded from the description object.
- *
- * @param description The description of the unit to create
- * @return The created installable unit fragment
- */
- public static IInstallableUnitFragment createInstallableUnitFragment(InstallableUnitFragmentDescription description) {
- Assert.isNotNull(description);
- return (IInstallableUnitFragment) description.unitCreate();
- }
-
- /**
- * Returns an {@link IInstallableUnitPatch} based on the given
- * description. Once the patch installable unit has been created, the information is
- * discarded from the description object.
- *
- * @param description The description of the unit to create
- * @return The created installable unit patch
- */
- public static IInstallableUnitPatch createInstallableUnitPatch(InstallableUnitPatchDescription description) {
- Assert.isNotNull(description);
- return (IInstallableUnitPatch) description.unitCreate();
- }
-
- /**
- * Returns a {@link IProvidedCapability} with the given values.
- *
- * @param namespace The capability namespace
- * @param name The capability name
- * @param version The capability version
- */
- public static IProvidedCapability createProvidedCapability(String namespace, String name, Version version) {
- return new ProvidedCapability(namespace, name, version);
- }
-
- /**
- * Returns a {@link IRequirement} with the given values.
- *
- * @param namespace The capability namespace
- * @param name The required capability name
- * @param range The range of versions that are required, or <code>null</code>
- * to indicate that any version will do.
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param optional <code>true</code> if this required capability is optional,
- * and <code>false</code> otherwise.
- * @param multiple <code>true</code> if this capability can be satisfied by multiple provided capabilities,
- * or <code>false</code> if it requires exactly one match
- * @return the requirement
- */
- public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, boolean optional, boolean multiple) {
- return new RequiredCapability(namespace, name, range, filter, optional ? 0 : 1, multiple ? Integer.MAX_VALUE : 1, true, null);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param namespace the namespace for the requirement. Must not be <code>null</code>.
- * @param name the name for the requirement. Must not be <code>null</code>.
- * @param range the version range. A value of <code>null</code> is equivalent to {@link VersionRange#emptyRange} and matches all versions.
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param minCard minimum cardinality
- * @param maxCard maximum cardinality
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @return the requirement
- */
- public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy) {
- return new RequiredCapability(namespace, name, range, filter, minCard, maxCard, greedy, null);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param requirement the match expression
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param minCard minimum cardinality
- * @param maxCard maximum cardinality
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @return the requirement
- */
- public static IRequirement createRequirement(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy) {
- return new RequiredCapability(requirement, filter, minCard, maxCard, greedy, null);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param namespace the namespace for the requirement. Must not be <code>null</code>.
- * @param name the name for the requirement. Must not be <code>null</code>.
- * @param range the version range. A value of <code>null</code> is equivalent to {@link VersionRange#emptyRange} and matches all versions.
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param optional <code>true</code> if this requirement is optional, and <code>false</code> otherwise.
- * @param multiple <code>true</code> if this requirement can be satisfied by multiple provided capabilities, or <code>false</code>
- * if it requires exactly one match
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @return the requirement
- */
- public static IRequirement createRequirement(String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy) {
- return new RequiredCapability(namespace, name, range, filter, optional, multiple, greedy);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param namespace the namespace for the requirement. Must not be <code>null</code>.
- * @param name the name for the requirement. Must not be <code>null</code>.
- * @param range the version range. A value of <code>null</code> is equivalent to {@link VersionRange#emptyRange} and matches all versions.
- * @param filter The filter used to evaluate whether this capability is applicable in the
- * current environment, or <code>null</code> to indicate this capability is always applicable
- * @param minCard minimum cardinality
- * @param maxCard maximum cardinality
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @param description a <code>String</code> description of the requirement, or <code>null</code>
- * @return the requirement
- */
- public static IRequirement createRequirement(String namespace, String name, VersionRange range, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy, String description) {
- return new RequiredCapability(namespace, name, range, filter, minCard, maxCard, greedy, description);
- }
-
- /**
- * Create and return a new requirement ({@link IRequirement}) with the specified values.
- *
- * @param requirement the match expression
- * @param filter the filter, or <code>null</code>
- * @param minCard minimum cardinality
- * @param maxCard maximum cardinality
- * @param greedy <code>true</code> if the requirement should be considered greedy and <code>false</code> otherwise
- * @param description a <code>String</code> description of the requirement, or <code>null</code>
- * @return the requirement
- */
- public static IRequirement createRequirement(IMatchExpression<IInstallableUnit> requirement, IMatchExpression<IInstallableUnit> filter, int minCard, int maxCard, boolean greedy, String description) {
- return new RequiredCapability(requirement, filter, minCard, maxCard, greedy, description);
- }
-
- /**
- * Returns a new requirement change.
- * @param applyOn The source of the requirement change - the kind of requirement to apply the change to
- * @param newValue The result of the requirement change - the requirement to replace the source requirement with
- * @return a requirement change
- */
- public static IRequirementChange createRequirementChange(IRequirement applyOn, IRequirement newValue) {
- if ((applyOn == null || applyOn instanceof IRequiredCapability) && (newValue == null || newValue instanceof IRequiredCapability))
- return new RequirementChange((IRequiredCapability) applyOn, (IRequiredCapability) newValue);
- throw new IllegalArgumentException();
- }
-
- /**
- * Returns a new {@link ICopyright}.
- * @param location the location of a document containing the copyright notice, or <code>null</code>
- * @param body the copyright body, cannot be <code>null</code>
- * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
- */
- public static ICopyright createCopyright(URI location, String body) {
- return new Copyright(location, body);
- }
-
- /**
- * Return a new {@link ILicense}
- * The body should contain either the full text of the license or an summary for a license
- * fully specified in the given location.
- *
- * @param location the location of a document containing the full license, or <code>null</code>
- * @param body the license body, cannot be <code>null</code>
- * @throws IllegalArgumentException when the <code>body</code> is <code>null</code>
- */
- public static ILicense createLicense(URI location, String body) {
- return new License(location, body, null);
- }
-
- /**
- * Returns an {@link IInstallableUnit} that represents the given
- * unit bound to the given fragments.
- *
- * @see IInstallableUnit#isResolved()
- * @param unit The unit to be bound
- * @param fragments The fragments to be bound
- * @return A resolved installable unit
- */
- public static IInstallableUnit createResolvedInstallableUnit(IInstallableUnit unit, IInstallableUnitFragment[] fragments) {
- if (unit.isResolved())
- return unit;
- Assert.isNotNull(unit);
- Assert.isNotNull(fragments);
- return new ResolvedInstallableUnit(unit, fragments);
-
- }
-
- /**
- * Returns an instance of {@link ITouchpointData} with the given instructions.
- *
- * @param instructions The instructions for the touchpoint data.
- * @return The created touchpoint data
- */
- public static ITouchpointData createTouchpointData(Map<String, ? extends Object> instructions) {
- Assert.isNotNull(instructions);
- //copy the map to protect against subsequent change by caller
- if (instructions.isEmpty())
- return EMPTY_TOUCHPOINT_DATA;
-
- Map<String, ITouchpointInstruction> result = new LinkedHashMap<String, ITouchpointInstruction>(instructions.size());
-
- for (Map.Entry<String, ? extends Object> entry : instructions.entrySet()) {
- Object value = entry.getValue();
- ITouchpointInstruction instruction;
- if (value == null || value instanceof String)
- instruction = createTouchpointInstruction((String) value, null);
- else
- instruction = (ITouchpointInstruction) value;
- result.put(entry.getKey(), instruction);
- }
- return new TouchpointData(result);
- }
-
- /**
- * Merge the given touchpoint instructions with a pre-existing touchpoint data
- * @param initial - the initial ITouchpointData
- * @param incomingInstructions - Map of ITouchpointInstructions to merge into the initial touchpoint data
- * @return the merged ITouchpointData
- */
- public static ITouchpointData mergeTouchpointData(ITouchpointData initial, Map<String, ITouchpointInstruction> incomingInstructions) {
- if (incomingInstructions == null || incomingInstructions.size() == 0)
- return initial;
-
- Map<String, ITouchpointInstruction> resultInstructions = new HashMap<String, ITouchpointInstruction>(initial.getInstructions());
- for (String key : incomingInstructions.keySet()) {
- ITouchpointInstruction instruction = incomingInstructions.get(key);
- ITouchpointInstruction existingInstruction = resultInstructions.get(key);
-
- if (existingInstruction != null) {
- String body = existingInstruction.getBody();
- if (body == null || body.length() == 0)
- body = instruction.getBody();
- else if (instruction.getBody() != null) {
- if (!body.endsWith(";")) //$NON-NLS-1$
- body += ';';
- body += instruction.getBody();
- }
-
- String importAttribute = existingInstruction.getImportAttribute();
- if (importAttribute == null || importAttribute.length() == 0)
- importAttribute = instruction.getImportAttribute();
- else if (instruction.getImportAttribute() != null) {
- if (!importAttribute.endsWith(",")) //$NON-NLS-1$
- importAttribute += ',';
- importAttribute += instruction.getBody();
- }
- instruction = createTouchpointInstruction(body, importAttribute);
- }
- resultInstructions.put(key, instruction);
- }
- return createTouchpointData(resultInstructions);
- }
-
- public static ITouchpointInstruction createTouchpointInstruction(String body, String importAttribute) {
- return new TouchpointInstruction(body, importAttribute);
- }
-
- /**
- * Returns a {@link TouchpointType} with the given id and version.
- *
- * @param id The touchpoint id
- * @param version The touchpoint version
- * @return A touchpoint type instance with the given id and version
- */
- public static ITouchpointType createTouchpointType(String id, Version version) {
- Assert.isNotNull(id);
- Assert.isNotNull(version);
-
- if (id.equals(ITouchpointType.NONE.getId()) && version.equals(ITouchpointType.NONE.getVersion()))
- return ITouchpointType.NONE;
-
- synchronized (typeCache) {
- ITouchpointType result = getCachedTouchpointType(id, version);
- if (result != null)
- return result;
- result = new TouchpointType(id, version);
- putCachedTouchpointType(result);
- return result;
- }
- }
-
- public static IUpdateDescriptor createUpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors, int severity, String description, URI location) {
- return new UpdateDescriptor(descriptors, severity, description, location);
- }
-
- public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description) {
- return createUpdateDescriptor(id, range, severity, description, null);
- }
-
- /**
- * Create and return a new update descriptor {@link IUpdateDescriptor} with the specified values.
- *
- * @param id the identifiter for the update. Must not be <code>null</code>.
- * @param range the version range. A <code>null</code> range is equivalent to {@link VersionRange#emptyRange} and matches all versions.
- * @param severity the severity
- * @param description a <code>String</code> description or <code>null</code>
- * @param location a {@link URI} specifying the location or <code>null</code>
- * @return the update descriptor
- */
- public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description, URI location) {
- Collection<IMatchExpression<IInstallableUnit>> descriptors = new ArrayList<IMatchExpression<IInstallableUnit>>(1);
- descriptors.add(createMatchExpressionFromRange(IInstallableUnit.NAMESPACE_IU_ID, id, range));
- return createUpdateDescriptor(descriptors, severity, description, location);
- }
-
- private static final IExpression allVersionsExpression;
- private static final IExpression range_II_Expression;
- private static final IExpression range_IN_Expression;
- private static final IExpression range_NI_Expression;
- private static final IExpression range_NN_Expression;
- private static final IExpression strictVersionExpression;
- private static final IExpression openEndedExpression;
- private static final IExpression openEndedNonInclusiveExpression;
-
- static {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression xVar = factory.variable("x"); //$NON-NLS-1$
- IExpression nameEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAME), factory.indexedParameter(0));
- IExpression namespaceEqual = factory.equals(factory.member(xVar, ProvidedCapability.MEMBER_NAMESPACE), factory.indexedParameter(1));
-
- IExpression versionMember = factory.member(xVar, ProvidedCapability.MEMBER_VERSION);
-
- IExpression versionCmpLow = factory.indexedParameter(2);
- IExpression versionEqual = factory.equals(versionMember, versionCmpLow);
- IExpression versionGt = factory.greater(versionMember, versionCmpLow);
- IExpression versionGtEqual = factory.greaterEqual(versionMember, versionCmpLow);
-
- IExpression versionCmpHigh = factory.indexedParameter(3);
- IExpression versionLt = factory.less(versionMember, versionCmpHigh);
- IExpression versionLtEqual = factory.lessEqual(versionMember, versionCmpHigh);
-
- IExpression pvMember = factory.member(factory.thisVariable(), InstallableUnit.MEMBER_PROVIDED_CAPABILITIES);
- allVersionsExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual)));
- strictVersionExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionEqual)));
- openEndedExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual)));
- openEndedNonInclusiveExpression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt)));
- range_II_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLtEqual)));
- range_IN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGtEqual, versionLt)));
- range_NI_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLtEqual)));
- range_NN_Expression = factory.exists(pvMember, factory.lambda(xVar, factory.and(nameEqual, namespaceEqual, versionGt, versionLt)));
- }
-
- private static IMatchExpression<IInstallableUnit> createMatchExpressionFromRange(String namespace, String name, VersionRange range) {
- IMatchExpression<IInstallableUnit> resultExpression = null;
- IExpressionFactory factory = ExpressionUtil.getFactory();
- if (range == null || range.equals(VersionRange.emptyRange)) {
- resultExpression = factory.matchExpression(allVersionsExpression, name, namespace);
- } else {
- if (range.getMinimum().equals(range.getMaximum())) {
- // Explicit version appointed
- resultExpression = factory.matchExpression(strictVersionExpression, name, namespace, range.getMinimum());
- } else {
- if (range.getMaximum().equals(Version.MAX_VERSION)) {
- // Open ended
- resultExpression = factory.matchExpression(range.getIncludeMinimum() ? openEndedExpression : openEndedNonInclusiveExpression, name, namespace, range.getMinimum());
- } else {
- resultExpression = factory.matchExpression(//
- range.getIncludeMinimum() ? (range.getIncludeMaximum() ? range_II_Expression : range_IN_Expression) //
- : (range.getIncludeMaximum() ? range_NI_Expression : range_NN_Expression), //
- name, namespace, range.getMinimum(), range.getMaximum());
- }
- }
- }
- return resultExpression;
- }
-
- private static ITouchpointType getCachedTouchpointType(String id, Version version) {
- for (int i = 0; i < typeCache.length; i++) {
- if (typeCache[i] != null && typeCache[i].getId().equals(id) && typeCache[i].getVersion().equals(version))
- return typeCache[i];
- }
- return null;
- }
-
- private static void putCachedTouchpointType(ITouchpointType result) {
- //simple rotating buffer
- typeCache[typeCacheOffset] = result;
- typeCacheOffset = (typeCacheOffset + 1) % typeCache.length;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java
deleted file mode 100644
index 3b3d1b3de..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/Version.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith 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:
- * Cloudsmith Inc - initial API and implementation.
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.metadata;
-
-import java.io.Serializable;
-import org.eclipse.equinox.internal.p2.metadata.*;
-
-/**
- * A class that represents a Version in the Omni Version format. A Version can be though of as an
- * array of comparable elements and an optional pad value. The pad value is used when comparing
- * two versions with a different number of segments.
- *
- * The Omni Version can convert almost any version into a raw format that it uses for comparisons.
- * This enables a unified order of all such versions and solves problems that arise when the
- * version semantics are different. A good example is the OSGi version versus the version used in Maven.
- * The lack of qualifier in the OSGi version implies that the qualifier is an empty string. So a version
- * without a qualifier is the smallest of all other versions with the same major,minor,micro number.
- * With Maven semantics, it's the opposite. If the qualifier is removed, the resulting version is
- * considered higher then all other versions with the same major, minor, and micro number. The
- * Omni version solves this by using different raw representations of the OSGi and Maven versions.
- *
- * The Omni version addresses a lot of other issues as well, such as reordering of the elements
- * or treating some parts of a version as irrelevant when comparing.
- *
- * The class is signature compatible with {@link org.osgi.framework.Version} but attempts
- * to use it as such might render a {@link UnsupportedOperationException} in case the
- * raw vector holds incompatible values. The method {@link #isOSGiCompatible()} can be used
- * to test.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public abstract class Version implements Comparable<Version>, Serializable {
- public static final String RAW_PREFIX = "raw:"; //$NON-NLS-1$
-
- /**
- * The version that is semantically greater then all other versions.
- */
- public static final Version MAX_VERSION = OmniVersion.createMaxVersion();
-
- /**
- * The version that is semantically less then all other versions.
- */
- public static final Version emptyVersion = OmniVersion.createMinVersion();
-
- private static final long serialVersionUID = 6218979149720923857L;
-
- /**
- * Compile a version format string into a compiled format..
- *
- * @param format The format to compile.
- * @return The compiled format
- * @throws VersionFormatException If the format could not be compiled
- */
- public static IVersionFormat compile(String format) throws VersionFormatException {
- return VersionFormat.compile(format, 0, format.length());
- }
-
- /**
- * Parses a version identifier from the specified string.
- *
- * @param version String representation of the version identifier. Leading
- * and trailing whitespace will be ignored.
- * @return A <code>Version</code> object representing the version identifier
- * or <code>null</code> if <code>version</code> is <code>null</code> or
- * an empty string.
- * @throws IllegalArgumentException If <code>version</code> is improperly
- * formatted.
- */
- public static Version create(String version) {
- return version == null ? null : VersionParser.parse(version, 0, version.length());
- }
-
- /**
- * Creates an OSGi version identifier from the specified numerical components.
- *
- * <p>
- * The qualifier is set to the empty string.
- *
- * @param major Major component of the version identifier.
- * @param minor Minor component of the version identifier.
- * @param micro Micro component of the version identifier.
- * @throws IllegalArgumentException If the numerical components are
- * negative.
- */
- public static Version createOSGi(int major, int minor, int micro) {
- return createOSGi(major, minor, micro, null);
- }
-
- /**
- * Creates an OSGi version identifier from the specified components.
- *
- * @param major Major component of the version identifier.
- * @param minor Minor component of the version identifier.
- * @param micro Micro component of the version identifier.
- * @param qualifier Qualifier component of the version identifier. If
- * <code>null</code> is specified, then the qualifier will be set to
- * the empty string.
- * @throws IllegalArgumentException If the numerical components are negative
- * or the qualifier string is invalid.
- */
- public static Version createOSGi(int major, int minor, int micro, String qualifier) {
- Comparable<?> logicQualifier;
- if (qualifier == null || qualifier.length() == 0) {
- if (major == 0 && minor == 0 && micro == 0)
- return emptyVersion;
- logicQualifier = VersionVector.MINS_VALUE; // So that we can do identity compare
- } else if (qualifier.equals(IVersionFormat.DEFAULT_MAX_STRING_TRANSLATION))
- logicQualifier = VersionVector.MAXS_VALUE;
- else
- logicQualifier = qualifier;
- return new OSGiVersion(major, minor, micro, logicQualifier);
- }
-
- /**
- * Parses a version identifier from the specified string. This method is for backward
- * compatibility with OSGi and will return the OSGi &quot;0.0.0&quot; version when
- * the provided string is empty or <code>null</code>.
- *
- * @param version String representation of the version identifier. Leading
- * and trailing whitespace will be ignored.
- * @return A <code>Version</code> object representing the version
- * identifier. If <code>version</code> is <code>null</code> or
- * the empty string then the OSGi <code>emptyVersion</code> will be
- * returned.
- * @throws IllegalArgumentException If <code>version</code> is improperly
- * formatted.
- * @see #create(String)
- */
- public static Version parseVersion(String version) {
- if (version == null || version.length() == 0)
- return Version.emptyVersion;
- Version v = create(version);
- return v == null ? Version.emptyVersion : v;
- }
-
- /**
- * Returns the optional format.
- */
- public abstract IVersionFormat getFormat();
-
- /**
- * Returns the <code>original</code> part of the string for this version
- * or <code>null</code> if no such part was provided when the version was
- * created. An OSGi type version will always return the OSGi string representation.
- *
- * @return The <code>original</code> part of the version string or
- * <code>null</code> if that part was missing.
- */
- public abstract String getOriginal();
-
- /**
- * Returns the pad value used when comparing this versions to
- * versions that has a larger number of segments
- * @return The pad value or <code>null</code> if not set.
- */
- public abstract Comparable<?> getPad();
-
- /**
- * An element from the raw vector representation of this version.
- * @param index The zero based index of the desired element
- * @return An element from the raw vector
- */
- public abstract Comparable<?> getSegment(int index);
-
- /**
- * Returns the number of elements in the raw vector representation of this version.
- * @return The number of elements in the raw vector.
- */
- public abstract int getSegmentCount();
-
- /**
- * Checks if this version is in compliance with the OSGi version spec.
- * @return A flag indicating whether the version is OSGi compatible or not.
- */
- public abstract boolean isOSGiCompatible();
-
- public String toString() {
- StringBuffer buf = new StringBuffer(20);
- toString(buf);
- return buf.toString();
- }
-
- /**
- * Appends the string representation of this version onto the
- * <code>sb</code> StringBuffer.
- * @param sb The buffer that will receive the version string
- */
- public abstract void toString(StringBuffer sb);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java
deleted file mode 100644
index 4585b5c72..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionFormatException.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-/**
- * Exception thrown when parsing Omni Version formats.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class VersionFormatException extends Exception {
-
- private static final long serialVersionUID = -867104101610941043L;
-
- public VersionFormatException(String message) {
- super(message);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java
deleted file mode 100644
index 5fde149f0..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionRange.java
+++ /dev/null
@@ -1,470 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- * Cloudsmith Inc - rewrite to handle non-OSGi versions.
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import java.io.Serializable;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This class represents a version range with Omni Version bounds. It is signature
- * equivalent with the OSGi org.eclipse.osgi.service.resolver.VersionRange
- *
- * @Immutable
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class VersionRange implements Serializable {
- private static final long serialVersionUID = 4988030307298088028L;
-
- /**
- * TODO: This should not be OSGi but it has to be that for now since the resolver creates
- * a filter where the min and max are converted into strings. When the filter is evaluated an
- * attempt is made to recreate them as OSGi versions.
- *
- * An empty OSGi Version range.
- */
- public static final VersionRange emptyRange = new VersionRange(Version.emptyVersion, true, Version.MAX_VERSION, true);
-
- private final Version minVersion;
- private final boolean includeMin;
- private final Version maxVersion;
- private final boolean includeMax;
-
- private static int copyEscaped(String vr, int pos, String breakChars, StringBuffer sb) {
- int top = vr.length();
- pos = VersionParser.skipWhite(vr, pos);
- if (pos >= top)
- throw new IllegalArgumentException();
-
- char c = vr.charAt(pos);
- for (;;) {
- if (c == '\\' && ++pos < top)
- c = vr.charAt(pos);
- else {
- if (c <= ' ')
- return VersionParser.skipWhite(vr, pos);
- if (breakChars != null && breakChars.indexOf(c) >= 0)
- break;
- }
- sb.append(c);
- if (++pos >= top)
- break;
- c = vr.charAt(pos);
- }
- return pos;
- }
-
- /**
- * Constructs a VersionRange with the specified minVersion and maxVersion.
- * @param minVersion the minimum version of the range
- * @param maxVersion the maximum version of the range
- */
- public VersionRange(Version minVersion, boolean includeMin, Version maxVersion, boolean includeMax) {
- if (minVersion == null) {
- if (maxVersion == null) {
- minVersion = Version.emptyVersion;
- maxVersion = Version.MAX_VERSION;
- } else
- minVersion = Version.emptyVersion;
- } else {
- if (maxVersion == null)
- maxVersion = Version.MAX_VERSION;
- else {
- if (minVersion != maxVersion && minVersion.equals(maxVersion))
- maxVersion = minVersion;
- else if (!(minVersion.getFormat() == null ? maxVersion.getFormat() == null : minVersion.getFormat().equals(maxVersion.getFormat()))) {
- // We always allow the MIN and MAX boundaries
- if (!(minVersion.equals(Version.emptyVersion) || maxVersion.equals(Version.MAX_VERSION)))
- throw new IllegalArgumentException(NLS.bind(Messages.range_boundaries_0_and_1_cannot_have_different_formats, minVersion, maxVersion));
- }
- }
- }
- this.minVersion = minVersion;
- this.includeMin = includeMin;
- this.maxVersion = maxVersion;
- this.includeMax = includeMax;
- validateRange();
- }
-
- /**
- * Constructs a VersionRange from the given versionRange String.
- * @param versionRange a version range String that specifies a range of
- * versions.
- */
- public VersionRange(String versionRange) {
- int top = 0;
- int pos = 0;
- if (versionRange != null) {
- top = versionRange.length();
- pos = VersionParser.skipWhite(versionRange, 0);
- top = VersionParser.skipTrailingWhite(versionRange, pos, top);
- }
-
- if (pos >= top) {
- minVersion = Version.emptyVersion;
- includeMin = true;
- maxVersion = Version.MAX_VERSION;
- includeMax = true;
- return;
- }
-
- char c = versionRange.charAt(pos);
- int[] position = new int[1];
- boolean rawPrefix = false;
- IVersionFormat fmt = null;
- if (VersionParser.isLetter(c)) {
- if (versionRange.startsWith("raw:", pos)) { //$NON-NLS-1$
- rawPrefix = true;
- pos += 4;
- } else {
- position[0] = pos;
- fmt = parseFormat(versionRange, position);
- pos = position[0];
- if (pos >= versionRange.length())
- throw new IllegalArgumentException(NLS.bind(Messages.format_must_be_delimited_by_colon_0, versionRange));
-
- c = versionRange.charAt(pos);
- if (c != ':')
- throw new IllegalArgumentException(NLS.bind(Messages.format_must_be_delimited_by_colon_0, versionRange));
- ++pos;
- }
- pos = VersionParser.skipWhite(versionRange, pos);
- if (pos >= top)
- throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
- c = versionRange.charAt(pos);
- } else
- fmt = VersionFormat.OSGI_FORMAT;
-
- String minStr;
- String maxStr;
- StringBuffer sb = new StringBuffer();
- if (c == '[' || c == '(') {
- includeMin = (c == '[');
- pos = copyEscaped(versionRange, ++pos, ",)]", sb); //$NON-NLS-1$
- if (pos >= top)
- throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
- c = versionRange.charAt(pos++);
- if (c != ',')
- throw new IllegalArgumentException(NLS.bind(Messages.missing_comma_in_range_0, versionRange));
-
- minStr = sb.toString();
- sb.setLength(0);
- pos = copyEscaped(versionRange, pos, ")]", sb); //$NON-NLS-1$
- if (pos >= top)
- throw new IllegalArgumentException();
- maxStr = sb.toString();
-
- c = versionRange.charAt(pos++);
- includeMax = (c == ']');
- } else {
- StringBuffer sbMin = new StringBuffer();
- pos = copyEscaped(versionRange, pos, rawPrefix ? "/" : null, sbMin); //$NON-NLS-1$
- includeMin = includeMax = true;
- minStr = sbMin.toString();
- maxStr = null;
- }
-
- if (rawPrefix) {
- String origMin = null;
- String origMax = null;
- pos = VersionParser.skipWhite(versionRange, pos);
- if (pos < top && versionRange.charAt(pos) == '/') {
- if (++pos == top)
- throw new IllegalArgumentException(NLS.bind(Messages.original_stated_but_missing_0, versionRange));
- position[0] = pos;
- fmt = parseFormat(versionRange, position);
- pos = VersionParser.skipWhite(versionRange, position[0]);
- if (pos < top) {
- boolean origUseIncDelims = false;
- c = versionRange.charAt(pos);
- if (c != ':')
- throw new IllegalArgumentException(NLS.bind(Messages.original_must_start_with_colon_0, versionRange));
-
- pos = VersionParser.skipWhite(versionRange, ++pos);
- if (pos == top)
- throw new IllegalArgumentException(NLS.bind(Messages.original_stated_but_missing_0, versionRange));
-
- c = versionRange.charAt(pos);
- if (c == '[' || c == '(') {
- if (includeMin != (c == '[') || maxStr == null)
- throw new IllegalArgumentException(NLS.bind(Messages.raw_and_original_must_use_same_range_inclusion_0, versionRange));
- pos = VersionParser.skipWhite(versionRange, ++pos);
- origUseIncDelims = true;
- }
-
- sb.setLength(0);
- if (maxStr == null) {
- copyEscaped(versionRange, pos, ",])", sb); //$NON-NLS-1$
- origMin = sb.toString();
- } else {
- pos = copyEscaped(versionRange, pos, ",])", sb); //$NON-NLS-1$
- if (pos >= top)
- throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
- c = versionRange.charAt(pos++);
- if (c != ',')
- throw new IllegalArgumentException(NLS.bind(Messages.missing_comma_in_range_0, versionRange));
- origMin = sb.toString();
-
- sb.setLength(0);
- pos = copyEscaped(versionRange, pos, "])", sb); //$NON-NLS-1$
- if (origUseIncDelims) {
- if (pos >= top)
- throw new IllegalArgumentException(NLS.bind(Messages.premature_EOS_0, versionRange));
- c = versionRange.charAt(pos++);
- if (includeMax != (c == ']'))
- throw new IllegalArgumentException(NLS.bind(Messages.raw_and_original_must_use_same_range_inclusion_0, versionRange));
- }
- origMax = sb.toString();
- }
- }
- }
- minVersion = VersionFormat.parseRaw(minStr, fmt, origMin);
- if (maxStr != null) {
- if (maxStr.equals(minStr))
- maxVersion = minVersion;
- else
- maxVersion = VersionFormat.parseRaw(maxStr, fmt, origMax);
- } else
- maxVersion = Version.MAX_VERSION;
- } else {
- if (fmt == null)
- fmt = VersionFormat.OSGI_FORMAT;
- minVersion = fmt.parse(minStr);
- if (maxStr != null) {
- if (maxStr.equals(minStr))
- maxVersion = minVersion;
- else
- maxVersion = fmt.parse(maxStr);
- } else {
- maxVersion = Version.MAX_VERSION;
- }
- }
- validateRange();
- }
-
- private static IVersionFormat parseFormat(String versionRange, int[] position) {
- int pos = VersionParser.skipWhite(versionRange, position[0]);
- if (!versionRange.startsWith("format(", pos)) //$NON-NLS-1$
- return null;
-
- pos += 7;
- int end = VersionParser.findEndOfFormat(versionRange, pos, versionRange.length());
- try {
- position[0] = end + 1;
- return VersionFormat.compile(versionRange, pos, end);
- } catch (VersionFormatException e) {
- throw new IllegalArgumentException(e.getMessage());
- }
- }
-
- /**
- * Returns the version format.
- */
- public IVersionFormat getFormat() {
- return minVersion.equals(Version.emptyVersion) ? maxVersion.getFormat() : minVersion.getFormat();
- }
-
- /**
- * Returns the minimum Version of this VersionRange
- * @return the minimum Version of this VersionRange
- */
- public Version getMinimum() {
- return minVersion;
- }
-
- /**
- * Indicates if the minimum version is included in the version range.
- * @return true if the minimum version is included in the version range;
- * otherwise false is returned
- */
- public boolean getIncludeMinimum() {
- return includeMin;
- }
-
- /**
- * Returns the maximum Version of this VersionRange
- * @return the maximum Version of this VersionRange
- */
- public Version getMaximum() {
- return maxVersion;
- }
-
- /**
- * Indicates if the maximum version is included in the version range.
- * @return true if the maximum version is included in the version range;
- * otherwise false is returned
- */
- public boolean getIncludeMaximum() {
- return includeMax;
- }
-
- public VersionRange intersect(VersionRange r2) {
- int minCompare = minVersion.compareTo(r2.getMinimum());
- int maxCompare = maxVersion.compareTo(r2.getMaximum());
-
- boolean resultMinIncluded;
- Version resultMin;
- if (minCompare == 0) {
- if (maxCompare == 0 && includeMin == r2.getIncludeMinimum() && includeMax == r2.getIncludeMaximum())
- return this;
- resultMin = minVersion;
- resultMinIncluded = includeMin && r2.getIncludeMinimum();
- } else if (minCompare < 0) {
- resultMin = r2.getMinimum();
- resultMinIncluded = r2.getIncludeMinimum();
- } else { // minCompare > 0)
- resultMin = minVersion;
- resultMinIncluded = includeMin;
- }
-
- boolean resultMaxIncluded;
- Version resultMax;
- if (maxCompare > 0) {
- resultMax = r2.getMaximum();
- resultMaxIncluded = r2.getIncludeMaximum();
- } else if (maxCompare < 0) {
- resultMax = maxVersion;
- resultMaxIncluded = includeMax;
- } else {//maxCompare == 0
- resultMax = maxVersion;
- resultMaxIncluded = includeMax && r2.getIncludeMaximum();
- }
-
- int minMaxCmp = resultMin.compareTo(resultMax);
- if (minMaxCmp < 0 || (minMaxCmp == 0 && resultMinIncluded && resultMaxIncluded))
- return new VersionRange(resultMin, resultMinIncluded, resultMax, resultMaxIncluded);
-
- return null;
- }
-
- /**
- * Returns whether the given version is included in this VersionRange.
- * This will depend on the minimum and maximum versions of this VersionRange
- * and the given version.
- *
- * @param version a version to be tested for inclusion in this VersionRange.
- * (may be <code>null</code>)
- * @return <code>true</code> if the version is include,
- * <code>false</code> otherwise
- */
- public boolean isIncluded(Version version) {
- if (version == null)
- return false;
-
- if (minVersion == maxVersion)
- // Can only happen when both includeMin and includeMax are true
- return minVersion.equals(version);
-
- int minCheck = includeMin ? 0 : -1;
- int maxCheck = includeMax ? 0 : 1;
- return minVersion.compareTo(version) <= minCheck && maxVersion.compareTo(version) >= maxCheck;
- }
-
- /**
- * Checks if the versions of this range is in compliance with the OSGi version spec.
- * @return A flag indicating whether the range is OSGi compatible or not.
- */
- public boolean isOSGiCompatible() {
- return minVersion.isOSGiCompatible() && maxVersion.isOSGiCompatible();
- }
-
- public boolean equals(Object object) {
- if (!(object instanceof VersionRange))
- return false;
- VersionRange vr = (VersionRange) object;
- return includeMin == vr.includeMin && includeMax == vr.includeMax && minVersion.equals(vr.getMinimum()) && maxVersion.equals(vr.getMaximum());
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + maxVersion.hashCode();
- result = prime * result + minVersion.hashCode();
- result = prime * result + (includeMax ? 1231 : 1237);
- result = prime * result + (includeMin ? 1231 : 1237);
- return result;
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
- toString(result);
- return result.toString();
- }
-
- public void toString(StringBuffer result) {
- boolean gtEqual = includeMin && includeMax && Version.MAX_VERSION.equals(maxVersion);
- if (gtEqual && Version.emptyVersion.equals(minVersion)) {
- minVersion.toString(result);
- return;
- }
-
- IVersionFormat fmt = getFormat();
- if (fmt == VersionFormat.OSGI_FORMAT) {
- if (gtEqual) {
- minVersion.toString(result);
- } else {
- result.append(includeMin ? '[' : '(');
- minVersion.toString(result);
- result.append(',');
- maxVersion.toString(result);
- result.append(includeMax ? ']' : ')');
- }
- return;
- }
-
- result.append("raw:"); //$NON-NLS-1$
- if (gtEqual) {
- ((BasicVersion) minVersion).rawToString(result, true);
- } else {
- result.append(includeMin ? '[' : '(');
- ((BasicVersion) minVersion).rawToString(result, true);
- result.append(',');
- ((BasicVersion) maxVersion).rawToString(result, true);
- result.append(includeMax ? ']' : ')');
- }
- boolean hasOriginal = (minVersion.getOriginal() != null || maxVersion.getOriginal() != null);
- if (fmt != null || hasOriginal) {
- result.append('/');
- if (fmt != null)
- fmt.toString(result);
- if (hasOriginal) {
- result.append(':');
- if (gtEqual) {
- ((BasicVersion) minVersion).originalToString(result, true);
- } else {
- if (Version.emptyVersion.equals(minVersion))
- ((BasicVersion) minVersion).rawToString(result, true);
- else
- ((BasicVersion) minVersion).originalToString(result, true);
- result.append(',');
- ((BasicVersion) maxVersion).originalToString(result, true);
- }
- }
- }
- }
-
- // Preserve singletons during deserialization
- private Object readResolve() {
- VersionRange vr = this;
- if (equals(emptyRange))
- vr = emptyRange;
- return vr;
- }
-
- private void validateRange() {
- int cmp = minVersion.compareTo(maxVersion);
- if (!(cmp < 0 || (cmp == 0 && includeMin && includeMax)))
- throw new IllegalArgumentException(NLS.bind(Messages.range_min_0_is_not_less_then_range_max_1, minVersion, maxVersion));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java
deleted file mode 100644
index ebd1273dc..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/VersionedId.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Code 9 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:
- * Code 9 - initial API and implementation
- * EclipseSource - ongoing development
- * Thomas Hallgren - Fix for bug 268659
- * IBM - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata;
-
-import org.eclipse.equinox.internal.p2.core.helpers.StringHelper;
-
-/**
- * An object representing a (id,version) pair. An instance of this class can be constructed
- * by invoking the constructor or calling {@link VersionedId#parse(String)} with a string
- * representation of this VersionedID.
- *
- * @noextend This class is not intended to be subclassed by clients.
- *
- * @since 2.0
- */
-public class VersionedId implements IVersionedId {
- private final String id;
- private final Version version;
-
- /**
- * Creates and returns a new {@link VersionedId} from the given string specification.
- * The specification must be of the form "id/version", or just "id" if the version is absent
- * <p>
- * This factory method can be used to reconstruct a {@link VersionedId}
- * instance from the string representation produced by a previous invocation of
- * {@link #toString()}.
- *
- * @param spec the specification for the versioned id to create
- * @return the parsed versioned id
- * @throws IllegalArgumentException If <code>spec</code> is improperly
- * formatted.
- */
- public static IVersionedId parse(String spec) {
- String[] segments = StringHelper.getArrayFromString(spec, '/');
- return new VersionedId(segments[0], segments.length == 1 ? null : segments[1]);
- }
-
- /**
- * Creates a new versioned id with the given id and version.
- *
- * @param id The identifier
- * @param version The version
- * @throws IllegalArgumentException If <code>version</code> is improperly
- * formatted.
- */
- public VersionedId(String id, String version) {
- this.id = id;
- this.version = Version.parseVersion(version);
- }
-
- /**
- * Creates a new versioned id with the given id and version.
- *
- * @param id The identifier
- * @param version The version
- */
- public VersionedId(String id, Version version) {
- this.id = id;
- this.version = (version == null) ? Version.emptyVersion : version;
- }
-
- /**
- * @return the ID of this VersionedID
- */
- public String getId() {
- return id;
- }
-
- /**
- * @return the Version of this VersionedID
- */
- public Version getVersion() {
- return version;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (!(obj instanceof VersionedId))
- return false;
-
- VersionedId vname = (VersionedId) obj;
- return id.equals(vname.id) && version.equals(vname.version);
- }
-
- public int hashCode() {
- return id.hashCode() * 31 + version.hashCode();
- }
-
- /**
- * Returns a string representation of this versioned id.
- * The result can be used to later construct an equal {@link VersionedId}
- * instance using {{@link #parse(String)}.
- * @return A string representation of this versioned id
- */
- public String toString() {
- return Version.emptyVersion.equals(version) ? id : id + '/' + version.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java
deleted file mode 100644
index 1d0832405..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionParseException.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * An exception used by an expression parser that indicates that something went wrong when
- * parsing.
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class ExpressionParseException extends RuntimeException {
- private static final long serialVersionUID = 8432875384760577764L;
-
- public ExpressionParseException(String message) {
- super(message);
- }
-
- public ExpressionParseException(String expression, String message, int position) {
- super("Parse error in string \"" + expression + "\": " + message + " at position " + position); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java
deleted file mode 100644
index 28864fe0d..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/ExpressionUtil.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.parser.LDAPFilterParser;
-import org.eclipse.equinox.internal.p2.metadata.expression.parser.QLParser;
-
-/**
- * Global access to factory, parser, and methods for introspection
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since 2.0
- */
-public final class ExpressionUtil {
- private static final IExpressionParser expressionParser = new QLParser(ExpressionFactory.INSTANCE);
- private static final LDAPFilterParser ldapFilterParser = new LDAPFilterParser(ExpressionFactory.INSTANCE);
- public static final IExpression TRUE_EXPRESSION = ExpressionFactory.INSTANCE.constant(Boolean.TRUE);
- public static final IExpression FALSE_EXPRESSION = ExpressionFactory.INSTANCE.constant(Boolean.FALSE);
-
- private ExpressionUtil() {
- //We don't want to ppl to instantiate this class
- }
-
- /**
- * Returns the global expression factory
- * @return The global expression factory.
- */
- public static IExpressionFactory getFactory() {
- return ExpressionFactory.INSTANCE;
- }
-
- /**
- * Creates and returns a new expression parser
- * @return The new parser
- */
- public static IExpressionParser getParser() {
- return expressionParser;
- }
-
- /**
- * Parse an LDAP filter from the <code>filter</code> string. If <code>filter</code> is <code>null</code>
- * or a string that is empty or only consists of whitespace, then this method returns <code>null</code>.
- * @param filter The filter to parse. Can be <code>null</code> or empty.
- * @return An expression that corresponds to the LDAP filter or <code>null</code>.
- * @throws ExpressionParseException If the syntax was invalid
- */
- public static IFilterExpression parseLDAP(String filter) throws IllegalArgumentException {
- filter = trimmedOrNull(filter);
- return filter == null ? null : ldapFilterParser.parse(filter);
- }
-
- /**
- * Create a new expression. The expression will have access to the global
- * variable 'this' and to the context parameters.
- * @param expression The string representing the boolean expression.
- * @return The resulting expression tree.
- * @throws ExpressionParseException If the syntax was invalid
- */
- public static IExpression parse(String expression) {
- expression = trimmedOrNull(expression);
- return expression == null ? null : getParser().parse(expression);
- }
-
- /**
- * Create an arbitrary expression. The expression will have access to the global
- * variable 'everything' and to the context parameters.
- * @param expression The string representing the boolean expression.
- * @return The resulting expression tree.
- * @throws ExpressionParseException If the syntax was invalid
- */
- public static IExpression parseQuery(String expression) {
- expression = trimmedOrNull(expression);
- return expression == null ? null : getParser().parseQuery(expression);
- }
-
- /**
- * If <code>str</code> is <code>null</code>, then this method returns <code>null</code>.
- * Otherwise <code>str</code> is trimmed from whitespace at both ends. If the result
- * of the trim is an empty string, then <code>null</code> is returned, otherwise the
- * result of the trim is returned.
- * @param str The string to trim. Can be <code>null</code>.
- * @return The trimmed string or <code>null</code>.
- */
- public static String trimmedOrNull(String str) {
- if (str != null) {
- str = str.trim();
- if (str.length() == 0)
- str = null;
- }
- return str;
- }
-
- /**
- * Obtains the Left Hand Side (LHS) of a binary expression.
- * @param expression The expression to introspect
- * @return The left hand side operator
- * @throws IllegalArgumentException if the expression is not a binary expression
- * @see IExpression#TYPE_AT
- * @see IExpression#TYPE_EQUALS
- * @see IExpression#TYPE_GREATER
- * @see IExpression#TYPE_GREATER_EQUAL
- * @see IExpression#TYPE_LESS
- * @see IExpression#TYPE_LESS_EQUAL
- * @see IExpression#TYPE_MATCHES
- * @see IExpression#TYPE_NOT_EQUALS
- */
- public static IExpression getLHS(IExpression expression) {
- if (expression instanceof Binary)
- return ((Binary) expression).lhs;
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the name of a variable or member expression.
- * @param expression The expression to introspect
- * @return The name of the expression
- * @throws IllegalArgumentException if the expression is not a variable or a member
- * @see IExpression#TYPE_MEMBER
- * @see IExpression#TYPE_VARIABLE
- */
- public static String getName(IExpression expression) {
- if (expression instanceof Member)
- return ((Member) expression).getName();
- if (expression instanceof Variable)
- return ((Variable) expression).getName();
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the operand of an unary expression
- * @param expression The expression to introspect
- * @return The expression operand
- * @throws IllegalArgumentException if the expression is not an unary expression
- * @see IExpression#TYPE_ALL
- * @see IExpression#TYPE_EXISTS
- * @see IExpression#TYPE_LAMBDA
- * @see IExpression#TYPE_NOT
- */
- public static IExpression getOperand(IExpression expression) {
- if (expression instanceof Unary)
- return ((Unary) expression).operand;
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the operands of an n-ary expression
- * @param expression The expression to introspect
- * @return The expression operand
- * @throws IllegalArgumentException if the expression is not a n-ary expression
- * @see IExpression#TYPE_AND
- * @see IExpression#TYPE_OR
- */
- public static IExpression[] getOperands(IExpression expression) {
- if (expression instanceof NAry)
- return ((NAry) expression).operands;
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the Right Hand Side (RHS) of a binary expression.
- * @param expression The expression to introspect
- * @return The right hand side operator
- * @throws IllegalArgumentException if the expression is not a binary expression
- * @see IExpression#TYPE_AT
- * @see IExpression#TYPE_EQUALS
- * @see IExpression#TYPE_GREATER
- * @see IExpression#TYPE_GREATER_EQUAL
- * @see IExpression#TYPE_LESS
- * @see IExpression#TYPE_LESS_EQUAL
- * @see IExpression#TYPE_MATCHES
- * @see IExpression#TYPE_NOT_EQUALS
- */
- public static IExpression getRHS(IExpression expression) {
- if (expression instanceof Binary)
- return ((Binary) expression).rhs;
- throw new IllegalArgumentException();
- }
-
- /**
- * Obtains the value of a literal expression
- * @param expression The expression to introspect
- * @return The literal value
- * @throws IllegalArgumentException if the expression is not a literal
- * @see IExpression#TYPE_LITERAL
- */
- public static Object getValue(IExpression expression) {
- if (expression instanceof Literal)
- return ((Literal) expression).value;
- throw new IllegalArgumentException();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java
deleted file mode 100644
index a89e54e2a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IContextExpression.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * This is an expression that will need access to the global variable
- * <code>everything</code>.
- * @since 2.0
- */
-public interface IContextExpression<T> extends IExpression {
-
- /**
- * <p>Creates a new context to be passed to a subsequent evaluation. The context
- * will have the variable 'everything' set to an expression that represents
- * the <code>everything</code> iterator filtered for instances of <code>elementClass</code>.</p>
- * <p>The values of the iterator will be copied if necessary (when everything is referenced
- * more then once).</p>
- * @param elementClass the class of the iterator elements
- * @param indexProvider The index provider that represents all queried material.
- * @return A new evaluation context.
- */
- IEvaluationContext createContext(Class<? extends T> elementClass, IIndexProvider<T> indexProvider);
-
- /**
- * <p>Creates a new context to be passed to a subsequent evaluation. The context
- * will have the variable 'everything' set to an expression that represents
- * the <code>everything</code> iterator filtered for instances of <code>elementClass</code>.</p>
- * <p>The values of the iterator will be copied if necessary (when everything is referenced
- * more then once).</p>
- * @param elementClass the class of the iterator elements
- * @param everything The iterator that represents all queried material.
- * @return A new evaluation context.
- */
- IEvaluationContext createContext(Class<? extends T> elementClass, Iterator<T> everything);
-
- /**
- * Returns the parameters that this context expression was created with.
- * @return An array of parameters, possibly empty but never <code>null</code>.
- */
- Object[] getParameters();
-
- /**
- * Evaluate the expression and return the expected collection result as an iterator
- * @param context The evaluation context
- * @return The result of the evaluation.
- */
- Iterator<T> iterator(IEvaluationContext context);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java
deleted file mode 100644
index ee3021442..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IEvaluationContext.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * The evaluation context. Contexts can be nested and new contexts are pushed for each closure
- * during an evaluation of an expression.
- * @since 2.0
- */
-public interface IEvaluationContext {
- IIndexProvider<?> getIndexProvider();
-
- void setIndexProvider(IIndexProvider<?> indexProvider);
-
- /**
- * Retrieve the value of the given <code>variable</code> from this context
- * @param variable The variable who's value should be retrieved
- * @return The current value for the variable
- */
- Object getValue(IExpression variable);
-
- /**
- * Set the current value for the given <code>variable</code> to <code>value</code>
- * @param variable The variable who's value should be set
- * @param value The new value for the variable.
- */
- void setValue(IExpression variable, Object value);
-
- /**
- * Returns the value of the parameter at the given <code>position</code>
- * @param position The zero based position for the parameter
- * @return The parameter value
- */
- Object getParameter(int position);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java
deleted file mode 100644
index 802c8ba85..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpression.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * A node in the expression tree
- * @since 2.0
- * @noimplement This interface is not intended to be implemented directly by clients.
- * @noextend This interface is not intended to be extended directly by clients.
- */
-public interface IExpression {
- int TYPE_ALL = 1;
- int TYPE_AND = 2;
- int TYPE_AT = 3;
- int TYPE_EQUALS = 4;
- int TYPE_EXISTS = 5;
- int TYPE_GREATER = 6;
- int TYPE_GREATER_EQUAL = 7;
- int TYPE_LAMBDA = 8;
- int TYPE_LESS = 9;
- int TYPE_LESS_EQUAL = 10;
- int TYPE_LITERAL = 11;
- int TYPE_MATCHES = 12;
- int TYPE_MEMBER = 13;
- int TYPE_NOT = 14;
- int TYPE_NOT_EQUALS = 15;
- int TYPE_OR = 16;
- int TYPE_PARAMETER = 17;
- int TYPE_VARIABLE = 18;
- int TYPE_ARRAY = 20;
- int TYPE_ASSIGNMENT = 21;
- int TYPE_COLLECT = 22;
- int TYPE_CONDITION = 23;
- int TYPE_FIRST = 24;
- int TYPE_FLATTEN = 25;
- int TYPE_FUNCTION = 26;
- int TYPE_INTERSECT = 27;
- int TYPE_LATEST = 28;
- int TYPE_LIMIT = 29;
- int TYPE_PIPE = 30;
- int TYPE_SELECT = 31;
- int TYPE_TRAVERSE = 32;
- int TYPE_UNION = 33;
- int TYPE_UNIQUE = 34;
-
- /**
- * Let the visitor visit this instance and all expressions that this
- * instance contains.
- * @param visitor The visiting visitor.
- * @return <code>true</code> if the visitor should continue visiting, <code>false</code> otherwise.
- */
- boolean accept(IExpressionVisitor visitor);
-
- /**
- * Evaluate this expression with given context and variables.
- * @param context The evaluation context
- * @return The result of the evaluation.
- */
- Object evaluate(IEvaluationContext context);
-
- /**
- * Returns the expression type (see TYPE_xxx constants).
- */
- int getExpressionType();
-
- /**
- * Appends the string representation of this expression to the collector <code>collector</code>.
- */
- void toString(StringBuffer collector);
-
- /**
- * Appends the an LDAP filter representation of this expression to the <code>collector</code>.
- * @throws UnsupportedOperationException if the expression contains nodes
- * that cannot be represented in an LDAP filter
- */
- void toLDAPString(StringBuffer collector);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java
deleted file mode 100644
index 7a6701c50..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionFactory.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import java.util.List;
-import java.util.Map;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-import org.eclipse.equinox.p2.query.IQuery;
-
-/**
- * This interface provides all the factory methods needed to create the
- * nodes of the expression tree.
- * @since 2.0
- * @noimplement This interface is not intended to be implemented directly by clients.
- * @noextend This interface is not intended to be extended directly by clients.
- */
-public interface IExpressionFactory {
- String FUNC_BOOLEAN = "boolean"; //$NON-NLS-1$
- String FUNC_VERSION = "version"; //$NON-NLS-1$
- String FUNC_CLASS = "class"; //$NON-NLS-1$
- String FUNC_RANGE = "range"; //$NON-NLS-1$
- String FUNC_FILTER = "filter"; //$NON-NLS-1$
-
- IExpression[] NO_ARGS = new IExpression[0];
-
- /**
- * Create a collection filter that yields true if the <code>lambda</code> yields true for
- * all of the elements of the <code>collection</code>
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that performs the test
- * @return A boolean expression
- */
- IExpression all(IExpression collection, IExpression lambda);
-
- /**
- * Create a logical <i>and</i> of its <code>operands</code>.
- * @param operands The boolean operands
- * @return A boolean expression
- */
- IExpression and(IExpression... operands);
-
- /**
- * Creates an expression that represents a variable assignment
- * @param variable The variable
- * @param expression The expression that yields the value to assign to the variable
- * @return An assignment expression
- */
- IExpression assignment(IExpression variable, IExpression expression);
-
- /**
- * Create an expression that collects the result of evaluating each element in a new collection.
- * @param collection The collection providing the elements to evaluate
- * @param lambda The lambda that creates each new element
- * @return A collection expression
- */
- IExpression collect(IExpression collection, IExpression lambda);
-
- /**
- * Create an expression that first evaluates a <code>test</code> and then, depending on the outcome,
- * evaluates either <code>ifTrue</code> or <code>ifFalse</code>. The expression yields the result
- * of the <code>ifTrue</code> or <code>ifFalse</code> evaluation.
- * @param test The test
- * @param ifTrue The code to evaluate when the test evaluates to <code>true</code>
- * @param ifFalse The code to evaluate when the test evaluates to <code>false</code>
- * @return The conditional expression
- */
- IExpression condition(IExpression test, IExpression ifTrue, IExpression ifFalse);
-
- /**
- * Create an expression that yields the first element of the
- * <code>collection</code> for which the <code>lambda</code> yields <code>true</code>.
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that performs the test
- * @return An element expression
- */
- IExpression first(IExpression collection, IExpression lambda);
-
- /**
- * Intended to be applied on collections of collections. Yields a single collection with
- * all elements from the source collections, in the order they are evaluated.
- * @param collection The collection providing the collections that provides all elements
- * @return A collection expression
- */
- IExpression flatten(IExpression collection);
-
- /**
- * Creates a lambda expression that takes more then one variable (currying). Suitable for use
- * in most collection expressions.
- * @param variable The element variable that the lambda uses
- * @param body The body of the lambda
- * @param initialAssignments Assignments to evaluate once before calling the body for each element.
- * @return A lambda expression with currying
- */
- IExpression lambda(IExpression variable, IExpression[] initialAssignments, IExpression body);
-
- /**
- * Creates a member call expression.
- * @param target The target for the member call
- * @param name The name of the member
- * @param args The arguments to use for the call
- * @return A member expression
- */
- IExpression memberCall(IExpression target, String name, IExpression... args);
-
- /**
- * <p>Recursively traverse and collect elements based on a condition</p>
- * <p>A common scenario in p2 is that you want to start with a set of roots and then find
- * all items that fulfill the root requirements. Those items in turn introduce new
- * requirements so you want to find them too. The process continues until no more
- * requirements can be satisfied. This type of query can be performed using the traverse
- * function.</p>
- * <p>The function will evaluate an expression, once for each element, collect
- * elements for which the evaluation returned true, then then re-evaluate using the
- * collected result as source of elements. No element is evaluated twice. This continues
- * until no more elements are found.</p>
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that collects the children for the next iteration
- * @return A collection expression
- */
- IExpression traverse(IExpression collection, IExpression lambda);
-
- /**
- * Create an expression that yields a new collection where each element is unique. An
- * optional <code>cache</code> can be provided if the uniqueness should span a larger
- * scope then just the source collection.
- * @param collection The source collection
- * @param cache Optional cache to use when uniqueness should span over several invocations
- * @return A collection expression
- */
- IExpression unique(IExpression collection, IExpression cache);
-
- /**
- * Create an array of elements.
- * @param elements The elements of the array
- * @return An array expression
- */
- IExpression array(IExpression... elements);
-
- /**
- * Create an lookup of <code>key</code> in the <code>target</code>.
- * The key expression should evaluate to a string or an integer.
- * @param target The target for the lookup
- * @param key The key to use for the lookup
- * @return A lookup expression
- */
- IExpression at(IExpression target, IExpression key);
-
- /**
- * Create an evaluation context with one single variable
- * @param params Indexed parameters to use in the expression
- * @return the context
- */
- IEvaluationContext createContext(Object... params);
-
- /**
- * Create an evaluation context with one single variable
- * @param params Indexed parameters to use in the expression
- * @param variables The variables that will be maintained by the context
- * @return the context
- */
- IEvaluationContext createContext(IExpression[] variables, Object... params);
-
- /**
- * Creates an expression that evaluates to the constant <code>value</code>.
- * @param value The constant
- * @return A constant expression
- */
- IExpression constant(Object value);
-
- /**
- * Creates a top level expression that represents a full query.
- * @param expr The query
- * @param parameters The parameters of the query
- * @return A top level query expression
- */
- <T> IContextExpression<T> contextExpression(IExpression expr, Object... parameters);
-
- /**
- * Create an expression that tests if <code>lhs</code> is equal to <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression equals(IExpression lhs, IExpression rhs);
-
- /**
- * Create a collection filter that yields true if the <code>lambda</code> yields true for
- * at least one of the elements of the <code>collection</code>
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that performs the test
- * @return A boolean expression
- */
- IExpression exists(IExpression collection, IExpression lambda);
-
- /**
- * Creates a top level expression suitable for predicate matching
- * @param expression The boolean expression
- * @return A top level predicate expression
- */
- IFilterExpression filterExpression(IExpression expression);
-
- /**
- * Given one of the values in the map returned by {@link #getFunctionMap()}, this method
- * returns a function expression.
- * @param function The value obtained from the map.
- * @param args The arguments to evaluate and pass when evaluating the function.
- * @return A function expression
- */
- IExpression function(Object function, IExpression... args);
-
- /**
- * Returns a map of functions supported by this factory. The map is keyed by
- * function names and the value is an object suitable to pass to the {@link #function(Object, IExpression[])}
- * method.
- * @return A key/function map.
- */
- Map<String, ? extends Object> getFunctionMap();
-
- /**
- * Create an expression that tests if <code>lhs</code> is greater than <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression greater(IExpression lhs, IExpression rhs);
-
- /**
- * Create an expression that tests if <code>lhs</code> is greater than or equal to <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression greaterEqual(IExpression lhs, IExpression rhs);
-
- /**
- * Creates an indexed parameter expression
- * @param index The index to use
- * @return a parameter expression
- */
- IExpression indexedParameter(int index);
-
- /**
- * Create an <i>intersection</i> of <code>c1</code> and <code>c2</code>
- * @param c1 first collection
- * @param c2 second collection
- * @return An intersect expression
- */
- IExpression intersect(IExpression c1, IExpression c2);
-
- /**
- * Creates a lambda expression that takes exactly one variable. Suitable for use
- * in most collection expressions.
- * @param variable The element variable that the lambda uses
- * @param body The body of the lambda
- * @return A lambda expression
- */
- IExpression lambda(IExpression variable, IExpression body);
-
- /**
- * Create an expression that yields a new collection consisting of the latest version of
- * the elements of the <code>collection</code>. Each element in <code>collection</code>
- * must implement the {@link IVersionedId} interface.
- * @param collection The collection providing the versioned elements
- * @return A collection expression
- */
- IExpression latest(IExpression collection);
-
- /**
- * Create an expression that tests if <code>lhs</code> is less than <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression less(IExpression lhs, IExpression rhs);
-
- /**
- * Create an expression that tests if <code>lhs</code> is less than or equal to <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression lessEqual(IExpression lhs, IExpression rhs);
-
- /**
- * Create an expression that yields a new collection consisting of the <i>count</i>
- * first elements of the source collection.
- * @param collection The source collection
- * @param count The element count limit
- * @return A collection expression
- */
- IExpression limit(IExpression collection, int count);
-
- /**
- * Create an expression that yields a new collection consisting of the <i>n</i> first
- * elements of the source collection where <i>n</i> is determined by <code>limit</code>.
- * @param collection The source collection
- * @param limit The expression that evaluates to the element count limit
- * @return A collection expression
- */
- IExpression limit(IExpression collection, IExpression limit);
-
- /**
- * Performs boolean normalization on the expression to create a canonical form.
- * @param operands The operands to normalize
- * @param expressionType The type (must be either {@link IExpression#TYPE_AND}
- * or {@link IExpression#TYPE_OR}.
- * @return The normalized expression
- */
- IExpression normalize(List<? extends IExpression> operands, int expressionType);
-
- /**
- * Create an expression that tests if <code>lhs</code> matches <code>rhs</code>.
- * @param lhs The left hand side value.
- * @param rhs The right hand side value.
- * @return A boolean expression
- */
- IExpression matches(IExpression lhs, IExpression rhs);
-
- /**
- * Creates a parameterized top level expression suitable for predicate matching
- * @param expression The boolean expression
- * @param parameters The parameters to use in the call
- * @return A top level predicate expression
- */
- <T> IMatchExpression<T> matchExpression(IExpression expression, Object... parameters);
-
- /**
- * Creates a member accessor expression.
- * @param target The target for the member access
- * @param name The name of the member
- * @return A member expression
- */
- IExpression member(IExpression target, String name);
-
- /**
- * Creates an expression that negates the result of evaluating its <code>operand</code>.
- * @param operand The boolean expression to negate
- * @return A boolean expression
- */
- IExpression not(IExpression operand);
-
- /**
- * Create a logical <i>or</i> of its <code>operands</code>.
- * @param operands The boolean operands
- * @return A boolean expression
- */
- IExpression or(IExpression... operands);
-
- /**
- * Create a pipe of expressions.
- * @param expressions The expressions that make out the pipe
- * @return A pipe expression
- */
- IExpression pipe(IExpression... expressions);
-
- /**
- * Create an expression that yields a new collection consisting of all elements of the
- * <code>collection</code> for which the <code>lambda</code> yields <code>true</code>.
- * @param collection The collection providing the elements to test
- * @param lambda The lambda that performs the test
- * @return A collection expression
- */
- IExpression select(IExpression collection, IExpression lambda);
-
- /**
- * Returns the variable that represents <code>this</this> in an expression
- * @return The <code>this</this> variable.
- */
- IExpression thisVariable();
-
- /**
- * Wrap an {@link IQuery} as an expression.
- * @param query
- * @return An expression that wraps the query
- */
- IExpression toExpression(IQuery<?> query);
-
- /**
- * Create a <i>union</i> of <code>c1</code> and <code>c2</code>
- * @param c1 first collection
- * @param c2 second collection
- * @return A union expression
- */
- IExpression union(IExpression c1, IExpression c2);
-
- /**
- * Creates an expression that represents a variable
- * @param name The name of the variable
- * @return A variable expression
- */
- IExpression variable(String name);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java
deleted file mode 100644
index c9f43b33c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionParser.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-
-/**
- * A parser that produces an expression tree based on a string representation. An
- * implementation will use the {@link IExpressionFactory} to create the actual expressions
- * @since 2.0
- */
-public interface IExpressionParser {
- /**
- * Create a new expression. The expression will have access to the global
- * variable 'this' and to the context parameters.
- * @param exprString The string representing the boolean expression.
- * @return The resulting expression tree.
- * @throws ExpressionParseException
- */
- IExpression parse(String exprString);
-
- /**
- * Create an arbitrary expression. The expression will have access to the global
- * variable 'everything' and to the context parameters.
- * @param exprString The string representing the boolean expression.
- * @return The resulting expression tree.
- * @throws ExpressionParseException
- */
- IExpression parseQuery(String exprString);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java
deleted file mode 100644
index 1c314d804..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IExpressionVisitor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * A general purpose visitor that will visit each node in an expression tree.
- * @since 2.0
- */
-public interface IExpressionVisitor {
- /**
- * The method that will be called for each expression that is
- * visited.
- * @param expression The expression that the visitor visits.
- * @return <code>true</code> to continue visiting other expressions or
- * <code>false</code> to break out.
- */
- boolean visit(IExpression expression);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java
deleted file mode 100644
index 8e5bcba92..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IFilterExpression.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import java.util.Map;
-import org.osgi.framework.Filter;
-
-/**
- * An interface that combines the IExpression with the LDAP filter. The
- * string representation is the LDAP filter syntax.
- * @since 2.0
- */
-public interface IFilterExpression extends IExpression, Filter {
- /**
- * Filter using a <code>Map</code>. This <code>Filter</code> is
- * executed using the specified <code>Map</code>'s keys and values.
- * The keys are case insensitively matched with this <code>Filter</code>.
- *
- * @param map The <code>Map</code> whose keys are used in the
- * match.
- * @return <code>true</code> if the <code>map</code>'s keys and
- * values match this filter; <code>false</code> otherwise.
- * @throws IllegalArgumentException If <code>map</code> contains case
- * variants of the same key name.
- */
- boolean match(Map<String, ? extends Object> map);
-
- /**
- * Filter with case sensitivity using a <code>Map</code>. This
- * <code>Filter</code> is executed using the specified
- * <code>Map</code>'s keys and values. The keys are case sensitively
- * matched with this <code>Filter</code>.
- *
- * @param map The <code>Map</code> whose keys are used in the
- * match.
- * @return <code>true</code> if the <code>map</code>'s keys and
- * values match this filter; <code>false</code> otherwise.
- */
- boolean matchCase(Map<String, ? extends Object> map);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java
deleted file mode 100644
index ac425e9d9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMatchExpression.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * A match expression is a boolean expression matching a candidate of a
- * specific type. An {@link IEvaluationContext} is needed in order to evaluate
- * a match and this class provides two ways of doing that. Either a context
- * is created first and then reused in several subsequent calls to
- * {@link #isMatch(IEvaluationContext, Object)} or, if no repeated calls are
- * expected, the {@link #isMatch(Object)} method can be used. It will then
- * create a context on each call.
- * @since 2.0
- */
-public interface IMatchExpression<T> extends IExpression {
- /**
- * <p>Creates a new context to be passed to repeated subsequent evaluations. The context
- * will introduce 'this' as an uninitialized variable and make the parameters available.
- * @return A new evaluation context.
- */
- IEvaluationContext createContext();
-
- /**
- * Returns the parameters that this match expression was created with.
- * @return An array of parameters, possibly empty but never <code>null</code>.
- */
- Object[] getParameters();
-
- /**
- * This method creates a new evaluation context and assigns the <code>candidate</code>
- * to the 'this' variable of the <code>context</code> and then evaluates the expression.
- * This is essentially a short form for <pre>isMatch(createContext(), candidate)</pre>.
- * @param candidate The object to test.
- * @return the result of the evaluation.
- */
- boolean isMatch(T candidate);
-
- /**
- * This method assigns <code>candidate</code> to the 'this' variable of the
- * <code>context</code> and then evaluates the expression.
- * @param context A context
- * @param candidate The object to test.
- * @return the result of the evaluation.
- */
- boolean isMatch(IEvaluationContext context, T candidate);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java
deleted file mode 100644
index 44cf39d29..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/IMemberProvider.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 - 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-/**
- * This interface may be implemented by any class that wants to provide easy
- * (high performance) access to its member to the expression evaluator. It
- * also gives the implementing class a way to hide or rename the members
- * otherwise accessible using getters.
- * @since 2.0
- */
-public interface IMemberProvider {
- /**
- * Returns the value for the specified member. Implementers can rely
- * on that the <code>memberName</code> is a string that has been
- * internalized using {@link String#intern()}.
- * @param memberName The name of the member
- * @return The member value.
- * @throws IllegalArgumentException if the instance has no member with
- * the given name.
- */
- Object getMember(String memberName);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java
deleted file mode 100644
index 0ba2c0928..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/SimplePattern.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.expression;
-
-import java.io.Serializable;
-
-/**
- * A simple compiled pattern. It supports two kinds of wildcards. The '*' (any character zero to many times)
- * and the '?' (any character exactly one time).
- * @since 2.0
- */
-public class SimplePattern implements Serializable, Comparable<SimplePattern> {
- private static final long serialVersionUID = -2477990705739062410L;
-
- /**
- * Matches the <code>value</code> with the compiled expression. The value
- * is considered matching if all characters are matched by the expression. A
- * partial match is not enough.
- * @param value The value to match
- * @return <code>true</code> if the value was a match.
- */
- public boolean isMatch(CharSequence value) {
- if (node == null)
- node = parse(pattern, 0);
- return node.match(value, 0);
- }
-
- public String toString() {
- return pattern;
- }
-
- public int compareTo(SimplePattern o) {
- return pattern.compareTo(o.pattern);
- }
-
- public boolean equals(Object o) {
- return o == this || (o instanceof SimplePattern && ((SimplePattern) o).pattern.equals(pattern));
- }
-
- public int hashCode() {
- return 3 * pattern.hashCode();
- }
-
- private final String pattern;
- private transient Node node;
-
- private SimplePattern(String pattern) {
- this.pattern = pattern;
- }
-
- static class AllNode extends Node {
- boolean match(CharSequence value, int pos) {
- return true;
- }
- }
-
- static class RubberBandNode extends Node {
- final Node next;
-
- RubberBandNode(Node next) {
- this.next = next;
- }
-
- boolean match(CharSequence value, int pos) {
- int top = value.length();
- String ending = next.getEndingConstant();
- if (ending != null) {
- // value must end with this constant. It will be faster
- // to scan backwards from the end.
- int clen = ending.length();
- if (clen > top - pos)
- return false;
- while (clen > 0)
- if (ending.charAt(--clen) != value.charAt(--top))
- return false;
- return true;
- }
-
- while (pos < top) {
- if (next.match(value, pos++))
- return true;
- }
- return false;
- }
- }
-
- static class AnyCharacterNode extends Node {
- final Node next;
-
- AnyCharacterNode(Node next) {
- this.next = next;
- }
-
- boolean match(CharSequence value, int pos) {
- int top = value.length();
- return next == null ? pos + 1 == top : next.match(value, pos + 1);
- }
- }
-
- static class EndConstantNode extends Node {
- final String constant;
-
- EndConstantNode(String constant) {
- this.constant = constant;
- }
-
- boolean match(CharSequence value, int pos) {
- int max = constant.length() + pos;
- int top = value.length();
- if (top != max)
- return false;
-
- int idx = 0;
- while (pos < max)
- if (value.charAt(pos++) != constant.charAt(idx++))
- return false;
- return true;
- }
-
- String getEndingConstant() {
- return constant;
- }
- }
-
- static class ConstantNode extends Node {
- final Node next;
- final String constant;
-
- ConstantNode(Node next, String constant) {
- this.next = next;
- this.constant = constant;
- }
-
- boolean match(CharSequence value, int pos) {
- int max = constant.length() + pos;
- int top = value.length();
- if (top < max)
- return false;
-
- int idx = 0;
- while (pos < max)
- if (value.charAt(pos++) != constant.charAt(idx++))
- return false;
- return next == null ? (pos == top) : next.match(value, pos);
- }
- }
-
- static abstract class Node {
- abstract boolean match(CharSequence value, int pos);
-
- String getEndingConstant() {
- return null;
- }
- }
-
- public static SimplePattern compile(String pattern) {
- if (pattern == null)
- throw new IllegalArgumentException("Pattern can not be null"); //$NON-NLS-1$
- return new SimplePattern(pattern);
- }
-
- private static Node parse(String pattern, int pos) {
- int top = pattern.length();
- StringBuffer bld = null;
- Node parsedNode = null;
- while (pos < top) {
- char c = pattern.charAt(pos);
- switch (c) {
- case '*' :
- ++pos;
- parsedNode = pos == top ? new AllNode() : new RubberBandNode(parse(pattern, pos));
- break;
- case '?' :
- parsedNode = new AnyCharacterNode(parse(pattern, pos + 1));
- break;
- case '\\' :
- if (++pos == top)
- throw new IllegalArgumentException("Pattern ends with escape"); //$NON-NLS-1$
- c = pattern.charAt(pos);
- // fall through
- default :
- if (bld == null)
- bld = new StringBuffer();
- bld.append(c);
- ++pos;
- continue;
- }
- break;
- }
-
- if (bld != null) {
- String constant = bld.toString();
- parsedNode = parsedNode == null ? new EndConstantNode(constant) : new ConstantNode(parsedNode, constant);
- }
- return parsedNode;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html
deleted file mode 100644
index 04c524048..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/expression/package.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides a simple expression language used to represent requirements and filters in the metadada<h2>
-Package Specification</h2>
-<p>
-This package defines a simple expression language that is used to define requirements and filters in the metadata, but also form the base of the p2 query language.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java
deleted file mode 100644
index ebb8ce232..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndex.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.index;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * Indexed access to the elements provided by an IQueryable
- * @since 2.0
- */
-public interface IIndex<T> {
- /**
- * Obtains the elements that are candidates for the given <code>booleanExpr</code> when applied
- * using the given <code>variable</code> as <code>this</code>.
- * The returned set of elements are the elements that must be present in order for the expression
- * to evaluate to <code>true</code>. The set may contain false positives.
- *
- * TODO: Write more about how the valid set of elements is determined.
- *
- * @param ctx The evaluation context used when examining the <code>booleanExpr</code>.
- * @param variable The variable used as <code>this</code>.
- * @param booleanExpr The boolean expression.
- * @return The candidate elements or <code>null</code> if this index cannot be used.
- */
- Iterator<T> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java
deleted file mode 100644
index e85ec8732..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IIndexProvider.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.index;
-
-import java.util.Iterator;
-
-/**
- * An index provider is typically an IQueryable.
- * @since 2.0
- */
-public interface IIndexProvider<T> {
- /**
- * Return an index optimized for producing candidates based on values
- * for a <code>memberName</code> that denotes a member of the index
- * type.
- * @param memberName A member of type <code>T</code>.
- * @return An index or <code>null</code> if this provider does not support
- * this index.
- */
- IIndex<T> getIndex(String memberName);
-
- /**
- * Return the iterator that delivers all rows that the target query should
- * consider. This is used when no index can be found for any possible
- * member.
- * @return An iterator. Possibly empty but never <code>null</code>.
- */
- Iterator<T> everything();
-
- /**
- * Returns a property that this index manages on behalf of a <code>client</code> object.
- * Examples of this is the properties that a profile manages for installable
- * units.
- * @param client The client for which the property is managed. Typically an IU.
- * @param memberName The name of the managed properties, i.e. &quot;profileProperties&quot;
- * @param key The property key
- * @return The managed property value or <code>null</code> if no value could be found.
- */
- Object getManagedProperty(Object client, String memberName, Object key);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java
deleted file mode 100644
index d944e8554..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/IQueryWithIndex.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.metadata.index;
-
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-/**
- * An extension of the {@link IQuery} that allows use of indexes.
- * @since 2.0
- */
-public interface IQueryWithIndex<T> extends IQuery<T> {
- /**
- * Evaluates the query using the <code>indexProvider</code>. The query
- * is first analyzed for index candidates (typically expressions like
- * id == &lt;some value&gt;) and if possible, indexes returned by
- * {@link IIndexProvider#getIndex(String)} will be used
- * in place of the iterator returned by {@link IIndexProvider#everything()}.
- *
- * @param indexProvider The provider of the material to evaluate the query on
- * @return The results of the query.
- */
- IQueryResult<T> perform(IIndexProvider<T> indexProvider);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html
deleted file mode 100644
index 3486d12fb..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/index/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides classes for metadata query indexing
-<h2>
-Package Specification</h2>
-<p>
-This package provides API for creating and manipulating indices that are used
-to optimize queries against a particular queryable source.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html
deleted file mode 100644
index 8b40121ee..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/metadata/package.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Defines the metadata being handled by p2.
-<h2>
-Package Specification</h2>
-<p>
-This API package defines the constructs being manipulated by p2 such as installable units.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java
deleted file mode 100644
index 6edd2e054..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CollectionResult.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.lang.reflect.Array;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-
-/**
- * This class allows to adapt java collections to a p2 a query result and as such something queryable
- * @since 2.0
- */
-public class CollectionResult<T> implements IQueryResult<T> {
- private final Collection<T> collection;
-
- public CollectionResult(Collection<T> collection) {
- this.collection = collection == null ? CollectionUtils.<T> emptySet() : collection;
- }
-
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
- return query.perform(iterator());
- }
-
- public boolean isEmpty() {
- return collection.isEmpty();
- }
-
- public Iterator<T> iterator() {
- return collection.iterator();
- }
-
- public T[] toArray(Class<T> clazz) {
- int size = collection.size();
- @SuppressWarnings("unchecked")
- T[] result = (T[]) Array.newInstance(clazz, size);
- if (size != 0)
- collection.toArray(result);
- return result;
- }
-
- public Set<T> toSet() {
- return new HashSet<T>(collection);
- }
-
- public Set<T> toUnmodifiableSet() {
- return collection instanceof Set<?> ? Collections.<T> unmodifiableSet((Set<T>) collection) : toSet();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java
deleted file mode 100644
index c387ce71a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.lang.reflect.Array;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.Messages;
-
-/**
- * A collector is a generic visitor that collects objects passed to it,
- * and can then express the result of the visit in various forms. The collector
- * can also short-circuit a traversal by returning <code>false</code> from
- * its {@link #accept(Object)} method.
- * <p>
- * This default collector just accepts all objects passed to it. Clients may subclass
- * to perform different processing on the objects passed to it.
- * @param <T> The type of object accepted by this collector
- * @since 2.0
- */
-public class Collector<T> implements IQueryResult<T> {
- private Set<T> collected = null;
-
- public static final Collector<?> EMPTY_COLLECTOR = new Collector<Object>() {
- public boolean accept(Object val) {
- return false;
- }
- };
-
- @SuppressWarnings("unchecked")
- public static final <T> Collector<T> emptyCollector() {
- return (Collector<T>) EMPTY_COLLECTOR;
- }
-
- /**
- * Creates a new collector.
- */
- public Collector() {
- super();
- }
-
- /**
- * Accepts an object.
- * <p>
- * This default implementation adds the objects to a list. Clients may
- * override this method to perform additional filtering, add different objects
- * to the list, short-circuit the traversal, or process the objects directly without
- * collecting them.
- *
- * @param object the object to collect or visit
- * @return <code>true</code> if the traversal should continue,
- * or <code>false</code> to indicate the traversal should stop.
- */
- public boolean accept(T object) {
- getCollection().add(object);
- return true;
- }
-
- /**
- * Adds the elements from one collector to this collector
- * @param queryResult The collector from which the elements should be retrieved
- */
- public void addAll(IQueryResult<T> queryResult) {
- boolean keepGoing = true;
- for (Iterator<T> iter = queryResult.iterator(); iter.hasNext() && keepGoing;) {
- keepGoing = accept(iter.next());
- }
- }
-
- /**
- * Returns the collection that is being used to collect results. Unlike {@linkplain #toSet()},
- * this returns the actual modifiable collection that is being used to store results. The
- * return value is only intended to be used within subclasses and should not be exposed
- * outside of a collection class.
- *
- * @return the collection being used to collect results.
- */
- protected Collection<T> getCollection() {
- if (collected == null)
- collected = new HashSet<T>();
- return collected;
- }
-
- /**
- * Returns whether this collector is empty.
- * @return <code>true</code> if this collector has accepted any results,
- * and <code>false</code> otherwise.
- */
- public boolean isEmpty() {
- return collected == null || collected.isEmpty();
- }
-
- /**
- * Returns an iterator on the collected objects.
- *
- * @return an iterator of the collected objects.
- */
- public Iterator<T> iterator() {
- return collected == null ? CollectionUtils.<T> emptyList().iterator() : collected.iterator();
- }
-
- /**
- * Returns the number of collected objects.
- */
- public int size() {
- return collected == null ? 0 : collected.size();
- }
-
- /**
- * Returns the collected objects as an array
- *
- * @param clazz The type of array to return
- * @return The array of results
- * @throws ArrayStoreException the runtime type of the specified array is
- * not a super-type of the runtime type of every collected object
- */
- public T[] toArray(Class<T> clazz) {
- int size = collected == null ? 0 : collected.size();
- @SuppressWarnings("unchecked")
- T[] result = (T[]) Array.newInstance(clazz, size);
- if (size != 0)
- collected.toArray(result);
- return result;
- }
-
- /**
- * Returns a copy of the collected objects.
- *
- * @return An unmodifiable collection of the collected objects
- */
- public Set<T> toSet() {
- return collected == null ? new HashSet<T>() : new HashSet<T>(collected);
- }
-
- /**
- * Performs a query on this results of this collector.
- */
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
- IQueryResult<T> result;
- if (monitor == null)
- monitor = new NullProgressMonitor();
- try {
- monitor.beginTask(Messages.performing_subquery, 1);
- result = query.perform(iterator());
- monitor.worked(1);
- } finally {
- monitor.done();
- }
- return result;
- }
-
- /**
- * Returns the collected objects as an immutable collection.
- *
- * @return An unmodifiable collection of the collected objects
- */
- @SuppressWarnings("unchecked")
- public Set<T> toUnmodifiableSet() {
- return collected == null ? Collections.EMPTY_SET : Collections.unmodifiableSet(collected);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java
deleted file mode 100644
index dab517ce7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 2010 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.*;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
-import org.eclipse.equinox.internal.p2.metadata.index.CompoundIndex;
-import org.eclipse.equinox.internal.p2.metadata.index.IndexProvider;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.KeyWithLocale;
-import org.eclipse.equinox.p2.metadata.expression.IEvaluationContext;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-
-/**
- * A queryable that holds a number of other IQueryables and provides
- * a mechanism for querying the entire set.
- * @since 2.0
- */
-public final class CompoundQueryable<T> extends IndexProvider<T> {
-
- static class PassThroughIndex<T> implements IIndex<T> {
- private final Iterator<T> iterator;
-
- public PassThroughIndex(Iterator<T> iterator) {
- this.iterator = iterator;
- }
-
- public Iterator<T> getCandidates(IEvaluationContext ctx, IExpression variable, IExpression booleanExpr) {
- return iterator;
- }
- }
-
- private IQueryable<T>[] queryables;
-
- public CompoundQueryable(IQueryable<T>[] queryables) {
- this.queryables = queryables;
- }
-
- /**
- * Creates a queryable that combines the given collection of input queryables
- *
- * @param queryables The collection of queryables to be combined
- */
- @SuppressWarnings("unchecked")
- CompoundQueryable(Collection<? extends IQueryable<T>> queryables) {
- this(queryables.toArray(new IQueryable[queryables.size()]));
- }
-
- /**
- * Creates a queryable that combines the two provided input queryables
- *
- * @param query1 The first queryable
- * @param query2 The second queryable
- */
- @SuppressWarnings("unchecked")
- CompoundQueryable(IQueryable<T> query1, IQueryable<T> query2) {
- this(new IQueryable[] {query1, query2});
- }
-
- public IIndex<T> getIndex(String memberName) {
- // Check that at least one of the queryable can present an index
- // for the given member.
- boolean found = false;
- for (IQueryable<T> queryable : queryables) {
- if (queryable instanceof IIndexProvider<?>) {
- @SuppressWarnings("unchecked")
- IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
- if (ip.getIndex(memberName) != null) {
- found = true;
- break;
- }
- }
- }
-
- if (!found)
- // Nobody had an index for this member
- return null;
-
- ArrayList<IIndex<T>> indexes = new ArrayList<IIndex<T>>(queryables.length);
- for (IQueryable<T> queryable : queryables) {
- if (queryable instanceof IIndexProvider<?>) {
- @SuppressWarnings("unchecked")
- IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
- IIndex<T> index = ip.getIndex(memberName);
- if (index != null)
- indexes.add(index);
- else
- indexes.add(new PassThroughIndex<T>(ip.everything()));
- } else {
- indexes.add(new PassThroughIndex<T>(getIteratorFromQueryable(queryable)));
- }
- }
- return indexes.size() == 1 ? indexes.get(0) : new CompoundIndex<T>(indexes);
- }
-
- public Iterator<T> everything() {
- if (queryables.length == 0)
- return CollectionUtils.<T> emptySet().iterator();
-
- if (queryables.length == 1)
- return getIteratorFromQueryable(queryables[0]);
-
- ArrayList<Iterator<T>> iterators = new ArrayList<Iterator<T>>(queryables.length);
- for (IQueryable<T> queryable : queryables)
- iterators.add(getIteratorFromQueryable(queryable));
- return new CompoundIterator<T>(iterators.iterator());
- }
-
- public Object getManagedProperty(Object client, String memberName, Object key) {
- for (IQueryable<T> queryable : queryables) {
- if (queryable instanceof IIndexProvider<?>) {
- @SuppressWarnings("unchecked")
- IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
- Object value = ip.getManagedProperty(client, memberName, key);
- if (value != null)
- return value;
- }
- }
-
- // When asked for translatedProperties we should return from the IU when the property is not found.
- if (client instanceof IInstallableUnit && memberName.equals(InstallableUnit.MEMBER_TRANSLATED_PROPERTIES)) {
- IInstallableUnit iu = (IInstallableUnit) client;
- return key instanceof KeyWithLocale ? iu.getProperty(((KeyWithLocale) key).getKey()) : iu.getProperty(key.toString());
- }
- return null;
- }
-
- static class IteratorCapture<T> implements IQuery<T> {
- private Iterator<T> capturedIterator;
-
- public IQueryResult<T> perform(Iterator<T> iterator) {
- capturedIterator = iterator;
- return Collector.emptyCollector();
- }
-
- public IExpression getExpression() {
- return null;
- }
-
- Iterator<T> getCapturedIterator() {
- return capturedIterator == null ? CollectionUtils.<T> emptySet().iterator() : capturedIterator;
- }
- }
-
- private static <T> Iterator<T> getIteratorFromQueryable(IQueryable<T> queryable) {
- if (queryable instanceof IIndexProvider<?>) {
- @SuppressWarnings("unchecked")
- IIndexProvider<T> ip = (IIndexProvider<T>) queryable;
- return ip.everything();
- }
- IteratorCapture<T> capture = new IteratorCapture<T>();
- queryable.query(capture, new NullProgressMonitor());
- return capture.getCapturedIterator();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java
deleted file mode 100644
index b81bcfe9a..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionMatchQuery.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.*;
-
-/**
- * A query that matches candidates against an expression.
- * @since 2.0
- */
-public class ExpressionMatchQuery<T> implements IMatchQuery<T>, IQueryWithIndex<T> {
- private final IMatchExpression<T> expression;
- private final Class<? extends T> matchingClass;
- private final IEvaluationContext context;
- private final List<String> indexedMembers;
-
- public ExpressionMatchQuery(Class<? extends T> matchingClass, IExpression expression, Object... parameters) {
- this.matchingClass = matchingClass;
- this.expression = ExpressionUtil.getFactory().<T> matchExpression(expression, parameters);
- this.context = this.expression.createContext();
- this.indexedMembers = Expression.getIndexCandidateMembers(matchingClass, ExpressionFactory.THIS, (Expression) expression);
- }
-
- public ExpressionMatchQuery(Class<? extends T> matchingClass, String expression, Object... parameters) {
- this(matchingClass, ExpressionUtil.parse(expression), parameters);
- }
-
- public IEvaluationContext getContext() {
- return context;
- }
-
- public Class<? extends T> getMatchingClass() {
- return matchingClass;
- }
-
- public IQueryResult<T> perform(IIndexProvider<T> indexProvider) {
- if (((MatchExpression<T>) expression).operand == ExpressionUtil.TRUE_EXPRESSION)
- return new QueryResult<T>(RepeatableIterator.create(indexProvider));
- Iterator<T> iterator = null;
- int top = indexedMembers.size();
- for (int idx = 0; idx < top; ++idx) {
- IIndex<T> index = indexProvider.getIndex(indexedMembers.get(idx));
- if (index != null) {
- iterator = index.getCandidates(context, ExpressionFactory.THIS, expression);
- if (iterator != null)
- break;
- }
- }
- if (iterator == null)
- iterator = RepeatableIterator.create(indexProvider);
- context.setIndexProvider(indexProvider);
- return perform(iterator);
- }
-
- public IQueryResult<T> perform(Iterator<T> iterator) {
- if (((MatchExpression<T>) expression).operand == ExpressionUtil.TRUE_EXPRESSION)
- return new QueryResult<T>(iterator);
-
- HashSet<T> result = null;
- while (iterator.hasNext()) {
- T value = iterator.next();
- if (isMatch(value)) {
- if (result == null)
- result = new HashSet<T>();
- result.add(value);
- }
- }
- return result == null ? Collector.<T> emptyCollector() : new CollectionResult<T>(result);
- }
-
- public boolean isMatch(T candidate) {
- if (!matchingClass.isInstance(candidate))
- return false;
- ExpressionFactory.THIS.setValue(context, candidate);
- return Boolean.TRUE == expression.evaluate(context);
- }
-
- public IMatchExpression<T> getExpression() {
- return expression;
- }
-
- public void setIndexProvider(IIndexProvider<T> indexProvider) {
- context.setIndexProvider(indexProvider);
- }
-
- public void prePerform() { //
- }
-
- public void postPerform() { //
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java
deleted file mode 100644
index 8ec52f4e4..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/ExpressionQuery.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.metadata.index.IIndexProvider;
-import org.eclipse.equinox.p2.metadata.index.IQueryWithIndex;
-
-/**
- * A query that evaluates using an iterator as input and produces a new iterator.
- * @since 2.0
- */
-public class ExpressionQuery<T> implements IQueryWithIndex<T> {
- private final IContextExpression<T> expression;
- private final Class<? extends T> elementClass;
-
- public ExpressionQuery(Class<? extends T> elementClass, IExpression expression, Object... parameters) {
- this.elementClass = elementClass;
- this.expression = ExpressionUtil.getFactory().<T> contextExpression(expression, parameters);
- }
-
- public ExpressionQuery(Class<? extends T> matchingClass, String expression, Object... parameters) {
- this(matchingClass, ExpressionUtil.parseQuery(expression), parameters);
- }
-
- public Class<? extends T> getElementClass() {
- return elementClass;
- }
-
- public IQueryResult<T> perform(IIndexProvider<T> indexProvider) {
- return new QueryResult<T>(expression.iterator(expression.createContext(elementClass, indexProvider)));
- }
-
- public IQueryResult<T> perform(Iterator<T> iterator) {
- return new QueryResult<T>(expression.iterator(expression.createContext(elementClass, iterator)));
- }
-
- public IContextExpression<T> getExpression() {
- return expression;
- }
-
- public static <T> Class<? extends T> getElementClass(IQuery<T> query) {
- @SuppressWarnings("unchecked")
- Class<? extends T> elementClass = (Class<T>) Object.class;
- if (query instanceof ExpressionMatchQuery<?>)
- elementClass = ((ExpressionMatchQuery<T>) query).getMatchingClass();
- else if (query instanceof ExpressionQuery<?>)
- elementClass = ((ExpressionQuery<T>) query).getElementClass();
- return elementClass;
- }
-
- public static <T> IContextExpression<T> createExpression(IQuery<T> query) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IExpression expr = query.getExpression();
- Object[] parameters;
- if (expr == null) {
- expr = factory.toExpression(query);
- if (query instanceof IMatchQuery<?>)
- expr = factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, expr));
- parameters = new Object[0];
- } else {
- if (expr instanceof MatchExpression<?>) {
- MatchExpression<?> matchExpr = (MatchExpression<?>) expr;
- parameters = matchExpr.getParameters();
- expr = factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, matchExpr.operand));
- } else if (expr instanceof ContextExpression<?>) {
- ContextExpression<?> contextExpr = (ContextExpression<?>) expr;
- parameters = contextExpr.getParameters();
- expr = contextExpr.operand;
- } else
- parameters = new Object[0];
- }
- return factory.contextExpression(expr, parameters);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java
deleted file mode 100644
index e0a6413d3..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 2010 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-/**
- * A query in which the elements can be evaluated by calling isMatch on. Each
- * element can be evaluated independently of all other elements. Match queries
- * can be evaluated in parallel as each call {@link #isMatch(Object)} is mutually
- * exclusive from all other calls. <P>
- *
- * @noimplement This interface is not intended to be implemented by clients. Clients
- * creating custom queries must extend {@link ExpressionMatchQuery}.
- * @deprecated If possible, use one of the predefined queries in {@link QueryUtil} or
- * use the {@link QueryUtil#createMatchQuery(String, Object...)}
- * to create a custom expression based query. If the query cannot be expressed using
- * the p2QL, then use a predefined or custom expression query as a first filter
- * (in worst case, use {@link QueryUtil#createIUAnyQuery()}) and then provide further filtering
- * like so:<pre>
- * for(iter = queryable.query(someExpressionQuery).iterator(); iter.hasNext();) {
- * // do your match here
- * }</pre>
- * @since 2.0
- */
-public interface IMatchQuery<T> extends IQuery<T> {
-
- /**
- * Returns whether the given object satisfies the parameters of this query.
- *
- * @param candidate The object to perform the query against
- * @return <code>true</code> if the unit satisfies the parameters
- * of this query, and <code>false</code> otherwise
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public boolean isMatch(T candidate);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java
deleted file mode 100644
index 14860a54c..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQuery.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * The root interface for all queries that can be performed on an {@link IQueryable}.
- * A query is a piece of logic that selects some objects from a list of provided
- * inputs using some established criteria.
- * <p>
- * Any given query must be stable - running the same query on the same inputs
- * must return an equal query result each time the query is executed. Thus a client
- * that has performed a query can freely cache the result as long as they know the
- * query input has not changed.
- * </p>
- *
- * @param <T> The type of input object that this query accepts
- * @noimplement This interface is not intended to be implemented directly by clients.
- * @noextend This interface is not intended to be extended directly by clients.
- * @since 2.0
- */
-public interface IQuery<T> {
- /**
- * Evaluates the query for a specific input.
- *
- * @param iterator The elements for which to evaluate the query on
- * @return The results of the query.
- */
- IQueryResult<T> perform(Iterator<T> iterator);
-
- /**
- * Returns the IExpression backing this query or <code>null</code> if
- * this is not an expression query.
- * @return An expression or <code>null</code>.
- */
- IExpression getExpression();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java
deleted file mode 100644
index 0f7ce7617..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryResult.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * An IQueryResult represents the results of a query.
- *
- * @since 2.0
- */
-public interface IQueryResult<T> extends IQueryable<T> {
- /**
- * Returns whether this QueryResult is empty.
- * @return <code>true</code> if this QueryResult has accepted any results,
- * and <code>false</code> otherwise.
- */
- public boolean isEmpty();
-
- /**
- * Returns an iterator on the collected objects.
- *
- * @return an iterator of the collected objects.
- */
- public Iterator<T> iterator();
-
- /**
- * Returns the collected objects as an array
- *
- * @param clazz The type of array to return
- * @return The array of results
- * @throws ArrayStoreException the runtime type of the specified array is
- * not a super-type of the runtime type of every collected object
- */
- public T[] toArray(Class<T> clazz);
-
- /**
- * Creates a new Set copy with the contents of this query result. The
- * copy can be altered without any side effects on its origin.
- * @return A detached copy of the result.
- */
- public Set<T> toSet();
-
- /**
- * Returns a Set backed by this query result. The set is immutable.
- * @return A Set backed by this query result.
- */
- public Set<T> toUnmodifiableSet();
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java
deleted file mode 100644
index 22b4d8bd7..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IQueryable.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * An IQueryable contains objects, and is able to perform queries on those objects.
- * <p>
- * This interface may be implemented by clients.
- * @since 2.0
- */
-public interface IQueryable<T> {
- /**
- * Performs a query, passing any objects that satisfy the
- * query to the provided collector.
- * <p>
- * This method is long-running; progress and cancellation are provided
- * by the given progress monitor.
- * </p>
- *
- * @param query The query to perform
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The collector argument
- */
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java
deleted file mode 100644
index f320f7e18..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009, 2010 EclipseSource 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:
-* EclipseSource - initial API and implementation
-* IBM Corporation - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * This class represents a simple Java-based query. Clients may subclass and
- * override the {@link #isMatch(Object)} method in order to write simple
- * queries against p2 metadata.
- * <p>
- * Note that hand-written queries cannot be optimized for queryables containing
- * indices, or for remote queryables. In general you should use one of the pre-defined
- * queries found in {@link QueryUtil} if possible, to obtain queries optimized for indexing and
- * remote execution. This class is intended for simple queries against small data
- * sources where indexed lookup and remote query execution are not needed.
- * </p>
- * @deprecated If possible, use one of the predefined queries in {@link QueryUtil}
- * or use the {@link QueryUtil#createMatchQuery(String, Object...)}
- * to create a custom expression based query. If the query cannot be expressed using
- * the p2QL, then use a predefined or custom expression query as a first filter
- * (in worst case, use {@link QueryUtil#createIUAnyQuery()}) and then provide further filtering
- * like so:<pre>
- * for(iter = queryable.query(someExpressionQuery).iterator(); iter.hasNext();) {
- * // do your match here
- * }</pre>
- * @since 2.0
- */
-public abstract class MatchQuery<T> implements IMatchQuery<T> {
-
- /**
- * Returns whether the given object satisfies the parameters of this query.
- *
- * @param candidate The object to perform the query against
- * @return <code>true</code> if the unit satisfies the parameters
- * of this query, and <code>false</code> otherwise
- *
- * @noreference This method is not intended to be referenced by clients.
- * Clients should call {@link #perform(Iterator)}
- */
- public abstract boolean isMatch(T candidate);
-
- /**
- * Performs this query on the given iterator, passing all objects in the iterator
- * that match the criteria of this query to the given result.
- */
- public final IQueryResult<T> perform(Iterator<T> iterator) {
- Collector<T> result = new Collector<T>();
- while (iterator.hasNext()) {
- T candidate = iterator.next();
- if (candidate != null && isMatch(candidate))
- if (!result.accept(candidate))
- break;
- }
- return result;
- }
-
- /**
- * Execute any pre-processing that must be done before this query is performed against
- * a particular iterator. This method may be used by subclasses to do any calculations,
- * caching, or other preparation for the query.
- * <p>
- * This method is internal to the framework. Subclasses may override this method, but
- * should not call this method.
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public void prePerform() {
- // nothing to do by default
- }
-
- /**
- * Execute any post-processing that must be done after this query has been performed against
- * a particular iterator. This method may be used by subclasses to clear caches or any other
- * cleanup that should occur after a query.
- * <p>
- * This method will be called even if the query does not complete successfully.
- * <p>
- * This method is internal to the framework. Subclasses may override this method, but
- * should not call this method.
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public void postPerform() {
- // nothing to do by default
- }
-
- public IExpression getExpression() {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
deleted file mode 100644
index 5b4c54c12..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
+++ /dev/null
@@ -1,519 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.query;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.expression.ContextExpression;
-import org.eclipse.equinox.internal.p2.metadata.expression.ExpressionFactory;
-import org.eclipse.equinox.internal.p2.metadata.expression.Expression.VariableFinder;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.expression.*;
-
-/**
- * Helper class for query related tasks.
- * @since 2.0
- */
-public class QueryUtil {
-
- public static final IQuery<IInstallableUnit> ALL_UNITS = QueryUtil.createMatchQuery(ExpressionUtil.TRUE_EXPRESSION);
-
- public static final String ANY = "*"; //$NON-NLS-1$
-
- public static final IQuery<IInstallableUnit> NO_UNITS = QueryUtil.createQuery("limit(0)"); //$NON-NLS-1$
-
- public static final String PROP_TYPE_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$NON-NLS-1$
-
- public static final String PROP_TYPE_GROUP = "org.eclipse.equinox.p2.type.group"; //$NON-NLS-1$
-
- public static final String PROP_TYPE_PATCH = "org.eclipse.equinox.p2.type.patch"; //$NON-NLS-1$
-
- private static final IExpression matchesRequirementsExpression = ExpressionUtil.parse("$0.exists(r | this ~= r)"); //$NON-NLS-1$
-
- private static final IExpression matchIU_ID = ExpressionUtil.parse("id == $0"); //$NON-NLS-1$
- private static final IExpression matchIU_IDAndRange = ExpressionUtil.parse("id == $0 && version ~= $1"); //$NON-NLS-1$
- private static final IExpression matchIU_IDAndVersion = ExpressionUtil.parse("id == $0 && version == $1"); //$NON-NLS-1$
- private static final IExpression matchIU_Range = ExpressionUtil.parse("version ~= $0"); //$NON-NLS-1$
- private static final IExpression matchIU_Version = ExpressionUtil.parse("version == $0"); //$NON-NLS-1$
- private static final IExpression matchIU_propAny = ExpressionUtil.parse("properties[$0] != null"); //$NON-NLS-1$
- private static final IExpression matchIU_propNull = ExpressionUtil.parse("properties[$0] == null"); //$NON-NLS-1$
- private static final IExpression matchIU_propTrue = ExpressionUtil.parse("properties[$0] == true"); //$NON-NLS-1$
- private static final IExpression matchIU_propValue = ExpressionUtil.parse("properties[$0] == $1"); //$NON-NLS-1$
-
- /**
- * Creates a queryable that combines the given collection of input queryables
- *
- * @param queryables The collection of queryables to be combined
- */
- @SuppressWarnings("unchecked")
- public static <T> IQueryable<T> compoundQueryable(Collection<? extends IQueryable<T>> queryables) {
- return new CompoundQueryable<T>(queryables.toArray(new IQueryable[queryables.size()]));
- }
-
- /**
- * Creates a queryable that combines the two provided input queryables
- *
- * @param query1 The first queryable
- * @param query2 The second queryable
- */
- @SuppressWarnings("unchecked")
- public static <T> IQueryable<T> compoundQueryable(IQueryable<T> query1, IQueryable<T> query2) {
- return new CompoundQueryable<T>(new IQueryable[] {query1, query2});
- }
-
- /**
- * Creates a compound query that combines the given queries. If all queries
- * are candidate match queries, then the queries will be concatenated as a
- * boolean 'and' or a boolean 'or' expression depending on the <code>and</code>
- * flag. If at least one query is a full query, all queries will instead be evaluated
- * using intersection when <code>and</code> is <code>true</code> or a union.
- *
- * @param queries The queries to perform
- * @param and <code>true</code> if this query represents an intersection or a
- * logical 'and', and <code>false</code> if this query represents a union or
- * a logical 'or'.
- * @return A compound query
- */
- @SuppressWarnings("unchecked")
- public static <T> IQuery<T> createCompoundQuery(Collection<? extends IQuery<? extends T>> queries, boolean and) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- int top = queries.size();
- if (top == 1)
- return (IQuery<T>) queries.iterator().next();
-
- Class<? extends T> elementClass = (Class<T>) Object.class;
- if (top == 0)
- return QueryUtil.<T> createMatchQuery(elementClass, ExpressionUtil.TRUE_EXPRESSION);
-
- IExpression[] expressions = new IExpression[top];
- boolean justBooleans = true;
- boolean justContexts = true;
- int idx = 0;
- for (IQuery<? extends T> query : queries) {
- if (query instanceof IMatchQuery<?>)
- justContexts = false;
- else
- justBooleans = false;
-
- IExpression expr = query.getExpression();
- if (expr == null)
- expr = factory.toExpression(query);
-
- Class<? extends T> ec = ExpressionQuery.getElementClass(query);
- if (elementClass == null)
- elementClass = ec;
- else if (elementClass != ec) {
- if (elementClass.isAssignableFrom(ec)) {
- if (and)
- // Use most restrictive class
- elementClass = ec;
- } else if (ec.isAssignableFrom(elementClass)) {
- if (!and)
- // Use least restrictive class
- elementClass = ec;
- }
- }
- expressions[idx++] = expr;
- }
-
- if (justBooleans) {
- IExpression compound = and ? factory.and(expressions) : factory.or(expressions);
- return QueryUtil.<T> createMatchQuery(elementClass, compound);
- }
-
- if (!justContexts) {
- // Mix of boolean queries and context queries. All must be converted into context then.
- for (idx = 0; idx < expressions.length; ++idx)
- expressions[idx] = makeContextExpression(factory, expressions[idx]);
- }
-
- IExpression compound = expressions[0];
- for (idx = 1; idx < expressions.length; ++idx)
- compound = and ? factory.intersect(compound, expressions[idx]) : factory.union(compound, expressions[idx]);
- return QueryUtil.<T> createQuery(elementClass, compound);
- }
-
- /**
- * Creates a compound query that combines the two queries. If both queries
- * are candidate match queries, then the queries will be concatenated as a
- * boolean 'and' or a boolean 'or' expression depending on the <code>and</code>
- * flag. If at least one query is a full query, all queries will instead be evaluated
- * using intersection when <code>and</code> is <code>true</code> or a union.
- *
- * @param query1 the first query
- * @param query2 the second query
- * @param and <code>true</code> if this query represents an intersection or a
- * logical 'and', and <code>false</code> if this query represents a union or
- * a logical 'or'.
- * @return A compound query
- */
- public static <T> IQuery<T> createCompoundQuery(IQuery<? extends T> query1, IQuery<T> query2, boolean and) {
- ArrayList<IQuery<? extends T>> queries = new ArrayList<IQuery<? extends T>>(2);
- queries.add(query1);
- queries.add(query2);
- return createCompoundQuery(queries, and);
- }
-
- /**
- * Returns a query that matches all {@link InstallableUnit} elements
- */
- public static IQuery<IInstallableUnit> createIUAnyQuery() {
- return ALL_UNITS;
- }
-
- /**
- * Creates a new query that will return the members of the
- * given <code>category</code>. If the specified {@link IInstallableUnit}
- * is not a category, then no installable unit will satisfy the query.
- *
- * @param category The category
- * @return A query that returns category members
- */
- public static IQuery<IInstallableUnit> createIUCategoryMemberQuery(IInstallableUnit category) {
- if (QueryUtil.isCategory(category))
- return QueryUtil.createMatchQuery(matchesRequirementsExpression, category.getRequirements());
- return NO_UNITS;
- }
-
- /**
- * Creates a query matching every {@link IInstallableUnit} that is a category.
- * @return The query that matches categories
- * @since 2.0
- */
- public static IQuery<IInstallableUnit> createIUCategoryQuery() {
- return createIUPropertyQuery(QueryUtil.PROP_TYPE_CATEGORY, Boolean.TRUE.toString());
- }
-
- /**
- * Creates a query matching every {@link IInstallableUnit} that is a group.
- * @return a query that matches all groups
- */
- public static IQuery<IInstallableUnit> createIUGroupQuery() {
- return createIUPropertyQuery(PROP_TYPE_GROUP, Boolean.TRUE.toString());
- }
-
- /**
- * Creates an {@link IInstallableUnit} that will match all patches.
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createIUPatchQuery() {
- return createIUPropertyQuery(QueryUtil.PROP_TYPE_PATCH, Boolean.TRUE.toString());
- }
-
- /**
- * Creates a query that searches for {@link IInstallableUnit} instances that have
- * a property whose value matches the provided value. If no property name is
- * specified, then all {@link IInstallableUnit} instances are accepted.
- * @param propertyName The key of the property to match or <code>null</code> to match all
- * @param propertyValue The value of the property. Can be {@link #ANY} to match all values
- * except <code>null</code>
- * @return The query matching properties
- */
- public static IQuery<IInstallableUnit> createIUPropertyQuery(String propertyName, String propertyValue) {
- if (propertyName == null)
- return QueryUtil.createMatchQuery(ExpressionUtil.TRUE_EXPRESSION);
- if (propertyValue == null)
- return QueryUtil.createMatchQuery(matchIU_propNull, propertyName);
- if (ANY.equals(propertyValue))
- return QueryUtil.createMatchQuery(matchIU_propAny, propertyName);
- if (Boolean.valueOf(propertyValue).booleanValue())
- return QueryUtil.createMatchQuery(matchIU_propTrue, propertyName);
- return QueryUtil.createMatchQuery(matchIU_propValue, propertyName, propertyValue);
- }
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * id and version.
- *
- * @param versionedId The precise id/version combination that a matching unit must have
- * @return a query that matches IU's by id and version
- */
- public static IQuery<IInstallableUnit> createIUQuery(IVersionedId versionedId) {
- return createIUQuery(versionedId.getId(), versionedId.getVersion());
- }
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * id, regardless of version.
- *
- * @param id The installable unit id to match, or <code>null</code> to match any id
- * @return a query that matches IU's by id
- */
- public static IQuery<IInstallableUnit> createIUQuery(String id) {
- return id == null ? ALL_UNITS : QueryUtil.createMatchQuery(matchIU_ID, id);
- }
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * id and version.
- *
- * @param id The installable unit id to match, or <code>null</code> to match any id
- * @param version The precise version that a matching unit must have or <code>null</code>
- * to match any version
- * @return a query that matches IU's by id and version
- */
- public static IQuery<IInstallableUnit> createIUQuery(String id, Version version) {
- if (version == null || version.equals(Version.emptyVersion))
- return createIUQuery(id);
- if (id == null)
- return QueryUtil.createMatchQuery(matchIU_Version, version);
- return QueryUtil.createMatchQuery(matchIU_IDAndVersion, id, version);
- }
-
- /**
- * Creates a query that will match any {@link IInstallableUnit} with the given
- * id, and whose version falls in the provided range.
- *
- * @param id The installable unit id to match, or <code>null</code> to match any id
- * @param range The version range to match or <code>null</code> to match any range.
- * @return a query that matches IU's by id and range
- */
- public static IQuery<IInstallableUnit> createIUQuery(String id, VersionRange range) {
- if (range == null || range.equals(VersionRange.emptyRange))
- return createIUQuery(id);
- if (id == null)
- return QueryUtil.createMatchQuery(matchIU_Range, range);
- return QueryUtil.createMatchQuery(matchIU_IDAndRange, id, range);
- }
-
- /**
- * Creates a query that returns the latest version for each unique id of an {@link IVersionedId}.
- * All other elements are discarded.
- * @return A query matching the latest version for each id.
- */
- public static IQuery<IInstallableUnit> createLatestIUQuery() {
- return QueryUtil.createQuery(ExpressionUtil.getFactory().latest(ExpressionFactory.EVERYTHING));
- }
-
- /**
- * Creates a query that returns the latest version for each unique id of an {@link IVersionedId}
- * from the collection produced by <code>query</code>.
- * All other elements are discarded.
- * @param query The query that precedes the latest query when evaluating.
- * @return A query matching the latest version for each id.
- */
- public static <T extends IVersionedId> IQuery<T> createLatestQuery(IQuery<T> query) {
- IContextExpression<T> ctxExpr = ExpressionQuery.createExpression(query);
- IExpressionFactory factory = ExpressionUtil.getFactory();
- @SuppressWarnings("unchecked")
- Class<T> elementClass = (Class<T>) IVersionedId.class;
- return QueryUtil.createQuery(elementClass, factory.latest(((ContextExpression<?>) ctxExpr).operand), ctxExpr.getParameters());
- }
-
- /**
- * Creates a limit query that can be used to limit the number of query results returned. Once
- * the limit is reached, the query is terminated.
- * @param query The query that should be limited
- * @param limit A positive integer denoting the limit
- * @return A limited query
- * @since 2.0
- */
- public static <T> IQuery<T> createLimitQuery(IQuery<T> query, int limit) {
- IContextExpression<T> ctxExpr = ExpressionQuery.createExpression(query);
- IExpressionFactory factory = ExpressionUtil.getFactory();
- return QueryUtil.createQuery(ExpressionQuery.getElementClass(query), factory.limit(((ContextExpression<T>) ctxExpr).operand, limit), ctxExpr.getParameters());
- }
-
- /**
- * Creates an {@link IInstallableUnit} query that will iterate over all candidates and discriminate by
- * applying the boolean <code>matchExpression</code> on each candidate.
- * @param matchExpression The boolean expression used for filtering one candidate
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createMatchQuery(IExpression matchExpression, Object... parameters) {
- return new ExpressionMatchQuery<IInstallableUnit>(IInstallableUnit.class, matchExpression, parameters);
- }
-
- /**
- * Parses the <code>matchExpression</code> and creates an {@link IInstallableUnit} query that will
- * iterate over all candidates and discriminate by applying the boolean <code>matchExpression</code>
- * on each candidate.
- * @param matchExpression The boolean expression used for filtering one candidate
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createMatchQuery(String matchExpression, Object... parameters) {
- return new ExpressionMatchQuery<IInstallableUnit>(IInstallableUnit.class, matchExpression, parameters);
- }
-
- /**
- * Creates an query that will iterate over all candidates and discriminate all
- * candidates that are not instances of <code>matchinClass></code> or for which
- * the boolean <code>matchExpression</code> returns false.
- * @param matchingClass The class that matching candidates must be an instance of
- * @param matchExpression The boolean expression used for filtering one candidate
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static <T> IQuery<T> createMatchQuery(Class<? extends T> matchingClass, IExpression matchExpression, Object... parameters) {
- return new ExpressionMatchQuery<T>(matchingClass, matchExpression, parameters);
- }
-
- /**
- * Parses the <code>matchExpression</code> and creates an query that will iterate over
- * all candidates and discriminate all candidates that are not instances of
- * <code>matchinClass></code> or for which the boolean <code>matchExpression</code>
- * returns false.
- * @param matchingClass The class that matching candidates must be an instance of
- * @param matchExpression The boolean expression used for filtering one candidate
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static <T> IQuery<T> createMatchQuery(Class<? extends T> matchingClass, String matchExpression, Object... parameters) {
- return new ExpressionMatchQuery<T>(matchingClass, matchExpression, parameters);
- }
-
- /**
- * <p>Creates a piped query based on the provided input queries.</p>
- * <p>A pipe is a composite query in which each sub-query is executed in succession.
- * The results from the ith sub-query are piped as input into the i+1th sub-query. The
- * query will short-circuit if any query returns an empty result set.</p>
- *
- * @param queries the ordered list of queries to perform
- * @return A query pipe
- */
- @SuppressWarnings("unchecked")
- public static <T> IQuery<T> createPipeQuery(Collection<? extends IQuery<? extends T>> queries) {
- IExpressionFactory factory = ExpressionUtil.getFactory();
- int top = queries.size();
- IExpression[] expressions = new IExpression[top];
- int idx = 0;
- for (IQuery<? extends T> query : queries) {
- IExpression expr = query.getExpression();
- if (expr == null)
- expr = factory.toExpression(query);
- expressions[idx++] = expr;
- }
- IExpression pipe = factory.pipe(expressions);
- VariableFinder finder = new VariableFinder(ExpressionFactory.EVERYTHING);
- pipe.accept(finder);
- return finder.isFound() ? QueryUtil.<T> createQuery((Class<T>) Object.class, pipe) : QueryUtil.<T> createMatchQuery((Class<T>) Object.class, pipe);
- }
-
- /**
- * <p>Creates a piped query based on the provided input queries.</p>
- * <p>A pipe is a composite query in which each sub-query is executed in succession.
- * The results from the ith sub-query are piped as input into the i+1th sub-query. The
- * query will short-circuit if any query returns an empty result set.</p>
- *
- * @param query1 the first query
- * @param query2 the second query
- * @return A query pipe
- */
- public static <T> IQuery<T> createPipeQuery(IQuery<? extends T> query1, IQuery<? extends T> query2) {
- ArrayList<IQuery<? extends T>> queries = new ArrayList<IQuery<? extends T>>(2);
- queries.add(query1);
- queries.add(query2);
- return createPipeQuery(queries);
- }
-
- /**
- * Creates an {@link IInstallableUnit} query based on an <code>expression</code> that
- * uses all candidates as input.
- * @param expression The query expression
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createQuery(IExpression expression, Object... parameters) {
- return new ExpressionQuery<IInstallableUnit>(IInstallableUnit.class, expression, parameters);
- }
-
- /**
- * Parses the <code>expression</code> and creates an {@link IInstallableUnit} query. The
- * <code>expression</code> is expected to use all candidates as input.
- * @param expression The query expression
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static IQuery<IInstallableUnit> createQuery(String expression, Object... parameters) {
- return new ExpressionQuery<IInstallableUnit>(IInstallableUnit.class, expression, parameters);
- }
-
- /**
- * Creates a query that will limit the result to instances of the <code>matchinClass</code>. The
- * <code>expression</code> is expected to use all candidates as input.
- * @param matchingClass The class used as discriminator for the result
- * @param expression The query expression
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static <T> IQuery<T> createQuery(Class<? extends T> matchingClass, IExpression expression, Object... parameters) {
- return new ExpressionQuery<T>(matchingClass, expression, parameters);
- }
-
- /**
- * Parses the <code>expression</code> and creates a query that will limit the result
- * to instances of the <code>matchinClass</code>. The <code>expression</code> is expected
- * to use all candidates as input.
- * @param matchingClass The class used as discriminator for the result
- * @param expression The query expression
- * @param parameters Values for parameter substitution
- * @return The created query
- */
- public static <T> IQuery<T> createQuery(Class<? extends T> matchingClass, String expression, Object... parameters) {
- return new ExpressionQuery<T>(matchingClass, expression, parameters);
- }
-
- /**
- * Test if the {@link IInstallableUnit} is a category.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter is a category.
- */
- public static boolean isCategory(IInstallableUnit iu) {
- String value = iu.getProperty(PROP_TYPE_CATEGORY);
- if (value != null && (value.equals(Boolean.TRUE.toString())))
- return true;
- return false;
- }
-
- /**
- * Test if the {@link IInstallableUnit} is a fragment.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter is a fragment.
- */
- public static boolean isFragment(IInstallableUnit iu) {
- return iu instanceof IInstallableUnitFragment;
- }
-
- /**
- * Test if the {@link IInstallableUnit} is a group.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter is a group.
- */
- public static boolean isGroup(IInstallableUnit iu) {
- String value = iu.getProperty(PROP_TYPE_GROUP);
- if (value != null && (value.equals(Boolean.TRUE.toString())))
- return true;
- return false;
- }
-
- /**
- * Test if the {@link IInstallableUnit} is a patch.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter is a patch.
- */
- public static boolean isPatch(IInstallableUnit iu) {
- String value = iu.getProperty(PROP_TYPE_PATCH);
- if (value != null && (value.equals(Boolean.TRUE.toString())))
- return true;
- return false;
- }
-
- private static IExpression makeContextExpression(IExpressionFactory factory, IExpression expr) {
- VariableFinder finder = new VariableFinder(ExpressionFactory.EVERYTHING);
- expr.accept(finder);
- if (!finder.isFound())
- expr = factory.select(ExpressionFactory.EVERYTHING, factory.lambda(ExpressionFactory.THIS, expr));
- return expr;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html
deleted file mode 100644
index ddcfd40e9..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides common classes for the query mechanism.
-<h2>
-Package Specification</h2>
-<p>
-This package provide low level infrastructure for querying collections of metadata.
-Additional queries can be found in the org.eclipse.equinox.p2.metadata.query package and more domain specific queries can be found in the touchpoints.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.operations/.classpath b/bundles/org.eclipse.equinox.p2.operations/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.operations/.cvsignore b/bundles/org.eclipse.equinox.p2.operations/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.operations/.project b/bundles/org.eclipse.equinox.p2.operations/.project
deleted file mode 100644
index e5272e277..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.operations</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.operations/.settings/.api_filters b/bundles/org.eclipse.equinox.p2.operations/.settings/.api_filters
deleted file mode 100644
index 056afbd99..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/.settings/.api_filters
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.equinox.p2.operations" version="2">
- <resource path="src/org/eclipse/equinox/p2/operations/ProfileChangeOperation.java" type="org.eclipse.equinox.p2.operations.ProfileChangeOperation">
- <filter id="338792546">
- <message_arguments>
- <message_argument value="org.eclipse.equinox.p2.operations.ProfileChangeOperation"/>
- <message_argument value="getProfileChangeRequest()"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 69f49b645..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Dec 29 23:18:33 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index dbe72f165..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:14 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 6904bd96c..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Sat Aug 11 20:17:52 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF
deleted file mode 100644
index acddd86dc..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.operations;singleton:=true
-Bundle-Version: 2.1.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.operations.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.operations;x-friends:="org.eclipse.pde.ui",
- org.eclipse.equinox.p2.operations;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.6.0",
- org.eclipse.core.jobs;bundle-version="3.5.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.director,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.configurator,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.4.0"
diff --git a/bundles/org.eclipse.equinox.p2.operations/about.html b/bundles/org.eclipse.equinox.p2.operations/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.operations/build.properties b/bundles/org.eclipse.equinox.p2.operations/build.properties
deleted file mode 100644
index ca5030900..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.operations/plugin.properties b/bundles/org.eclipse.equinox.p2.operations/plugin.properties
deleted file mode 100644
index 3c8feb57a..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Update Checker
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.operations/pom.xml b/bundles/org.eclipse.equinox.p2.operations/pom.xml
deleted file mode 100644
index 961f543ed..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.operations</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Activator.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Activator.java
deleted file mode 100644
index 9580bc9f7..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Activator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.operations;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * Activator class that registers the update checker service.
- */
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.operations"; //$NON-NLS-1$
- private static BundleContext context;
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IFailedStatusEvaluator.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IFailedStatusEvaluator.java
deleted file mode 100644
index 3c47f24f9..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IFailedStatusEvaluator.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.operations;
-
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-
-/**
- * IFailedStatusEvaluator determines what to do (if anything)
- * when a profile change cannot be resolved successfully.
- *
- * @since 2.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IFailedStatusEvaluator {
- public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan);
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IStatusCodes.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IStatusCodes.java
deleted file mode 100644
index 34f92df10..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/IStatusCodes.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.operations;
-
-/**
- * IStatusCodes defines codes for common status conditions when
- * performing provisioning operations.
- *
- * This interface is not intended to be implemented
- *
- * @since 2.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IStatusCodes {
-
- //Operation status codes [10000-10999] - note these cannot conflict with the core codes
- //in ProvisionException or we'll see strange results.
-
- public static final int NOTHING_TO_UPDATE = 10000;
-
- // Status codes associated with profile change request or plans being altered from the original intent
- public static final int PROFILE_CHANGE_ALTERED = 10001;
- public static final int IU_REQUEST_ALTERED = 10002;
- public static final int ALTERED_IMPLIED_UPDATE = 10003;
- public static final int ALTERED_IGNORED_IMPLIED_DOWNGRADE = 10004;
- public static final int ALTERED_IGNORED_ALREADY_INSTALLED = 10005;
- public static final int ALTERED_PARTIAL_INSTALL = 10006;
- public static final int ALTERED_PARTIAL_UNINSTALL = 10007;
- public static final int ALTERED_SIDE_EFFECT_UPDATE = 10008;
- public static final int ALTERED_SIDE_EFFECT_REMOVE = 10009;
- public static final int ALTERED_SIDE_EFFECT_INSTALL = 10010;
- public static final int ALTERED_IGNORED_INSTALL_REQUEST = 10011;
- public static final int ALTERED_IGNORED_UNINSTALL_REQUEST = 10012;
- public static final int ALTERED_IGNORED_IMPLIED_UPDATE = 10013;
-
- // Status codes associated with inability to perform an operation
- public static final int UNEXPECTED_NOTHING_TO_DO = 10050;
- public static final int EXPECTED_NOTHING_TO_DO = 10051;
- public static final int OPERATION_ALREADY_IN_PROGRESS = 10052;
-
- // Status codes associated with repositories
- public static final int INVALID_REPOSITORY_LOCATION = 10100;
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Messages.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Messages.java
deleted file mode 100644
index 55e98c177..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/Messages.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.operations;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @since 2.0
- *
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.operations.messages"; //$NON-NLS-1$
-
- public static String InstallOperation_ComputeProfileChangeProgress;
-
- public static String InstallOperation_InstallJobName;
- public static String InstallOperation_ResolveJobName;
-
- public static String ProfileChangeOperation_NoProfileChangeRequest;
- public static String ProfileChangeOperation_ResolveTaskName;
-
- public static String ProvisioningJob_GenericErrorStatusMessage;
- public static String ProvisioningSession_AgentNotFound;
-
- public static String ProvisioningSession_InstallPlanConfigurationError;
-
- public static String PlanAnalyzer_IgnoringInstall;
- public static String PlanAnalyzer_LockedImpliedUpdate0;
- public static String PlanAnalyzer_PartialInstall;
- public static String PlanAnalyzer_PartialUninstall;
- public static String PlanAnalyzer_SideEffectInstall;
- public static String PlanAnalyzer_SideEffectUninstall;
- public static String PlannerResolutionJob_NullProvisioningPlan;
-
- public static String PlanAnalyzer_IgnoringImpliedDowngrade;
- public static String PlanAnalyzer_ImpliedUpdate;
- public static String PlanAnalyzer_Items;
- public static String PlanAnalyzer_NothingToDo;
-
- public static String PlanAnalyzer_NoUpdates;
- public static String PlanAnalyzer_AlreadyInstalled;
- public static String PlanAnalyzer_AnotherOperationInProgress;
- public static String PlanAnalyzer_RequestAltered;
- public static String PlanAnalyzer_UnexpectedError;
-
- public static String RepositoryTracker_DuplicateLocation;
- public static String RepositoryTracker_InvalidLocation;
-
- public static String ResolutionResult_SummaryStatus;
-
- public static String SizingPhaseSet_PhaseSetName;
-
- public static String UninstallOperation_ProvisioningJobName;
- public static String UninstallOperation_ResolveJobName;
-
- public static String UpdateOperation_ProfileChangeRequestProgress;
- public static String UpdateOperation_ResolveJobName;
- public static String UpdateOperation_UpdateJobName;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
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
deleted file mode 100644
index f32511f0b..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlanAnalyzer.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.provisional.p2.director.PlannerStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.RequestStatus;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This class analyzes a profile change request and the resultant provisioning plan,
- * and reports problems in a way that can be communicated to a user.
- *
- * @since 3.5
- */
-public class PlanAnalyzer {
-
- public static IStatus getStatus(int statusCode, IInstallableUnit affectedIU) {
- switch (statusCode) {
- case IStatusCodes.NOTHING_TO_UPDATE :
- return new Status(IStatus.INFO, Activator.ID, statusCode, Messages.PlanAnalyzer_NoUpdates, null);
- case IStatusCodes.PROFILE_CHANGE_ALTERED :
- return new MultiStatus(Activator.ID, statusCode, Messages.PlanAnalyzer_RequestAltered, null);
- case IStatusCodes.ALTERED_IMPLIED_UPDATE :
- return new Status(IStatus.INFO, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_ImpliedUpdate, getIUString(affectedIU)), null);
- case IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE :
- return new Status(IStatus.WARNING, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_LockedImpliedUpdate0, getIUString(affectedIU)), null);
- case IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE :
- return new Status(IStatus.WARNING, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_IgnoringImpliedDowngrade, getIUString(affectedIU)), null);
- case IStatusCodes.ALTERED_IGNORED_ALREADY_INSTALLED :
- return new Status(IStatus.WARNING, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_AlreadyInstalled, getIUString(affectedIU)), null);
- case IStatusCodes.ALTERED_PARTIAL_INSTALL :
- return new Status(IStatus.INFO, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_PartialInstall, getIUString(affectedIU)), null);
- case IStatusCodes.ALTERED_PARTIAL_UNINSTALL :
- return new Status(IStatus.INFO, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_PartialUninstall, getIUString(affectedIU)), null);
- case IStatusCodes.UNEXPECTED_NOTHING_TO_DO :
- return new Status(IStatus.ERROR, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_NothingToDo, getIUString(affectedIU)), null);
- case IStatusCodes.OPERATION_ALREADY_IN_PROGRESS :
- return new Status(IStatus.ERROR, Activator.ID, statusCode, Messages.PlanAnalyzer_AnotherOperationInProgress, null);
- default :
- return new Status(IStatus.ERROR, Activator.ID, statusCode, NLS.bind(Messages.PlanAnalyzer_UnexpectedError, new Integer(statusCode), getIUString(affectedIU)), null);
- }
- }
-
- public static MultiStatus getProfileChangeAlteredStatus() {
- return (MultiStatus) getStatus(IStatusCodes.PROFILE_CHANGE_ALTERED, null);
- }
-
- public static ResolutionResult computeResolutionResult(ProfileChangeRequest originalRequest, IProvisioningPlan plan, MultiStatus originalStatus) {
- Assert.isNotNull(originalRequest);
- Assert.isNotNull(plan);
- Assert.isNotNull(originalStatus);
-
- ResolutionResult report = new ResolutionResult();
-
- // If the plan was canceled, no further analysis is needed
- if (plan.getStatus().getSeverity() == IStatus.CANCEL) {
- report.addSummaryStatus(plan.getStatus());
- return report;
- }
-
- if (nothingToDo(originalRequest)) {
- report.addSummaryStatus(getStatus(IStatusCodes.UNEXPECTED_NOTHING_TO_DO, null));
- IStatus[] details = originalStatus.getChildren();
- for (int i = 0; i < details.length; i++)
- report.addSummaryStatus(details[i]);
- return report;
- }
-
- // If there was already some status supplied before resolution, this should get included
- // with the report. For example, this might contain information about the profile request
- // being altered before resolution began.
- if (originalStatus != null && originalStatus.getChildren().length > 0) {
- report.addSummaryStatus(originalStatus);
- }
-
- // If the overall plan had a non-OK status, capture that in the report.
- if (!plan.getStatus().isOK())
- report.addSummaryStatus(plan.getStatus());
-
- // Now we compare what was requested with what is going to happen.
- // In the long run, when a RequestStatus can provide actual explanation/status
- // about failures, we might want to add this information to the overall status.
- // As it stands now, if the provisioning plan is in error, that info is more detailed
- // than the request status. So we will only add request status info to the overall
- // status when the overall status is not in error.
-
- PlannerStatus plannerStatus = plan.getStatus() instanceof PlannerStatus ? (PlannerStatus) plan.getStatus() : null;
- // If there is no additional plannerStatus details just return the report
- if (plannerStatus == null)
- return report;
-
- if (plan.getStatus().getSeverity() != IStatus.ERROR) {
- 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(added)), null);
- report.addStatus(added, fail);
- report.addSummaryStatus(fail);
- }
- }
- 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(removed)), null);
- report.addStatus(removed, fail);
- report.addSummaryStatus(fail);
- }
- }
- }
-
- // Now process the side effects
- if (plannerStatus.getRequestSideEffects() != null) {
- for (Entry<IInstallableUnit, RequestStatus> entry : plannerStatus.getRequestSideEffects().entrySet()) {
- IInstallableUnit iu = entry.getKey();
- RequestStatus rs = entry.getValue();
- if (rs.getInitialRequestType() == RequestStatus.ADDED) {
- report.addStatus(iu, new Status(rs.getSeverity(), Activator.ID, IStatusCodes.ALTERED_SIDE_EFFECT_INSTALL, NLS.bind(Messages.PlanAnalyzer_SideEffectInstall, getIUString(iu)), null));
- } else {
- report.addStatus(iu, new Status(rs.getSeverity(), Activator.ID, IStatusCodes.ALTERED_SIDE_EFFECT_REMOVE, NLS.bind(Messages.PlanAnalyzer_SideEffectUninstall, getIUString(iu)), null));
- }
- }
- }
-
- return report;
-
- }
-
- private static String getIUString(IInstallableUnit iu) {
- if (iu == null)
- return Messages.PlanAnalyzer_Items;
- // Get the iu name in the default locale
- String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
- if (name != null)
- return name;
- return iu.getId();
- }
-
- private static boolean nothingToDo(ProfileChangeRequest request) {
- 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/internal/p2/operations/PlannerResolutionJob.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlannerResolutionJob.java
deleted file mode 100644
index 78264ab90..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/PlannerResolutionJob.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.operations;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.operations.*;
-import org.eclipse.equinox.p2.planner.IPlanner;
-
-/**
- * Class representing a provisioning profile plan
- *
- * @since 2.0
- */
-public class PlannerResolutionJob extends ProvisioningJob implements IProfileChangeJob {
-
- ProfileChangeRequest request;
- String profileId;
- IProvisioningPlan plan;
- MultiStatus additionalStatus;
- ResolutionResult report;
- ProvisioningContext firstPass, successful;
- IFailedStatusEvaluator evaluator;
-
- public static MultiStatus getProfileChangeRequestAlteredStatus() {
- return PlanAnalyzer.getProfileChangeAlteredStatus();
- }
-
- public PlannerResolutionJob(String label, ProvisioningSession session, String profileId, ProfileChangeRequest request, ProvisioningContext context, IFailedStatusEvaluator evaluator, MultiStatus additionalStatus) {
- super(label, session);
- this.request = request;
- this.profileId = profileId;
- if (context == null)
- firstPass = new ProvisioningContext(session.getProvisioningAgent());
- else
- firstPass = context;
- this.evaluator = evaluator;
- Assert.isNotNull(additionalStatus);
- this.additionalStatus = additionalStatus;
- }
-
- public IProvisioningPlan getProvisioningPlan() {
- return plan;
- }
-
- public ProfileChangeRequest getProfileChangeRequest() {
- return request;
- }
-
- public ProvisioningContext getActualProvisioningContext() {
- return successful;
- }
-
- public void setFirstPassProvisioningContext(ProvisioningContext firstPass) {
- this.firstPass = firstPass;
- }
-
- public IStatus runModal(IProgressMonitor monitor) {
- SubMonitor sub;
- if (evaluator != null) {
- sub = SubMonitor.convert(monitor, 1000);
- } else {
- sub = SubMonitor.convert(monitor, 500);
- }
-
- plan = ((IPlanner) getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME)).getProvisioningPlan(request, firstPass, sub.newChild(500));
- IStatus status;
- if (plan == null) {
- status = new Status(IStatus.ERROR, Activator.ID, Messages.PlannerResolutionJob_NullProvisioningPlan);
- additionalStatus.add(status);
- } else {
- status = plan.getStatus();
- }
-
- if (status.getSeverity() != IStatus.ERROR || evaluator == null) {
- successful = firstPass;
- return status;
- }
-
- // First resolution was in error, try again with an alternate provisioning context
- ProvisioningContext secondPass = evaluator.getSecondPassProvisioningContext(plan);
- if (secondPass == null)
- return status;
-
- successful = secondPass;
- plan = ((IPlanner) getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME)).getProvisioningPlan(request, secondPass, sub.newChild(500));
- if (plan == null) {
- status = new Status(IStatus.ERROR, Activator.ID, Messages.PlannerResolutionJob_NullProvisioningPlan);
- additionalStatus.add(status);
- return status;
- }
- return plan.getStatus();
- }
-
- public ResolutionResult getResolutionResult() {
- if (report == null) {
- if (plan == null) {
- if (additionalStatus.getSeverity() != IStatus.ERROR) {
- additionalStatus.add(new Status(IStatus.ERROR, Activator.ID, Messages.PlannerResolutionJob_NullProvisioningPlan));
- }
- report = new ResolutionResult();
- report.addSummaryStatus(additionalStatus);
- } else {
- report = PlanAnalyzer.computeResolutionResult(request, plan, additionalStatus);
- }
- }
- return report;
- }
-
- public String getProfileId() {
- return profileId;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/ResolutionResult.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/ResolutionResult.java
deleted file mode 100644
index 0d0d90bab..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/ResolutionResult.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.operations;
-
-import java.util.HashMap;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * ResolutionResult describes problems in a provisioning plan in a structured
- * way that can be presented to a user.
- *
- * @since 2.0
- */
-public class ResolutionResult {
- private static final String NESTING_INDENT = " "; //$NON-NLS-1$
-
- private final HashMap<IInstallableUnit, MultiStatus> iuToStatusMap = new HashMap<IInstallableUnit, MultiStatus>();
- private MultiStatus summaryStatus;
-
- public IStatus getSummaryStatus() {
- if (summaryStatus != null)
- return summaryStatus;
- return Status.OK_STATUS;
- }
-
- public void addSummaryStatus(IStatus status) {
- if (summaryStatus == null) {
- summaryStatus = new MultiStatus(Activator.ID, 0, Messages.ResolutionResult_SummaryStatus, null);
- }
- summaryStatus.add(status);
- }
-
- public IStatus statusOf(IInstallableUnit iu) {
- return iuToStatusMap.get(iu);
- }
-
- public void addStatus(IInstallableUnit iu, IStatus status) {
- MultiStatus iuSummaryStatus = iuToStatusMap.get(iu);
- if (iuSummaryStatus == null) {
- iuSummaryStatus = new MultiStatus(Activator.ID, IStatusCodes.IU_REQUEST_ALTERED, new IStatus[] {status}, getIUString(iu), null);
- } else
- iuSummaryStatus.add(status);
- }
-
- private String getIUString(IInstallableUnit iu) {
- if (iu == null)
- return Messages.PlanAnalyzer_Items;
- // Get the iu name in the default locale
- String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
- if (name != null)
- return name;
- return iu.getId();
- }
-
- public String getSummaryReport() {
- if (summaryStatus != null) {
- StringBuffer buffer = new StringBuffer();
- appendDetailText(summaryStatus, buffer, -1, false);
- return buffer.toString();
- }
- return ""; //$NON-NLS-1$
- }
-
- // Answers null if there is nothing to say about the ius
- public String getDetailedReport(IInstallableUnit[] ius) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < ius.length; i++) {
- MultiStatus iuStatus = iuToStatusMap.get(ius[i]);
- if (iuStatus != null)
- appendDetailText(iuStatus, buffer, 0, true);
- }
- String report = buffer.toString();
- if (report.length() == 0)
- return null;
- return report;
- }
-
- void appendDetailText(IStatus status, StringBuffer buffer, int indent, boolean includeTopLevelMessage) {
- if (includeTopLevelMessage) {
- for (int i = 0; i < indent; i++)
- buffer.append(NESTING_INDENT);
- if (status.getMessage() != null)
- buffer.append(status.getMessage());
- }
- Throwable t = status.getException();
- if (t != null) {
- // A provision (or core) exception occurred. Get its status message or if none, its top level message.
- // Indent by one more level (note the <=)
- buffer.append('\n');
- for (int i = 0; i <= indent; i++)
- buffer.append(NESTING_INDENT);
- if (t instanceof CoreException) {
- IStatus exceptionStatus = ((CoreException) t).getStatus();
- if (exceptionStatus != null && exceptionStatus.getMessage() != null)
- buffer.append(exceptionStatus.getMessage());
- else {
- String details = t.getLocalizedMessage();
- if (details != null)
- buffer.append(details);
- }
- } else {
- String details = t.getLocalizedMessage();
- if (details != null)
- buffer.append(details);
- }
- }
- // Now print the children status info (if there are children)
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- if (buffer.length() > 0)
- buffer.append('\n');
- appendDetailText(children[i], buffer, indent + 1, true);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/SearchForUpdatesResolutionJob.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/SearchForUpdatesResolutionJob.java
deleted file mode 100644
index 5fcd8f152..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/SearchForUpdatesResolutionJob.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.operations;
-
-import java.lang.reflect.InvocationTargetException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
-
-public class SearchForUpdatesResolutionJob extends PlannerResolutionJob {
-
- IRunnableWithProgress searchForUpdatesRunnable;
- ProfileChangeRequest[] requestHolder;
- UpdateOperation operation;
-
- public SearchForUpdatesResolutionJob(String label, ProvisioningSession session, String profileId, ProfileChangeRequest request, ProvisioningContext context, IFailedStatusEvaluator evaluator, MultiStatus additionalStatus, IRunnableWithProgress searchForUpdatesRunnable, ProfileChangeRequest[] requestHolder, UpdateOperation operation) {
- super(label, session, profileId, request, context, evaluator, additionalStatus);
- this.searchForUpdatesRunnable = searchForUpdatesRunnable;
- this.requestHolder = requestHolder;
- this.operation = operation;
- }
-
- public IStatus runModal(IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor);
- try {
- searchForUpdatesRunnable.run(sub.newChild(500));
- if (requestHolder.length > 0)
- this.request = requestHolder[0];
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- } catch (InvocationTargetException e) {
- // ignore, we don't actually throw this in the supplied runnable
- }
- if (request != null)
- return super.runModal(sub.newChild(500));
- return operation.getResolutionResult();
- }
-
- // This is made public for the automated tests
- public ProfileChangeRequest getProfileChangeRequest() {
- return request;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/messages.properties b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/messages.properties
deleted file mode 100644
index 1e91ac05c..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/messages.properties
+++ /dev/null
@@ -1,44 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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
-###############################################################################
-InstallOperation_ComputeProfileChangeProgress=Checking the install request
-InstallOperation_InstallJobName=Installing Software
-InstallOperation_ResolveJobName=Computing install requirements
-ProfileChangeOperation_NoProfileChangeRequest=Could not interpret the installation request.
-ProfileChangeOperation_ResolveTaskName=Analyzing the install operation
-ProvisioningJob_GenericErrorStatusMessage=Error encountered while running {0}
-ProvisioningSession_AgentNotFound=No provisioning agent could be found
-ProvisioningSession_InstallPlanConfigurationError=A problem was encountered while preparing the system for the installation
-PlanAnalyzer_IgnoringInstall="{0}" is not applicable to the current configuration and will not be installed.
-PlanAnalyzer_LockedImpliedUpdate0={0} will be ignored because it is already installed, and updates are not permitted.
-PlanAnalyzer_PartialInstall="{0}" is already present because other installed software requires it. It will be added to the installed software list.
-PlanAnalyzer_PartialUninstall= "{0}" cannot be fully uninstalled because other installed software requires it. The parts that are not required will be uninstalled.
-PlanAnalyzer_SideEffectInstall="{0}" will also be installed in order to complete this operation.
-PlanAnalyzer_SideEffectUninstall="{0}" must be uninstalled in order to complete this operation.
-PlannerResolutionJob_NullProvisioningPlan=Unexpected Error. Could not process the request. Check the error log for details.
-PlanAnalyzer_IgnoringImpliedDowngrade="{0}" will be ignored because a newer version is already installed.
-PlanAnalyzer_ImpliedUpdate="{0}" is already installed, so an update will be performed instead.
-PlanAnalyzer_Items=Items
-PlanAnalyzer_NothingToDo=Cannot complete the request. See the error log for details.
-PlanAnalyzer_NoUpdates=No updates were found.
-PlanAnalyzer_AlreadyInstalled="{0}" will be ignored because it is already installed.
-PlanAnalyzer_AnotherOperationInProgress=Cannot continue the operation. There is another install operation in progress.
-PlanAnalyzer_RequestAltered=Your original request has been modified.
-PlanAnalyzer_UnexpectedError=Unexpected error code {0} encountered for {1}.
-RepositoryTracker_DuplicateLocation=Duplicate location
-RepositoryTracker_InvalidLocation=The location "{0}" is not a valid software site location.
-ResolutionResult_SummaryStatus=Operation details
-SizingPhaseSet_PhaseSetName=Compute sizes
-
-UninstallOperation_ProvisioningJobName=Uninstalling Software
-UninstallOperation_ResolveJobName=Calculating Uninstall Validity
-UpdateOperation_ProfileChangeRequestProgress=Computing update request
-UpdateOperation_ResolveJobName=Computing Update Requirements
-UpdateOperation_UpdateJobName=Updating Software
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/IProfileChangeJob.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/IProfileChangeJob.java
deleted file mode 100644
index e964169bd..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/IProfileChangeJob.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.p2.operations;
-
-/**
- * Interface for a provisioning job that operates on a
- * profile.
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- * @since 2.0
- */
-public interface IProfileChangeJob {
-
- /**
- * Return the string id of the profile involved in this job.
- *
- * @return the id of the profile
- */
- public String getProfileId();
-
-}
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
deleted file mode 100644
index b179aea64..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/InstallOperation.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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.director.Explanation;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.p2.operations.*;
-import org.eclipse.equinox.internal.provisional.p2.director.PlannerStatus;
-import org.eclipse.equinox.internal.provisional.p2.director.RequestStatus;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-/**
- * An InstallOperation describes an operation that installs IInstallableUnits into
- * a profile.
- *
- * The following snippet shows how one might use an InstallOperation to perform a synchronous resolution and
- * then kick off an install in the background:
- *
- * <pre>
- * InstallOperation op = new InstallOperation(session, new IInstallableUnit [] { myIU });
- * IStatus result = op.resolveModal(monitor);
- * if (result.isOK()) {
- * op.getProvisioningJob(monitor).schedule();
- * }
- * </pre>
- *
- * @since 2.0
- * @see ProfileChangeOperation
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class InstallOperation extends ProfileChangeOperation {
-
- private Collection<IInstallableUnit> toInstall;
-
- /**
- * Create an install operation on the specified provisioning session that installs
- * the supplied IInstallableUnits. Unless otherwise specified, the operation will
- * be associated with the currently running profile.
- *
- * @param session the session to use for obtaining provisioning services
- * @param toInstall the IInstallableUnits to be installed into the profile.
- */
- public InstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toInstall) {
- super(session);
- this.toInstall = toInstall;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#computeProfileChangeRequest(org.eclipse.core.runtime.MultiStatus, org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor) {
- request = ProfileChangeRequest.createByProfileId(session.getProvisioningAgent(), profileId);
- IProfile profile;
- profile = session.getProfileRegistry().getProfile(profileId);
- 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 (QueryUtil.isPatch(entryToInstall))
- request.setInstallableUnitInclusionRules(entryToInstall, ProfileInclusionRules.createOptionalInclusionRule(entryToInstall));
-
- // Check to see if it is already installed. This may alter the request.
- IQueryResult<IInstallableUnit> alreadyInstalled = profile.query(QueryUtil.createIUQuery(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 = entryToInstall.getVersion().compareTo(installedIU.getVersion());
- // If the iu is a newer version of something already installed, consider this an
- // update request
- if (compareTo > 0) {
- boolean lockedForUpdate = false;
- String value = profile.getInstallableUnitProperty(installedIU, IProfile.PROP_PROFILE_LOCKED_IU);
- if (value != null)
- lockedForUpdate = (Integer.parseInt(value) & IProfile.LOCK_UPDATE) == IProfile.LOCK_UPDATE;
- 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, entryToInstall));
- } else {
- 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, entryToInstall));
- // Mark it as a root if it hasn't been already
- if (!UserVisibleRootQuery.isUserVisible(installedIU, profile))
- 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, 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, 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, entryToInstall));
- request.setInstallableUnitProfileProperty(entryToInstall, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
- }
- // }
- }
- } else {
- // Install it and mark as a root
- request.add(entryToInstall);
- // if (rootMarkerKey != null)
- request.setInstallableUnitProfileProperty(entryToInstall, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
- }
- sub.worked(1);
- }
- sub.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getResolveJobName()
- */
- protected String getResolveJobName() {
- return Messages.InstallOperation_ResolveJobName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getProvisioningJobName()
- */
- protected String getProvisioningJobName() {
- return Messages.InstallOperation_InstallJobName;
-
- }
-
- @Override
- ProvisioningContext getFirstPassProvisioningContext() {
- // Set it back to no referencing for first pass in case we reuse this context.
- context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, null);
- return context;
- }
-
- @Override
- IFailedStatusEvaluator getSecondPassEvaluator() {
- return new IFailedStatusEvaluator() {
- public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan) {
- // Follow metadata repository references if the first try fails
- // There should be real API for this!
- if (missingRequirement(failedPlan))
- context.setProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES, Boolean.toString(true));
- return context;
- }
- };
- }
-
- // this is very reachy
- boolean missingRequirement(IProvisioningPlan failedPlan) {
- IStatus status = failedPlan.getStatus();
- RequestStatus requestStatus = null;
- if (status instanceof PlannerStatus)
- requestStatus = ((PlannerStatus) status).getRequestStatus();
- return requestStatus != null && requestStatus.getShortExplanation() == Explanation.MISSING_REQUIREMENT;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileChangeOperation.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileChangeOperation.java
deleted file mode 100644
index 670d6514e..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileChangeOperation.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.operations;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.p2.operations.*;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-
-/**
- * ProfileChangeOperation describes a provisioning operation that modifies a profile.
- * The operation must first be resolved, followed by the actual provisioning
- * work being performed. This two-pass nature of the ProfileChangeOperation allows
- * resolution status to be reported to a client to determine whether the operation
- * should proceed. Each phase of the operation can be performed synchronously or in
- * the background as a job. To perform the operation synchronously:
- *
- * <pre>
- * IStatus result = op.resolveModal(monitor);
- * if (result.isOK())
- * op.getProvisioningJob(null).runModal(monitor);
- * else {
- * // interpret the result
- * }
- * </pre>
- *
- * To perform the resolution synchronously and the provisioning job in the
- * background:
- *
- * <pre>
- * IStatus status = op.resolveModal(monitor);
- * if (status.isOK()) {
- * ProvisioningJob job = op.getProvisioningJob(monitor);
- * job.schedule();
- * } else {
- * // interpret the result
- * }
- * </pre>
- *
- * To resolve in the background and perform the job when it is complete:
- *
- * <pre>
- * ProvisioningJob job = op.getResolveJob(monitor);
- * job.addJobChangeListener(new JobChangeAdapter() {
- * public void done (JobChangeEvent event) {
- * if (event.getResult().isOK() {
- * op.getProvisioningJob(monitor).schedule();
- * } else {
- * // interpret the result
- * }
- * }
- * });
- * job.schedule();
- *
- * </pre>
- *
- * In general, it is expected that clients create a new ProfileChangeOperation if
- * the resolution result of the current operation is not satisfactory. However,
- * subclasses may prescribe a different life cycle where appropriate.
- *
- * When retrieving the resolution and provisioning jobs managed by this operation,
- * a client may supply a progress monitor to be used by the job. When the job is
- * run by the platform job manager, both the platform job manager progress indicator
- * and the monitor supplied by the client will be updated.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public abstract class ProfileChangeOperation implements IProfileChangeJob {
-
- ProvisioningSession session;
- String profileId;
- ProvisioningContext context;
- MultiStatus noChangeRequest;
- PlannerResolutionJob job;
- ProfileChangeRequest request;
-
- /**
- * Create an operation using the provided provisioning session.
- * Unless otherwise specified by the client, the operation is
- * performed on the currently running profile.
- *
- * @param session the provisioning session providing the services
- */
- protected ProfileChangeOperation(ProvisioningSession session) {
- this.session = session;
- this.profileId = IProfileRegistry.SELF;
- this.context = new ProvisioningContext(session.getProvisioningAgent());
- }
-
- /**
- * Resolve the operation in the current thread using the specified progress
- * monitor. Return a status describing the result of the resolution.
- *
- * @param monitor the progress monitor to use
- * @return a status describing the resolution results
- */
- public final IStatus resolveModal(IProgressMonitor monitor) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- prepareToResolve();
- makeResolveJob(monitor);
- if (job != null) {
- job.runModal(monitor);
- }
- return getResolutionResult();
-
- }
-
- /**
- * Set the id of the profile that will be modified by this operation.
- * @param id the profile id
- */
- public void setProfileId(String id) {
- this.profileId = id;
- }
-
- /**
- * Return a job that can be used to resolve this operation in the background.
- *
- * @param monitor a progress monitor that should be used to report the job's progress in addition
- * to the standard job progress reporting. Can be <code>null</code>. If provided, this monitor
- * will be called from a background thread.
- *
- * @return a job that can be scheduled to perform the provisioning operation.
- */
- public final ProvisioningJob getResolveJob(IProgressMonitor monitor) {
- SubMonitor mon = SubMonitor.convert(monitor, Messages.ProfileChangeOperation_ResolveTaskName, 1000);
- prepareToResolve();
- makeResolveJob(mon.newChild(100));
- job.setAdditionalProgressMonitor(mon.newChild(900));
- return job;
- }
-
- /**
- * Perform any processing that must occur just before resolving this operation.
- */
- protected void prepareToResolve() {
- // default is to do nothing
- }
-
- void makeResolveJob(IProgressMonitor monitor) {
- noChangeRequest = PlanAnalyzer.getProfileChangeAlteredStatus();
- if (session.hasScheduledOperationsFor(profileId)) {
- noChangeRequest.add(PlanAnalyzer.getStatus(IStatusCodes.OPERATION_ALREADY_IN_PROGRESS, null));
- } else {
- computeProfileChangeRequest(noChangeRequest, monitor);
- }
- if (request == null) {
- if (noChangeRequest.getChildren().length == 0)
- // No explanation for failure was provided. It shouldn't happen, but...
- noChangeRequest = new MultiStatus(Activator.ID, IStatusCodes.UNEXPECTED_NOTHING_TO_DO, new IStatus[] {PlanAnalyzer.getStatus(IStatusCodes.UNEXPECTED_NOTHING_TO_DO, null)}, Messages.ProfileChangeOperation_NoProfileChangeRequest, null);
- return;
- }
- createPlannerResolutionJob();
- }
-
- /**
- * Compute the profile change request for this operation, adding any relevant intermediate status
- * to the supplied status.
- *
- * @param status a multi-status to be used to add relevant status. If a profile change request cannot
- * be computed for any reason, a status should be added to explain the problem.
- *
- * @param monitor the progress monitor to use for computing the profile change request
- */
- protected abstract void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor);
-
- private void createPlannerResolutionJob() {
- job = new PlannerResolutionJob(getResolveJobName(), session, profileId, request, getFirstPassProvisioningContext(), getSecondPassEvaluator(), noChangeRequest);
- }
-
- /**
- * Return an appropriate name for the resolution job.
- *
- * @return the resolution job name.
- */
- protected abstract String getResolveJobName();
-
- /**
- * Return an appropriate name for the provisioning job.
- *
- * @return the provisioning job name.
- */
- protected abstract String getProvisioningJobName();
-
- /**
- * Return a status indicating the result of resolving this
- * operation. A <code>null</code> return indicates that
- * resolving has not occurred yet.
- *
- * @return the status of the resolution, or <code>null</code>
- * if resolution has not yet occurred.
- */
- public IStatus getResolutionResult() {
- if (request == null) {
- if (noChangeRequest != null) {
- // If there is only one child message, use the specific message
- if (noChangeRequest.getChildren().length == 1)
- return noChangeRequest.getChildren()[0];
- return noChangeRequest;
- }
- return null;
- }
- if (job != null && job.getResolutionResult() != null)
- return job.getResolutionResult().getSummaryStatus();
- return null;
- }
-
- /**
- * Return a string that can be used to describe the results of the resolution
- * to a client.
- *
- * @return a string describing the resolution details, or <code>null</code> if the
- * operation has not been resolved.
- */
- public String getResolutionDetails() {
- if (job != null && job.getResolutionResult() != null)
- return job.getResolutionResult().getSummaryReport();
- // We couldn't resolve, but we have some status describing
- // why there is no profile change request.
- IStatus result = getResolutionResult();
- if (result != null)
- return result.getMessage();
- return null;
-
- }
-
- /**
- * Return a string that describes the specific resolution results
- * related to the supplied {@link IInstallableUnit}.
- *
- * @param iu the IInstallableUnit for which resolution details are requested
- *
- * @return a string describing the results for the installable unit, or <code>null</code> if
- * there are no specific results available for the installable unit.
- */
- public String getResolutionDetails(IInstallableUnit iu) {
- if (job != null && job.getResolutionResult() != null)
- return job.getResolutionResult().getDetailedReport(new IInstallableUnit[] {iu});
- return null;
-
- }
-
- /**
- * Return the provisioning plan obtained by resolving the receiver.
- *
- * @return the provisioning plan. This may be <code>null</code> if the operation
- * has not been resolved, or if a plan could not be obtained when attempting to
- * resolve. If the plan is null and the operation has been resolved, then the
- * resolution result will explain the problem.
- *
- * @see #hasResolved()
- * @see #getResolutionResult()
- */
- public IProvisioningPlan getProvisioningPlan() {
- if (job != null)
- return job.getProvisioningPlan();
- return null;
- }
-
- /**
- * Return the profile change request that describes the receiver.
- *
- * @return the profile change request. This may be <code>null</code> if the operation
- * has not been resolved, or if a profile change request could not be assembled given
- * the operation's state. If the profile change request is null and the operation has
- * been resolved, the the resolution result will explain the problem.
- *
- * @see #hasResolved()
- * @see #getResolutionResult()
- * @since 2.1
- */
- public IProfileChangeRequest getProfileChangeRequest() {
- if (job != null)
- return job.getProfileChangeRequest();
- return null;
- }
-
- /**
- * Return a provisioning job that can be used to perform the resolved operation. The job is
- * created using the default values associated with a new job. It is up to clients to configure
- * the priority of the job and set any appropriate properties, such as
- * {@link Job#setUser(boolean)},
- * {@link Job#setSystem(boolean)}, or {@link Job#setProperty(QualifiedName, Object)},
- * before scheduling it.
- *
- * @param monitor a progress monitor that should be used to report the job's progress in addition
- * to the standard job progress reporting. Can be <code>null</code>. If provided, this monitor
- * will be called from a background thread.
- *
- * @return a job that can be used to perform the provisioning operation. This may be <code>null</code>
- * if the operation has not been resolved, or if a plan could not be obtained when attempting to
- * resolve. If the job is null and the operation has been resolved, then the resolution result
- * will explain the problem.
- *
- * @see #hasResolved()
- * @see #getResolutionResult()
- */
- public ProvisioningJob getProvisioningJob(IProgressMonitor monitor) {
- IStatus status = getResolutionResult();
- if (status.getSeverity() != IStatus.CANCEL && status.getSeverity() != IStatus.ERROR) {
- if (job.getProvisioningPlan() != null) {
- ProfileModificationJob pJob = new ProfileModificationJob(getProvisioningJobName(), session, profileId, job.getProvisioningPlan(), job.getActualProvisioningContext());
- pJob.setAdditionalProgressMonitor(monitor);
- return pJob;
- }
- }
- return null;
- }
-
- /**
- * Set the provisioning context that should be used to resolve and perform the provisioning for
- * the operation. This must be set before an attempt is made to resolve the operation
- * for it to have any effect.
- *
- * @param context the provisioning context.
- */
- public void setProvisioningContext(ProvisioningContext context) {
- this.context = context;
- if (job != null)
- updateJobProvisioningContexts(job, context);
- }
-
- /**
- * Get the provisioning context that will be used to resolve and perform the provisioning for
- * the operation.
- *
- * @return the provisioning context
- */
- public ProvisioningContext getProvisioningContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.IProfileChangeJob#getProfileId()
- */
- public String getProfileId() {
- return profileId;
- }
-
- /**
- * Return a boolean indicating whether the operation has been resolved. This method
- * should be used to determine whether a client can expect to retrieve a profile
- * change request, provisioning plan, or resolution result. It is possible that this
- * method return <code>false</code> while resolution is taking place if it is performed
- * in the background.
- *
- * @return <code>true</code> if the operation has been resolved, <code>false</code>
- * if it has not resolved.
- */
- public boolean hasResolved() {
- return getResolutionResult() != null;
- }
-
- ProvisioningContext getFirstPassProvisioningContext() {
- return getProvisioningContext();
- }
-
- IFailedStatusEvaluator getSecondPassEvaluator() {
- return new IFailedStatusEvaluator() {
- public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan) {
- return null;
- }
- };
- }
-
- protected void updateJobProvisioningContexts(PlannerResolutionJob job, ProvisioningContext context) {
- job.setFirstPassProvisioningContext(context);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java
deleted file mode 100644
index fbab41a70..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.operations;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.engine.*;
-
-/**
- * A job that modifies a profile according to a specified provisioning plan.
- *
- * @since 2.0
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class ProfileModificationJob extends ProvisioningJob implements IProfileChangeJob {
-
- IProvisioningPlan plan;
- String profileId;
- IPhaseSet phaseSet = PhaseSetFactory.createDefaultPhaseSet();
- ProvisioningContext provisioningContext;
- int restartPolicy = ProvisioningJob.RESTART_OR_APPLY;
- private String taskName;
-
- /**
- * Create a job that will update a profile according to the specified provisioning plan.
- *
- * @param name the name of the job
- * @param session the provisioning session to use to obtain provisioning services
- * @param profileId the id of the profile to be altered
- * @param plan the provisioning plan describing how the profile is to be altered
- * @param context the provisioning context describing how the operation is to be performed
- */
- public ProfileModificationJob(String name, ProvisioningSession session, String profileId, IProvisioningPlan plan, ProvisioningContext context) {
- super(name, session);
- this.plan = plan;
- this.profileId = profileId;
- this.provisioningContext = context;
- }
-
- /**
- * Set the phase set to be used when running the provisioning plan. This method need only
- * be used when the default phase set is not sufficient. For example, clients could
- * use this method to perform a sizing or to download artifacts without provisioning them.
- *
- * @param phaseSet the provisioning phases to be run during provisioning.
- */
- public void setPhaseSet(IPhaseSet phaseSet) {
- this.phaseSet = phaseSet;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.IProfileChangeJob#getProfileId()
- */
- public String getProfileId() {
- return profileId;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProvisioningJob#runModal(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus runModal(IProgressMonitor monitor) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- String task = taskName;
- IStatus status = Status.OK_STATUS;
- if (task == null)
- task = getName();
- monitor.beginTask(task, 1000);
- try {
- status = getSession().performProvisioningPlan(plan, phaseSet, provisioningContext, new SubProgressMonitor(monitor, 1000));
- } finally {
- monitor.done();
- }
- return status;
- }
-
- /**
- * Sets the top level task name for progress when running this operation.
- *
- * @param label the label to be used for the task name
- */
- public void setTaskName(String label) {
- this.taskName = label;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProvisioningJob#getRestartPolicy()
- */
- public int getRestartPolicy() {
- //if we are installing into self we must always use the restart policy
- if (IProfileRegistry.SELF.equals(profileId))
- return restartPolicy;
- //otherwise only apply restart policy if the profile being modified is the one that is currently running
- IProfile profile = getSession().getProfileRegistry().getProfile(IProfileRegistry.SELF);
- String id = profile == null ? null : profile.getProfileId();
- if (id != null && profileId.equals(id)) {
- return restartPolicy;
- }
- return ProvisioningJob.RESTART_NONE;
- }
-
- /**
- * Set the restart policy that describes whether restart is needed after
- * performing this job. This policy will be consulted when the
- * profile being changed is the profile of the running system.
- *
- * @param policy an integer describing the restart policy
- * @see ProvisioningJob#RESTART_NONE
- * @see ProvisioningJob#RESTART_ONLY
- * @see ProvisioningJob#RESTART_OR_APPLY
- */
- public void setRestartPolicy(int policy) {
- restartPolicy = policy;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningJob.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningJob.java
deleted file mode 100644
index 3e834b4a5..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningJob.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.operations;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.operations.Activator;
-import org.eclipse.equinox.internal.p2.operations.Messages;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Abstract class representing provisioning jobs. Provisioning jobs
- * can be run in the background by scheduling them, or they can
- * be run by a client in a modal context. An additional progress monitor
- * can be set into the job for progress reporting.
- *
- * @since 2.0
- */
-public abstract class ProvisioningJob extends Job {
-
- /**
- * Class for multiplexing progress across multiple progress monitors.
- */
- private static class DoubleProgressMonitor extends ProgressMonitorWrapper {
-
- IProgressMonitor additionalMonitor;
-
- protected DoubleProgressMonitor(IProgressMonitor monitor1, IProgressMonitor monitor2) {
- super(monitor1);
- additionalMonitor = monitor2;
- }
-
- public void beginTask(String name, int totalWork) {
- super.beginTask(name, totalWork);
- additionalMonitor.beginTask(name, totalWork);
- }
-
- public void clearBlocked() {
- super.clearBlocked();
- if (additionalMonitor instanceof IProgressMonitorWithBlocking)
- ((IProgressMonitorWithBlocking) additionalMonitor).clearBlocked();
- }
-
- public void done() {
- super.done();
- additionalMonitor.done();
- }
-
- public void internalWorked(double work) {
- super.internalWorked(work);
- additionalMonitor.internalWorked(work);
- }
-
- public boolean isCanceled() {
- if (super.isCanceled())
- return true;
- return additionalMonitor.isCanceled();
- }
-
- public void setBlocked(IStatus reason) {
- super.setBlocked(reason);
- if (additionalMonitor instanceof IProgressMonitorWithBlocking)
- ((IProgressMonitorWithBlocking) additionalMonitor).setBlocked(reason);
- }
-
- public void setCanceled(boolean b) {
- super.setCanceled(b);
- additionalMonitor.setCanceled(b);
- }
-
- public void setTaskName(String name) {
- super.setTaskName(name);
- additionalMonitor.setTaskName(name);
- }
-
- public void subTask(String name) {
- super.subTask(name);
- additionalMonitor.subTask(name);
- }
-
- public void worked(int work) {
- super.worked(work);
- additionalMonitor.worked(work);
- }
- }
-
- /**
- * Constant which indicates that the job does not require a restart
- * upon completion. This constant is typically used for operations that
- * do not modify the running profile.
- *
- * @since 2.0
- */
- public static final int RESTART_NONE = 1;
-
- /**
- * Constant which indicates that the job requires the user to either
- * restart or apply the configuration changes in order to pick up the
- * changes performed by the job. This constant is typically used for
- * operations that modify the running profile.
- *
- * @since 2.0
- */
- public static final int RESTART_OR_APPLY = 2;
- /**
- * Constant which indicates that the job requires the user to restart
- * in order to pick up the changes performed by the job. This constant
- * is typically used for operations that modify the running profile but don't
- * handle dynamic changes without restarting the workbench.
- *
- * @since 2.0
- */
- public static final int RESTART_ONLY = 3;
-
- private ProvisioningSession session;
- private IProgressMonitor additionalMonitor;
-
- /**
- * Create a provisioning job with the given name that uses the
- * provided provisioning session for retrieving any services
- * needed.
- *
- * @param name the name of the job
- * @param session the session providing the services
- */
- public ProvisioningJob(String name, ProvisioningSession session) {
- super(name);
- this.session = session;
- }
-
- /**
- * Return the provisioning session that is used by the receiver
- * when retrieving necessary provisioning services.
- *
- * @return the session
- * @see ProvisioningSession
- */
- protected ProvisioningSession getSession() {
- return session;
- }
-
- private IProgressMonitor getCombinedProgressMonitor(IProgressMonitor mon1, IProgressMonitor mon2) {
- if (mon1 == null)
- return mon2;
- if (mon2 == null)
- return mon1;
- return new DoubleProgressMonitor(mon1, mon2);
- }
-
- public void setAdditionalProgressMonitor(IProgressMonitor monitor) {
- additionalMonitor = monitor;
- }
-
- /**
- * Executes this job. Returns the result of the execution.
- * This method is overridden to look for a wrapped progress monitor for
- * reporting progress.
- *
- * @noreference This method is not intended to be referenced by clients.
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- *
- */
- public final IStatus run(IProgressMonitor monitor) {
- IProgressMonitor wrappedMonitor = getCombinedProgressMonitor(monitor, additionalMonitor);
- IStatus status = Status.OK_STATUS;
- try {
- status = runModal(wrappedMonitor);
- } catch (OperationCanceledException e) {
- status = Status.CANCEL_STATUS;
- }
- return status;
- }
-
- /**
- * Perform the specific work involved in running this job in
- * the current thread. This method can be called directly by
- * clients, or in the course of running the job in the
- * background.
- *
- * @param monitor
- * the progress monitor to use for the operation
- *
- * @return a status indicating the result of the operation.
- *
- */
- public abstract IStatus runModal(IProgressMonitor monitor);
-
- /**
- * Return the restart policy that is appropriate for this job.
- *
- * @return a constant indicating the restart policy
- *
- * @see #RESTART_NONE
- * @see #RESTART_ONLY
- * @see #RESTART_OR_APPLY
- */
- public int getRestartPolicy() {
- return RESTART_NONE;
- }
-
- /**
- * Return an error status that can be used to report the specified exception.
- *
- * @param message the message that should be used in the status
- * @param e the exception to be reported
- * @return a status that can be used to describe the exception
- */
- protected IStatus getErrorStatus(String message, ProvisionException e) {
- if (message == null)
- if (e == null)
- message = NLS.bind(Messages.ProvisioningJob_GenericErrorStatusMessage, getName());
- else
- message = e.getLocalizedMessage();
- return new Status(IStatus.ERROR, Activator.ID, message, e);
- }
-
-}
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
deleted file mode 100644
index 16280faf8..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProvisioningSession.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- ******************************************************************************/
-
-package org.eclipse.equinox.p2.operations;
-
-import java.io.IOException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.operations.Activator;
-import org.eclipse.equinox.internal.p2.operations.Messages;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * ProvisioningSession provides the context for a provisioning session, including
- * the provisioning services that should be used. It also provides utility
- * methods for commonly performed provisioning tasks.
- *
- * @since 2.0
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class ProvisioningSession {
- private IProvisioningAgent agent;
-
- Set<Job> scheduledJobs = Collections.synchronizedSet(new HashSet<Job>());
-
- /**
- * Create a provisioning session using the services of the supplied agent.
- * @param agent the provisioning agent that supplies services. Must not be <code>null</code>.
- */
- public ProvisioningSession(IProvisioningAgent agent) {
- Assert.isNotNull(agent, Messages.ProvisioningSession_AgentNotFound);
- this.agent = agent;
- }
-
- /**
- * Return the provisioning agent used to retrieve provisioning services.
- * @return the provisioning agent
- */
- public IProvisioningAgent getProvisioningAgent() {
- return agent;
- }
-
- /**
- * Return the agent location for this session
- * @return the agent location
- */
- IAgentLocation getAgentLocation() {
- return (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- }
-
- /**
- * Return the artifact repository manager for this session
- * @return the repository manager
- */
- IArtifactRepositoryManager getArtifactRepositoryManager() {
- return (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- /**
- * Return the metadata repository manager for this session
- * @return the repository manager
- */
- IMetadataRepositoryManager getMetadataRepositoryManager() {
- return (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- }
-
- IProfileRegistry getProfileRegistry() {
- return (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- }
-
- /**
- * Return the provisioning engine for this session
- * @return the provisioning engine
- */
- IEngine getEngine() {
- return (IEngine) agent.getService(IEngine.SERVICE_NAME);
- }
-
- /**
- * Return the provisioning event bus used for dispatching events.
- * @return the event bus
- */
- IProvisioningEventBus getProvisioningEventBus() {
- return (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
- }
-
- /**
- * Return the planner used for this session
- * @return the planner
- */
- IPlanner getPlanner() {
- return (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- }
-
- /**
- * Perform the specified provisioning plan.
- *
- * @param plan the provisioning plan to be performed
- * @param phaseSet the phase set to be used for the plan
- * @param context the provisioning context to be used during provisioning
- * @param monitor the progress monitor to use while performing the plan
- * @return a status describing the result of performing the plan
- */
- public IStatus performProvisioningPlan(IProvisioningPlan plan, IPhaseSet phaseSet, ProvisioningContext context, IProgressMonitor monitor) {
- IPhaseSet set;
- if (phaseSet == null)
- set = PhaseSetFactory.createDefaultPhaseSet();
- else
- set = phaseSet;
-
- // 300 ticks for download, 100 to install handlers, 100 to compute the plan, 100 to install the rest
- SubMonitor mon = SubMonitor.convert(monitor, 600);
- int ticksUsed = 0;
-
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=272355
- // The exact profile instance used in the profile change request and passed to the engine must be used for all
- // of these operations, otherwise we can get profile out of synch errors.
- IProfile profile = plan.getProfile();
-
- if (plan.getInstallerPlan() != null) {
- if (doesPhaseSetIncludeDownload(set)) {
- // If the phase set calls for download, then we want to download the install plan artifacts
- // at the same time as the actual install artifacts. This way, we will only install the install handler
- // after already knowing we have successfully obtained the artifacts that will be installed afterward.
- IProvisioningPlan downloadPlan = getEngine().createPlan(profile, context);
- Iterator<IInstallableUnit> it = QueryUtil.compoundQueryable(plan.getAdditions(), plan.getInstallerPlan().getAdditions()).query(QueryUtil.createIUAnyQuery(), null).iterator();
- while (it.hasNext()) {
- downloadPlan.addInstallableUnit(it.next());
- }
- IPhaseSet download = PhaseSetFactory.createPhaseSetIncluding(new String[] {PhaseSetFactory.PHASE_COLLECT});
- IStatus downloadStatus = getEngine().perform(downloadPlan, download, mon.newChild(300));
- if (!downloadStatus.isOK()) {
- mon.done();
- return downloadStatus;
- }
- ticksUsed = 300;
- }
- // we pre-downloaded if necessary. Now perform the install plan against the original phase set.
- IStatus installerPlanStatus = getEngine().perform(plan.getInstallerPlan(), set, mon.newChild(100));
- if (!installerPlanStatus.isOK()) {
- mon.done();
- return installerPlanStatus;
- }
- ticksUsed += 100;
- // Apply the configuration
- Configurator configChanger = (Configurator) ServiceHelper.getService(Activator.getContext(), Configurator.class.getName());
- try {
- configChanger.applyConfiguration();
- } catch (IOException e) {
- mon.done();
- return new Status(IStatus.ERROR, Activator.ID, Messages.ProvisioningSession_InstallPlanConfigurationError, e);
- }
- }
- return getEngine().perform(plan, set, mon.newChild(500 - ticksUsed));
- }
-
- private boolean doesPhaseSetIncludeDownload(IPhaseSet set) {
- String[] phaseIds = set.getPhaseIds();
- for (int i = 0; i < phaseIds.length; i++)
- if (phaseIds[i].equals(PhaseSetFactory.PHASE_COLLECT))
- return true;
- return false;
- }
-
- /**
- * Return a boolean indicating whether any other provisioning operations are
- * scheduled for the specified profile.
- *
- * @param profileId the id of the profile in question
- * @return <code>true</code> if there are pending provisioning operations for
- * this profile, <code>false</code> if there are not.
- * @see #rememberJob(Job)
- */
- public boolean hasScheduledOperationsFor(String profileId) {
- Job[] jobs = getScheduledJobs();
- for (int i = 0; i < jobs.length; i++) {
- if (jobs[i] instanceof IProfileChangeJob) {
- String id = ((IProfileChangeJob) jobs[i]).getProfileId();
- if (profileId.equals(id))
- return true;
- }
- }
- return false;
- }
-
- private Job[] getScheduledJobs() {
- synchronized (scheduledJobs) {
- return scheduledJobs.toArray(new Job[scheduledJobs.size()]);
- }
- }
-
- /**
- * Remember the specified job. Remembered jobs are
- * checked when callers want to know what work is scheduled for
- * a particular profile.
- *
- * @param job the job to be remembered
- * @see #hasScheduledOperationsFor(String)
- */
- public void rememberJob(Job job) {
- scheduledJobs.add(job);
- job.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- scheduledJobs.remove(event.getJob());
- }
- });
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RepositoryTracker.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RepositoryTracker.java
deleted file mode 100644
index 152a3d09e..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RepositoryTracker.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.operations;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.operations.*;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * RepositoryTracker defines a service that retrieves repositories, tracks their status, and
- * reports errors.
- *
- * @since 2.0
- */
-public abstract class RepositoryTracker {
-
- /**
- * A status code used to indicate that a repository location was not valid.
- */
- public static final int STATUS_INVALID_REPOSITORY_LOCATION = IStatusCodes.INVALID_REPOSITORY_LOCATION;
-
- // What repositories to show
- private int artifactRepositoryFlags = IRepositoryManager.REPOSITORIES_NON_SYSTEM;
- private int metadataRepositoryFlags = IRepositoryManager.REPOSITORIES_NON_SYSTEM;
- /**
- * List<URI> of repositories that have already been reported to the user as not found.
- */
- private final List<URI> reposNotFound = Collections.synchronizedList(new ArrayList<URI>());
-
- /**
- * Return an array of repository locations known for the specified provisioning session.
- *
- * @param session the provisioning session providing the provisioning services
- * @return an array of repository locations known by this tracker
- */
- public abstract URI[] getKnownRepositories(ProvisioningSession session);
-
- /**
- * Return a status appropriate for reporting an invalid repository location.
- * @param locationText the text representation of the location
- * @return a status that describes an invalid location
- */
- public IStatus getInvalidLocationStatus(String locationText) {
- return new Status(IStatus.ERROR, Activator.ID, IStatusCodes.INVALID_REPOSITORY_LOCATION, NLS.bind(Messages.RepositoryTracker_InvalidLocation, locationText), null);
- }
-
- /**
- * Return a repository location represented by the supplied string. The provided
- * string should either be an unencoded string representation of a URI, or a
- * local file system path. This method is generally suitable for converting a
- * location string entered by an end user into a suitable URI representation.
- *
- * @param locationString a text representation of the location
- * @return a repository location URI, or <code>null</code> if the
- * text could not be interpreted.
- */
- public URI locationFromString(String locationString) {
- URI userLocation;
- try {
- userLocation = URIUtil.fromString(locationString);
- } catch (URISyntaxException e) {
- return null;
- }
- // If a path separator char was used, interpret as a local file URI
- String uriString = URIUtil.toUnencodedString(userLocation);
- if (uriString.length() > 0 && (uriString.charAt(0) == '/' || uriString.charAt(0) == File.separatorChar))
- return RepositoryHelper.localRepoURIHelper(userLocation);
- return userLocation;
- }
-
- /**
- * Validate the specified repository location.
- *
- * @param session the provisioning session providing the repository services
- * @param location the location in question
- * @param contactRepositories <code>true</code> if the appropriate repository manager(s) should be
- * consulted regarding the validity of the location, or <code>false</code> if the repository manager
- * should not be consulted.
- * @param monitor the progress monitor
- * @return a status indicating the current status of the repository
- */
-
- public IStatus validateRepositoryLocation(ProvisioningSession session, URI location, boolean contactRepositories, IProgressMonitor monitor) {
- // First validate syntax issues
- IStatus localValidationStatus = RepositoryHelper.checkRepositoryLocationSyntax(location);
- if (!localValidationStatus.isOK()) {
- // bad syntax, but it could just be non-absolute.
- // In this case, use the helper
- String locationString = URIUtil.toUnencodedString(location);
- if (locationString.length() > 0 && (locationString.charAt(0) == '/' || locationString.charAt(0) == File.separatorChar)) {
- location = RepositoryHelper.localRepoURIHelper(location);
- localValidationStatus = RepositoryHelper.checkRepositoryLocationSyntax(location);
- }
- }
-
- if (!localValidationStatus.isOK())
- return localValidationStatus;
-
- if (contains(location, session))
- return new Status(IStatus.ERROR, Activator.ID, IStatusCodes.INVALID_REPOSITORY_LOCATION, Messages.RepositoryTracker_DuplicateLocation, null);
- return Status.OK_STATUS;
- }
-
- /**
- * Return a boolean indicating whether this tracker already contains the specified
- * repository location.
- *
- * @param location the location in question
- * @param session the provisioning session providing the repository services
- * @since 2.1
- */
- protected boolean contains(URI location, ProvisioningSession session) {
- // This is a fallback implementation in the absence of a repository manager
- // that would know what to do.
- URI[] knownRepositories = getKnownRepositories(session);
- for (int i = 0; i < knownRepositories.length; i++) {
- if (URIUtil.sameURI(knownRepositories[i], location)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Add the specified location to the list of "not found" repositories.
- * This list is used to ensure that errors are not reported multiple times
- * for the same repository.
- *
- * The caller is already assumed to have reported any errors if necessary.
- *
- * @param location the location of the repository that cannot be found
- */
- public void addNotFound(URI location) {
- reposNotFound.add(location);
- }
-
- /**
- * Answer a boolean indicating whether not found status has already been
- * reported for the specified location.
- *
- * @param location the location in question
- * @return <code>true</code> if the repository has already been reported as
- * being not found, <code>false</code> if no status has been reported for this
- * location.
- */
- public boolean hasNotFoundStatusBeenReported(URI location) {
- // We don't check for things like case variants or end slash variants
- // because we know that the repository managers already did this.
- return reposNotFound.contains(location);
- }
-
- /**
- * Clear the list of repositories that have already been reported as not found.
- */
- public void clearRepositoriesNotFound() {
- reposNotFound.clear();
- }
-
- /**
- * Remove the specified repository from the list of repositories that
- * have already been reported as not found. This method has no effect
- * if the repository has never been reported as not found.
- *
- * @param location the location in question
- */
- public void clearRepositoryNotFound(URI location) {
- reposNotFound.remove(location);
- }
-
- /**
- * Return the repository flags suitable for retrieving known repositories from
- * a repository manager
- *
- * @return the repository flags
- *
- */
- public int getArtifactRepositoryFlags() {
- return artifactRepositoryFlags;
- }
-
- /**
- * Set the repository flags suitable for retrieving known repositories from
- * a repository manager
- *
- * @param flags the repository flags
- *
- */
- public void setArtifactRepositoryFlags(int flags) {
- artifactRepositoryFlags = flags;
- }
-
- /**
- * Return the repository flags suitable for retrieving known repositories from
- * a repository manager
- *
- * @return the repository flags
- *
- */
- public int getMetadataRepositoryFlags() {
- return metadataRepositoryFlags;
- }
-
- /**
- * Set the repository flags suitable for retrieving known repositories from
- * a repository manager
- *
- * @param flags the repository flags
- *
- */
-
- public void setMetadataRepositoryFlags(int flags) {
- metadataRepositoryFlags = flags;
- }
-
- /**
- * Report a failure to load the specified repository.
- * <p>
- * This default implementation simply logs the failure. Subclasses may override
- * to provide additional error reporting.
- * </p>
- * @param location the location of the failed repository
- * @param exception the failure that occurred
- */
- public void reportLoadFailure(final URI location, ProvisionException exception) {
- // special handling when the repo location is bad. We don't want to continually report it
- int code = exception.getStatus().getCode();
- if (code == IStatusCodes.INVALID_REPOSITORY_LOCATION || code == ProvisionException.REPOSITORY_INVALID_LOCATION || code == ProvisionException.REPOSITORY_NOT_FOUND) {
- if (hasNotFoundStatusBeenReported(location))
- return;
- addNotFound(location);
- }
-
- LogHelper.log(exception.getStatus());
- }
-
- /**
- * Add a repository at the specified location.
- *
- * @param location the location of the new repository
- * @param nickname the nickname for the repository, or <code>null</code> if there is no nickname
- * @param session the session to use for provisioning services
- */
- public abstract void addRepository(URI location, String nickname, ProvisioningSession session);
-
- /**
- * Remove the repositories at the specified locations
- *
- * @param locations the locations
- * @param session the session to use for provisioning services
- */
- public abstract void removeRepositories(URI[] locations, ProvisioningSession session);
-
- /**
- * Refresh the repositories at the specified locations
- * @param locations the locations
- * @param session the session to use for provisioning services
- * @param monitor the progress monitor to use
- */
- public abstract void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor);
-}
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
deleted file mode 100644
index 85c1c0231..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UninstallOperation.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.operations;
-
-import java.net.URI;
-import java.util.Collection;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.p2.operations.IFailedStatusEvaluator;
-import org.eclipse.equinox.internal.p2.operations.Messages;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * An UninstallOperation describes an operation that uninstalls {@link IInstallableUnit}s from
- * a profile.
- *
- * The following snippet shows how one might use an UninstallOperation to perform a synchronous resolution and
- * then kick off an uninstall in the background:
- *
- * <pre>
- * UninstallOperation op = new UninstallOperation(session, new IInstallableUnit [] { removeThisIU });
- * IStatus result = op.resolveModal(monitor);
- * if (result.isOK()) {
- * op.getProvisioningJob(monitor).schedule();
- * }
- * </pre>
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class UninstallOperation extends ProfileChangeOperation {
-
- private Collection<IInstallableUnit> toUninstall;
-
- /**
- * Create an uninstall operation on the specified provisioning session that uninstalls
- * the specified IInstallableUnits. Unless otherwise specified, the operation will
- * be associated with the currently running profile.
- *
- * @param session the session to use for obtaining provisioning services
- * @param toUninstall the IInstallableUnits to be installed into the profile.
- */
- public UninstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toUninstall) {
- super(session);
- this.toUninstall = toUninstall;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#computeProfileChangeRequest(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor) {
- request = ProfileChangeRequest.createByProfileId(session.getProvisioningAgent(), profileId);
- 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 (IInstallableUnit iuToUninstall : toUninstall) {
- request.removeInstallableUnitProfileProperty(iuToUninstall, IProfile.PROP_PROFILE_ROOT_IU);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getProvisioningJobName()
- */
- protected String getProvisioningJobName() {
- return Messages.UninstallOperation_ProvisioningJobName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getResolveJobName()
- */
- protected String getResolveJobName() {
- return Messages.UninstallOperation_ResolveJobName;
- }
-
- @Override
- ProvisioningContext getFirstPassProvisioningContext() {
- ProvisioningContext pc = new ProvisioningContext(session.getProvisioningAgent());
- pc.setMetadataRepositories(new URI[0]);
- pc.setArtifactRepositories(new URI[0]);
- return pc;
- }
-
- @Override
- IFailedStatusEvaluator getSecondPassEvaluator() {
- return new IFailedStatusEvaluator() {
- public ProvisioningContext getSecondPassProvisioningContext(IProvisioningPlan failedPlan) {
- return context;
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/Update.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/Update.java
deleted file mode 100644
index 8188710e3..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/Update.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.p2.operations;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * A simple data structure describing a possible update.
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class Update {
-
- public IInstallableUnit toUpdate;
- public IInstallableUnit replacement;
-
- /**
- * Creates a new update description.
- * @param toUpdate The installable unit to update
- * @param replacement The replacement installable unit
- */
- public Update(IInstallableUnit toUpdate, IInstallableUnit replacement) {
- this.toUpdate = toUpdate;
- this.replacement = replacement;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof Update))
- return false;
- if (toUpdate == null)
- return false;
- if (replacement == null)
- return false;
- Update other = (Update) obj;
- return toUpdate.equals(other.toUpdate) && replacement.equals(other.replacement);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((toUpdate == null) ? 0 : toUpdate.hashCode());
- result = prime * result + ((replacement == null) ? 0 : replacement.hashCode());
- return result;
- }
-
- /*(non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return "Update " + toUpdate.toString() + " ==> " + replacement.toString(); //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
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
deleted file mode 100644
index ba8dc9c77..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/UpdateOperation.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.operations;
-
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.p2.operations.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.planner.ProfileInclusionRules;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRunnableWithProgress;
-
-/**
- * An UpdateOperation describes an operation that updates {@link IInstallableUnit}s in
- * a profile.
- *
- * The following snippet shows how one might use an UpdateOperation to check for updates
- * to the profile and then install them in the background.
- *
- * <pre>
- * UpdateOperation op = new UpdateOperation(session);
- * IStatus result = op.resolveModal(monitor);
- * if (result.isOK()) {
- * op.getProvisioningJob(monitor).schedule();
- * }
- * </pre>
- *
- * The life cycle of an UpdateOperation is different than that of the other
- * operations. Since assembling the list of possible updates may be costly,
- * clients should not have to create a new update operation if the desired updates
- * to be applied need to change. In this case, the client can set a new set of
- * chosen updates on the update operation and resolve again.
- *
- * <pre>
- * UpdateOperation op = new UpdateOperation(session);
- * IStatus result = op.resolveModal(monitor);
- * if (result.isOK()) {
- * op.getProvisioningJob(monitor).schedule();
- * } else if (result.getSeverity() == IStatus.ERROR) {
- * Update [] chosenUpdates = letUserPickFrom(op.getPossibleUpdates());
- * op.setSelectedUpdates(chosenUpdates);
- * IStatus result = op.resolveModal(monitor);
- * }
- * </pre>
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @since 2.0
- */
-public class UpdateOperation extends ProfileChangeOperation {
-
- /**
- * A status code used to indicate that there were no updates found when
- * looking for updates.
- */
- public static final int STATUS_NOTHING_TO_UPDATE = IStatusCodes.NOTHING_TO_UPDATE;
-
- private Collection<IInstallableUnit> iusToUpdate;
- private HashMap<IInstallableUnit, List<Update>> possibleUpdatesByIU = new HashMap<IInstallableUnit, List<Update>>();
- private List<Update> defaultUpdates;
-
- /**
- * Create an update operation on the specified provisioning session that updates
- * the specified IInstallableUnits. Unless otherwise specified, the operation will
- * be associated with the currently running profile.
- *
- * @param session the session to use for obtaining provisioning services
- * @param toBeUpdated the IInstallableUnits to be updated.
- */
- public UpdateOperation(ProvisioningSession session, Collection<IInstallableUnit> toBeUpdated) {
- super(session);
- this.iusToUpdate = toBeUpdated;
- }
-
- /**
- * Create an update operation that will update all of the user-visible installable
- * units in the profile (the profile roots).
- *
- * @param session the session providing the provisioning services
- */
- public UpdateOperation(ProvisioningSession session) {
- this(session, null);
- }
-
- /**
- * Set the updates that should be selected from the set of available updates.
- * If the selected updates are not specified, then the latest available update
- * for each IInstallableUnit with updates will be chosen.
- *
- * @param defaultUpdates the updates that should be chosen from all of the available
- * updates.
- */
- public void setSelectedUpdates(Update[] defaultUpdates) {
- this.defaultUpdates = new ArrayList<Update>(Arrays.asList(defaultUpdates));
- }
-
- /**
- * Get the updates that have been selected from the set of available updates.
- * If none have been specified by the client, then the latest available update
- * for each IInstallableUnit with updates will be chosen.
- *
- * @return the updates that should be chosen from all of the available updates
- */
- public Update[] getSelectedUpdates() {
- if (defaultUpdates == null)
- return new Update[0];
- return defaultUpdates.toArray(new Update[defaultUpdates.size()]);
- }
-
- /**
- * Get the list of all possible updates. This list may include multiple versions
- * of updates for the same IInstallableUnit, as well as patches to the IInstallableUnit.
- *
- * @return an array of all possible updates
- */
- public Update[] getPossibleUpdates() {
- ArrayList<Update> all = new ArrayList<Update>();
- for (List<Update> updates : possibleUpdatesByIU.values())
- all.addAll(updates);
- return all.toArray(new Update[all.size()]);
- }
-
- private Update[] updatesFor(IInstallableUnit iu, IProfile profile, IProgressMonitor monitor) {
- List<Update> updates;
- if (possibleUpdatesByIU.containsKey(iu)) {
- // We've already looked them up in the planner, use the cache
- updates = possibleUpdatesByIU.get(iu);
- } else {
- // We must consult the planner
- IQueryResult<IInstallableUnit> replacements = session.getPlanner().updatesFor(iu, context, monitor);
- updates = new ArrayList<Update>();
- for (Iterator<IInstallableUnit> replacementIterator = replacements.iterator(); replacementIterator.hasNext();) {
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=273967
- // In the case of patches, it's possible that a patch is returned as an available update
- // even though it is already installed, because we are querying each IU for updates individually.
- // For now, we ignore any proposed update that is already installed.
- IInstallableUnit replacementIU = replacementIterator.next();
- IQueryResult<IInstallableUnit> alreadyInstalled = profile.query(QueryUtil.createIUQuery(replacementIU), null);
- if (alreadyInstalled.isEmpty()) {
- Update update = new Update(iu, replacementIU);
- updates.add(update);
- }
- }
- possibleUpdatesByIU.put(iu, updates);
- }
- return updates.toArray(new Update[updates.size()]);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#computeProfileChangeRequest(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected void computeProfileChangeRequest(MultiStatus status, IProgressMonitor monitor) {
- // Here we create a profile change request by finding the latest version available for any replacement, unless
- // otherwise specified in the selections.
- // We have to consider the scenario where the only updates available are patches, in which case the original
- // IU should not be removed as part of the update.
- Set<IInstallableUnit> toBeUpdated = new HashSet<IInstallableUnit>();
- HashSet<Update> elementsToPlan = new HashSet<Update>();
- boolean selectionSpecified = defaultUpdates != null;
- IProfile profile = session.getProfileRegistry().getProfile(profileId);
- if (profile == null)
- return;
-
- SubMonitor sub = SubMonitor.convert(monitor, Messages.UpdateOperation_ProfileChangeRequestProgress, 100 * iusToUpdate.size());
- for (IInstallableUnit iuToUpdate : iusToUpdate) {
- SubMonitor iuMon = sub.newChild(100);
- Update[] updates = updatesFor(iuToUpdate, profile, iuMon);
- for (int j = 0; j < updates.length; j++) {
- toBeUpdated.add(iuToUpdate);
- if (defaultUpdates != null && defaultUpdates.contains(updates[j])) {
- elementsToPlan.add(updates[j]);
- }
-
- }
- if (!selectionSpecified) {
- // If no selection was specified, we must figure out the latest version to apply.
- // The rules are that a true update will always win over a patch, but if only
- // patches are available, they should all be selected.
- // We first gather the latest versions of everything proposed.
- // Patches are keyed by their id because they are unique and should not be compared to
- // each other. Updates are keyed by the IU they are updating so we can compare the
- // versions and select the latest one
- HashMap<String, Update> latestVersions = new HashMap<String, Update>();
- boolean foundUpdate = false;
- boolean foundPatch = false;
- for (int j = 0; j < updates.length; j++) {
- String key;
- if (QueryUtil.isPatch(updates[j].replacement)) {
- foundPatch = true;
- key = updates[j].replacement.getId();
- } else {
- foundUpdate = true;
- key = updates[j].toUpdate.getId();
- }
- Update latestUpdate = latestVersions.get(key);
- IInstallableUnit latestIU = latestUpdate == null ? null : latestUpdate.replacement;
- if (latestIU == null || updates[j].replacement.getVersion().compareTo(latestIU.getVersion()) > 0)
- latestVersions.put(key, updates[j]);
- }
- // If there is a true update available, ignore any patches found
- // Patches are keyed by their own id
- if (foundPatch && foundUpdate) {
- Set<String> keys = new HashSet<String>();
- keys.addAll(latestVersions.keySet());
- 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(iuToUpdate.getId())) {
- latestVersions.remove(id);
- }
- }
- }
- elementsToPlan.addAll(latestVersions.values());
- }
- sub.worked(100);
- }
-
- if (toBeUpdated.size() <= 0 || elementsToPlan.isEmpty()) {
- sub.done();
- status.add(PlanAnalyzer.getStatus(IStatusCodes.NOTHING_TO_UPDATE, null));
- return;
- }
-
- request = ProfileChangeRequest.createByProfileId(session.getProvisioningAgent(), profileId);
- for (Update update : elementsToPlan) {
- IInstallableUnit theUpdate = update.replacement;
- if (defaultUpdates == null) {
- defaultUpdates = new ArrayList<Update>();
- defaultUpdates.add(update);
- } else {
- if (!defaultUpdates.contains(update))
- defaultUpdates.add(update);
- }
- request.add(theUpdate);
- request.setInstallableUnitProfileProperty(theUpdate, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
- if (QueryUtil.isPatch(theUpdate)) {
- request.setInstallableUnitInclusionRules(theUpdate, ProfileInclusionRules.createOptionalInclusionRule(theUpdate));
- } else {
- request.remove(update.toUpdate);
- }
-
- }
- sub.done();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getProvisioningJobName()
- */
- protected String getProvisioningJobName() {
- return Messages.UpdateOperation_UpdateJobName;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#getResolveJobName()
- */
- protected String getResolveJobName() {
- return Messages.UpdateOperation_ResolveJobName;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#prepareToResolve()
- */
- protected void prepareToResolve() {
- super.prepareToResolve();
- if (iusToUpdate == null) {
- iusToUpdate = getInstalledIUs();
- }
- }
-
- /*
- * Get the IInstallable units for the specified profile
- *
- * @param profileId the profile in question
- * @param all <code>true</code> if all IInstallableUnits in the profile should
- * be returned, <code>false</code> only those IInstallableUnits marked as (user visible) roots
- * should be returned.
- *
- * @return an array of IInstallableUnits installed in the profile.
- */
- private Collection<IInstallableUnit> getInstalledIUs() {
- IProfile profile = session.getProfileRegistry().getProfile(profileId);
- if (profile == null)
- return CollectionUtils.emptyList();
- IQuery<IInstallableUnit> query = new UserVisibleRootQuery();
- IQueryResult<IInstallableUnit> queryResult = profile.query(query, null);
- return queryResult.toUnmodifiableSet();
- }
-
- /*
- * Overridden to delay computation of the profile change request until the resolution
- * occurs. This is done because computing the request is expensive (it involves searching
- * for updates).
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#makeResolveJob(org.eclipse.core.runtime.IProgressMonitor)
- */
- void makeResolveJob(IProgressMonitor monitor) {
- // throw away any previous requests
- request = null;
- noChangeRequest = PlanAnalyzer.getProfileChangeAlteredStatus();
- // the requestHolder is a hack to work around the fact that there is no public API
- // for the resolution job to get the request from the operation after it has been
- // computed.
- final ProfileChangeRequest[] requestHolder = new ProfileChangeRequest[1];
- job = new SearchForUpdatesResolutionJob(getResolveJobName(), session, profileId, request, getFirstPassProvisioningContext(), getSecondPassEvaluator(), noChangeRequest, new IRunnableWithProgress() {
- public void run(IProgressMonitor mon) throws OperationCanceledException {
- // We only check for other jobs running if this job is *not* scheduled
- if (job.getState() == Job.NONE && session.hasScheduledOperationsFor(profileId)) {
- noChangeRequest.add(PlanAnalyzer.getStatus(IStatusCodes.OPERATION_ALREADY_IN_PROGRESS, null));
- } else {
- computeProfileChangeRequest(noChangeRequest, mon);
- requestHolder[0] = UpdateOperation.this.request;
- }
- }
- }, requestHolder, this);
- }
-
- /*
- * Overridden because our resolution job life cycle is different. We have a job
- * before we've computed the profile change request, so we must ensure that we
- * have already computed the profile change request.
- *
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProfileChangeOperation#hasResolved()
- */
- public boolean hasResolved() {
- return request != null && super.hasResolved();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/package.html b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/package.html
deleted file mode 100644
index c0f0a930a..000000000
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/package.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Describes high level provisioning operations that can be resolved and performed
-either modally or in the background.
-<h2>
-Package Specification</h2>
-<p>
-This package consists of several kinds of operations and supporting classes:
-<ul>
-<li><b>Profile Change Operations</b> describe high level provisioning operations that
-modify a profile. These operations generally are performed in two phases, the resolution
-of the operation, followed by the provisioning of the resolved operation. Both the
-resolution and the provisioning tasks can be performed either synchronously or as jobs.
-</li>
-<li><b>Provisioning Jobs</b> describe lower level provisioning tasks that can
-be performed synchronously or in the background.
-</li>
-<li><b>ProvisioningSession</b> represents a particular instance of a p2 provisioning
-system. It provides access to all of the p2 core services as well as utility methods
-for commonly performed provisioning tasks.
-</li>
-</ul>
-<p>
-@since 2.0
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.classpath b/bundles/org.eclipse.equinox.p2.publisher/.classpath
deleted file mode 100644
index 834ea833e..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" output="bin_ant" path="src_ant"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.cvsignore b/bundles/org.eclipse.equinox.p2.publisher/.cvsignore
deleted file mode 100644
index e576ad57b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-temp.folder
-target
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch b/bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch
deleted file mode 100644
index ec9c3e8df..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Metadata Generator Ant Tasks.launch
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.metadata.generator"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.metadata.generator"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.metadata.generator/scripts/buildExtraJAR.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value=""/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch b/bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch
deleted file mode 100644
index 3c6003b89..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.externalToolBuilders/Build Publisher Ant Tasks.launch
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;launchConfigurationWorkingSet factoryID=&quot;org.eclipse.ui.internal.WorkingSetFactory&quot; id=&quot;1255396868921_12&quot; label=&quot;working set&quot; name=&quot;working set&quot;&gt;&#10;&lt;item factoryID=&quot;org.eclipse.ui.internal.model.ResourceFactory&quot; path=&quot;/org.eclipse.equinox.p2.publisher&quot; type=&quot;4&quot;/&gt;&#10;&lt;/launchConfigurationWorkingSet&gt;}"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.publisher"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.project b/bundles/org.eclipse.equinox.p2.publisher/.project
deleted file mode 100644
index 20aa4f425..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.publisher</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Build Publisher Ant Tasks.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f9763e493..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,348 +0,0 @@
-#Tue Feb 16 09:33:59 EST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=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
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 014501b61..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:54 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch b/bundles/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch
deleted file mode 100644
index 632914eb5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/Eclipse install publisher.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Eclipse install publisher"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console &#13;&#10;-consolelog&#13;&#10;-application org.eclipse.equinox.p2.publisher.InstallPublisher&#13;&#10;-metadataRepository file:c:/temp/repos&#13;&#10;-source file:C:\build.ecf\v20080507-1345\3.3.2\updateSite&#13;&#10;-artifactRepository file:d:/temp/repos&#13;&#10;-source d:/m1/eclipse&#13;&#10;-configs win32.win32.x86&#13;&#10;-id sdk&#13;&#10;-version 3.4.0&#13;&#10;&#10;-flavor tooling&#13;&#10;-top org.eclipse.sdk.feature.group&#13;&#10;-publishArtifacts"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="true"/>
-<stringAttribute key="target_bundles" value="org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.app@default:true,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.launcher@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ecf@default:default,org.eclipse.equinox.frameworkadmin.equinox@3:true,org.eclipse.equinox.security@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.net@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.frameworkadmin@3:true,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.jarprocessor@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.simpleconfigurator.manipulator@3:true,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.simpleconfigurator@3:true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/Features and Bundles Publisher.launch b/bundles/org.eclipse.equinox.p2.publisher/Features and Bundles Publisher.launch
deleted file mode 100644
index 41b1d426a..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/Features and Bundles Publisher.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Features and Bundles Publisher"/>
-<booleanAttribute key="default_auto_start" value="false"/>
-<intAttribute key="default_start_level" value="4"/>
-<booleanAttribute key="includeOptional" value="false"/>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher&#13;&#10;-metadataRepository file:c:/temp/repos&#13;&#10;-artifactRepository file:c:/temp/repos&#13;&#10;-source C:\build.ecf\v20080507-1345\3.3.2\updateSite&#13;&#10;-configs win32.win32.x86&#13;&#10;-publishArtifacts"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.osgi@default:default,org.eclipse.equinox.frameworkadmin@3:true,org.eclipse.equinox.common@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.frameworkadmin.equinox@3:true,org.eclipse.core.jobs@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.app@default:true,org.eclipse.equinox.launcher@default:default,org.eclipse.core.net@default:default,org.eclipse.osgi.services@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.registry@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useNamedJRE" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.simpleconfigurator.manipulator@3:true,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.equinox.simpleconfigurator@3:true,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.artifact.repository@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
deleted file mode 100644
index bdba755d5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,68 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.publisher;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.publisher.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.publisher;
- x-friends:="org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.ui.sdk,
- org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.p2.publisher.compatibility;x-internal:=true,
- org.eclipse.equinox.internal.p2.publisher.eclipse;
- x-friends:="org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.repository.tools,
- org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.internal.p2.swt.tools;x-internal:=true,
- org.eclipse.equinox.p2.publisher;x-friends:="org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.updatesite",
- org.eclipse.equinox.p2.publisher.actions;x-friends:="org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.directorywatcher",
- org.eclipse.equinox.p2.publisher.eclipse;
- x-friends:="org.eclipse.equinox.p2.directorywatcher,
- org.eclipse.equinox.p2.extensionlocation,
- org.eclipse.equinox.p2.touchpoint.eclipse,
- org.eclipse.equinox.p2.updatesite,
- org.eclipse.equinox.p2.repository.tools",
- org.eclipse.equinox.spi.p2.publisher;x-friends:="org.eclipse.equinox.p2.updatesite"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.app;version="1.0.0";resolution:=optional,
- org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.frameworkadmin.equinox,
- org.eclipse.equinox.internal.frameworkadmin.utils,
- org.eclipse.equinox.internal.p2.artifact.repository,
- org.eclipse.equinox.internal.p2.artifact.repository.simple,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.expression,
- org.eclipse.equinox.internal.p2.metadata.index,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.index;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.spi,
- org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.datalocation;version="1.2.0",
- org.eclipse.osgi.service.environment;version="1.1.0",
- org.eclipse.osgi.service.pluginconversion;version="1.0.0",
- org.eclipse.osgi.service.resolver;version="1.2.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.6.0",
- org.osgi.service.application;version="1.1.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.xml.sax,
- org.xml.sax.helpers
diff --git a/bundles/org.eclipse.equinox.p2.publisher/about.html b/bundles/org.eclipse.equinox.p2.publisher/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/ant_tasks/.cvsignore b/bundles/org.eclipse.equinox.p2.publisher/ant_tasks/.cvsignore
deleted file mode 100644
index 1d6b46f03..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/ant_tasks/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-publisher-ant.jar
diff --git a/bundles/org.eclipse.equinox.p2.publisher/build.properties b/bundles/org.eclipse.equinox.p2.publisher/build.properties
deleted file mode 100644
index cf4258197..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/build.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2010 EclipseSource 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:
-# EclipseSource - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-source.ant_tasks/publisher-ant.jar = src_ant/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- profiles/,\
- plugin.xml,\
- ant_tasks/publisher-ant.jar,\
- plugin.properties
-src.includes = about.html
-jars.compile.order = .,\
- ant_tasks/publisher-ant.jar
-javacWarnings..=+unusedThrown
-extra.ant_tasks/publisher-ant.jar = platform:/plugin/org.apache.ant
-jars.extra.classpath = platform:/plugin/org.apache.ant/lib/ant.jar
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.publisher/plugin.properties b/bundles/org.eclipse.equinox.p2.publisher/plugin.properties
deleted file mode 100644
index bdeeb80a6..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-bundleName = Equinox Provisioning Publisher
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.publisher/plugin.xml b/bundles/org.eclipse.equinox.p2.publisher/plugin.xml
deleted file mode 100644
index 210c1d9e8..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/plugin.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.5"?>
-<plugin>
- <extension id="InstallPublisher" point="org.eclipse.core.runtime.applications">
- <application cardinality="1" thread="any" visible="true">
- <run class="org.eclipse.equinox.p2.publisher.eclipse.InstallPublisherApplication" />
- </application>
- </extension>
- <extension id="org.eclipse.equinox.p2.publisher.EclipseGenerator" point="org.eclipse.core.runtime.applications">
- <application cardinality="1" thread="main" visible="true">
- <run class="org.eclipse.equinox.internal.p2.publisher.compatibility.GeneratorApplication" />
- </application>
- </extension>
- <extension id="ProductPublisher" point="org.eclipse.core.runtime.applications">
- <application cardinality="1" thread="any" visible="true">
- <run class="org.eclipse.equinox.p2.publisher.eclipse.ProductPublisherApplication" />
- </application>
- </extension>
- <extension id="FeaturesAndBundlesPublisher" point="org.eclipse.core.runtime.applications">
- <application cardinality="1" thread="any" visible="true">
- <run class="org.eclipse.equinox.p2.publisher.eclipse.FeaturesAndBundlesPublisherApplication" />
- </application>
- </extension>
-
- <extension point="org.eclipse.ant.core.antTasks">
- <antTask
- library="ant_tasks/publisher-ant.jar"
- name="p2.publisher"
- class="org.eclipse.equinox.internal.p2.publisher.ant.PublisherTask">
- </antTask>
- <antTask
- class="org.eclipse.equinox.internal.p2.publisher.ant.FeaturesAndBundlesPublisherTask"
- library="ant_tasks/publisher-ant.jar"
- name="p2.publish.featuresAndBundles">
- </antTask>
- <antTask
- class="org.eclipse.equinox.internal.p2.publisher.ant.ProductPublisherTask"
- library="ant_tasks/publisher-ant.jar"
- name="p2.publish.product">
- </antTask>
- </extension>
-
- <extension point="org.eclipse.ant.core.extraClasspathEntries">
- <extraClasspathEntry library="ant_tasks/publisher-ant.jar"/>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/pom.xml b/bundles/org.eclipse.equinox.p2.publisher/pom.xml
deleted file mode 100644
index 7b068e9a5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.publisher</artifactId>
- <version>1.2.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.0_Foundation-1.0.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.0_Foundation-1.0.profile
deleted file mode 100644
index dde120a4d..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.0_Foundation-1.0.profile
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2005 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.microedition.io
-org.osgi.framework.bootdelegation = \
- javax.microedition.io
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- CDC-1.0/Foundation-1.0
-osgi.java.profile.name = CDC-1.0/Foundation-1.0
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.1_Foundation-1.1.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.1_Foundation-1.1.profile
deleted file mode 100644
index 67b20c7ef..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/CDC-1.1_Foundation-1.1.profile
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.microedition.io,\
- javax.microedition.pki,\
- javax.security.auth.x500
-org.osgi.framework.bootdelegation = \
- javax.microedition.io,\
- javax.microedition.pki,\
- javax.security.auth.x500
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- CDC-1.0/Foundation-1.0,\
- CDC-1.1/Foundation-1.1
-osgi.java.profile.name = CDC-1.1/Foundation-1.1
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.2.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.2.profile
deleted file mode 100644
index ab98b6707..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.2.profile
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- org.omg.CORBA,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextPackage
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- JRE-1.1,\
- J2SE-1.2
-osgi.java.profile.name = J2SE-1.2
-org.eclipse.jdt.core.compiler.compliance=1.2
-org.eclipse.jdt.core.compiler.source=1.2
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.3.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.3.profile
deleted file mode 100644
index da3538e6e..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.3.profile
+++ /dev/null
@@ -1,68 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.omg.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3
-osgi.java.profile.name = J2SE-1.3
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.4.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.4.profile
deleted file mode 100644
index abaa0c3d6..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.4.profile
+++ /dev/null
@@ -1,129 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml.parsers,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stream,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.views ,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4
-osgi.java.profile.name = J2SE-1.4
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.5.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.5.profile
deleted file mode 100644
index e56a9293d..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/J2SE-1.5.profile
+++ /dev/null
@@ -1,157 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activity,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.management,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views ,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5
-osgi.java.profile.name = J2SE-1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/JRE-1.1.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/JRE-1.1.profile
deleted file mode 100644
index 7bb8b46de..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/JRE-1.1.profile
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- JRE-1.1
-osgi.java.profile.name = JRE-1.1
-org.eclipse.jdt.core.compiler.compliance=1.1
-org.eclipse.jdt.core.compiler.source=1.1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/JavaSE-1.6.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/JavaSE-1.6.profile
deleted file mode 100644
index 68e811f69..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/JavaSE-1.6.profile
+++ /dev/null
@@ -1,194 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.accessibility,\
- javax.activation,\
- javax.activity,\
- javax.annotation,\
- javax.annotation.processing,\
- javax.crypto,\
- javax.crypto.interfaces,\
- javax.crypto.spec,\
- javax.imageio,\
- javax.imageio.event,\
- javax.imageio.metadata,\
- javax.imageio.plugins.bmp,\
- javax.imageio.plugins.jpeg,\
- javax.imageio.spi,\
- javax.imageio.stream,\
- javax.jws,\
- javax.jws.soap,\
- javax.lang.model,\
- javax.lang.model.element,\
- javax.lang.model.type,\
- javax.lang.model.util,\
- javax.management,\
- javax.management.loading,\
- javax.management.modelmbean,\
- javax.management.monitor,\
- javax.management.openmbean,\
- javax.management.relation,\
- javax.management.remote,\
- javax.management.remote.rmi,\
- javax.management.timer,\
- javax.naming,\
- javax.naming.directory,\
- javax.naming.event,\
- javax.naming.ldap,\
- javax.naming.spi,\
- javax.net,\
- javax.net.ssl,\
- javax.print,\
- javax.print.attribute,\
- javax.print.attribute.standard,\
- javax.print.event,\
- javax.rmi,\
- javax.rmi.CORBA,\
- javax.rmi.ssl,\
- javax.script,\
- javax.security.auth,\
- javax.security.auth.callback,\
- javax.security.auth.kerberos,\
- javax.security.auth.login,\
- javax.security.auth.spi,\
- javax.security.auth.x500,\
- javax.security.cert,\
- javax.security.sasl,\
- javax.sound.midi,\
- javax.sound.midi.spi,\
- javax.sound.sampled,\
- javax.sound.sampled.spi,\
- javax.sql,\
- javax.sql.rowset,\
- javax.sql.rowset.serial,\
- javax.sql.rowset.spi,\
- javax.swing,\
- javax.swing.border,\
- javax.swing.colorchooser,\
- javax.swing.event,\
- javax.swing.filechooser,\
- javax.swing.plaf,\
- javax.swing.plaf.basic,\
- javax.swing.plaf.metal,\
- javax.swing.plaf.multi,\
- javax.swing.plaf.synth,\
- javax.swing.table,\
- javax.swing.text,\
- javax.swing.text.html,\
- javax.swing.text.html.parser,\
- javax.swing.text.rtf,\
- javax.swing.tree,\
- javax.swing.undo,\
- javax.tools,\
- javax.transaction,\
- javax.transaction.xa,\
- javax.xml,\
- javax.xml.bind,\
- javax.xml.bind.annotation,\
- javax.xml.bind.annotation.adapters,\
- javax.xml.bind.attachment,\
- javax.xml.bind.helpers,\
- javax.xml.bind.util,\
- javax.xml.crypto,\
- javax.xml.crypto.dom,\
- javax.xml.crypto.dsig,\
- javax.xml.crypto.dsig.dom,\
- javax.xml.crypto.dsig.keyinfo,\
- javax.xml.crypto.dsig.spec,\
- javax.xml.datatype,\
- javax.xml.namespace,\
- javax.xml.parsers,\
- javax.xml.soap,\
- javax.xml.stream,\
- javax.xml.stream.events,\
- javax.xml.stream.util,\
- javax.xml.transform,\
- javax.xml.transform.dom,\
- javax.xml.transform.sax,\
- javax.xml.transform.stax,\
- javax.xml.transform.stream,\
- javax.xml.validation,\
- javax.xml.ws,\
- javax.xml.ws.handler,\
- javax.xml.ws.handler.soap,\
- javax.xml.ws.http,\
- javax.xml.ws.soap,\
- javax.xml.ws.spi,\
- javax.xml.ws.wsaddressing,\
- javax.xml.xpath,\
- org.ietf.jgss,\
- org.omg.CORBA,\
- org.omg.CORBA_2_3,\
- org.omg.CORBA_2_3.portable,\
- org.omg.CORBA.DynAnyPackage,\
- org.omg.CORBA.ORBPackage,\
- org.omg.CORBA.portable,\
- org.omg.CORBA.TypeCodePackage,\
- org.omg.CosNaming,\
- org.omg.CosNaming.NamingContextExtPackage,\
- org.omg.CosNaming.NamingContextPackage,\
- org.omg.Dynamic,\
- org.omg.DynamicAny,\
- org.omg.DynamicAny.DynAnyFactoryPackage,\
- org.omg.DynamicAny.DynAnyPackage,\
- org.omg.IOP,\
- org.omg.IOP.CodecFactoryPackage,\
- org.omg.IOP.CodecPackage,\
- org.omg.Messaging,\
- org.omg.PortableInterceptor,\
- org.omg.PortableInterceptor.ORBInitInfoPackage,\
- org.omg.PortableServer,\
- org.omg.PortableServer.CurrentPackage,\
- org.omg.PortableServer.POAManagerPackage,\
- org.omg.PortableServer.POAPackage,\
- org.omg.PortableServer.portable,\
- org.omg.PortableServer.ServantLocatorPackage,\
- org.omg.SendingContext,\
- org.omg.stub.java.rmi,\
- org.w3c.dom,\
- org.w3c.dom.bootstrap,\
- org.w3c.dom.css,\
- org.w3c.dom.events,\
- org.w3c.dom.html,\
- org.w3c.dom.ls,\
- org.w3c.dom.ranges,\
- org.w3c.dom.stylesheets,\
- org.w3c.dom.traversal,\
- org.w3c.dom.views,\
- org.w3c.dom.xpath,\
- org.xml.sax,\
- org.xml.sax.ext,\
- org.xml.sax.helpers
-org.osgi.framework.bootdelegation = \
- javax.*,\
- org.ietf.jgss,\
- org.omg.*,\
- org.w3c.*,\
- org.xml.*,\
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2,\
- JRE-1.1,\
- J2SE-1.2,\
- J2SE-1.3,\
- J2SE-1.4,\
- J2SE-1.5,\
- JavaSE-1.6
-osgi.java.profile.name = JavaSE-1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.0.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.0.profile
deleted file mode 100644
index 773501a52..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.0.profile
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0
-osgi.java.profile.name = OSGi/Minimum-1.0
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.1.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.1.profile
deleted file mode 100644
index 5031392b7..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.1.profile
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 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
-###############################################################################
-org.osgi.framework.system.packages =
-org.osgi.framework.bootdelegation = \
- sun.*,\
- com.sun.*
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1
-osgi.java.profile.name = OSGi/Minimum-1.1
-org.eclipse.jdt.core.compiler.compliance=1.3
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore
diff --git a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.2.profile b/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.2.profile
deleted file mode 100644
index 601b37379..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/profiles/OSGi_Minimum-1.2.profile
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2008 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
-###############################################################################
-org.osgi.framework.system.packages = \
- javax.security.auth.x500
-org.osgi.framework.bootdelegation = \
- javax.security.auth.x500
-org.osgi.framework.executionenvironment = \
- OSGi/Minimum-1.0,\
- OSGi/Minimum-1.1,\
- OSGi/Minimum-1.2
-osgi.java.profile.name = OSGi/Minimum-1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
diff --git a/bundles/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml b/bundles/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml
deleted file mode 100644
index a34be7af7..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/scripts/buildExtraJAR.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.equinox.p2.metadata.generator" default="default" basedir="..">
-
- <target name="init" depends="properties">
- <property name="plugin" value="org.eclipse.equinox.p2.publisher"/>
- <property name="temp.folder" value="${basedir}/temp.folder"/>
- <property name="plugin.destination" value="${basedir}"/>
- <property name="build.result.folder" value="${basedir}/ant_tasks"/>
- <property name="version.suffix" value="_1.0.0"/>
- </target>
-
- <target name="properties" if="eclipse.running">
- <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
- </target>
-
- <target name="buildScripts" depends="init" description="Build from generated scripts">
- <tstamp/>
- <eclipse.buildScript elements="plugin@${plugin}"
- buildDirectory="${buildDirectory}"
- configInfo="*,*,*"
- baseLocation="${baseLocation}"
- buildingOSGi="true"
- outputUpdateJars="false"
- pluginpath="${basedir}"
- forceContextQualifier="z${DSTAMP}${TSTAMP}"
- />
- <delete file="${basedir}/ant_tasks/publisher-ant.jar" failonerror="false"/>
- <ant antfile="${basedir}/build.xml" target="ant_tasks/publisher-ant.jar"/>
- </target>
-
- <target name="default" description="Jar up the binaries that were compiled by the jdt builder" >
- <mkdir dir="${basedir}/ant_tasks" />
- <delete file="${basedir}/ant_tasks/publisher-ant.jar" failonerror="false"/>
- <jar destfile="${basedir}/ant_tasks/publisher-ant.jar" basedir="bin_ant"/>
- </target>
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java
deleted file mode 100644
index 80380db60..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Activator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static BundleContext context = null;
- public static String ID = "org.eclipse.equinox.p2.publisher"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java
deleted file mode 100644
index aa1c2d235..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/FileSetDescriptor.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM Corporation - Ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher;
-
-import java.io.File;
-import java.util.*;
-
-public class FileSetDescriptor {
- private final String key;
- private String configSpec = null;
- private HashSet<File> fileset = new HashSet<File>();
- private final ArrayList<String[]> permissions = new ArrayList<String[]>();
- private String links = ""; //$NON-NLS-1$
-
- public FileSetDescriptor(String key, String configSpec) {
- this.key = key;
- this.configSpec = configSpec;
- }
-
- public void addFiles(File[] files) {
- fileset.addAll(Arrays.asList(files));
- }
-
- // a permission spec is { <perm>, file patterns }
- public void addPermissions(String[] property) {
- permissions.add(property);
- }
-
- public void setLinks(String property) {
- links = property;
- }
-
- public String getConfigSpec() {
- return configSpec;
- }
-
- public String getKey() {
- return key;
- }
-
- public String getLinks() {
- return links;
- }
-
- public String[][] getPermissions() {
- return permissions.toArray(new String[permissions.size()][]);
- }
-
- public File[] getFiles() {
- return fileset.toArray(new File[fileset.size()]);
- }
-
- public int size() {
- return fileset.size();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java
deleted file mode 100644
index 69287e4b1..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/Messages.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.publisher.messages";//$NON-NLS-1$
-
- public static String exception_errorConverting;
- public static String exception_stateAddition;
- public static String exception_errorReadingManifest;
- public static String exception_errorLoadingManifest;
- public static String exception_errorLoadingProductFile;
- public static String exception_noPluginConverter;
- public static String exception_noArtifactRepo;
- public static String exception_noMetadataRepo;
- public static String exception_noBundlesOrLocations;
- public static String exception_noFeaturesOrLocations;
- public static String exception_invalidSiteReference;
- public static String exception_invalidSiteReferenceInFeature;
- public static String exception_repoMustBeURL;
- public static String exception_sourcePath;
-
- public static String message_generatingMetadata;
- public static String message_generationCompleted;
- public static String message_noSimpleconfigurator;
- public static String message_resultException;
- public static String message_publisherArguments;
-
- public static String exception_artifactRepoNoAppendDestroysInput;
-
- public static String error_rootIU_generation;
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java
deleted file mode 100644
index d66af45cb..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/QuotedTokenizer.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.publisher;
-
-import java.io.*;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-
-/**
- * Tokenzier which supports quoting using '"'
- * The resulting tokens will not contain the quote character '"' unless it was escaped '\"'
- */
-public class QuotedTokenizer implements Enumeration<String> {
- private StreamTokenizer tokenizer = null;
-
- /**
- * Default delimiter is whitespace characters
- * @param str - String to be tokenized
- */
- public QuotedTokenizer(String str) {
- this(str, null);
- }
-
- /**
- * Tokenize based on the given delimiters. The quote character '"' can not be
- * used as a delimiter.
- * @param str - String to be tokenized
- * @param delim - delimiter characters
- * @throws IllegalArgumentException if delim contains the quote character '"'
- */
- public QuotedTokenizer(String str, String delim) {
- if (delim != null && delim.indexOf('"') > -1)
- throw new IllegalArgumentException();
-
- StringReader reader = new StringReader(str);
- tokenizer = new StreamTokenizer(reader);
-
- tokenizer.resetSyntax();
- if (delim == null)
- tokenizer.ordinaryChars(0, 0x20);
- else
- tokenizer.wordChars(0, 0x20);
- tokenizer.wordChars(0x21, 0xFF); //characters > 0xFF are also word chars
- tokenizer.quoteChar('"');
-
- if (delim != null) {
- for (int i = 0; i < delim.length(); i++) {
- tokenizer.ordinaryChar(delim.charAt(i));
- }
- }
- }
-
- /**
- * Test to see if more tokens are available
- * @return true if there is another token
- */
- public boolean hasMoreTokens() {
- return (token(null) != StreamTokenizer.TT_EOF);
- }
-
- /**
- * Return the next token,
- * @return the next token
- * @throws NoSuchElementException if there are no more tokens
- */
- public String nextToken() {
- StringBuffer buffer = new StringBuffer(10);
- int tokenType = token(buffer);
-
- if (tokenType == StreamTokenizer.TT_EOF)
- throw new NoSuchElementException();
-
- return buffer.toString();
- }
-
- /**
- * Get the next token, or check that there is a next token
- * @param buffer to hold the token, or null if we just want to know if there is one
- */
- private int token(StringBuffer buffer) {
- int tokenType = 0;
- int next = 0;
-
- get_token: while (true) {
- try {
- tokenType = tokenizer.nextToken();
- } catch (IOException e) {
- tokenType = StreamTokenizer.TT_EOF;
- }
- switch (tokenType) {
- case StreamTokenizer.TT_WORD :
- case '"' :
- if (buffer == null) {
- //we just wanted to know if there was something coming
- tokenizer.pushBack();
- return tokenType;
- }
- buffer.append(tokenizer.sval);
-
- // peek at the next token,
- try {
- next = tokenizer.nextToken();
- tokenizer.pushBack();
- } catch (IOException e) {
- next = StreamTokenizer.TT_EOF;
- }
-
- //if the next token is a quote, it is still this token, otherwise we are done
- if (next == '"')
- continue;
- break get_token;
- case StreamTokenizer.TT_EOF :
- break get_token;
- default :
- //ordinary char from delim, if we have something we are done, otherwise keep looking for a token
- if (buffer != null && buffer.length() > 0)
- break get_token;
- continue;
- }
- }
- return tokenType;
- }
-
- public boolean hasMoreElements() {
- return hasMoreTokens();
- }
-
- public String nextElement() {
- return nextToken();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java
deleted file mode 100644
index f7bed224f..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/GeneratorApplication.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.publisher.compatibility;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.osgi.service.application.*;
-
-/**
- * @since 1.1
- */
-public class GeneratorApplication implements IApplication {
- protected static final String APP_ID = "app.id"; //$NON-NLS-1$
-
- public static final String UPDATE_SITE_APPLICATION = "org.eclipse.equinox.p2.publisher.UpdateSitePublisher"; //$NON-NLS-1$
- public static final String INSTALL_APPLICATION = "org.eclipse.equinox.p2.publisher.InstallPublisher"; //$NON-NLS-1$
- public static final String FEATURES_BUNDLES_APPLICATION = "org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher"; //$NON-NLS-1$
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS));
- }
-
- public void stop() {
- // TODO Auto-generated method stub
- }
-
- public Object run(String[] arguments) {
- Map<String, Object> argumentMap = parseArguments(arguments);
- return launchApplication(argumentMap);
- }
-
- protected Object launchApplication(Map<String, Object> applicationMap) {
- String applicationId = (String) applicationMap.get(APP_ID);
- String filter = "(service.pid=" + applicationId + ")"; //$NON-NLS-1$//$NON-NLS-2$
- ApplicationDescriptor descriptor = (ApplicationDescriptor) ServiceHelper.getService(Activator.getContext(), ApplicationDescriptor.class.getName(), filter);
- try {
- ApplicationHandle handle = descriptor.launch(applicationMap);
- return handle.getExitValue(0);
- } catch (ApplicationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return null;
- }
-
- private Map<String, Object> parseArguments(String[] arguments) {
- Map<String, Object> applicationMap = new HashMap<String, Object>();
- Map<String, String> args = new HashMap<String, String>(arguments.length);
- for (int i = 0; i < arguments.length; i++) {
- if (i == arguments.length - 1 || arguments[i + 1].startsWith(IGeneratorConstants.DASH))
- args.put(arguments[i], null);
- else
- args.put(arguments[i], arguments[++i]);
- }
-
- //adjust the short forms
- if (args.containsKey(IGeneratorConstants.AR))
- args.put(IGeneratorConstants.ARTIFACT_REPO, args.remove(IGeneratorConstants.AR));
- if (args.containsKey(IGeneratorConstants.MR))
- args.put(IGeneratorConstants.METADATA_REPO, args.remove(IGeneratorConstants.MR));
- if (args.containsKey(IGeneratorConstants.PA))
- args.put(IGeneratorConstants.PUBLISH_ARTIFACTS, args.remove(IGeneratorConstants.PA));
- if (args.containsKey(IGeneratorConstants.PAR))
- args.put(IGeneratorConstants.PUBLISH_ATIFACT_REPOSITORY, args.remove(IGeneratorConstants.PAR));
-
- if (args.containsKey(IGeneratorConstants.ROOT)) {
- String rootId = args.remove(IGeneratorConstants.ROOT);
- args.put(IGeneratorConstants.IU, rootId);
- args.put(IGeneratorConstants.ID, rootId);
- }
-
- if (args.containsKey(IGeneratorConstants.ROOT_VERSION))
- args.put(IGeneratorConstants.VERSION, args.remove(IGeneratorConstants.ROOT_VERSION));
-
- String source = null;
- // -inplace and -updateSite become -source, and imply -append
- if (args.containsKey(IGeneratorConstants.UPDATE_SITE))
- source = args.remove(IGeneratorConstants.UPDATE_SITE);
- if (args.containsKey(IGeneratorConstants.INPLACE))
- source = args.remove(IGeneratorConstants.INPLACE);
- if (source != null) {
- args.put(IGeneratorConstants.SOURCE, source);
- args.put(IGeneratorConstants.APPEND, null);
-
- //if not specified, repo locations are based on source
- String repoLocation = URIUtil.toUnencodedString(new File(source).toURI());
- if (!args.containsKey(IGeneratorConstants.ARTIFACT_REPO))
- args.put(IGeneratorConstants.ARTIFACT_REPO, repoLocation);
- if (!args.containsKey(IGeneratorConstants.METADATA_REPO))
- args.put(IGeneratorConstants.METADATA_REPO, repoLocation);
- }
-
- File base = new File(args.get(IGeneratorConstants.SOURCE));
- File configuration = new File(base, "configuration"); //$NON-NLS-1$
- if (configuration.exists()) {
- applicationMap.put(APP_ID, INSTALL_APPLICATION);
- } else if (args.containsKey(IGeneratorConstants.SITE)) {
- applicationMap.put(APP_ID, UPDATE_SITE_APPLICATION);
- } else if (args.containsKey(IGeneratorConstants.CONFIG)) {
- applicationMap.put(APP_ID, INSTALL_APPLICATION);
- } else {
- applicationMap.put(APP_ID, FEATURES_BUNDLES_APPLICATION);
- }
-
- applicationMap.put(IApplicationContext.APPLICATION_ARGS, flattenMap(args));
- return applicationMap;
- }
-
- private String[] flattenMap(Map<String, String> map) {
- ArrayList<String> list = new ArrayList<String>(map.size());
- for (Iterator<String> iterator = map.keySet().iterator(); iterator.hasNext();) {
- String key = iterator.next();
- String value = map.get(key);
- list.add(key);
- if (value != null)
- list.add(value);
- }
- return list.toArray(new String[list.size()]);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java
deleted file mode 100644
index 30bd49cb9..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/compatibility/IGeneratorConstants.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.publisher.compatibility;
-
-/**
- * @since 1.1
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface IGeneratorConstants {
- public static final String DASH = "-"; //$NON-NLS-1$
-
- //arguments understood by the old metadata generator application
- public static final String PUBLISH_ARTIFACTS = "-publishArtifacts"; //$NON-NLS-1$
- public static final String PA = "-pa"; //$NON-NLS-1$
- public static final String PUBLISH_ATIFACT_REPOSITORY = "-publishArtifactRepository"; //$NON-NLS-1$
- public static final String PAR = "-par"; //$NON-NLS-1$
- public static final String APPEND = "-append"; //$NON-NLS-1$
- public static final String NO_DEFAULT_IUS = "-noDefaultIUs"; //$NON-NLS-1$
- public static final String COMPRESS = "-compress"; //$NON-NLS-1$
- public static final String REUSE_PACK200 = "-reusePack200Files"; //$NON-NLS-1$
- public static final String SOURCE = "-source"; //$NON-NLS-1$
- public static final String INPLACE = "-inplace"; //$NON-NLS-1$
- public static final String CONFIG = "-config"; //$NON-NLS-1$
- public static final String UPDATE_SITE = "-updateSite"; //$NON-NLS-1$
- public static final String EXE = "-exe"; //$NON-NLS-1$
- public static final String LAUNCHER_CONFIG = "-launcherConfig"; //$NON-NLS-1$
- public static final String METADATA_REPO_NAME = "-metadataRepositoryName"; //$NON-NLS-1$
- public static final String METADATA_REPO = "-metadataRepository"; //$NON-NLS-1$
- public static final String MR = "-mr"; //$NON-NLS-1$
- public static final String ARTIFACT_REPO = "-artifactRepository"; //$NON-NLS-1$
- public static final String AR = "-ar"; //$NON-NLS-1$
- public static final String ARTIFACT_REPO_NAME = "-artifactRepositoryName"; //$NON-NLS-1$
- public static final String FLAVOR = "-flavor"; //$NON-NLS-1$
- public static final String PRODUCT_FILE = "-productFile"; //$NON-NLS-1$
- public static final String FEATURES = "-features"; //$NON-NLS-1$
- public static final String BUNDLES = "-bundles"; //$NON-NLS-1$
- public static final String BASE = "-base"; //$NON-NLS-1$
- public static final String ROOT = "-root"; //$NON-NLS-1$
- public static final String ROOT_VERSION = "-rootVersion"; //$NON-NLS-1$
- public static final String P2_OS = "-p2.os"; //$NON-NLS-1$
- public static final String SITE = "-site"; //$NON-NLS-1$
- public static final String IU = "-iu"; //$NON-NLS-1$
- public static final String ID = "-id"; //$NON-NLS-1$
- public static final String VERSION = "-version"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
deleted file mode 100644
index 5878b640c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/BrandingIron.java
+++ /dev/null
@@ -1,544 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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
- * Code 9 - Additional function and fixes
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.eclipse;
-
-import java.io.*;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.p2.swt.tools.IconExe;
-
-/**
- *
- */
-public class BrandingIron {
- private static final String MARKER_NAME = "%EXECUTABLE_NAME%"; //$NON-NLS-1$
- private static final String BUNDLE_NAME = "%BUNDLE_NAME%"; //$NON-NLS-1$
- private static final String ICON_NAME = "%ICON_NAME%"; //$NON-NLS-1$
- private static final String MARKER_KEY = "<key>CFBundleExecutable</key>"; //$NON-NLS-1$
- private static final String BUNDLE_KEY = "<key>CFBundleName</key>"; //$NON-NLS-1$
- private static final String ICON_KEY = "<key>CFBundleIconFile</key>"; //$NON-NLS-1$
- private static final String STRING_START = "<string>"; //$NON-NLS-1$
- private static final String STRING_END = "</string>"; //$NON-NLS-1$
- private static final String XDOC_ICON = "-Xdock:icon=../Resources/Eclipse.icns"; //$NON-NLS-1$
- private static final String XDOC_ICON_PREFIX = "-Xdock:icon=../Resources/"; //$NON-NLS-1$
-
- private String[] icons = null;
- private String root;
- private String name;
- private String os = "win32"; //$NON-NLS-1$
- private boolean brandIcons = true;
-
- public void setName(String value) {
- name = value;
- }
-
- public void setIcons(String[] value) {
- icons = value;
- }
-
- public void setIcons(String value) {
- icons = Utils.getTokens(value, ",");//$NON-NLS-1$
- if (icons[0].startsWith("${")) { //$NON-NLS-1$
- if (icons.length > 1) {
- String[] temp = new String[icons.length - 1];
- System.arraycopy(icons, 1, temp, 0, temp.length);
- icons = temp;
- } else {
- icons = null;
- }
- }
- //trim whitespace
- if (icons != null) {
- for (int i = 0; i < icons.length; i++) {
- icons[i] = icons[i].trim();
- }
- }
- }
-
- public void setRoot(String value) {
- root = value;
- }
-
- public void brand() throws Exception {
- // if the name property is not set it will be ${launcher.name} so just bail.
- if (name.startsWith("${")) //$NON-NLS-1$
- return;
-
- if (icons == null || icons[0].startsWith("${")) //$NON-NLS-1$
- brandIcons = false;
-
- // if the root does not exists (happens in some packaging cases) or
- // there is already a file with target name and we don't need to update its icons, don't do anything
- String testName = os.equals("win32") ? name + ".exe" : name; //$NON-NLS-1$ //$NON-NLS-2$
- if (!new File(root).exists() || (!brandIcons && new File(root, testName).exists()))
- return;
-
- if ("win32".equals(os)) //$NON-NLS-1$
- brandWindows();
- else if ("linux".equals(os)) //$NON-NLS-1$
- brandLinux();
- else if ("solaris".equals(os)) //$NON-NLS-1$
- brandSolaris();
- else if ("macosx".equals(os)) //$NON-NLS-1$
- brandMac();
- else if ("aix".equals(os)) //$NON-NLS-1$
- brandAIX();
- else if ("hpux".equals(os)) //$NON-NLS-1$
- brandHPUX();
- else
- renameLauncher();
- }
-
- private void brandAIX() {
- renameLauncher();
- }
-
- private void brandHPUX() {
- renameLauncher();
- }
-
- private void brandLinux() throws Exception {
- renameLauncher();
- if (brandIcons)
- copy(new File(icons[0]), new File(root, "icon.xpm")); //$NON-NLS-1$
- }
-
- private void brandSolaris() throws Exception {
- renameLauncher();
- if (brandIcons == false)
- return;
-
- for (int i = 0; i < icons.length; i++) {
- String icon = icons[i];
- if (icon.endsWith(".l.pm")) //$NON-NLS-1$
- copy(new File(icon), new File(root, name + ".l.pm")); //$NON-NLS-1$
- if (icon.endsWith(".m.pm")) //$NON-NLS-1$
- copy(new File(icon), new File(root, name + ".m.pm")); //$NON-NLS-1$
- if (icon.endsWith(".s.pm")) //$NON-NLS-1$
- copy(new File(icon), new File(root, name + ".s.pm")); //$NON-NLS-1$
- if (icon.endsWith(".t.pm")) //$NON-NLS-1$
- copy(new File(icon), new File(root, name + ".t.pm")); //$NON-NLS-1$
- }
- }
-
- private void brandMac() throws Exception {
- //Initially the files are in: <root>/Eclipse.app/
- //and they must appear in <root>/MyAppName.app/
- //Because java does not support the rename of a folder, files are copied.
-
- //Initialize the target folders
- String appName = name;
- if (appName.equals("eclipse")) //$NON-NLS-1$
- appName = "Eclipse"; //$NON-NLS-1$
- else if (appName.equals("launcher")) //$NON-NLS-1$
- appName = "Launcher"; //$NON-NLS-1$
-
- String target = root + '/' + appName + ".app/Contents"; //$NON-NLS-1$
- new File(target).mkdirs();
- new File(target + "/MacOS").mkdirs(); //$NON-NLS-1$
- new File(target + "/Resources").mkdirs(); //$NON-NLS-1$
-
- String initialRoot = root + "/Launcher.app/Contents"; //$NON-NLS-1$
- if (!new File(initialRoot).exists())
- initialRoot = root + "/Eclipse.app/Contents"; //$NON-NLS-1$
- copyMacLauncher(initialRoot, target);
- String iconName = ""; //$NON-NLS-1$
- File splashApp = new File(initialRoot, "Resources/Splash.app"); //$NON-NLS-1$
- if (brandIcons) {
- File icon = new File(icons[0]);
- iconName = icon.getName();
- copy(icon, new File(target + "/Resources/" + icon.getName())); //$NON-NLS-1$
- new File(initialRoot + "/Resources/Eclipse.icns").delete(); //$NON-NLS-1$
- if (!splashApp.exists())
- new File(initialRoot + "/Resources/").delete(); //$NON-NLS-1$
- }
- copyMacIni(initialRoot, target, iconName);
- modifyInfoPListFile(initialRoot, target, iconName);
- if (splashApp.exists()) {
- brandMacSplash(initialRoot, target, iconName);
- }
-
- File rootFolder = getCanonicalFile(new File(initialRoot));
- File targetFolder = getCanonicalFile(new File(target));
- if (!rootFolder.equals(targetFolder)) {
- rootFolder.delete();
- if (rootFolder.exists()) {
- //if the rootFolder still exists, its because there were other files that need to be moved over
- moveContents(rootFolder, targetFolder);
- }
- rootFolder.getParentFile().delete();
- }
- }
-
- /**
- * Brand the splash.app Info.plist and link or copy the mac launcher.
- * It is assumed that the mac launcher has been branded already.
- * @param initialRoot
- * @param target
- * @param iconName
- */
- private void brandMacSplash(String initialRoot, String target, String iconName) {
- String splashContents = "/Resources/Splash.app/Contents"; //$NON-NLS-1$
- modifyInfoPListFile(initialRoot + splashContents, target + splashContents, iconName);
-
- //link the MacOS launcher for the splash app
- int result = -1;
- String osName = System.getProperty("os.name"); //$NON-NLS-1$
- if (osName != null && !osName.startsWith("Windows")) { //$NON-NLS-1$
- try {
- String[] command = new String[] {"ln", "-sf", "../../../MacOS/" + name, "MacOS/" + name}; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
- File linkDir = new File(target, splashContents);
- Process proc = Runtime.getRuntime().exec(command, null, linkDir);
- result = proc.waitFor();
- } catch (IOException e) {
- // ignore
- } catch (InterruptedException e) {
- // ignore
- }
- }
-
- if (result != 0) {
- //ln failed, or we are on windows, just copy the executable instead
- File macOSDir = new File(target, "MacOS"); //$NON-NLS-1$
- File splashMacOSDir = new File(target, splashContents + "/MacOS"); //$NON-NLS-1$
- splashMacOSDir.mkdirs();
- try {
- File targetFile = new File(splashMacOSDir, name);
- copy(new File(macOSDir, name), targetFile);
- try {
- Runtime.getRuntime().exec(new String[] {"chmod", "755", targetFile.getAbsolutePath()}); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- // ignore
- }
- } catch (IOException e) {
- System.out.println("Could not copy macosx splash launcher"); //$NON-NLS-1$
- }
- }
- }
-
- private void moveContents(File source, File target) {
- if (!source.exists())
- return;
-
- try {
- if (source.getCanonicalFile().equals(target.getCanonicalFile()))
- return;
- } catch (IOException e) {
- System.out.println("Could not copy macosx resources."); //$NON-NLS-1$
- return;
- }
-
- target.getParentFile().mkdirs();
- if (source.isDirectory()) {
- target.mkdirs();
- File[] contents = source.listFiles();
- for (int i = 0; i < contents.length; i++) {
- File dest = new File(target, contents[i].getName());
- if (contents[i].isFile())
- contents[i].renameTo(dest);
- else
- moveContents(contents[i], dest);
- }
- source.delete();
- } else {
- source.renameTo(target);
- }
- }
-
- private void brandWindows() throws Exception {
- File templateLauncher = new File(root, name + ".exe"); //$NON-NLS-1$
- if (!templateLauncher.exists())
- templateLauncher = new File(root, "launcher.exe"); //$NON-NLS-1$
- if (!templateLauncher.exists())
- templateLauncher = new File(root, "eclipse.exe"); //$NON-NLS-1$
- if (brandIcons) {
- if (templateLauncher.exists()) {
- String[] args = new String[icons.length + 1];
- args[0] = templateLauncher.getAbsolutePath();
- System.arraycopy(icons, 0, args, 1, icons.length);
- IconExe.main(args);
- }
- }
- if (templateLauncher.exists() && !templateLauncher.getName().equals(name + ".exe")) //$NON-NLS-1$
- templateLauncher.renameTo(new File(root, name + ".exe")); //$NON-NLS-1$
- }
-
- private void renameLauncher() {
- if (!new File(root, "launcher").renameTo(new File(root, name))) //$NON-NLS-1$
- new File(root, "eclipse").renameTo(new File(root, name)); //$NON-NLS-1$
- }
-
- private void copyMacLauncher(String initialRoot, String target) {
- String targetLauncher = target + "/MacOS/"; //$NON-NLS-1$
- File launcher = getCanonicalFile(new File(initialRoot + "/MacOS/launcher")); //$NON-NLS-1$
- File eclipseLauncher = getCanonicalFile(new File(initialRoot + "/MacOS/eclipse")); //$NON-NLS-1$
- File targetFile = getCanonicalFile(new File(targetLauncher, name));
- if (!launcher.exists()) {
- launcher = eclipseLauncher;
- } else if (eclipseLauncher.exists() && !targetFile.equals(eclipseLauncher)) {
- //we may actually have both if exporting from the mac
- eclipseLauncher.delete();
- }
- try {
- if (targetFile.equals(launcher)) {
- try {
- //Force the executable bit on the exe because it has been lost when copying the file
- Runtime.getRuntime().exec(new String[] {"chmod", "755", targetFile.getAbsolutePath()}); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- //ignore
- }
- return;
- }
- copy(launcher, targetFile);
- } catch (IOException e) {
- System.out.println("Could not copy macosx launcher"); //$NON-NLS-1$
- return;
- }
- try {
- //Force the executable bit on the exe because it has been lost when copying the file
- Runtime.getRuntime().exec(new String[] {"chmod", "755", targetFile.getAbsolutePath()}); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (IOException e) {
- //ignore
- }
- launcher.delete();
- launcher.getParentFile().delete();
- }
-
- private File getCanonicalFile(File file) {
- try {
- return file.getCanonicalFile();
- } catch (IOException e) {
- return file;
- }
- }
-
- private void copyMacIni(String initialRoot, String target, String iconName) {
- // 3 possibilities, in order of preference:
- // rcp.app/Contents/MacOS/rcp.ini (targetFile)
- // Eclipse.app/Contents/MacOS/rcp.ini (brandedIni)
- // Eclipse.app/Contents/MacOs/eclipse.ini (ini)
- File targetFile = getCanonicalFile(new File(target, "/MacOS/" + name + ".ini")); //$NON-NLS-1$//$NON-NLS-2$
- File brandedIni = getCanonicalFile(new File(initialRoot, "/MacOS/" + name + ".ini")); //$NON-NLS-1$ //$NON-NLS-2$
- File ini = getCanonicalFile(new File(initialRoot, "/MacOS/eclipse.ini")); //$NON-NLS-1$
-
- if (targetFile.exists()) {
- //an ini already exists at the target, use that
- if (brandedIni.exists() && !brandedIni.equals(targetFile))
- brandedIni.delete();
- if (ini.exists() && !ini.equals(targetFile))
- ini.delete();
- ini = targetFile;
- } else if (brandedIni.exists()) {
- //take the one that is already branded
- if (ini.exists() && !ini.equals(brandedIni))
- ini.delete();
- ini = brandedIni;
- } else if (!ini.exists()) {
- return;
- }
-
- StringBuffer buffer;
- try {
- buffer = readFile(ini);
- } catch (IOException e) {
- System.out.println("Impossible to brand ini file"); //$NON-NLS-1$
- return;
- }
-
- if (iconName.length() > 0) {
- int xdoc = scan(buffer, 0, XDOC_ICON);
- if (xdoc != -1) {
- String icns = XDOC_ICON_PREFIX + iconName;
- buffer.replace(xdoc, xdoc + XDOC_ICON.length(), icns);
- }
- }
-
- try {
- transferStreams(new ByteArrayInputStream(buffer.toString().getBytes()), new FileOutputStream(targetFile));
- if (!ini.equals(targetFile))
- ini.delete();
- } catch (FileNotFoundException e) {
- System.out.println("Impossible to brand ini file"); //$NON-NLS-1$
- return;
- } catch (IOException e) {
- System.out.println("Impossible to brand ini file"); //$NON-NLS-1$
- return;
- }
- }
-
- private void modifyInfoPListFile(String initialRoot, String targetRoot, String iconName) {
- File infoPList = new File(initialRoot, "Info.plist"); //$NON-NLS-1$
- StringBuffer buffer;
- try {
- buffer = readFile(infoPList);
- } catch (IOException e) {
- System.out.println("Impossible to brand info.plist file"); //$NON-NLS-1$
- return;
- }
- int exePos = scan(buffer, 0, MARKER_NAME);
- if (exePos != -1)
- buffer.replace(exePos, exePos + MARKER_NAME.length(), name);
- else {
- exePos = scan(buffer, 0, MARKER_KEY);
- if (exePos != -1) {
- int start = scan(buffer, exePos + MARKER_KEY.length(), STRING_START);
- int end = scan(buffer, start + STRING_START.length(), STRING_END);
- if (start > -1 && end > start) {
- buffer.replace(start + STRING_START.length(), end, name);
- }
- }
- }
-
- int bundlePos = scan(buffer, 0, BUNDLE_NAME);
- if (bundlePos != -1)
- buffer.replace(bundlePos, bundlePos + BUNDLE_NAME.length(), name);
- else {
- exePos = scan(buffer, 0, BUNDLE_KEY);
- if (exePos != -1) {
- int start = scan(buffer, exePos + BUNDLE_KEY.length(), STRING_START);
- int end = scan(buffer, start + STRING_START.length(), STRING_END);
- if (start > -1 && end > start) {
- buffer.replace(start + STRING_START.length(), end, name);
- }
- }
- }
-
- int iconPos = scan(buffer, 0, ICON_NAME);
- if (iconPos != -1)
- buffer.replace(iconPos, iconPos + ICON_NAME.length(), iconName);
- else {
- exePos = scan(buffer, 0, ICON_KEY);
- if (exePos != -1) {
- int start = scan(buffer, exePos + ICON_KEY.length(), STRING_START);
- int end = scan(buffer, start + STRING_START.length(), STRING_END);
- if (start > -1 && end > start) {
- buffer.replace(start + STRING_START.length(), end, iconName);
- }
- }
- }
-
- File target = null;
- try {
- target = new File(targetRoot, "Info.plist"); //$NON-NLS-1$
- target.getParentFile().mkdirs();
- transferStreams(new ByteArrayInputStream(buffer.toString().getBytes()), new FileOutputStream(target));
- } catch (FileNotFoundException e) {
- System.out.println("Impossible to brand info.plist file"); //$NON-NLS-1$
- return;
- } catch (IOException e) {
- System.out.println("Impossible to brand info.plist file"); //$NON-NLS-1$
- return;
- }
- try {
- if (!infoPList.getCanonicalFile().equals(target.getCanonicalFile()))
- infoPList.delete();
- } catch (IOException e) {
- //ignore
- }
- }
-
- /**
- * Transfers all available bytes from the given input stream to the given output stream.
- * Regardless of failure, this method closes both streams.
- * @throws IOException
- */
- public void copy(File source, File destination) throws IOException {
- InputStream in = null;
- OutputStream out = null;
- try {
- in = new BufferedInputStream(new FileInputStream(source));
- out = new BufferedOutputStream(new FileOutputStream(destination));
- final byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- bytesRead = in.read(buffer);
- if (bytesRead == -1)
- break;
- out.write(buffer, 0, bytesRead);
- }
- } finally {
- try {
- if (in != null)
- in.close();
- } finally {
- if (out != null)
- out.close();
- }
- }
- }
-
- private int scan(StringBuffer buf, int start, String targetName) {
- return scan(buf, start, new String[] {targetName});
- }
-
- private int scan(StringBuffer buf, int start, String[] targets) {
- for (int i = start; i < buf.length(); i++) {
- for (int j = 0; j < targets.length; j++) {
- if (i < buf.length() - targets[j].length()) {
- String match = buf.substring(i, i + targets[j].length());
- if (targets[j].equalsIgnoreCase(match))
- return i;
- }
- }
- }
- return -1;
- }
-
- private StringBuffer readFile(File targetName) throws IOException {
- InputStreamReader reader = new InputStreamReader(new BufferedInputStream(new FileInputStream(targetName)));
- StringBuffer result = new StringBuffer();
- char[] buf = new char[4096];
- int count;
- try {
- count = reader.read(buf, 0, buf.length);
- while (count != -1) {
- result.append(buf, 0, count);
- count = reader.read(buf, 0, buf.length);
- }
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore exceptions here
- }
- }
- return result;
- }
-
- private void transferStreams(InputStream source, OutputStream destination) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- try {
- source.close();
- } catch (IOException e) {
- // ignore
- }
- try {
- destination.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- public void setOS(String value) {
- os = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java
deleted file mode 100644
index b6244ce8b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/DataLoader.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.eclipse;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.osgi.framework.Constants;
-
-public class DataLoader {
-
- private final static String FILTER_OBJECTCLASS = "(" + Constants.OBJECTCLASS + "=" + FrameworkAdmin.class.getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private final static String filterFwName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_NAME + "=Equinox)"; //$NON-NLS-1$ //$NON-NLS-2$
- //String filterFwVersion = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_VERSION + "=" + props.getProperty("equinox.fw.version") + ")";
- private final static String filterLauncherName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_NAME + "=Eclipse.exe)"; //$NON-NLS-1$ //$NON-NLS-2$
- //String filterLauncherVersion = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_VERSION + "=" + props.getProperty("equinox.launcher.version") + ")";
- private final static String frameworkAdminFillter = "(&" + FILTER_OBJECTCLASS + filterFwName + filterLauncherName + ")"; //$NON-NLS-1$ //$NON-NLS-2$
-
- private static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
-
- private Manipulator manipulator;
- private File configurationLocation;
-
- /**
- *
- * @param configurationLocation configuration file (i.e. config.ini).
- * @param executableLocation executable file (i.e. eclipse.exe).
- */
- public DataLoader(File configurationLocation, File executableLocation) {
- this.configurationLocation = configurationLocation;
- initializeFrameworkManipulator(configurationLocation.getParentFile(), executableLocation);
- }
-
- private void initializeFrameworkManipulator(File config, File executable) {
- getFrameworkManipulator();
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwPersistentDataLocation(config, true);
- launcherData.setLauncher(executable);
- if (executable == null)
- launcherData.setHome(config.getParentFile());
- try {
- manipulator.load();
- } catch (IllegalStateException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- } catch (FrameworkAdminRuntimeException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- } catch (IOException e2) {
- // TODO Auto-generated catch block
- e2.printStackTrace();
- }
- }
-
- public ConfigData getConfigData() {
- if (manipulator == null)
- return null;
-
- EquinoxFwConfigFileParser parser = new EquinoxFwConfigFileParser(Activator.getContext());
- try {
- if (configurationLocation != null && configurationLocation.exists())
- parser.readFwConfig(manipulator, configurationLocation);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error loading config.", e)); //$NON-NLS-1$ //TODO: Fix error string
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error loading config.", e)); //$NON-NLS-1$ //TODO: Fix error string
- }
- ConfigData data = manipulator.getConfigData();
- String value = data.getProperty(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL);
- if (value != null) {
- try {
- //config.ini uses simpleconfigurator, read the bundles.info and replace the bundle infos
- SimpleConfiguratorManipulator simpleManipulator = (SimpleConfiguratorManipulator) ServiceHelper.getService(Activator.getContext(), SimpleConfiguratorManipulator.class.getName());
- //input stream will be buffered and closed for us
- BundleInfo[] bundleInfos = simpleManipulator.loadConfiguration(new URL(value).openStream(), null);
- data.setBundles(bundleInfos);
- } catch (MalformedURLException e1) {
- // ignore
- } catch (IOException e1) {
- // ignore
- }
- try {
- data.setProperty(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR_CONFIGURL, EquinoxManipulatorImpl.makeRelative(value, configurationLocation.toURL()));
- } catch (MalformedURLException e) {
- //ignore
- }
- }
-
- return data;
- }
-
- public LauncherData getLauncherData() {
- return manipulator == null ? null : manipulator.getLauncherData();
- }
-
- /**
- * Obtains the framework manipulator instance. Throws an exception
- * if it could not be created.
- */
- private void getFrameworkManipulator() {
- FrameworkAdmin admin = getFrameworkAdmin();
- if (admin == null)
- throw new RuntimeException("Framework admin service not found"); //$NON-NLS-1$
- manipulator = admin.getManipulator();
- if (manipulator == null)
- throw new RuntimeException("Framework manipulator not found"); //$NON-NLS-1$
- }
-
- private FrameworkAdmin getFrameworkAdmin() {
- return (FrameworkAdmin) ServiceHelper.getService(Activator.getContext(), FrameworkAdmin.class.getName(), frameworkAdminFillter);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
deleted file mode 100644
index e10b6c502..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ExecutablesDescriptor.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 EclipseSource 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:
- * Eclipse Source - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.eclipse;
-
-import java.io.*;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
-import org.eclipse.osgi.service.environment.Constants;
-
-public class ExecutablesDescriptor {
-
- private File location;
- private Set<File> files;
- private String executableName;
- private boolean temporary = false;
- private String os;
- private File iniFile;
-
- public static File findExecutable(String os, File root, String baseName) {
- // TODO this may need to get more intelligent
- // if MacOS its going to be baseName.app/Contents/MacOS/baseName
- if (Constants.OS_MACOSX.equals(os)) {
- return new File(root, baseName + ".app/Contents/MacOS/" + baseName); //$NON-NLS-1$
- }
- // if it is not Mac and not Windows it must be a UNIX flavor
- if (!Constants.OS_WIN32.equals(os)) {
- return new File(root, baseName);
- }
- // otherwise we are left with windows
- return new File(root, baseName + ".exe"); //$NON-NLS-1$
- }
-
- /**
- * Return the root directory of the executables folder for the given configSpec. The folder
- * is expected to be part of the standard Eclipse executables feature whose structure is
- * embedded here.
- * @param executablesFeatureLocation the location of the executables feature
- * @param configSpec the configuration to lookup
- * @return the root location of the requested executables
- */
- public static ExecutablesDescriptor createExecutablesFromFeature(File executablesFeatureLocation, String configSpec) {
- // TODO consider handling JAR'd features here...
- if (executablesFeatureLocation == null || !executablesFeatureLocation.exists())
- return null;
- String[] config = AbstractPublisherAction.parseConfigSpec(configSpec);
- File result = new File(executablesFeatureLocation, "bin/" + config[0] + "/" + config[1] + "/" + config[2]); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (!result.exists())
- return null;
- return new ExecutablesDescriptor(config[1], "launcher", result, new File[] {result}); //$NON-NLS-1$
- }
-
- /**
- * Create an executable descriptor based on the given location, os and name.
- * This method is typically used to identify the executable related files in existing
- * unmanaged configurations.
- * @param os
- * @param location
- * @param executable
- * @return the created descriptor
- */
- public static ExecutablesDescriptor createDescriptor(String os, String executable, File location) {
- if (Constants.OS_MACOSX.equals(os))
- return createMacDescriptor(os, executable, location);
-
- // if it is not Mac and not Windows it must be a UNIX flavor
- if (!Constants.OS_WIN32.equals(os))
- return createUnixDescriptor(os, executable, location);
-
- // Nothing else so it must be Windows
- return createWindowsDescriptor(os, executable, location);
- }
-
- private static ExecutablesDescriptor createWindowsDescriptor(String os, String executable, File location) {
- ExecutablesDescriptor result = new ExecutablesDescriptor(os, executable, location, null);
- File file = new File(location, executable + ".exe"); //$NON-NLS-1$
- if (file.isFile()) {
- result.addFile(file);
- result.iniFile = new File(location, executable + ".ini"); //$NON-NLS-1$
- }
- file = new File(location, "eclipsec.exe"); //$NON-NLS-1$
- if (file.isFile())
- result.addFile(file);
- return result;
- }
-
- private static ExecutablesDescriptor createUnixDescriptor(String os, String executable, File location) {
- ExecutablesDescriptor result = new ExecutablesDescriptor(os, executable, location, null);
- File[] files = location.listFiles();
- for (int i = 0; files != null && i < files.length; i++) {
- String extension = new Path(files[i].getName()).getFileExtension();
- if (files[i].isFile() && (extension == null || extension.equals("so"))) //$NON-NLS-1$
- result.addFile(files[i]);
- }
- result.iniFile = new File(location, executable + ".ini"); //$NON-NLS-1$
- return result;
- }
-
- private static ExecutablesDescriptor createMacDescriptor(String os, String executable, File location) {
- File files[] = location.listFiles(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- int length = name.length();
- return length > 3 && name.substring(length - 4, length).equalsIgnoreCase(".app"); //$NON-NLS-1$
- }
- });
- ExecutablesDescriptor result = new ExecutablesDescriptor(os, executable, location, files);
- result.iniFile = new File(location, executable + ".ini"); //$NON-NLS-1$
- return result;
- }
-
- public ExecutablesDescriptor(String os, String executable, File location, File[] files) {
- this.os = os;
- this.executableName = executable;
- this.location = location;
- if (files == null)
- this.files = new HashSet<File>(11);
- else {
- this.files = new HashSet<File>(files.length);
- for (int i = 0; i < files.length; i++)
- addAllFiles(files[i]);
- }
- }
-
- public ExecutablesDescriptor(ExecutablesDescriptor descriptor) {
- this.os = descriptor.os;
- this.location = descriptor.location;
- this.executableName = descriptor.executableName;
- this.temporary = descriptor.temporary;
- this.files = new HashSet<File>(descriptor.files);
- }
-
- public void addAllFiles(File file) {
- if (file.isFile())
- files.add(relativize(file));
- else {
- File absolute = file.isAbsolute() ? file : new File(location, file.getPath());
- File[] list = absolute.listFiles();
- for (int i = 0; i < list.length; i++)
- addAllFiles(list[i]);
- }
- }
-
- public void addFile(File file) {
- files.add(relativize(file));
- }
-
- // do a simple relativization by removing all the bits before the location
- private File relativize(File file) {
- if (!file.isAbsolute())
- return file;
- String path = file.getPath();
- if (!path.startsWith(location.getPath()))
- throw new IllegalArgumentException(file.toString() + " must be related to " + location); //$NON-NLS-1$
- path = path.substring(location.getPath().length());
- // trim off any separator. This accomodates people who set the location with a trailing /
- if (path.startsWith("/") || path.startsWith("\\")) //$NON-NLS-1$//$NON-NLS-2$
- path = path.substring(1);
- return new File(path);
- }
-
- public void removeFile(File file) {
- files.remove(relativize(file));
- }
-
- public void replace(File oldFile, File newFile) {
- removeFile(oldFile);
- addFile(newFile);
- }
-
- public File[] getFiles() {
- File[] result = files.toArray(new File[files.size()]);
- for (int i = 0; i < result.length; i++)
- result[i] = new File(location, result[i].getPath());
- return result;
- }
-
- public String getExecutableName() {
- return executableName;
- }
-
- public File getExecutable() {
- return findExecutable(os, location, executableName);
- }
-
- public File getIniLocation() {
- return iniFile;
- }
-
- public File getLocation() {
- return location;
- }
-
- public void setLocation(File value) {
- location = value;
- }
-
- public boolean isTemporary() {
- return temporary;
- }
-
- public void setExecutableName(String value, boolean updateFiles) {
- if (updateFiles)
- updateExecutableName(value);
- executableName = value;
- }
-
- public void makeTemporaryCopy() {
- if (isTemporary())
- return;
- File tempFile = null;
- try {
- tempFile = File.createTempFile("p2.brandingIron", ""); //$NON-NLS-1$ //$NON-NLS-2$
- tempFile.delete();
- for (File file : files)
- FileUtils.copy(location, tempFile, file, true);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
- }
- location = tempFile;
- temporary = true;
- }
-
- /**
- * If the executable represented by this descriptor has been branded then a mess
- * of files have been renamed. Here scan the descriptor's file list and update the names
- * taking into account the different layout on different OSes.
- * @param newName the new name of the executable.
- */
- private void updateExecutableName(String newName) {
- if (newName.equalsIgnoreCase(executableName))
- return;
- String targetIni = executableName + ".ini"; //$NON-NLS-1$
- String targetExecutable = executableName;
- String executableExtension = Constants.OS_WIN32.equals(os) ? ".exe" : ""; //$NON-NLS-1$ //$NON-NLS-2$
- targetExecutable = executableName + executableExtension;
- Set<File> filesCopy = new HashSet<File>(files);
- for (File file : filesCopy) {
- String base = file.getParent();
-
- // use String concatenation here because new File("", "foo") is absolute on at least windows...
- base = base == null ? "" : base + "/"; //$NON-NLS-1$ //$NON-NLS-2$
- if (Constants.OS_MACOSX.equals(os) && base.startsWith(executableName + ".app")) //$NON-NLS-1$
- base = newName + ".app" + base.substring(executableName.length() + 4); //$NON-NLS-1$
- if (file.getName().equalsIgnoreCase(targetExecutable))
- replace(file, new File(base + newName + executableExtension));
- else if (file.getName().equalsIgnoreCase(targetIni))
- replace(file, new File(base + newName + ".ini")); //$NON-NLS-1$
- else if (Constants.OS_MACOSX.equals(os))
- replace(file, new File(base + file.getName()));
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
deleted file mode 100644
index 3e51ed23a..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureManifestParser.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Cloudsmith Inc - split into FeatureParser and FeatureManifestParser
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.eclipse;
-
-import java.io.*;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.parsers.*;
-import org.eclipse.equinox.p2.publisher.eclipse.Feature;
-import org.eclipse.equinox.p2.publisher.eclipse.FeatureEntry;
-import org.eclipse.osgi.util.NLS;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Parses a feature manifest from a provided stream.
- */
-public class FeatureManifestParser extends DefaultHandler {
-
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- private SAXParser parser;
- protected Feature result;
- private URL url;
- private StringBuffer characters = null;
-
- private List<String> messageKeys = new ArrayList<String>();
-
- public FeatureManifestParser() {
- this(true);
- }
-
- public FeatureManifestParser(boolean createParser) {
- super();
- if (!createParser)
- return;
- try {
- parserFactory.setNamespaceAware(true);
- this.parser = parserFactory.newSAXParser();
- } catch (ParserConfigurationException e) {
- System.out.println(e);
- } catch (SAXException e) {
- System.out.println(e);
- }
- }
-
- public void characters(char[] ch, int start, int length) {
- if (characters == null)
- return;
- characters.append(ch, start, length);
- }
-
- protected Feature createFeature(String id, String version) {
- return new Feature(id, version);
- }
-
- public void endElement(String uri, String localName, String qName) {
- if (characters == null)
- return;
- if ("description".equals(localName)) { //$NON-NLS-1$
- result.setDescription(localize(characters.toString().trim()));
- } else if ("license".equals(localName)) { //$NON-NLS-1$
- result.setLicense(localize(characters.toString().trim()));
- } else if ("copyright".equals(localName)) { //$NON-NLS-1$
- result.setCopyright(localize(characters.toString().trim()));
- }
- characters = null;
- }
-
- public Feature getResult() {
- return result;
- }
-
- private String localize(String value) {
- if (value != null && value.startsWith("%")) { //$NON-NLS-1$
- String key = value.substring(1);
- messageKeys.add(key);
- }
- return value;
- }
-
- /**
- * Parse the given input stream and return a feature object
- * or null.
- */
- public Feature parse(InputStream in) {
- result = null;
- try {
- parser.parse(new InputSource(in), this);
- } catch (SAXException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return result;
- }
-
- public List<String> getMessageKeys() {
- return messageKeys;
- }
-
- private void processCopyright(Attributes attributes) {
- result.setCopyrightURL(attributes.getValue("url")); //$NON-NLS-1$
- characters = new StringBuffer();
- }
-
- private void processDescription(Attributes attributes) {
- result.setDescriptionURL(attributes.getValue("url")); //$NON-NLS-1$
- characters = new StringBuffer();
- }
-
- private void processDiscoverySite(Attributes attributes) {
- //ignore discovery sites of type 'web'
- if ("web".equals(attributes.getValue("type"))) //$NON-NLS-1$ //$NON-NLS-2$
- return;
- result.addDiscoverySite(attributes.getValue("label"), attributes.getValue("url")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected void processFeature(Attributes attributes) {
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String ver = attributes.getValue("version"); //$NON-NLS-1$
-
- if (id == null || id.trim().equals("") //$NON-NLS-1$
- || ver == null || ver.trim().equals("")) { //$NON-NLS-1$
- // System.out.println(NLS.bind(Messages.FeatureParser_IdOrVersionInvalid, (new String[] { id, ver})));
- } else {
- result = createFeature(id, ver);
-
- String os = attributes.getValue("os"); //$NON-NLS-1$
- String ws = attributes.getValue("ws"); //$NON-NLS-1$
- String nl = attributes.getValue("nl"); //$NON-NLS-1$
- String arch = attributes.getValue("arch"); //$NON-NLS-1$
- result.setEnvironment(os, ws, arch, nl);
-
- result.setApplication(attributes.getValue("application")); //$NON-NLS-1$
- result.setPlugin(attributes.getValue("plugin")); //$NON-NLS-1$
- result.setExclusive(Boolean.valueOf(attributes.getValue("exclusive")).booleanValue()); //$NON-NLS-1$
- result.setPrimary(Boolean.valueOf(attributes.getValue("primary")).booleanValue()); //$NON-NLS-1$
- result.setColocationAffinity(attributes.getValue("colocation-affinity")); //$NON-NLS-1$
-
- //TODO rootURLs
- if (url != null && "file".equals(url.getProtocol())) { //$NON-NLS-1$
- File f = new File(url.getFile().replace('/', File.separatorChar));
- result.setURL("features" + "/" + f.getParentFile().getName() + "/");// + f.getName()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else {
- // externalized URLs might be in relative form, ensure they are absolute
- // feature.setURL(Utils.makeAbsolute(Utils.getInstallURL(), url).toExternalForm());
- }
-
- result.setProviderName(localize(attributes.getValue("provider-name"))); //$NON-NLS-1$
- result.setLabel(localize(attributes.getValue("label"))); //$NON-NLS-1$
- result.setImage(attributes.getValue("image")); //$NON-NLS-1$
-
- // Utils.debug("End process DefaultFeature tag: id:" +id + " ver:" +ver + " url:" + feature.getURL()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- private void processImport(Attributes attributes) {
- String id = attributes.getValue("feature"); //$NON-NLS-1$
- FeatureEntry entry = null;
- if (id != null) {
- if ("true".equalsIgnoreCase(attributes.getValue("patch"))) { //$NON-NLS-1$ //$NON-NLS-2$
- entry = FeatureEntry.createRequires(id, attributes.getValue("version"), "perfect", attributes.getValue("filter"), false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- entry.setPatch(true);
- } else {
- entry = FeatureEntry.createRequires(id, attributes.getValue("version"), attributes.getValue("match"), attributes.getValue("filter"), false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- } else {
- id = attributes.getValue("plugin"); //$NON-NLS-1$
- entry = FeatureEntry.createRequires(id, attributes.getValue("version"), attributes.getValue("match"), attributes.getValue("filter"), true); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- result.addEntry(entry);
- }
-
- private void processIncludes(Attributes attributes) {
- FeatureEntry entry = new FeatureEntry(attributes.getValue("id"), attributes.getValue("version"), false); //$NON-NLS-1$ //$NON-NLS-2$
- String flag = attributes.getValue("optional"); //$NON-NLS-1$
- if (flag != null)
- entry.setOptional(Boolean.valueOf(flag).booleanValue());
- setEnvironment(attributes, entry);
- String filter = attributes.getValue("filter"); //$NON-NLS-1$
- if (filter != null)
- entry.setFilter(filter);
- result.addEntry(entry);
- }
-
- private void processInstallHandler(Attributes attributes) {
- result.setInstallHandler(attributes.getValue("handler")); //$NON-NLS-1$
- result.setInstallHandlerLibrary(attributes.getValue("library")); //$NON-NLS-1$
- result.setInstallHandlerURL(attributes.getValue("url")); //$NON-NLS-1$
- }
-
- private void processLicense(Attributes attributes) {
- result.setLicenseURL(attributes.getValue("url")); //$NON-NLS-1$
- characters = new StringBuffer();
- }
-
- private void processPlugin(Attributes attributes) {
- String id = attributes.getValue("id"); //$NON-NLS-1$
- String version = attributes.getValue("version"); //$NON-NLS-1$
-
- if (id == null || id.trim().equals("") || version == null || version.trim().equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(NLS.bind("FeatureParser#processPlugin, ID {0} or version {1} invalid", (new String[] {id, version}))); //$NON-NLS-1$
- } else {
- FeatureEntry plugin = new FeatureEntry(id, version, true);
- setEnvironment(attributes, plugin);
- String unpack = attributes.getValue("unpack"); //$NON-NLS-1$
- if (unpack != null)
- plugin.setUnpack(Boolean.valueOf(unpack).booleanValue());
- String fragment = attributes.getValue("fragment"); //$NON-NLS-1$
- if (fragment != null)
- plugin.setFragment(Boolean.valueOf(fragment).booleanValue());
- String filter = attributes.getValue("filter"); //$NON-NLS-1$
- if (filter != null)
- plugin.setFilter(filter);
- result.addEntry(plugin);
-
- // Utils.debug("End process DefaultFeature tag: id:" + id + " ver:" + ver + " url:" + feature.getURL()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- private void processUpdateSite(Attributes attributes) {
- result.setUpdateSiteLabel(attributes.getValue("label")); //$NON-NLS-1$
- result.setUpdateSiteURL(attributes.getValue("url")); //$NON-NLS-1$
- }
-
- private void setEnvironment(Attributes attributes, FeatureEntry entry) {
- String os = attributes.getValue("os"); //$NON-NLS-1$
- String ws = attributes.getValue("ws"); //$NON-NLS-1$
- String nl = attributes.getValue("nl"); //$NON-NLS-1$
- String arch = attributes.getValue("arch"); //$NON-NLS-1$
- entry.setEnvironment(os, ws, arch, nl);
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) {
- // Utils.debug("Start Element: uri:" + uri + " local Name:" + localName + " qName:" + qName); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if ("plugin".equals(localName)) { //$NON-NLS-1$
- processPlugin(attributes);
- } else if ("description".equals(localName)) { //$NON-NLS-1$
- processDescription(attributes);
- } else if ("license".equals(localName)) { //$NON-NLS-1$
- processLicense(attributes);
- } else if ("copyright".equals(localName)) { //$NON-NLS-1$
- processCopyright(attributes);
- } else if ("feature".equals(localName)) { //$NON-NLS-1$
- processFeature(attributes);
- } else if ("import".equals(localName)) { //$NON-NLS-1$
- processImport(attributes);
- } else if ("includes".equals(localName)) { //$NON-NLS-1$
- processIncludes(attributes);
- } else if ("install-handler".equals(localName)) { //$NON-NLS-1$
- processInstallHandler(attributes);
- } else if ("update".equals(localName)) { //$NON-NLS-1$
- processUpdateSite(attributes);
- } else if ("discovery".equals(localName)) { //$NON-NLS-1$
- processDiscoverySite(attributes);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java
deleted file mode 100644
index 08fd6a805..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/FeatureParser.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- * Cloudsmith Inc - split into FeatureParser and FeatureManifestParser
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.eclipse;
-
-import java.io.*;
-import java.util.List;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-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.publisher.Activator;
-import org.eclipse.equinox.p2.publisher.eclipse.Feature;
-import org.eclipse.equinox.spi.p2.publisher.LocalizationHelper;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * The publisher feature parser. This class parses a feature either in jar or folder
- * form. Feature localization data (feature.properties) is also processed here.
- */
-public class FeatureParser extends DefaultHandler {
-
- private FeatureManifestParser parser = new FeatureManifestParser();
-
- /**
- * Parses the specified location and constructs a feature. The given location
- * should be either the location of the feature JAR or the directory containing
- * the feature.
- *
- * @param location the location of the feature to parse.
- */
- public Feature parse(File location) {
- if (!location.exists())
- return null;
-
- Feature feature = null;
- if (location.isDirectory()) {
- //skip directories that don't contain a feature.xml file
- File file = new File(location, "feature.xml"); //$NON-NLS-1$
- InputStream input = null;
- try {
- input = new BufferedInputStream(new FileInputStream(file));
- feature = parser.parse(input);
- if (feature != null) {
- List<String> messageKeys = parser.getMessageKeys();
- String[] keyStrings = messageKeys.toArray(new String[messageKeys.size()]);
- feature.setLocalizations(LocalizationHelper.getDirPropertyLocalizations(location, "feature", null, keyStrings)); //$NON-NLS-1$
- }
- } catch (FileNotFoundException e) {
- return null;
- } finally {
- if (input != null)
- try {
- input.close();
- } catch (IOException e) {
- //
- }
- }
- } else if (location.getName().endsWith(".jar")) { //$NON-NLS-1$
- JarFile jar = null;
- try {
- jar = new JarFile(location);
- JarEntry entry = jar.getJarEntry("feature.xml"); //$NON-NLS-1$
- if (entry == null)
- return null;
-
- InputStream input = new BufferedInputStream(jar.getInputStream(entry));
- feature = parser.parse(input);
- if (feature != null) {
- List<String> messageKeys = parser.getMessageKeys();
- String[] keyStrings = messageKeys.toArray(new String[messageKeys.size()]);
- feature.setLocalizations(LocalizationHelper.getJarPropertyLocalizations(location, "feature", null, keyStrings)); //$NON-NLS-1$
- }
- } catch (IOException e) {
- e.printStackTrace();
- } catch (SecurityException e) {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Exception parsing feature: " + location.getAbsolutePath(), e)); //$NON-NLS-1$
- } finally {
- try {
- if (jar != null)
- jar.close();
- } catch (IOException e) {
- //
- }
- }
- }
- return feature;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
deleted file mode 100644
index 4c55a27f0..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/GeneratorBundleInfo.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.eclipse;
-
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-public class GeneratorBundleInfo extends BundleInfo {
- private IInstallableUnit iu = null;
- private String specialConfigCommands;
- private String specialUnconfigCommands;
-
- public GeneratorBundleInfo(BundleInfo bInfo) {
- super.setBundleId(bInfo.getBundleId());
- super.setLocation(bInfo.getLocation());
- super.setManifest(bInfo.getManifest());
- super.setMarkedAsStarted(bInfo.isMarkedAsStarted());
- super.setResolved(bInfo.isResolved());
- super.setStartLevel(bInfo.getStartLevel());
- super.setSymbolicName(bInfo.getSymbolicName());
- super.setVersion(bInfo.getVersion());
- }
-
- public GeneratorBundleInfo() {
- super();
- }
-
- public String getSpecialConfigCommands() {
- return specialConfigCommands;
- }
-
- public void setSpecialConfigCommands(String specialConfigCommands) {
- this.specialConfigCommands = specialConfigCommands;
- }
-
- public void setIU(IInstallableUnit iu) {
- this.iu = iu;
- }
-
- public IInstallableUnit getIU() {
- return iu;
- }
-
- public String getSpecialUnconfigCommands() {
- return specialUnconfigCommands;
- }
-
- public void setSpecialUnconfigCommands(String specialUnconfigCommands) {
- this.specialUnconfigCommands = specialUnconfigCommands;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- String superSt = super.toString();
- if (superSt.length() > 0)
- buffer.append(superSt.substring(0, superSt.length() - 1));
- buffer.append(", this.specialConfigCommands="); //$NON-NLS-1$
- buffer.append(this.specialConfigCommands);
- buffer.append(')');
- return buffer.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
deleted file mode 100644
index 56b46abab..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * EclipseSource - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.eclipse;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-
-/**
- * Represents a product file.
- *
- * If getLocation returns null, then config.ini and p2 advice files cannot
- * be used (since these are both relative to the product location).
- *
- */
-public interface IProductDescriptor {
-
- /**
- * Gets the name of the launcher.
- */
- public String getLauncherName();
-
- /**
- * Returns the list of all bundles in this product.
- * @param includeFragments whether or not to include the fragments in the return value
- * @return the list of bundles in this product
- */
- public List<IVersionedId> getBundles(boolean includeFragments);
-
- /**
- * Returns a list<VersionedName> of fragments that constitute this product.
- */
- public List<IVersionedId> getFragments();
-
- /**
- * Returns a List<VersionedName> of features that constitute this product.
- */
- public List<IVersionedId> getFeatures();
-
- /**
- * Returns the path to the config.ini file as specified in the .product file.
- */
- public String getConfigIniPath(String os);
-
- /**
- * Returns the ID for this product.
- */
- public String getId();
-
- /**
- * Returns the Product extension point ID
- */
- public String getProductId();
-
- /**
- * Returns the Applicaiton extension point ID
- */
- public String getApplication();
-
- /**
- * Returns the ID of the bundle in which the splash screen resides.
- */
- public String getSplashLocation();
-
- /**
- * Returns the name of the product
- */
- public String getProductName();
-
- /**
- * Specifies whether this product was built using features or not.
- */
- public boolean useFeatures();
-
- /**
- * Returns the version of the product.
- */
- public String getVersion();
-
- /**
- * Returns the VM arguments for this product for a given OS.
- */
- public String getVMArguments(String os);
-
- /**
- * Returns the program arguments for this product for a given OS.
- */
- public String getProgramArguments(String os);
-
- /**
- * Returns the properties for a product file.
- */
- public Map<String, String> getConfigurationProperties();
-
- /**
- * Returns a list of icons for this product for a given OS.
- */
- public String[] getIcons(String os);
-
- /**
- * Returns a List<BundleInfo> for each bundle that has custom configuration data.
- * @return A List<BundleInfo>
- */
- public List<BundleInfo> getBundleInfos();
-
- /**
- * This is needed for config.ini files and p2 advice
- */
- public File getLocation();
-
- /**
- * Returns the license URL for this product
- */
- public String getLicenseURL();
-
- /**
- * Returns the license text for this product
- */
- public String getLicenseText();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
deleted file mode 100644
index 6fac40d04..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
+++ /dev/null
@@ -1,760 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- * Code 9 - Additional function and fixes
- * EclipseSource - ongoing development
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.publisher.eclipse;
-
-import java.io.*;
-import java.util.*;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-import org.eclipse.equinox.p2.metadata.VersionedId;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Used to parse a .product file.
- */
-public class ProductFile extends DefaultHandler implements IProductDescriptor {
- private static final String ATTRIBUTE_PATH = "path"; //$NON-NLS-1$
- private static final String ATTRIBUTE_ICON = "icon"; //$NON-NLS-1$
- protected static final String ATTRIBUTE_FRAGMENT = "fragment"; //$NON-NLS-1$
- private static final String ATTRIBUTE_APPLICATION = "application"; //$NON-NLS-1$
- private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
- private static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
- private static final String ATTRIBUTE_LOCATION = "location"; //$NON-NLS-1$
- private static final String ATTRIBUTE_AUTO_START = "autoStart"; //$NON-NLS-1$
- private static final String ATTRIBUTE_START_LEVEL = "startLevel"; //$NON-NLS-1$
- protected static final String ATTRIBUTE_VERSION = "version"; //$NON-NLS-1$
- protected static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
- private static final String ATTRIBUTE_UID = "uid"; //$NON-NLS-1$
-
- private static final String PROPERTY_ECLIPSE_APPLICATION = "eclipse.application"; //$NON-NLS-1$
- private static final String PROPERTY_ECLIPSE_PRODUCT = "eclipse.product"; //$NON-NLS-1$
-
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
-
- private static final String PROGRAM_ARGS = "programArgs"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_LINUX = "programArgsLin"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_MAC = "programArgsMac"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_SOLARIS = "programArgsSol"; //$NON-NLS-1$
- private static final String PROGRAM_ARGS_WIN = "programArgsWin"; //$NON-NLS-1$
- private static final String VM_ARGS = "vmArgs"; //$NON-NLS-1$
- private static final String VM_ARGS_LINUX = "vmArgsLin"; //$NON-NLS-1$
- private static final String VM_ARGS_MAC = "vmArgsMac"; //$NON-NLS-1$
- private static final String VM_ARGS_SOLARIS = "vmArgsSol"; //$NON-NLS-1$
- private static final String VM_ARGS_WIN = "vmArgsWin"; //$NON-NLS-1$
-
- private static final String SOLARIS_LARGE = "solarisLarge"; //$NON-NLS-1$
- private static final String SOLARIS_MEDIUM = "solarisMedium"; //$NON-NLS-1$
- private static final String SOLARIS_SMALL = "solarisSmall"; //$NON-NLS-1$
- private static final String SOLARIS_TINY = "solarisTiny"; //$NON-NLS-1$
- private static final String WIN32_16_LOW = "winSmallLow"; //$NON-NLS-1$
- private static final String WIN32_16_HIGH = "winSmallHigh"; //$NON-NLS-1$
- private static final String WIN32_24_LOW = "win24Low"; //$NON-NLS-1$
- private static final String WIN32_32_LOW = "winMediumLow"; //$NON-NLS-1$
- private static final String WIN32_32_HIGH = "winMediumHigh"; //$NON-NLS-1$
- private static final String WIN32_48_LOW = "winLargeLow"; //$NON-NLS-1$
- private static final String WIN32_48_HIGH = "winLargeHigh"; //$NON-NLS-1$
-
- private static final String OS_WIN32 = "win32";//$NON-NLS-1$
- private static final String OS_LINUX = "linux";//$NON-NLS-1$
- private static final String OS_SOLARIS = "solaris";//$NON-NLS-1$
- private static final String OS_MACOSX = "macosx";//$NON-NLS-1$
-
- //element names
- private static final String EL_FEATURES = "features"; //$NON-NLS-1$
- private static final String EL_FEATURE = "feature"; //$NON-NLS-1$
- private static final String EL_PLUGINS = "plugins"; //$NON-NLS-1$
- private static final String EL_PLUGIN = "plugin"; //$NON-NLS-1$
- private static final String EL_PRODUCT = "product"; //$NON-NLS-1$
- private static final String EL_PROPERTY = "property"; //$NON-NLS-1$
- private static final String EL_CONFIG_INI = "configIni"; //$NON-NLS-1$
- private static final String EL_LAUNCHER = "launcher"; //$NON-NLS-1$
- private static final String EL_LAUNCHER_ARGS = "launcherArgs"; //$NON-NLS-1$
- private static final String EL_SPLASH = "splash"; //$NON-NLS-1$
- private static final String EL_CONFIGURATIONS = "configurations"; //$NON-NLS-1$
- private static final String EL_LICENSE = "license"; //$NON-NLS-1$
- private static final String EL_URL = "url"; //$NON-NLS-1$
- private static final String EL_TEXT = "text"; //$NON-NLS-1$
-
- //These constants form a small state machine to parse the .product file
- private static final int STATE_START = 0;
- private static final int STATE_PRODUCT = 1;
- private static final int STATE_LAUNCHER = 2;
- private static final int STATE_LAUNCHER_ARGS = 3;
- private static final int STATE_PLUGINS = 4;
- private static final int STATE_FEATURES = 5;
- private static final int STATE_PROGRAM_ARGS = 6;
- private static final int STATE_PROGRAM_ARGS_LINUX = 7;
- private static final int STATE_PROGRAM_ARGS_MAC = 8;
- private static final int STATE_PROGRAM_ARGS_SOLARIS = 9;
- private static final int STATE_PROGRAM_ARGS_WIN = 10;
- private static final int STATE_VM_ARGS = 11;
- private static final int STATE_VM_ARGS_LINUX = 12;
- private static final int STATE_VM_ARGS_MAC = 13;
- private static final int STATE_VM_ARGS_SOLARIS = 14;
- private static final int STATE_VM_ARGS_WIN = 15;
- private static final int STATE_CONFIG_INI = 16;
- private static final int STATE_CONFIGURATIONS = 17;
- private static final int STATE_LICENSE = 18;
- private static final int STATE_LICENSE_URL = 19;
- private static final int STATE_LICENSE_TEXT = 20;
-
- private int state = STATE_START;
-
- private SAXParser parser;
- private String launcherName = null;
- // private boolean useIco = false;
- private Map<String, Collection<String>> icons = new HashMap<String, Collection<String>>(6);
- private String configPath = null;
- private final Map<String, String> platformSpecificConfigPaths = new HashMap<String, String>();
- private String configPlatform = null;
- private String platformConfigPath = null;
- private String id = null;
- private String uid = null;
- private boolean useFeatures = false;
- protected List<IVersionedId> plugins = null;
- protected List<IVersionedId> fragments = null;
- private List<IVersionedId> features = null;
- private String splashLocation = null;
- private String productName = null;
- private String application = null;
- private String version = null;
- private Properties launcherArgs = new Properties();
- private File location;
- private List<BundleInfo> bundleInfos;
- private Map<String, String> properties;
- private String licenseURL;
- private String licenseText = null;
-
- private static String normalize(String text) {
- if (text == null || text.trim().length() == 0)
- return ""; //$NON-NLS-1$
-
- StringBuffer result = new StringBuffer(text.length());
- boolean haveSpace = false;
- for (int i = 0; i < text.length(); i++) {
- char c = text.charAt(i);
- if (Character.isWhitespace(c)) {
- if (haveSpace)
- continue;
- haveSpace = true;
- result.append(" "); //$NON-NLS-1$
- } else {
- haveSpace = false;
- result.append(c);
- }
- }
- return result.toString();
- }
-
- /**
- * Constructs a product file parser.
- */
- public ProductFile(String location) throws Exception {
- super();
- this.location = new File(location);
-
- parserFactory.setNamespaceAware(true);
- parser = parserFactory.newSAXParser();
- InputStream in = new BufferedInputStream(new FileInputStream(location));
- try {
- parser.parse(new InputSource(in), this);
- } finally {
- if (in != null)
- in.close();
- }
- parser = null;
- }
-
- /**
- * Gets the name of the launcher specified in the .product file.
- */
- public String getLauncherName() {
- return launcherName;
- }
-
- /**
- * Gets the location of the .product file.
- */
- public File getLocation() {
- return location;
- }
-
- /**
- * Returns the properties found in .product file. Properties
- * are located in the <configurations> block of the file
- */
- public Map<String, String> getConfigurationProperties() {
- Map<String, String> result = properties != null ? properties : new HashMap<String, String>();
- if (application != null && !result.containsKey(PROPERTY_ECLIPSE_APPLICATION))
- result.put(PROPERTY_ECLIPSE_APPLICATION, application);
- if (id != null && !result.containsKey(PROPERTY_ECLIPSE_PRODUCT))
- result.put(PROPERTY_ECLIPSE_PRODUCT, id);
-
- return result;
- }
-
- /**
- * Returns a List<VersionedName> for each bundle that makes up this product.
- * @param includeFragments Indicates whether or not fragments should
- * be included in the list
- */
- public List<IVersionedId> getBundles(boolean includeFragments) {
- List<IVersionedId> p = plugins != null ? plugins : CollectionUtils.<IVersionedId> emptyList();
- if (!includeFragments)
- return p;
-
- List<IVersionedId> f = fragments != null ? fragments : CollectionUtils.<IVersionedId> emptyList();
- int size = p.size() + f.size();
- if (size == 0)
- return CollectionUtils.emptyList();
-
- List<IVersionedId> both = new ArrayList<IVersionedId>(size);
- both.addAll(p);
- both.addAll(f);
- return both;
- }
-
- /**
- * Returns a List<BundleInfo> for each bundle that has custom configuration data
- * in the product file.
- * @return A List<BundleInfo>
- */
- public List<BundleInfo> getBundleInfos() {
- return bundleInfos != null ? bundleInfos : CollectionUtils.<BundleInfo> emptyList();
- }
-
- /**
- * Returns a list<VersionedName> of fragments that constitute this product.
- */
- public List<IVersionedId> getFragments() {
- return fragments != null ? fragments : CollectionUtils.<IVersionedId> emptyList();
- }
-
- /**
- * Returns a List<VersionedName> of features that constitute this product.
- */
- public List<IVersionedId> getFeatures() {
- return features != null ? features : CollectionUtils.<IVersionedId> emptyList();
- }
-
- public String[] getIcons(String os) {
- Collection<String> result = icons.get(os);
- if (result == null)
- return null;
- return result.toArray(new String[result.size()]);
- }
-
- public String getConfigIniPath(String os) {
- String specific = platformSpecificConfigPaths.get(os);
- return specific == null ? configPath : specific;
- }
-
- public String getConfigIniPath() {
- return configPath;
- }
-
- /**
- * Returns the ID for this product.
- */
- public String getId() {
- if (uid != null)
- return uid;
- return id;
- }
-
- public String getProductId() {
- return id;
- }
-
- /**
- * Returns the location (the bundle) that defines the splash screen
- */
- public String getSplashLocation() {
- return splashLocation;
- }
-
- /**
- * Returns the product name.
- */
- public String getProductName() {
- return productName;
- }
-
- /**
- * Returns the application identifier for this product.
- */
- public String getApplication() {
- return application;
- }
-
- /**
- * Returns true if this product is built using feature,
- * false otherwise.
- */
- public boolean useFeatures() {
- return useFeatures;
- }
-
- /**
- * Returns the version of the product
- */
- public String getVersion() {
- return (version == null || version.length() == 0) ? "0.0.0" : version; //$NON-NLS-1$
- }
-
- /**
- * Returns the VM arguments for a specific platform.
- * If the empty string is used for the OS, this returns
- * the default VM arguments
- */
- public String getVMArguments(String os) {
- os = os == null ? "" : os; //$NON-NLS-1$
- String key = null;
- if (os.equals(OS_WIN32)) {
- key = VM_ARGS_WIN;
- } else if (os.equals(OS_LINUX)) {
- key = VM_ARGS_LINUX;
- } else if (os.equals(OS_MACOSX)) {
- key = VM_ARGS_MAC;
- } else if (os.equals(OS_SOLARIS)) {
- key = VM_ARGS_SOLARIS;
- }
-
- String prefix = launcherArgs.getProperty(VM_ARGS);
- String platform = null, args = null;
- if (key != null)
- platform = launcherArgs.getProperty(key);
- if (prefix != null)
- args = platform != null ? prefix + " " + platform : prefix; //$NON-NLS-1$
- else
- args = platform != null ? platform : ""; //$NON-NLS-1$
- return normalize(args);
- }
-
- /**
- * Returns the program arguments for a specific platform.
- * If the empty string is used for the OS, this returns
- * the default program arguments
- */
- public String getProgramArguments(String os) {
- os = os == null ? "" : os; //$NON-NLS-1$
- String key = null;
- if (os.equals(OS_WIN32)) {
- key = PROGRAM_ARGS_WIN;
- } else if (os.equals(OS_LINUX)) {
- key = PROGRAM_ARGS_LINUX;
- } else if (os.equals(OS_MACOSX)) {
- key = PROGRAM_ARGS_MAC;
- } else if (os.equals(OS_SOLARIS)) {
- key = PROGRAM_ARGS_SOLARIS;
- }
-
- String prefix = launcherArgs.getProperty(PROGRAM_ARGS);
- String platform = null, args = null;
- if (key != null)
- platform = launcherArgs.getProperty(key);
- if (prefix != null)
- args = platform != null ? prefix + " " + platform : prefix; //$NON-NLS-1$
- else
- args = platform != null ? platform : ""; //$NON-NLS-1$
- return normalize(args);
- }
-
- public String getLicenseText() {
- return licenseText;
- }
-
- public String getLicenseURL() {
- return licenseURL;
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) {
- switch (state) {
- case STATE_START :
- if (EL_PRODUCT.equals(localName)) {
- processProduct(attributes);
- state = STATE_PRODUCT;
- }
- break;
-
- case STATE_PRODUCT :
- if (EL_CONFIG_INI.equals(localName)) {
- processConfigIni(attributes);
- state = STATE_CONFIG_INI;
- } else if (EL_LAUNCHER.equals(localName)) {
- processLauncher(attributes);
- state = STATE_LAUNCHER;
- } else if (EL_PLUGINS.equals(localName)) {
- state = STATE_PLUGINS;
- } else if (EL_FEATURES.equals(localName)) {
- state = STATE_FEATURES;
- } else if (EL_LAUNCHER_ARGS.equals(localName)) {
- state = STATE_LAUNCHER_ARGS;
- } else if (EL_SPLASH.equals(localName)) {
- splashLocation = attributes.getValue(ATTRIBUTE_LOCATION);
- } else if (EL_CONFIGURATIONS.equals(localName)) {
- state = STATE_CONFIGURATIONS;
- } else if (EL_LICENSE.equals(localName)) {
- state = STATE_LICENSE;
- }
- break;
-
- case STATE_CONFIG_INI :
- processConfigIniPlatform(localName, true);
- break;
-
- case STATE_LAUNCHER :
- if (OS_SOLARIS.equals(localName)) {
- processSolaris(attributes);
- } else if ("win".equals(localName)) { //$NON-NLS-1$
- processWin(attributes);
- } else if (OS_LINUX.equals(localName)) {
- processLinux(attributes);
- } else if (OS_MACOSX.equals(localName)) {
- processMac(attributes);
- }
- if ("ico".equals(localName)) { //$NON-NLS-1$
- processIco(attributes);
- } else if ("bmp".equals(localName)) { //$NON-NLS-1$
- processBmp(attributes);
- }
- break;
-
- case STATE_LAUNCHER_ARGS :
- if (PROGRAM_ARGS.equals(localName)) {
- state = STATE_PROGRAM_ARGS;
- } else if (PROGRAM_ARGS_LINUX.equals(localName)) {
- state = STATE_PROGRAM_ARGS_LINUX;
- } else if (PROGRAM_ARGS_MAC.equals(localName)) {
- state = STATE_PROGRAM_ARGS_MAC;
- } else if (PROGRAM_ARGS_SOLARIS.equals(localName)) {
- state = STATE_PROGRAM_ARGS_SOLARIS;
- } else if (PROGRAM_ARGS_WIN.equals(localName)) {
- state = STATE_PROGRAM_ARGS_WIN;
- } else if (VM_ARGS.equals(localName)) {
- state = STATE_VM_ARGS;
- } else if (VM_ARGS_LINUX.equals(localName)) {
- state = STATE_VM_ARGS_LINUX;
- } else if (VM_ARGS_MAC.equals(localName)) {
- state = STATE_VM_ARGS_MAC;
- } else if (VM_ARGS_SOLARIS.equals(localName)) {
- state = STATE_VM_ARGS_SOLARIS;
- } else if (VM_ARGS_WIN.equals(localName)) {
- state = STATE_VM_ARGS_WIN;
- }
- break;
-
- case STATE_PLUGINS :
- if (EL_PLUGIN.equals(localName)) {
- processPlugin(attributes);
- }
- break;
-
- case STATE_LICENSE :
- if (EL_URL.equals(localName)) {
- state = STATE_LICENSE_URL;
- } else if (EL_TEXT.equals(localName)) {
- licenseText = ""; //$NON-NLS-1$
- state = STATE_LICENSE_TEXT;
- }
- break;
-
- case STATE_FEATURES :
- if (EL_FEATURE.equals(localName)) {
- processFeature(attributes);
- }
- break;
- case STATE_CONFIGURATIONS :
- if (EL_PLUGIN.equals(localName)) {
- processPluginConfiguration(attributes);
- } else if (EL_PROPERTY.equals(localName)) {
- processPropertyConfiguration(attributes);
- }
- break;
- }
- }
-
- /**
- * Processes the property tag in the .product file. These tags contain
- * a Name and Value pair. For each tag (with a non-null name), a property
- * is created.
- */
- private void processPropertyConfiguration(Attributes attributes) {
- String name = attributes.getValue(ATTRIBUTE_NAME);
- String value = attributes.getValue(ATTRIBUTE_VALUE);
- if (name == null)
- return;
- if (value == null)
- value = ""; //$NON-NLS-1$
- if (properties == null)
- properties = new HashMap<String, String>();
- properties.put(name, value);
- }
-
- private void processPluginConfiguration(Attributes attributes) {
- BundleInfo info = new BundleInfo();
- info.setSymbolicName(attributes.getValue(ATTRIBUTE_ID));
- info.setVersion(attributes.getValue(ATTRIBUTE_VERSION));
- String value = attributes.getValue(ATTRIBUTE_START_LEVEL);
- if (value != null) {
- int startLevel = Integer.parseInt(value);
- if (startLevel > 0)
- info.setStartLevel(startLevel);
- }
- value = attributes.getValue(ATTRIBUTE_AUTO_START);
- if (value != null)
- info.setMarkedAsStarted(Boolean.valueOf(value).booleanValue());
- if (bundleInfos == null)
- bundleInfos = new ArrayList<BundleInfo>();
- bundleInfos.add(info);
- }
-
- public void endElement(String uri, String localName, String qName) {
- switch (state) {
- case STATE_PLUGINS :
- if (EL_PLUGINS.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_FEATURES :
- if (EL_FEATURES.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_LAUNCHER_ARGS :
- if (EL_LAUNCHER_ARGS.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_LAUNCHER :
- if (EL_LAUNCHER.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_CONFIGURATIONS :
- if (EL_CONFIGURATIONS.equals(localName))
- state = STATE_PRODUCT;
- break;
- case STATE_LICENSE :
- if (EL_LICENSE.equals(localName))
- state = STATE_PRODUCT;
- break;
-
- case STATE_PROGRAM_ARGS :
- case STATE_PROGRAM_ARGS_LINUX :
- case STATE_PROGRAM_ARGS_MAC :
- case STATE_PROGRAM_ARGS_SOLARIS :
- case STATE_PROGRAM_ARGS_WIN :
- case STATE_VM_ARGS :
- case STATE_VM_ARGS_LINUX :
- case STATE_VM_ARGS_MAC :
- case STATE_VM_ARGS_SOLARIS :
- case STATE_VM_ARGS_WIN :
- state = STATE_LAUNCHER_ARGS;
- break;
- case STATE_LICENSE_URL :
- case STATE_LICENSE_TEXT :
- state = STATE_LICENSE;
- break;
-
- case STATE_CONFIG_INI :
- if (EL_CONFIG_INI.equals(localName))
- state = STATE_PRODUCT;
- else
- processConfigIniPlatform(localName, false);
- break;
- }
- }
-
- public void characters(char[] ch, int start, int length) {
- switch (state) {
- case STATE_PROGRAM_ARGS :
- addLaunchArgumentToMap(PROGRAM_ARGS, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_LINUX :
- addLaunchArgumentToMap(PROGRAM_ARGS_LINUX, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_MAC :
- addLaunchArgumentToMap(PROGRAM_ARGS_MAC, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_SOLARIS :
- addLaunchArgumentToMap(PROGRAM_ARGS_SOLARIS, String.valueOf(ch, start, length));
- break;
- case STATE_PROGRAM_ARGS_WIN :
- addLaunchArgumentToMap(PROGRAM_ARGS_WIN, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS :
- addLaunchArgumentToMap(VM_ARGS, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_LINUX :
- addLaunchArgumentToMap(VM_ARGS_LINUX, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_MAC :
- addLaunchArgumentToMap(VM_ARGS_MAC, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_SOLARIS :
- addLaunchArgumentToMap(VM_ARGS_SOLARIS, String.valueOf(ch, start, length));
- break;
- case STATE_VM_ARGS_WIN :
- addLaunchArgumentToMap(VM_ARGS_WIN, String.valueOf(ch, start, length));
- break;
- case STATE_CONFIG_INI :
- if (platformConfigPath != null)
- platformConfigPath += String.valueOf(ch, start, length);
- break;
- case STATE_LICENSE_URL :
- licenseURL = String.valueOf(ch, start, length);
- break;
- case STATE_LICENSE_TEXT :
- if (licenseText != null)
- licenseText += String.valueOf(ch, start, length);
- break;
-
- }
- }
-
- private void addLaunchArgumentToMap(String key, String value) {
- if (launcherArgs == null)
- launcherArgs = new Properties();
-
- String oldValue = launcherArgs.getProperty(key);
- if (oldValue != null)
- launcherArgs.setProperty(key, oldValue + value);
- else
- launcherArgs.setProperty(key, value);
- }
-
- protected void processPlugin(Attributes attributes) {
- String fragment = attributes.getValue(ATTRIBUTE_FRAGMENT);
- IVersionedId name = new VersionedId(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
- if (fragment != null && new Boolean(fragment).booleanValue()) {
- if (fragments == null)
- fragments = new ArrayList<IVersionedId>();
- fragments.add(name);
- } else {
- if (plugins == null)
- plugins = new ArrayList<IVersionedId>();
- plugins.add(name);
- }
- }
-
- private void processFeature(Attributes attributes) {
- IVersionedId name = new VersionedId(attributes.getValue(ATTRIBUTE_ID), attributes.getValue(ATTRIBUTE_VERSION));
- if (features == null)
- features = new ArrayList<IVersionedId>();
- features.add(name);
- }
-
- private void processProduct(Attributes attributes) {
- id = attributes.getValue(ATTRIBUTE_ID);
- uid = attributes.getValue(ATTRIBUTE_UID);
- productName = attributes.getValue(ATTRIBUTE_NAME);
- application = attributes.getValue(ATTRIBUTE_APPLICATION);
- String use = attributes.getValue("useFeatures"); //$NON-NLS-1$
- if (use != null)
- useFeatures = Boolean.valueOf(use).booleanValue();
- version = attributes.getValue(ATTRIBUTE_VERSION);
- }
-
- private void processConfigIni(Attributes attributes) {
- String path = null;
- if ("custom".equals(attributes.getValue("use"))) { //$NON-NLS-1$//$NON-NLS-2$
- path = attributes.getValue(ATTRIBUTE_PATH);
- }
- String os = attributes.getValue("os"); //$NON-NLS-1$
- if (os != null && os.length() > 0) {
- // TODO should we allow a platform-specific default to over-ride a custom generic path?
- if (path != null)
- platformSpecificConfigPaths.put(os, path);
- } else if (path != null) {
- configPath = path;
- }
- }
-
- private void processConfigIniPlatform(String key, boolean begin) {
- if (begin) {
- configPlatform = key;
- platformConfigPath = ""; //$NON-NLS-1$
- } else if (configPlatform.equals(key) && platformConfigPath.length() > 0) {
- platformSpecificConfigPaths.put(key, platformConfigPath);
- platformConfigPath = null;
- }
- }
-
- private void processLauncher(Attributes attributes) {
- launcherName = attributes.getValue(ATTRIBUTE_NAME);
- }
-
- private void addIcon(String os, String value) {
- if (value == null)
- return;
-
- File iconFile = new File(value);
- if (!iconFile.isFile()) {
- //workspace
- Location instanceLocation = (Location) ServiceHelper.getService(Activator.getContext(), Location.class.getName(), Location.INSTANCE_FILTER);
- if (instanceLocation != null && instanceLocation.getURL() != null) {
- File workspace = URLUtil.toFile(instanceLocation.getURL());
- if (workspace != null)
- iconFile = new File(workspace, value);
- }
- }
- if (!iconFile.isFile())
- iconFile = new File(location.getParentFile(), value);
-
- Collection<String> list = icons.get(os);
- if (list == null) {
- list = new ArrayList<String>(6);
- icons.put(os, list);
- }
- list.add(iconFile.getAbsolutePath());
- }
-
- private void processSolaris(Attributes attributes) {
- addIcon(OS_SOLARIS, attributes.getValue(SOLARIS_LARGE));
- addIcon(OS_SOLARIS, attributes.getValue(SOLARIS_MEDIUM));
- addIcon(OS_SOLARIS, attributes.getValue(SOLARIS_SMALL));
- addIcon(OS_SOLARIS, attributes.getValue(SOLARIS_TINY));
- }
-
- private void processWin(Attributes attributes) {
- // useIco = Boolean.valueOf(attributes.getValue(P_USE_ICO)).booleanValue();
- }
-
- private void processIco(Attributes attributes) {
- addIcon(OS_WIN32, attributes.getValue(ATTRIBUTE_PATH));
- }
-
- private void processBmp(Attributes attributes) {
- addIcon(OS_WIN32, attributes.getValue(WIN32_16_HIGH));
- addIcon(OS_WIN32, attributes.getValue(WIN32_16_LOW));
- addIcon(OS_WIN32, attributes.getValue(WIN32_24_LOW));
- addIcon(OS_WIN32, attributes.getValue(WIN32_32_HIGH));
- addIcon(OS_WIN32, attributes.getValue(WIN32_32_LOW));
- addIcon(OS_WIN32, attributes.getValue(WIN32_48_HIGH));
- addIcon(OS_WIN32, attributes.getValue(WIN32_48_LOW));
- }
-
- private void processLinux(Attributes attributes) {
- addIcon(OS_LINUX, attributes.getValue(ATTRIBUTE_ICON));
- }
-
- private void processMac(Attributes attributes) {
- addIcon(OS_MACOSX, attributes.getValue(ATTRIBUTE_ICON));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties
deleted file mode 100644
index d7be89b26..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/messages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-exception_errorConverting = An error occurred while generating manifest for {0}.
-exception_stateAddition = An error has occurred while adding the bundle {0}.
-exception_errorReadingManifest = An error occurred while parsing the bundle manifest {0}: {1}.
-exception_errorLoadingManifest = An error occurred while loading the manifest {0}.
-exception_noBundlesOrLocations=No bundles or locations provided.
-exception_noFeaturesOrLocations=No features or locations provided.
-exception_noPluginConverter=Unable to acquire PluginConverter service during generation for: {0}.
-exception_noArtifactRepo=An artifact repository must be specified in order to publish artifacts.
-exception_noMetadataRepo=A metadata repository must be specified.
-exception_invalidSiteReference=Invalid site reference: {0}
-exception_invalidSiteReferenceInFeature=Invalid site reference {0} in feature {1}.
-exception_repoMustBeURL=Repository location ({0}) must be a URL.
-exception_sourcePath=Source location ({0}) must be a valid file-system path.
-message_generatingMetadata = Generating metadata for {0}.
-message_generationCompleted = Generation completed with success [{0} seconds].
-message_noSimpleconfigurator = Could not find simpleconfigurator bundle.
-message_resultException=Product publishing ended with the following exception:
-message_publisherArguments=Product publisher application was executed with the following arguments:
-exception_artifactRepoNoAppendDestroysInput = Not appending to artifact repository ({0}) may destroy input files.
-error_rootIU_generation = Could not generate root IU {0}, {1}, {2}..
-exception_errorLoadingProductFile = An error has occurred while loading product file {0}. Exception details: {1}. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java
deleted file mode 100644
index 6367a40b9..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/swt/tools/IconExe.java
+++ /dev/null
@@ -1,3339 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.swt.tools;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Customize the icon of a Windows exe
- *
- * WARNING! This class is not part of SWT API. It is NOT API. It is an internal
- * tool that may be changed or removed at anytime.
- *
- * Based on MSDN "An In-Depth Look into the Win32 Portable Executable File Format".
- *
- * Win x64 support (Bug #238001) based on MSDN "x64 Primer: Everything You Need To
- * Know To Start Programming 64-Bit Windows Systems".
- */
-public class IconExe {
-
- /**
- * Replace the Desktop icons provided in the Windows executable program
- * with matching icons provided by the user.
- *
- * Takes 2 arguments
- * argument 0: the Windows executable e.g c:/eclipse/eclipse.exe
- * argument 1: The .ico file to write to the given executable e.g. c:/myApp.ico
- *
- * Note 1. Write access to the executable program is required. As a result, that
- * program must not be currently running or edited elsewhere.
- *
- * Note 2. The Eclipse 3.4 launcher requires an .ico file with the following 7 images (in any order).
- * 1. 48x48, 32 bit (RGB / Alpha Channel)
- * 2. 32x32, 32 bit (RGB / Alpha Channel)
- * 3. 16x16, 32 bit (RGB / Alpha Channel)
- * 4. 48x48, 8 bit (256 colors)
- * 5. 32x32, 8 bit (256 colors)
- * 6. 24x24, 8 bit (256 colors)
- * 7. 16x16, 8 bit (256 colors)
- * A user icon matching exactly the width/height/depth of an executable icon will be written
- * to the executable and will replace that executable icon. If an executable icon
- * does not match a user icon, it is silently left as is.
- *
- * Note 3. This function modifies the content of the executable program and may cause
- * its corruption.
- */
- public static void main(String[] args) throws Exception {
- if (args.length < 2) {
- System.err.println("Usage: IconExe <windows executable> <ico file>"); //$NON-NLS-1$
- return;
- }
- ImageLoader loader = new ImageLoader();
-
- List<ImageData> images = new ArrayList<ImageData>();
- for (int i = 1; i < args.length; i++) {
- try {
- //An ICO should contain 7 images, a BMP will contain 1
- ImageData[] current = loader.load(args[i]);
- for (int j = 0; j < current.length; j++) {
- images.add(current[j]);
- }
- } catch (RuntimeException e) {
- //ignore so that we process the other images
- }
- }
- ImageData[] data = new ImageData[images.size()];
- data = images.toArray(data);
-
- int nMissing = unloadIcons(args[0], data);
- if (nMissing != 0)
- System.err.println("Error - " + nMissing + " icon(s) not replaced in " + args[0] + " using " + args[1]); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /* Implementation */
-
- /**
- * Retrieve the Desktop icons provided in the Windows executable program.
- * These icons are typically shown in various places of the Windows desktop.
- *
- * Note. The Eclipse 3.4 launcher returns the following 7 images (in any order).
- * 1. 48x48, 32 bit (RGB / Alpha Channel)
- * 2. 32x32, 32 bit (RGB / Alpha Channel)
- * 3. 16x16, 32 bit (RGB / Alpha Channel)
- * 4. 48x48, 8 bit (256 colors)
- * 5. 32x32, 8 bit (256 colors)
- * 6. 24x24, 8 bit (256 colors)
- * 7. 16x16, 8 bit (256 colors)
- *
- * @param program the Windows executable e.g c:/eclipse/eclipse.exe
- */
- static ImageData[] loadIcons(String program) throws FileNotFoundException, IOException {
- RandomAccessFile raf = new RandomAccessFile(program, "r"); //$NON-NLS-1$
- IconExe iconExe = new IconExe();
- IconResInfo[] iconInfo = iconExe.getIcons(raf);
- ImageData[] data = new ImageData[iconInfo.length];
- for (int i = 0; i < data.length; i++)
- data[i] = iconInfo[i].data;
- raf.close();
- return data;
- }
-
- /**
- * Replace the Desktop icons provided in the Windows executable program
- * with icons provided by the user.
- *
- * Note 1. Write access to the executable program is required. As a result, that
- * program must not be currently running or edited elsewhere.
- *
- * Note 2. Use loadIcons to determine which set of icons (width, height, depth)
- * is required to replace the icons in the executable program. A user icon
- * matching exactly the width/height/depth of an executable icon will be written
- * to the executable and will replace that executable icon. If an executable icon
- * does not match a user icon, it is left as is. Verify the return value matches
- * the number of icons to write. Finally, use loadIcons after this operation
- * to verify the icons have changed as expected.
- *
- * Note 3. The Eclipse 3.4 launcher requires the following 7 images (in any order).
- * 1. 48x48, 32 bit (RGB / Alpha Channel)
- * 2. 32x32, 32 bit (RGB / Alpha Channel)
- * 3. 16x16, 32 bit (RGB / Alpha Channel)
- * 4. 48x48, 8 bit (256 colors)
- * 5. 32x32, 8 bit (256 colors)
- * 6. 24x24, 8 bit (256 colors)
- * 7. 16x16, 8 bit (256 colors)
- *
- * Note 4. This function modifies the content of the executable program and may cause
- * its corruption.
- *
- * @param program the Windows executable e.g c:/eclipse/eclipse.exe
- * @param icons to write to the given executable
- * @return the number of icons from the original program that were not successfully replaced (0 if success)
- */
- static int unloadIcons(String program, ImageData[] icons) throws FileNotFoundException, IOException {
- RandomAccessFile raf = new RandomAccessFile(program, "rw"); //$NON-NLS-1$
- IconExe iconExe = new IconExe();
- IconResInfo[] iconInfo = iconExe.getIcons(raf);
- // Display an error if no icons found in target executable.
- if (iconInfo.length == 0) {
- System.err.println("Warning - no icons detected in \"" + program + "\"."); //$NON-NLS-1$ //$NON-NLS-2$
- raf.close();
- return 0;
- }
- int cnt = 0;
- for (int i = 0; i < iconInfo.length; i++) {
- for (int j = 0; j < icons.length; j++) {
- if (icons[j] == null)
- continue;
- if (iconInfo[i].data.width == icons[j].width && iconInfo[i].data.height == icons[j].height && iconInfo[i].data.depth == icons[j].depth) {
- raf.seek(iconInfo[i].offset);
- unloadIcon(raf, icons[j]);
- cnt++;
- break;
- }
- }
- }
- raf.close();
- return iconInfo.length - cnt;
- }
-
- public static final String VERSION = "20050124"; //$NON-NLS-1$
-
- static final boolean DEBUG = false;
-
- public static class IconResInfo {
- ImageData data;
- int offset;
- int size;
- }
-
- IconResInfo[] iconInfo = null;
- int iconCnt;
-
- IconResInfo[] getIcons(RandomAccessFile raf) throws IOException {
- iconInfo = new IconResInfo[4];
- iconCnt = 0;
- IMAGE_DOS_HEADER imageDosHeader = new IMAGE_DOS_HEADER();
- read(raf, imageDosHeader);
- if (imageDosHeader.e_magic != IMAGE_DOS_SIGNATURE)
- return new IconResInfo[0];
- int imageNtHeadersOffset = imageDosHeader.e_lfanew;
- raf.seek(imageNtHeadersOffset);
- IMAGE_NT_HEADERS imageNtHeaders = new IMAGE_NT_HEADERS();
- read(raf, imageNtHeaders);
- if (imageNtHeaders.Signature != IMAGE_NT_SIGNATURE)
- return new IconResInfo[0];
- // DumpResources
- int resourcesRVA = imageNtHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress;
- if (resourcesRVA == 0)
- return new IconResInfo[0];
- if (DEBUG)
- System.out.println("* Resources (RVA= " + resourcesRVA + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- IMAGE_SECTION_HEADER imageSectionHeader = new IMAGE_SECTION_HEADER();
- int firstSectionOffset = imageNtHeadersOffset + IMAGE_NT_HEADERS.FIELD_OFFSET_OptionalHeader + imageNtHeaders.FileHeader.SizeOfOptionalHeader;
- raf.seek(firstSectionOffset);
- boolean found = false;
- for (int i = 0; i < imageNtHeaders.FileHeader.NumberOfSections; i++) {
- read(raf, imageSectionHeader);
- if (resourcesRVA >= imageSectionHeader.VirtualAddress && resourcesRVA < imageSectionHeader.VirtualAddress + imageSectionHeader.Misc_VirtualSize) {
- // could check the imageSectionHeader name is .rsrc
- found = true;
- break;
- }
- }
- if (!found)
- return new IconResInfo[0];
- int delta = imageSectionHeader.VirtualAddress - imageSectionHeader.PointerToRawData;
- int imageResourceDirectoryOffset = resourcesRVA - delta;
- dumpResourceDirectory(raf, imageResourceDirectoryOffset, imageResourceDirectoryOffset, delta, 0, 0, false);
- if (iconCnt < iconInfo.length) {
- IconResInfo[] newArray = new IconResInfo[iconCnt];
- System.arraycopy(iconInfo, 0, newArray, 0, iconCnt);
- iconInfo = newArray;
- }
- return iconInfo;
- }
-
- void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffset, int resourceBase, int delta, int type, int level, boolean rt_icon_root) throws IOException {
- if (DEBUG)
- System.out.println("** LEVEL " + level); //$NON-NLS-1$
-
- IMAGE_RESOURCE_DIRECTORY imageResourceDirectory = new IMAGE_RESOURCE_DIRECTORY();
- raf.seek(imageResourceDirectoryOffset);
- read(raf, imageResourceDirectory);
-
- if (DEBUG) {
- String sType = "" + type; //$NON-NLS-1$
- // level 1 resources are resource types
- if (level == 1) {
- System.out.println("___________________________"); //$NON-NLS-1$
- if (type == RT_ICON)
- sType = "RT_ICON"; //$NON-NLS-1$
- if (type == RT_GROUP_ICON)
- sType = "RT_GROUP_ICON"; //$NON-NLS-1$
- }
- System.out.println("Resource Directory [" + sType + "]" + " (Named " + imageResourceDirectory.NumberOfNamedEntries + ", ID " + imageResourceDirectory.NumberOfIdEntries + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
-
- IMAGE_RESOURCE_DIRECTORY_ENTRY[] imageResourceDirectoryEntries = new IMAGE_RESOURCE_DIRECTORY_ENTRY[imageResourceDirectory.NumberOfIdEntries];
- for (int i = 0; i < imageResourceDirectoryEntries.length; i++) {
- imageResourceDirectoryEntries[i] = new IMAGE_RESOURCE_DIRECTORY_ENTRY();
- read(raf, imageResourceDirectoryEntries[i]);
- }
- for (int i = 0; i < imageResourceDirectoryEntries.length; i++) {
- if (imageResourceDirectoryEntries[i].DataIsDirectory) {
- dumpResourceDirectory(raf, imageResourceDirectoryEntries[i].OffsetToDirectory + resourceBase, resourceBase, delta, imageResourceDirectoryEntries[i].Id, level + 1, rt_icon_root ? true : type == RT_ICON);
- } else {
- // Resource found
- /// pResDirEntry->Name
- IMAGE_RESOURCE_DIRECTORY_ENTRY irde = imageResourceDirectoryEntries[i];
- IMAGE_RESOURCE_DATA_ENTRY data = new IMAGE_RESOURCE_DATA_ENTRY();
- raf.seek(imageResourceDirectoryEntries[i].OffsetToData + resourceBase);
- read(raf, data);
- if (DEBUG)
- System.out.println("Resource Id " + irde.Id + " Data Offset RVA " + data.OffsetToData + ", Size " + data.Size); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (rt_icon_root) {
- if (DEBUG)
- System.out.println("iconcnt " + iconCnt + " |" + iconInfo.length); //$NON-NLS-1$ //$NON-NLS-2$
- iconInfo[iconCnt] = new IconResInfo();
- iconInfo[iconCnt].data = parseIcon(raf, data.OffsetToData - delta, data.Size);
- iconInfo[iconCnt].offset = data.OffsetToData - delta;
- iconInfo[iconCnt].size = data.Size;
- iconCnt++;
- if (iconCnt == iconInfo.length) {
- IconResInfo[] newArray = new IconResInfo[iconInfo.length + 4];
- System.arraycopy(iconInfo, 0, newArray, 0, iconInfo.length);
- iconInfo = newArray;
- }
- }
- }
- }
- }
-
- static ImageData parseIcon(RandomAccessFile raf, int offset, int size) throws IOException {
- raf.seek(offset);
- BITMAPINFO bitmapInfo = new BITMAPINFO();
- read(raf, bitmapInfo);
- bitmapInfo.bmiHeader.biHeight /= 2;
- int width = bitmapInfo.bmiHeader.biWidth;
- int height = bitmapInfo.bmiHeader.biHeight;
- int depth = bitmapInfo.bmiHeader.biBitCount;
-
- PaletteData palette = loadPalette(bitmapInfo.bmiHeader, raf);
- byte[] shapeData = loadData(bitmapInfo.bmiHeader, raf);
- bitmapInfo.bmiHeader.biBitCount = 1;
- byte[] maskData = loadData(bitmapInfo.bmiHeader, raf);
- maskData = convertPad(maskData, width, height, 1, 4, 2);
- bitInvertData(maskData, 0, maskData.length);
- return ImageData.internal_new(width, height, depth, palette, 4, shapeData, 2, maskData, null, -1, -1, SWT.IMAGE_ICO, 0, 0, 0, 0);
- }
-
- static byte[] bitInvertData(byte[] data, int startIndex, int endIndex) {
- // Destructively bit invert data in the given byte array.
- for (int i = startIndex; i < endIndex; i++) {
- data[i] = (byte) (255 - data[i - startIndex]);
- }
- return data;
- }
-
- static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
- if (pad == newPad)
- return data;
- int stride = (width * depth + 7) / 8;
- int bpl = (stride + (pad - 1)) / pad * pad;
- int newBpl = (stride + (newPad - 1)) / newPad * newPad;
- byte[] newData = new byte[height * newBpl];
- int srcIndex = 0, destIndex = 0;
- for (int y = 0; y < height; y++) {
- System.arraycopy(data, srcIndex, newData, destIndex, newBpl);
- srcIndex += bpl;
- destIndex += newBpl;
- }
- return newData;
- }
-
- static PaletteData loadPalette(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException {
- int depth = bih.biBitCount;
- if (depth <= 8) {
- int numColors = bih.biClrUsed;
- if (numColors == 0) {
- numColors = 1 << depth;
- } else {
- if (numColors > 256)
- numColors = 256;
- }
- byte[] buf = new byte[numColors * 4];
- raf.read(buf);
- return paletteFromBytes(buf, numColors);
- }
- if (depth == 16)
- return new PaletteData(0x7C00, 0x3E0, 0x1F);
- if (depth == 24)
- return new PaletteData(0xFF, 0xFF00, 0xFF0000);
- return new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
- }
-
- static PaletteData paletteFromBytes(byte[] bytes, int numColors) {
- int bytesOffset = 0;
- RGB[] colors = new RGB[numColors];
- for (int i = 0; i < numColors; i++) {
- colors[i] = new RGB(bytes[bytesOffset + 2] & 0xFF, bytes[bytesOffset + 1] & 0xFF, bytes[bytesOffset] & 0xFF);
- bytesOffset += 4;
- }
- return new PaletteData(colors);
- }
-
- static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException {
- int stride = (bih.biWidth * bih.biBitCount + 7) / 8;
- stride = (stride + 3) / 4 * 4; // Round up to 4 byte multiple
- byte[] data = loadData(bih, raf, stride);
- flipScanLines(data, stride, bih.biHeight);
- return data;
- }
-
- static void flipScanLines(byte[] data, int stride, int height) {
- int i1 = 0;
- int i2 = (height - 1) * stride;
- for (int i = 0; i < height / 2; i++) {
- for (int index = 0; index < stride; index++) {
- byte b = data[index + i1];
- data[index + i1] = data[index + i2];
- data[index + i2] = b;
- }
- i1 += stride;
- i2 -= stride;
- }
- }
-
- static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf, int stride) throws IOException {
- int dataSize = bih.biHeight * stride;
- byte[] data = new byte[dataSize];
- int cmp = bih.biCompression;
- if (cmp == 0) { // BMP_NO_COMPRESSION
- raf.read(data);
- } else {
- if (DEBUG)
- System.out.println("ICO cannot be compressed?"); //$NON-NLS-1$
- }
- return data;
- }
-
- static void unloadIcon(RandomAccessFile raf, ImageData icon) throws IOException {
- int sizeImage = (((icon.width * icon.depth + 31) / 32 * 4) + ((icon.width + 31) / 32 * 4)) * icon.height;
- write4(raf, BMPHeaderFixedSize);
- write4(raf, icon.width);
- write4(raf, icon.height * 2);
- writeU2(raf, 1);
- writeU2(raf, icon.depth);
- write4(raf, 0);
- write4(raf, sizeImage);
- write4(raf, 0);
- write4(raf, 0);
- write4(raf, icon.palette.colors != null ? icon.palette.colors.length : 0);
- write4(raf, 0);
-
- byte[] rgbs = paletteToBytes(icon.palette);
- raf.write(rgbs);
- unloadShapeData(raf, icon);
- unloadMaskData(raf, icon);
- }
-
- static byte[] paletteToBytes(PaletteData pal) {
- int n = pal.colors == null ? 0 : (pal.colors.length < 256 ? pal.colors.length : 256);
- byte[] bytes = new byte[n * 4];
- int offset = 0;
- for (int i = 0; i < n; i++) {
- RGB col = pal.colors[i];
- bytes[offset] = (byte) col.blue;
- bytes[offset + 1] = (byte) col.green;
- bytes[offset + 2] = (byte) col.red;
- offset += 4;
- }
- return bytes;
- }
-
- static void unloadMaskData(RandomAccessFile raf, ImageData icon) {
- ImageData mask = icon.getTransparencyMask();
- int bpl = (icon.width + 7) / 8;
- int pad = mask.scanlinePad;
- int srcBpl = (bpl + pad - 1) / pad * pad;
- int destBpl = (bpl + 3) / 4 * 4;
- byte[] buf = new byte[destBpl];
- int offset = (icon.height - 1) * srcBpl;
- byte[] data = mask.data;
- try {
- for (int i = 0; i < icon.height; i++) {
- System.arraycopy(data, offset, buf, 0, bpl);
- bitInvertData(buf, 0, bpl);
- raf.write(buf, 0, destBpl);
- offset -= srcBpl;
- }
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- }
-
- static void unloadShapeData(RandomAccessFile raf, ImageData icon) {
- int bpl = (icon.width * icon.depth + 7) / 8;
- int pad = icon.scanlinePad;
- int srcBpl = (bpl + pad - 1) / pad * pad;
- int destBpl = (bpl + 3) / 4 * 4;
- byte[] buf = new byte[destBpl];
- int offset = (icon.height - 1) * srcBpl;
- byte[] data = icon.data;
- try {
- for (int i = 0; i < icon.height; i++) {
- System.arraycopy(data, offset, buf, 0, bpl);
- raf.write(buf, 0, destBpl);
- offset -= srcBpl;
- }
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- }
-
- static boolean readIconGroup(RandomAccessFile raf, int offset, int size) throws IOException {
- raf.seek(offset);
- NEWHEADER newHeader = new NEWHEADER();
- read(raf, newHeader);
- if (newHeader.ResType != RES_ICON)
- return false;
- RESDIR[] resDir = new RESDIR[newHeader.ResCount];
- for (int i = 0; i < newHeader.ResCount; i++) {
- resDir[i] = new RESDIR();
- read(raf, resDir[i]);
- }
- return true;
- }
-
- static void copyFile(String src, String dst) throws FileNotFoundException, IOException {
- File srcFile = new File(src);
- File dstFile = new File(dst);
- InputStream in = new BufferedInputStream(new FileInputStream(srcFile));
- OutputStream out = new BufferedOutputStream(new FileOutputStream(dstFile));
- int c;
- while ((c = in.read()) != -1)
- out.write(c);
- in.close();
- out.close();
- }
-
- /* IO utilities to parse Windows executable */
- static final int IMAGE_DOS_SIGNATURE = 0x5a4d;
- static final int IMAGE_NT_SIGNATURE = 0x00004550;
- static final int IMAGE_DIRECTORY_ENTRY_RESOURCE = 2;
- static final int RES_ICON = 1;
- static final int RT_ICON = 3;
- static final int RT_GROUP_ICON = 14;
- static final int BMPHeaderFixedSize = 40;
- static final int IMAGE_NT_OPTIONAL_HDR64_MAGIC = 0x20b;
- static final int IMAGE_NT_OPTIONAL_HDR32_MAGIC = 0x10b;
-
- public static class IMAGE_DOS_HEADER {
- int e_magic; // WORD
- int e_cblp; // WORD
- int e_cp; // WORD
- int e_crlc; // WORD
- int e_cparhdr; // WORD
- int e_minalloc; // WORD
- int e_maxalloc; // WORD
- int e_ss; // WORD
- int e_sp; // WORD
- int e_csum; // WORD
- int e_ip; // WORD
- int e_cs; // WORD
- int e_lfarlc; // WORD
- int e_ovno; // WORD
- int[] e_res = new int[4]; // WORD[4]
- int e_oemid; // WORD
- int e_oeminfo; // WORD
- int[] e_res2 = new int[10]; // WORD[10]
- int e_lfanew; // LONG
- }
-
- public static class IMAGE_FILE_HEADER {
- int Machine; // WORD
- int NumberOfSections; // WORD
- int TimeDateStamp; // DWORD
- int PointerToSymbolTable; // DWORD
- int NumberOfSymbols; // DWORD
- int SizeOfOptionalHeader; // WORD
- int Characteristics; // WORD
- }
-
- public static class IMAGE_DATA_DIRECTORY {
- int VirtualAddress; // DWORD
- int Size; // DWORD
- }
-
- public static class IMAGE_OPTIONAL_HEADER {
- // Allocate enough storage for the 64 bit version of the header.
- int Magic; // WORD
- int MajorLinkerVersion; // BYTE
- int MinorLinkerVersion; // BYTE
- int SizeOfCode; // DWORD
- int SizeOfInitializedData; // DWORD
- int SizeOfUninitializedData; // DWORD
- int AddressOfEntryPoint; // DWORD
- int BaseOfCode; // DWORD
- int BaseOfData; // DWORD
- long ImageBase; // ULONGLONG
- int SectionAlignment; // DWORD
- int FileAlignment; // DWORD
- int MajorOperatingSystemVersion; // WORD
- int MinorOperatingSystemVersion; // WORD
- int MajorImageVersion; // WORD
- int MinorImageVersion; // WORD
- int MajorSubsystemVersion; // WORD
- int MinorSubsystemVersion; // WORD
- int Win32VersionValue; // DWORD
- int SizeOfImage; // DWORD
- int SizeOfHeaders; // DWORD
- int CheckSum; // DWORD
- int Subsystem; // WORD
- int DllCharacteristics; // WORD
- long SizeOfStackReserve; // ULONGLONG
- long SizeOfStackCommit; // ULONGLONG
- long SizeOfHeapReserve; // ULONGLONG
- long SizeOfHeapCommit; // ULONGLONG
- int LoaderFlags; // DWORD
- int NumberOfRvaAndSizes; // DWORD
- IMAGE_DATA_DIRECTORY[] DataDirectory = new IMAGE_DATA_DIRECTORY[16];
- }
-
- public static class IMAGE_NT_HEADERS {
- int Signature; // DWORD
- IMAGE_FILE_HEADER FileHeader = new IMAGE_FILE_HEADER();
- IMAGE_OPTIONAL_HEADER OptionalHeader = new IMAGE_OPTIONAL_HEADER();
- final static int FIELD_OFFSET_OptionalHeader = 24;
- }
-
- public static class IMAGE_SECTION_HEADER {
- int[] Name = new int[8]; // BYTE[8]
- int Misc_VirtualSize; // DWORD (union Misc { DWORD PhysicalAddress; DWORD VirtualSize }
- int VirtualAddress; // DWORD
- int SizeOfRawData; // DWORD
- int PointerToRawData; // DWORD
- int PointerToRelocations; // DWORD
- int PointerToLinenumbers; // DWORD
- int NumberOfRelocations; // WORD
- int NumberOfLinenumbers; // WORD
- int Characteristics; // DWORD
- }
-
- public static class IMAGE_RESOURCE_DIRECTORY {
- int Characteristics; // DWORD
- int TimeDateStamp; // DWORD
- int MajorVersion; // WORD
- int MinorVersion; // WORD
- int NumberOfNamedEntries; // WORD - used
- int NumberOfIdEntries; // WORD - used
- final static int SIZEOF = 16;
- }
-
- public static class IMAGE_RESOURCE_DIRECTORY_ENTRY {
- // union
- int NameOffset; // DWORD 31 bits
- boolean NameIsString; // DWORD 1 bit
- int Name; // DWORD
- int Id; // WORD
- // union
- int OffsetToData; // DWORD
- int OffsetToDirectory; // DWORD 31 bits
- boolean DataIsDirectory; // DWORD 1 bit
- }
-
- public static class IMAGE_RESOURCE_DATA_ENTRY {
- int OffsetToData; // DWORD
- int Size; // DWORD
- int CodePage; // DWORD
- int Reserved; // DWORD
- }
-
- public static class NEWHEADER {
- int Reserved; // WORD
- int ResType; // WORD
- int ResCount; // WORD
- }
-
- public static class ICONRESDIR {
- int Width; // BYTE
- int Height; // BYTE
- int ColorCount; // BYTE
- int reserved; // BYTE
- }
-
- public static class CURSORDIR {
- int Width; // WORD
- int Height; // WORD
- }
-
- public static class RESDIR {
- // union
- ICONRESDIR Icon = new ICONRESDIR();
- CURSORDIR Cursor = new CURSORDIR();
- int Planes; // WORD
- int BitCount; // WORD
- int BytesInRes; // DWORD
- int IconCursorId; // WORD
- }
-
- public static class BITMAPINFOHEADER {
- int biSize; // DWORD
- int biWidth; // LONG
- int biHeight; // LONG
- int biPlanes; // WORD
- int biBitCount; // WORD
- int biCompression; // DWORD
- int biSizeImage; // DWORD
- int biXPelsPerMeter; // LONG
- int biYPelsPerMeter; // LONG
- int biClrUsed; // DWORD
- int biClrImportant; // DWORD
- }
-
- static class RGBQUAD {
- int rgBlue; // BYTE
- int rgbGreen; // BYTE
- int rgbRed; // BYTE
- int rgbReserved; // BYTE
- }
-
- static class BITMAPINFO {
- BITMAPINFOHEADER bmiHeader = new BITMAPINFOHEADER();
- RGBQUAD[] bmiColors = null;
- }
-
- static void read(RandomAccessFile raf, BITMAPINFOHEADER bih) throws IOException {
- bih.biSize = read4(raf);
- bih.biWidth = read4(raf);
- bih.biHeight = read4(raf);
- bih.biPlanes = readU2(raf);
- bih.biBitCount = readU2(raf);
- bih.biCompression = read4(raf);
- bih.biSizeImage = read4(raf);
- bih.biXPelsPerMeter = read4(raf);
- bih.biYPelsPerMeter = read4(raf);
- bih.biClrUsed = read4(raf);
- bih.biClrImportant = read4(raf);
- }
-
- static void read(RandomAccessFile raf, BITMAPINFO bi) throws IOException {
- read(raf, bi.bmiHeader);
- }
-
- /* Little Endian helpers */
- static int readU2(RandomAccessFile raf) throws IOException {
- int b0 = raf.readByte() & 0xFF;
- int b1 = raf.readByte() & 0xFF;
- return (b1 << 8 | b0);
- }
-
- static int read4(RandomAccessFile raf) throws IOException {
- int b0 = raf.readByte() & 0xFF;
- int b1 = raf.readByte() & 0xFF;
- int b2 = raf.readByte() & 0xFF;
- int b3 = raf.readByte() & 0xFF;
- return b3 << 24 | b2 << 16 | b1 << 8 | b0;
- }
-
- static long read8(RandomAccessFile raf) throws IOException {
- int b0 = raf.readByte() & 0xFF;
- int b1 = raf.readByte() & 0xFF;
- int b2 = raf.readByte() & 0xFF;
- int b3 = raf.readByte() & 0xFF;
- int b4 = raf.readByte() & 0xFF;
- int b5 = raf.readByte() & 0xFF;
- int b6 = raf.readByte() & 0xFF;
- int b7 = raf.readByte() & 0xFF;
- return b7 << 56 | b6 << 48 | b5 << 40 | b4 << 32 | b3 << 24 | b2 << 16 | b1 << 8 | b0;
- }
-
- static void write4(RandomAccessFile raf, int value) throws IOException {
- raf.write(value & 0xFF);
- raf.write((value >> 8) & 0xFF);
- raf.write((value >> 16) & 0xFF);
- raf.write((value >> 24) & 0xFF);
- }
-
- static void writeU2(RandomAccessFile raf, int value) throws IOException {
- raf.write(value & 0xFF);
- raf.write((value >> 8) & 0xFF);
- }
-
- static void read(RandomAccessFile raf, IMAGE_DOS_HEADER idh) throws IOException {
- idh.e_magic = readU2(raf);
- idh.e_cblp = readU2(raf);
- idh.e_cp = readU2(raf);
- idh.e_crlc = readU2(raf);
- idh.e_cparhdr = readU2(raf);
- idh.e_minalloc = readU2(raf);
- idh.e_maxalloc = readU2(raf);
- idh.e_ss = readU2(raf);
- idh.e_sp = readU2(raf);
- idh.e_csum = readU2(raf);
- idh.e_ip = readU2(raf);
- idh.e_cs = readU2(raf);
- idh.e_lfarlc = readU2(raf);
- idh.e_ovno = readU2(raf);
- for (int i = 0; i < idh.e_res.length; i++)
- idh.e_res[i] = readU2(raf);
- idh.e_oemid = readU2(raf);
- idh.e_oeminfo = readU2(raf);
- for (int i = 0; i < idh.e_res2.length; i++)
- idh.e_res2[i] = readU2(raf);
- idh.e_lfanew = read4(raf);
- }
-
- static void read(RandomAccessFile raf, IMAGE_FILE_HEADER ifh) throws IOException {
- ifh.Machine = readU2(raf);
- ifh.NumberOfSections = readU2(raf);
- ifh.TimeDateStamp = read4(raf);
- ifh.PointerToSymbolTable = read4(raf);
- ifh.NumberOfSymbols = read4(raf);
- ifh.SizeOfOptionalHeader = readU2(raf);
- ifh.Characteristics = readU2(raf);
- }
-
- static void read(RandomAccessFile raf, IMAGE_DATA_DIRECTORY idd) throws IOException {
- idd.VirtualAddress = read4(raf);
- idd.Size = read4(raf);
- }
-
- static void read(RandomAccessFile raf, IMAGE_OPTIONAL_HEADER ioh) throws IOException {
- ioh.Magic = readU2(raf);
-
- // Assume file is 32bit executable unless x64 magic is present
- boolean is32 = !(ioh.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC);
-
- ioh.MajorLinkerVersion = raf.read();
- ioh.MinorLinkerVersion = raf.read();
- ioh.SizeOfCode = read4(raf);
- ioh.SizeOfInitializedData = read4(raf);
- ioh.SizeOfUninitializedData = read4(raf);
- ioh.AddressOfEntryPoint = read4(raf);
- ioh.BaseOfCode = read4(raf);
-
- if (is32) {
- ioh.BaseOfData = read4(raf);
- ioh.ImageBase = read4(raf);
- } else {
- // BaseOfData deleted in the 64 bit version PE32+
- ioh.ImageBase = read8(raf);
- }
-
- ioh.SectionAlignment = read4(raf);
- ioh.FileAlignment = read4(raf);
- ioh.MajorOperatingSystemVersion = readU2(raf);
- ioh.MinorOperatingSystemVersion = readU2(raf);
- ioh.MajorImageVersion = readU2(raf);
- ioh.MinorImageVersion = readU2(raf);
- ioh.MajorSubsystemVersion = readU2(raf);
- ioh.MinorSubsystemVersion = readU2(raf);
- ioh.Win32VersionValue = read4(raf);
- ioh.SizeOfImage = read4(raf);
- ioh.SizeOfHeaders = read4(raf);
- ioh.CheckSum = read4(raf);
- ioh.Subsystem = readU2(raf);
- ioh.DllCharacteristics = readU2(raf);
-
- if (is32) {
- ioh.SizeOfStackReserve = read4(raf);
- ioh.SizeOfStackCommit = read4(raf);
- ioh.SizeOfHeapReserve = read4(raf);
- ioh.SizeOfHeapCommit = read4(raf);
- } else {
- ioh.SizeOfStackReserve = read8(raf);
- ioh.SizeOfStackCommit = read8(raf);
- ioh.SizeOfHeapReserve = read8(raf);
- ioh.SizeOfHeapCommit = read8(raf);
- }
-
- ioh.LoaderFlags = read4(raf);
- ioh.NumberOfRvaAndSizes = read4(raf);
- for (int i = 0; i < ioh.DataDirectory.length; i++) {
- ioh.DataDirectory[i] = new IMAGE_DATA_DIRECTORY();
- read(raf, ioh.DataDirectory[i]);
- }
- }
-
- static void read(RandomAccessFile raf, IMAGE_NT_HEADERS inh) throws IOException {
- inh.Signature = read4(raf);
- read(raf, inh.FileHeader);
- read(raf, inh.OptionalHeader);
- }
-
- static void read(RandomAccessFile raf, IMAGE_SECTION_HEADER ish) throws IOException {
- for (int i = 0; i < ish.Name.length; i++)
- ish.Name[i] = raf.read();
- ish.Misc_VirtualSize = read4(raf);
- ish.VirtualAddress = read4(raf);
- ish.SizeOfRawData = read4(raf);
- ish.PointerToRawData = read4(raf);
- ish.PointerToRelocations = read4(raf);
- ish.PointerToLinenumbers = read4(raf);
- ish.NumberOfRelocations = readU2(raf);
- ish.NumberOfLinenumbers = readU2(raf);
- ish.Characteristics = read4(raf);
- }
-
- static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY ird) throws IOException {
- ird.Characteristics = read4(raf);
- ird.TimeDateStamp = read4(raf);
- ird.MajorVersion = readU2(raf);
- ird.MinorVersion = readU2(raf);
- ird.NumberOfNamedEntries = readU2(raf);
- ird.NumberOfIdEntries = readU2(raf);
- }
-
- static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY_ENTRY irde) throws IOException {
- irde.Name = read4(raf);
- irde.OffsetToData = read4(raf);
- // construct other union members
- irde.NameOffset = irde.Name & ~(1 << 31);
- irde.NameIsString = (irde.Name & (1 << 31)) != 0;
- irde.Id = irde.Name & 0xFFFF;
- irde.OffsetToDirectory = irde.OffsetToData & ~(1 << 31);
- irde.DataIsDirectory = (irde.OffsetToData & (1 << 31)) != 0;
- }
-
- static void read(RandomAccessFile raf, IMAGE_RESOURCE_DATA_ENTRY irde) throws IOException {
- irde.OffsetToData = read4(raf);
- irde.Size = read4(raf);
- irde.CodePage = read4(raf);
- irde.Reserved = read4(raf);
- }
-
- static void read(RandomAccessFile raf, NEWHEADER nh) throws IOException {
- nh.Reserved = readU2(raf);
- nh.ResType = readU2(raf);
- nh.ResCount = readU2(raf);
- }
-
- static void read(RandomAccessFile raf, ICONRESDIR i) throws IOException {
- i.Width = raf.read();
- i.Height = raf.read();
- i.ColorCount = raf.read();
- i.reserved = raf.read();
- }
-
- static void read(RandomAccessFile raf, CURSORDIR c) throws IOException {
- c.Width = readU2(raf);
- c.Height = readU2(raf);
- }
-
- static void read(RandomAccessFile raf, RESDIR rs) throws IOException {
- long start = raf.getFilePointer();
- read(raf, rs.Icon);
- raf.seek(start);
- read(raf, rs.Cursor);
- rs.Planes = readU2(raf);
- rs.BitCount = readU2(raf);
- rs.BytesInRes = read4(raf);
- rs.IconCursorId = readU2(raf);
- }
-
- /* ImageData and Image Decoder inlining to avoid dependency on SWT
- * The following section can be entirely removed if SWT can be used.
- */
-
- static class RGB {
-
- /**
- * the red component of the RGB
- */
- public int red;
-
- /**
- * the green component of the RGB
- */
- public int green;
-
- /**
- * the blue component of the RGB
- */
- public int blue;
-
- static final long serialVersionUID = 3258415023461249074L;
-
- /**
- * Constructs an instance of this class with the given
- * red, green and blue values.
- *
- * @param red the red component of the new instance
- * @param green the green component of the new instance
- * @param blue the blue component of the new instance
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_INVALID_ARGUMENT - if the red, green or blue argument is not between 0 and 255</li>
- * </ul>
- */
- public RGB(int red, int green, int blue) {
- if ((red > 255) || (red < 0) || (green > 255) || (green < 0) || (blue > 255) || (blue < 0))
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- this.red = red;
- this.green = green;
- this.blue = blue;
- }
-
- /**
- * Compares the argument to the receiver, and returns true
- * if they represent the <em>same</em> object using a class
- * specific comparison.
- *
- * @param object the object to compare with this object
- * @return <code>true</code> if the object is the same as this object and <code>false</code> otherwise
- *
- * @see #hashCode()
- */
- public boolean equals(Object object) {
- if (object == this)
- return true;
- if (!(object instanceof RGB))
- return false;
- RGB rgb = (RGB) object;
- return (rgb.red == this.red) && (rgb.green == this.green) && (rgb.blue == this.blue);
- }
-
- /**
- * Returns an integer hash code for the receiver. Any two
- * objects which return <code>true</code> when passed to
- * <code>equals</code> must return the same value for this
- * method.
- *
- * @return the receiver's hash
- *
- * @see #equals(Object)
- */
- public int hashCode() {
- return (blue << 16) | (green << 8) | red;
- }
-
- /**
- * Returns a string containing a concise, human-readable
- * description of the receiver.
- *
- * @return a string representation of the <code>RGB</code>
- */
- public String toString() {
- return "RGB {" + red + ", " + green + ", " + blue + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-
- //$NON-NLS-4$
- }
-
- }
-
- static class PaletteData {
-
- /**
- * true if the receiver is a direct palette,
- * and false otherwise
- */
- public boolean isDirect;
-
- /**
- * the RGB values for an indexed palette, where the
- * indices of the array correspond to pixel values
- */
- public RGB[] colors;
-
- /**
- * the red mask for a direct palette
- */
- public int redMask;
-
- /**
- * the green mask for a direct palette
- */
- public int greenMask;
-
- /**
- * the blue mask for a direct palette
- */
- public int blueMask;
-
- /**
- * the red shift for a direct palette
- */
- public int redShift;
-
- /**
- * the green shift for a direct palette
- */
- public int greenShift;
-
- /**
- * the blue shift for a direct palette
- */
- public int blueShift;
-
- /**
- * Constructs a new indexed palette given an array of RGB values.
- *
- * @param colors the array of <code>RGB</code>s for the palette
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- * </ul>
- */
- public PaletteData(RGB[] colors) {
- if (colors == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- this.colors = colors;
- this.isDirect = false;
- }
-
- /**
- * Constructs a new direct palette given the red, green and blue masks.
- *
- * @param redMask the red mask
- * @param greenMask the green mask
- * @param blueMask the blue mask
- */
- public PaletteData(int redMask, int greenMask, int blueMask) {
- this.redMask = redMask;
- this.greenMask = greenMask;
- this.blueMask = blueMask;
- this.isDirect = true;
- this.redShift = shiftForMask(redMask);
- this.greenShift = shiftForMask(greenMask);
- this.blueShift = shiftForMask(blueMask);
- }
-
- /**
- * Returns the pixel value corresponding to the given <code>RBG</code>.
- *
- * @param rgb the RGB to get the pixel value for
- * @return the pixel value for the given RGB
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- * <li>ERROR_INVALID_ARGUMENT - if the RGB is not found in the palette</li>
- * </ul>
- */
- public int getPixel(RGB rgb) {
- if (rgb == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (isDirect) {
- int pixel = 0;
- pixel |= (redShift < 0 ? rgb.red << -redShift : rgb.red >>> redShift) & redMask;
- pixel |= (greenShift < 0 ? rgb.green << -greenShift : rgb.green >>> greenShift) & greenMask;
- pixel |= (blueShift < 0 ? rgb.blue << -blueShift : rgb.blue >>> blueShift) & blueMask;
- return pixel;
- }
-
- for (int i = 0; i < colors.length; i++) {
- if (colors[i].equals(rgb))
- return i;
- }
- /* The RGB did not exist in the palette */
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- return 0;
- }
-
- /**
- * Returns an <code>RGB</code> corresponding to the given pixel value.
- *
- * @param pixel the pixel to get the RGB value for
- * @return the RGB value for the given pixel
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the argument is null</li>
- * <li>ERROR_INVALID_ARGUMENT - if the pixel does not exist in the palette</li>
- * </ul>
- */
- public RGB getRGB(int pixel) {
- if (isDirect) {
- int r = pixel & redMask;
- r = (redShift < 0) ? r >>> -redShift : r << redShift;
- int g = pixel & greenMask;
- g = (greenShift < 0) ? g >>> -greenShift : g << greenShift;
- int b = pixel & blueMask;
- b = (blueShift < 0) ? b >>> -blueShift : b << blueShift;
- return new RGB(r, g, b);
- }
- if (pixel < 0 || pixel >= colors.length) {
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- }
- return colors[pixel];
- }
-
- /**
- * Returns all the RGB values in the receiver if it is an
- * indexed palette, or null if it is a direct palette.
- *
- * @return the <code>RGB</code>s for the receiver or null
- */
- public RGB[] getRGBs() {
- return colors;
- }
-
- /**
- * Computes the shift value for a given mask.
- *
- * @param mask the mask to compute the shift for
- * @return the shift amount
- *
- * @see IconExe.PaletteData
- */
- int shiftForMask(int mask) {
- for (int i = 31; i >= 0; i--) {
- if (((mask >> i) & 0x1) != 0)
- return 7 - i;
- }
- return 32;
- }
-
- }
-
- static class ImageLoader {
-
- /**
- * the array of ImageData objects in this ImageLoader.
- * This array is read in when the load method is called,
- * and it is written out when the save method is called
- */
- public ImageData[] data;
-
- /**
- * the width of the logical screen on which the images
- * reside, in pixels (this corresponds to the GIF89a
- * Logical Screen Width value)
- */
- public int logicalScreenWidth;
-
- /**
- * the height of the logical screen on which the images
- * reside, in pixels (this corresponds to the GIF89a
- * Logical Screen Height value)
- */
- public int logicalScreenHeight;
-
- /**
- * the background pixel for the logical screen (this
- * corresponds to the GIF89a Background Color Index value).
- * The default is -1 which means 'unspecified background'
- *
- */
- public int backgroundPixel;
-
- /**
- * the number of times to repeat the display of a sequence
- * of animated images (this corresponds to the commonly-used
- * GIF application extension for "NETSCAPE 2.0 01")
- */
- public int repeatCount;
-
- /*
- * the set of ImageLoader event listeners, created on demand
- */
- Vector<?> imageLoaderListeners;
-
- /**
- * Construct a new empty ImageLoader.
- */
- public ImageLoader() {
- reset();
- }
-
- /**
- * Resets the fields of the ImageLoader, except for the
- * <code>imageLoaderListeners</code> field.
- */
- void reset() {
- data = null;
- logicalScreenWidth = 0;
- logicalScreenHeight = 0;
- backgroundPixel = -1;
- repeatCount = 1;
- }
-
- /**
- * Loads an array of <code>ImageData</code> objects from the
- * specified input stream. Throws an error if either an error
- * occurs while loading the images, or if the images are not
- * of a supported type. Returns the loaded image data array.
- *
- * @param stream the input stream to load the images from
- * @return an array of <code>ImageData</code> objects loaded from the specified input stream
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the stream is null</li>
- * </ul>
- * @exception RuntimeException <ul>
- * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
- * <li>ERROR_IO - if an input/output error occurs while reading data</li>
- * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
- * </ul>
- */
- public ImageData[] load(InputStream stream) {
- if (stream == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- reset();
- data = FileFormat.load(stream, this);
- return data;
- }
-
- /**
- * Loads an array of <code>ImageData</code> objects from the
- * file with the specified name. Throws an error if either
- * an error occurs while loading the images, or if the images are
- * not of a supported type. Returns the loaded image data array.
- *
- * @param filename the name of the file to load the images from
- * @return an array of <code>ImageData</code> objects loaded from the specified file
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the file name is null</li>
- * </ul>
- * @exception RuntimeException <ul>
- * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
- * <li>ERROR_IO - if an IO error occurs while reading data</li>
- * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
- * </ul>
- */
- public ImageData[] load(String filename) {
- if (filename == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- InputStream stream = null;
- try {
- stream = new BufferedInputStream(new FileInputStream(filename));
- return load(stream);
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- } finally {
- try {
- if (stream != null)
- stream.close();
- } catch (IOException e) {
- // Ignore error
- }
- }
- return null;
- }
- }
-
- static class ImageData {
-
- /**
- * The width of the image, in pixels.
- */
- public int width;
-
- /**
- * The height of the image, in pixels.
- */
- public int height;
-
- /**
- * The color depth of the image, in bits per pixel.
- * <p>
- * Note that a depth of 8 or less does not necessarily
- * mean that the image is palette indexed, or
- * conversely that a depth greater than 8 means that
- * the image is direct color. Check the associated
- * PaletteData's isDirect field for such determinations.
- */
- public int depth;
-
- /**
- * The scanline padding.
- * <p>
- * If one scanline of the image is not a multiple of
- * this number, it will be padded with zeros until it is.
- * </p>
- */
- public int scanlinePad;
-
- /**
- * The number of bytes per scanline.
- * <p>
- * This is a multiple of the scanline padding.
- * </p>
- */
- public int bytesPerLine;
-
- /**
- * The pixel data of the image.
- * <p>
- * Note that for 16 bit depth images the pixel data is stored
- * in least significant byte order; however, for 24bit and
- * 32bit depth images the pixel data is stored in most
- * significant byte order.
- * </p>
- */
- public byte[] data;
-
- /**
- * The color table for the image.
- */
- public PaletteData palette;
-
- /**
- * The transparent pixel.
- * <p>
- * Pixels with this value are transparent.
- * </p><p>
- * The default is -1 which means 'no transparent pixel'.
- * </p>
- */
- public int transparentPixel;
-
- /**
- * An icon-specific field containing the data from the icon mask.
- * <p>
- * This is a 1 bit bitmap stored with the most significant
- * bit first. The number of bytes per scanline is
- * '((width + 7) / 8 + (maskPad - 1)) / maskPad * maskPad'.
- * </p><p>
- * The default is null which means 'no transparency mask'.
- * </p>
- */
- public byte[] maskData;
-
- /**
- * An icon-specific field containing the scanline pad of the mask.
- * <p>
- * If one scanline of the transparency mask is not a
- * multiple of this number, it will be padded with zeros until
- * it is.
- * </p>
- */
- public int maskPad;
-
- /**
- * The alpha data of the image.
- * <p>
- * Every pixel can have an <em>alpha blending</em> value that
- * varies from 0, meaning fully transparent, to 255 meaning
- * fully opaque. The number of bytes per scanline is
- * 'width'.
- * </p>
- */
- public byte[] alphaData;
-
- /**
- * The global alpha value to be used for every pixel.
- * <p>
- * If this value is set, the <code>alphaData</code> field
- * is ignored and when the image is rendered each pixel
- * will be blended with the background an amount
- * proportional to this value.
- * </p><p>
- * The default is -1 which means 'no global alpha value'
- * </p>
- */
- public int alpha;
-
- /**
- * The type of file from which the image was read.
- *
- * It is expressed as one of the following values:
- * <dl>
- * <dt><code>IMAGE_BMP</code></dt>
- * <dd>Windows BMP file format, no compression</dd>
- * <dt><code>IMAGE_BMP_RLE</code></dt>
- * <dd>Windows BMP file format, RLE compression if appropriate</dd>
- * <dt><code>IMAGE_GIF</code></dt>
- * <dd>GIF file format</dd>
- * <dt><code>IMAGE_ICO</code></dt>
- * <dd>Windows ICO file format</dd>
- * <dt><code>IMAGE_JPEG</code></dt>
- * <dd>JPEG file format</dd>
- * <dt><code>IMAGE_PNG</code></dt>
- * <dd>PNG file format</dd>
- * </dl>
- */
- public int type;
-
- /**
- * The x coordinate of the top left corner of the image
- * within the logical screen (this field corresponds to
- * the GIF89a Image Left Position value).
- */
- public int x;
-
- /**
- * The y coordinate of the top left corner of the image
- * within the logical screen (this field corresponds to
- * the GIF89a Image Top Position value).
- */
- public int y;
-
- /**
- * A description of how to dispose of the current image
- * before displaying the next.
- *
- * It is expressed as one of the following values:
- * <dl>
- * <dt><code>DM_UNSPECIFIED</code></dt>
- * <dd>disposal method not specified</dd>
- * <dt><code>DM_FILL_NONE</code></dt>
- * <dd>do nothing - leave the image in place</dd>
- * <dt><code>DM_FILL_BACKGROUND</code></dt>
- * <dd>fill with the background color</dd>
- * <dt><code>DM_FILL_PREVIOUS</code></dt>
- * <dd>restore the previous picture</dd>
- * </dl>
- * (this field corresponds to the GIF89a Disposal Method value)
- */
- public int disposalMethod;
-
- /**
- * The time to delay before displaying the next image
- * in an animation (this field corresponds to the GIF89a
- * Delay Time value).
- */
- public int delayTime;
-
- /**
- * Arbitrary channel width data to 8-bit conversion table.
- */
- static final byte[][] ANY_TO_EIGHT = new byte[9][];
- static {
- for (int b = 0; b < 9; ++b) {
- byte[] data = ANY_TO_EIGHT[b] = new byte[1 << b];
- if (b == 0)
- continue;
- int inc = 0;
- for (int bit = 0x10000; (bit >>= b) != 0;)
- inc |= bit;
- for (int v = 0, p = 0; v < 0x10000; v += inc)
- data[p++] = (byte) (v >> 8);
- }
- }
- static final byte[] ONE_TO_ONE_MAPPING = ANY_TO_EIGHT[8];
-
- /**
- * Scaled 8x8 Bayer dither matrix.
- */
- static final int[][] DITHER_MATRIX = { {0xfc0000, 0x7c0000, 0xdc0000, 0x5c0000, 0xf40000, 0x740000, 0xd40000, 0x540000}, {0x3c0000, 0xbc0000, 0x1c0000, 0x9c0000, 0x340000, 0xb40000, 0x140000, 0x940000}, {0xcc0000, 0x4c0000, 0xec0000, 0x6c0000, 0xc40000, 0x440000, 0xe40000, 0x640000}, {0x0c0000, 0x8c0000, 0x2c0000, 0xac0000, 0x040000, 0x840000, 0x240000, 0xa40000}, {0xf00000, 0x700000, 0xd00000, 0x500000, 0xf80000, 0x780000, 0xd80000, 0x580000}, {0x300000, 0xb00000, 0x100000, 0x900000, 0x380000, 0xb80000, 0x180000, 0x980000}, {0xc00000, 0x400000, 0xe00000, 0x600000, 0xc80000, 0x480000, 0xe80000, 0x680000}, {0x000000, 0x800000, 0x200000, 0xa00000, 0x080000, 0x880000, 0x280000, 0xa80000}};
-
- /**
- * Constructs a new, empty ImageData with the given width, height,
- * depth and palette. The data will be initialized to an (all zero)
- * array of the appropriate size.
- *
- * @param width the width of the image
- * @param height the height of the image
- * @param depth the depth of the image
- * @param palette the palette of the image (must not be null)
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not
- * one of 1, 2, 4, 8, 16, 24 or 32</li>
- * <li>ERROR_NULL_ARGUMENT - if the palette is null</li>
- * </ul>
- */
- public ImageData(int width, int height, int depth, PaletteData palette) {
- this(width, height, depth, palette, 4, null, 0, null, null, -1, -1, SWT.IMAGE_UNDEFINED, 0, 0, 0, 0);
- }
-
- /**
- * Constructs a new, empty ImageData with the given width, height,
- * depth, palette, scanlinePad and data.
- *
- * @param width the width of the image
- * @param height the height of the image
- * @param depth the depth of the image
- * @param palette the palette of the image
- * @param scanlinePad the padding of each line, in bytes
- * @param data the data of the image
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not
- * one of 1, 2, 4, 8, 16, 24 or 32</li>
- * <li>ERROR_NULL_ARGUMENT - if the palette or data is null</li>
- * <li>ERROR_CANNOT_BE_ZERO - if the scanlinePad is zero</li>
- * </ul>
- */
- public ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data) {
- this(width, height, depth, palette, scanlinePad, checkData(data), 0, null, null, -1, -1, SWT.IMAGE_UNDEFINED, 0, 0, 0, 0);
- }
-
- /**
- * Constructs an <code>ImageData</code> loaded from a file with the
- * specified name. Throws an error if an error occurs loading the
- * image, or if the image has an unsupported type.
- * <p>
- * This constructor is provided for convenience when loading a single
- * image only. If the file contains multiple images, only the first
- * one will be loaded. To load multiple images, use
- * <code>ImageLoader.load()</code>.
- * </p>
- *
- * @param filename the name of the file to load the image from (must not be null)
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the file name is null</li>
- * </ul>
- * @exception RuntimeException <ul>
- * <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li>
- * <li>ERROR_IO if an IO error occurs while reading data</li>
- * <li>ERROR_UNSUPPORTED_FORMAT - if the image file contains an unrecognized format</li>
- * </ul>
- */
- public ImageData(String filename) {
- ImageData[] data = new ImageLoader().load(filename);
- if (data.length < 1)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- ImageData i = data[0];
- setAllFields(i.width, i.height, i.depth, i.scanlinePad, i.bytesPerLine, i.data, i.palette, i.transparentPixel, i.maskData, i.maskPad, i.alphaData, i.alpha, i.type, i.x, i.y, i.disposalMethod, i.delayTime);
- }
-
- /**
- * Prevents uninitialized instances from being created outside the package.
- */
- ImageData() {
- //empty constructor
- }
-
- /**
- * Constructs an image data by giving values for all non-computable fields.
- * <p>
- * This method is for internal use, and is not described further.
- * </p>
- */
- ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data, int maskPad, byte[] maskData, byte[] alphaData, int alpha, int transparentPixel, int type, int x, int y, int disposalMethod, int delayTime) {
-
- if (palette == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8 || depth == 16 || depth == 24 || depth == 32)) {
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- }
- if (width <= 0 || height <= 0) {
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- }
- if (scanlinePad == 0)
- SWT.error(SWT.ERROR_CANNOT_BE_ZERO);
-
- int bytesPerLine = (((width * depth + 7) / 8) + (scanlinePad - 1)) / scanlinePad * scanlinePad;
- setAllFields(width, height, depth, scanlinePad, bytesPerLine, data != null ? data : new byte[bytesPerLine * height], palette, transparentPixel, maskData, maskPad, alphaData, alpha, type, x, y, disposalMethod, delayTime);
- }
-
- /**
- * Initializes all fields in the receiver. This method must be called
- * by all public constructors to ensure that all fields are initialized
- * for a new ImageData object. If a new field is added to the class,
- * then it must be added to this method.
- * <p>
- * This method is for internal use, and is not described further.
- * </p>
- */
- void setAllFields(int width, int height, int depth, int scanlinePad, int bytesPerLine, byte[] data, PaletteData palette, int transparentPixel, byte[] maskData, int maskPad, byte[] alphaData, int alpha, int type, int x, int y, int disposalMethod, int delayTime) {
-
- this.width = width;
- this.height = height;
- this.depth = depth;
- this.scanlinePad = scanlinePad;
- this.bytesPerLine = bytesPerLine;
- this.data = data;
- this.palette = palette;
- this.transparentPixel = transparentPixel;
- this.maskData = maskData;
- this.maskPad = maskPad;
- this.alphaData = alphaData;
- this.alpha = alpha;
- this.type = type;
- this.x = x;
- this.y = y;
- this.disposalMethod = disposalMethod;
- this.delayTime = delayTime;
- }
-
- /**
- * Invokes internal SWT functionality to create a new instance of
- * this class.
- * <p>
- * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
- * API for <code>ImageData</code>. It is marked public only so that it
- * can be shared within the packages provided by SWT. It is subject
- * to change without notice, and should never be called from
- * application code.
- * </p>
- * <p>
- * This method is for internal use, and is not described further.
- * </p>
- */
- public static ImageData internal_new(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data, int maskPad, byte[] maskData, byte[] alphaData, int alpha, int transparentPixel, int type, int x, int y, int disposalMethod, int delayTime) {
- return new ImageData(width, height, depth, palette, scanlinePad, data, maskPad, maskData, alphaData, alpha, transparentPixel, type, x, y, disposalMethod, delayTime);
- }
-
- ImageData colorMaskImage(int pixel) {
- ImageData mask = new ImageData(width, height, 1, bwPalette(), 2, null, 0, null, null, -1, -1, SWT.IMAGE_UNDEFINED, 0, 0, 0, 0);
- int[] row = new int[width];
- for (int y = 0; y < height; y++) {
- getPixels(0, y, width, row, 0);
- for (int i = 0; i < width; i++) {
- if (pixel != -1 && row[i] == pixel) {
- row[i] = 0;
- } else {
- row[i] = 1;
- }
- }
- mask.setPixels(0, y, width, row, 0);
- }
- return mask;
- }
-
- static byte[] checkData(byte[] data) {
- if (data == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- return data;
- }
-
- /**
- * Returns <code>getWidth</code> pixel values starting at offset
- * <code>x</code> in scanline <code>y</code> in the receiver's
- * data starting at <code>startIndex</code>.
- *
- * @param x the x position of the first pixel to get
- * @param y the y position of the first pixel to get
- * @param getWidth the width of the data to get
- * @param pixels the buffer in which to put the pixels
- * @param startIndex the offset into the byte array to begin storing pixels
- *
- * @exception IndexOutOfBoundsException if getWidth is too large
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- * <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- * <li>ERROR_INVALID_ARGUMENT - if getWidth is negative</li>
- * </ul>
- * @exception RuntimeException <ul>
- * <li>ERROR_UNSUPPORTED_DEPTH - if the depth is not one of 1, 2, 4 or 8
- * (For higher depths, use the int[] version of this method.)</li>
- * </ul>
- */
- public void getPixels(int x, int y, int getWidth, byte[] pixels, int startIndex) {
- if (pixels == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (getWidth < 0 || x >= width || y >= height || x < 0 || y < 0)
- SWT.error
-
- (SWT.ERROR_INVALID_ARGUMENT);
- if (getWidth == 0)
- return;
- int index;
- int theByte;
- int mask = 0;
- int n = getWidth;
- int i = startIndex;
- int srcX = x, srcY = y;
- if (depth == 1) {
- index = (y * bytesPerLine) + (x >> 3);
- theByte = data[index] & 0xFF;
- while (n > 0) {
- mask = 1 << (7 - (srcX & 0x7));
- if ((theByte & mask) == 0) {
- pixels[i] = 0;
- } else {
- pixels[i] = 1;
- }
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- if (n > 0)
- theByte = data[index] & 0xFF;
- srcX = 0;
- } else {
- if (mask == 1) {
- index++;
- if (n > 0)
- theByte = data[index] & 0xFF;
- }
- }
- }
- return;
- }
- if (depth == 2) {
- index = (y * bytesPerLine) + (x >> 2);
- theByte = data[index] & 0xFF;
- int offset;
- while (n > 0) {
- offset = 3 - (srcX % 4);
- mask = 3 << (offset * 2);
- pixels[i] = (byte) ((theByte & mask) >> (offset * 2));
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- if (n > 0)
- theByte = data[index] & 0xFF;
- srcX = 0;
- } else {
- if (offset == 0) {
- index++;
- theByte = data[index] & 0xFF;
- }
- }
- }
- return;
- }
- if (depth == 4) {
- index = (y * bytesPerLine) + (x >> 1);
- if ((x & 0x1) == 1) {
- theByte = data[index] & 0xFF;
- pixels[i] = (byte) (theByte & 0x0F);
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index++;
- }
- }
- while (n > 1) {
- theByte = data[index] & 0xFF;
- pixels[i] = (byte) (theByte >> 4);
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- pixels[i] = (byte) (theByte & 0x0F);
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index++;
- }
- }
- }
- if (n > 0) {
- theByte = data[index] & 0xFF;
- pixels[i] = (byte) (theByte >> 4);
- }
- return;
- }
- if (depth == 8) {
- index = (y * bytesPerLine) + x;
- for (int j = 0; j < getWidth; j++) {
- pixels[i] = data[index];
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index++;
- }
- }
- return;
- }
- SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
- }
-
- /**
- * Returns <code>getWidth</code> pixel values starting at offset
- * <code>x</code> in scanline <code>y</code> in the receiver's
- * data starting at <code>startIndex</code>.
- *
- * @param x the x position of the first pixel to get
- * @param y the y position of the first pixel to get
- * @param getWidth the width of the data to get
- * @param pixels the buffer in which to put the pixels
- * @param startIndex the offset into the buffer to begin storing pixels
- *
- * @exception IndexOutOfBoundsException if getWidth is too large
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- * <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- * <li>ERROR_INVALID_ARGUMENT - if getWidth is negative</li>
- * </ul>
- * @exception RuntimeException <ul>
- * <li>ERROR_UNSUPPORTED_DEPTH - if the depth is not one of 1, 2, 4, 8, 16, 24 or 32</li>
- * </ul>
- */
- public void getPixels(int x, int y, int getWidth, int[] pixels, int startIndex) {
- if (pixels == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (getWidth < 0 || x >= width || y >= height || x < 0 || y < 0)
- SWT.error
-
- (SWT.ERROR_INVALID_ARGUMENT);
- if (getWidth == 0)
- return;
- int index;
- int theByte;
- int mask;
- int n = getWidth;
- int i = startIndex;
- int srcX = x, srcY = y;
- if (depth == 1) {
- index = (y * bytesPerLine) + (x >> 3);
- theByte = data[index] & 0xFF;
- while (n > 0) {
- mask = 1 << (7 - (srcX & 0x7));
- if ((theByte & mask) == 0) {
- pixels[i] = 0;
- } else {
- pixels[i] = 1;
- }
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- if (n > 0)
- theByte = data[index] & 0xFF;
- srcX = 0;
- } else {
- if (mask == 1) {
- index++;
- if (n > 0)
- theByte = data[index] & 0xFF;
- }
- }
- }
- return;
- }
- if (depth == 2) {
- index = (y * bytesPerLine) + (x >> 2);
- theByte = data[index] & 0xFF;
- int offset;
- while (n > 0) {
- offset = 3 - (srcX % 4);
- mask = 3 << (offset * 2);
- pixels[i] = (byte) ((theByte & mask) >> (offset * 2));
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- if (n > 0)
- theByte = data[index] & 0xFF;
- srcX = 0;
- } else {
- if (offset == 0) {
- index++;
- theByte = data[index] & 0xFF;
- }
- }
- }
- return;
- }
- if (depth == 4) {
- index = (y * bytesPerLine) + (x >> 1);
- if ((x & 0x1) == 1) {
- theByte = data[index] & 0xFF;
- pixels[i] = theByte & 0x0F;
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index++;
- }
- }
- while (n > 1) {
- theByte = data[index] & 0xFF;
- pixels[i] = theByte >> 4;
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- pixels[i] = theByte & 0x0F;
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index++;
- }
- }
- }
- if (n > 0) {
- theByte = data[index] & 0xFF;
- pixels[i] = theByte >> 4;
- }
- return;
- }
- if (depth == 8) {
- index = (y * bytesPerLine) + x;
- for (int j = 0; j < getWidth; j++) {
- pixels[i] = data[index] & 0xFF;
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index++;
- }
- }
- return;
- }
- if (depth == 16) {
- index = (y * bytesPerLine) + (x * 2);
- for (int j = 0; j < getWidth; j++) {
- pixels[i] = ((data[index + 1] & 0xFF) << 8) + (data[index] & 0xFF);
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index += 2;
- }
- }
- return;
- }
- if (depth == 24) {
- index = (y * bytesPerLine) + (x * 3);
- for (int j = 0; j < getWidth; j++) {
- pixels[i] = ((data[index] & 0xFF) << 16) | ((data[index + 1] & 0xFF) << 8) | (data[index + 2] & 0xFF);
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index += 3;
- }
- }
- return;
- }
- if (depth == 32) {
- index = (y * bytesPerLine) + (x * 4);
- i = startIndex;
- for (int j = 0; j < getWidth; j++) {
- pixels[i] = ((data[index] & 0xFF) << 24) | ((data[index + 1] & 0xFF) << 16) | ((data[index + 2] & 0xFF) << 8) | (data[index + 3] & 0xFF);
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index += 4;
- }
- }
- return;
- }
- SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
- }
-
- /**
- * Returns an array of <code>RGB</code>s which comprise the
- * indexed color table of the receiver, or null if the receiver
- * has a direct color model.
- *
- * @return the RGB values for the image or null if direct color
- *
- * @see IconExe.PaletteData#getRGBs()
- */
- public RGB[] getRGBs() {
- return palette.getRGBs();
- }
-
- /**
- * Returns an <code>ImageData</code> which specifies the
- * transparency mask information for the receiver, or null if the
- * receiver has no transparency and is not an icon.
- *
- * @return the transparency mask or null if none exists
- */
- public ImageData getTransparencyMask() {
- if (getTransparencyType() == SWT.TRANSPARENCY_MASK) {
- return new ImageData(width, height, 1, bwPalette(), maskPad, maskData);
- }
- return colorMaskImage(transparentPixel);
- }
-
- /**
- * Returns the image transparency type.
- *
- * @return the receiver's transparency type
- */
- public int getTransparencyType() {
- if (maskData != null)
- return SWT.TRANSPARENCY_MASK;
- if (transparentPixel != -1)
- return SWT.TRANSPARENCY_PIXEL;
- if (alphaData != null)
- return SWT.TRANSPARENCY_ALPHA;
- return SWT.TRANSPARENCY_NONE;
- }
-
- /**
- * Returns the byte order of the receiver.
- *
- * @return MSB_FIRST or LSB_FIRST
- */
- int getByteOrder() {
- return depth != 16 ? MSB_FIRST : LSB_FIRST;
- }
-
- /**
- * Sets the pixel values starting at offset <code>x</code> in
- * scanline <code>y</code> in the receiver's data to the
- * values from the array <code>pixels</code> starting at
- * <code>startIndex</code>.
- *
- * @param x the x position of the pixel to set
- * @param y the y position of the pixel to set
- * @param putWidth the width of the pixels to set
- * @param pixels the pixels to set
- * @param startIndex the index at which to begin setting
- *
- * @exception IndexOutOfBoundsException if putWidth is too large
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- * <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- * <li>ERROR_INVALID_ARGUMENT - if putWidth is negative</li>
- * </ul>
- * @exception RuntimeException <ul>
- * <li>ERROR_UNSUPPORTED_DEPTH if the depth is not one of 1, 2, 4, 8
- * (For higher depths, use the int[] version of this method.)</li>
- * </ul>
- */
- public void setPixels(int x, int y, int putWidth, byte[] pixels, int startIndex) {
- if (pixels == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (putWidth < 0 || x >= width || y >= height || x < 0 || y < 0)
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- if (putWidth == 0)
- return;
- int index;
- int theByte;
- int mask;
- int n = putWidth;
- int i = startIndex;
- int srcX = x, srcY = y;
- if (depth == 1) {
- index = (y * bytesPerLine) + (x >> 3);
- while (n > 0) {
- mask = 1 << (7 - (srcX & 0x7));
- if ((pixels[i] & 0x1) == 1) {
- data[index] = (byte) ((data[index] & 0xFF) | mask);
- } else {
- data[index] = (byte) ((data[index] & 0xFF) & (mask ^ -1));
- }
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- if (mask == 1) {
- index++;
- }
- }
- }
- return;
- }
- if (depth == 2) {
- byte[] masks = {(byte) 0xFC, (byte) 0xF3, (byte) 0xCF, (byte) 0x3F};
- index = (y * bytesPerLine) + (x >> 2);
- int offset = 3 - (x % 4);
- while (n > 0) {
- theByte = pixels[i] & 0x3;
- data[index] = (byte) ((data[index] & masks[offset]) | (theByte << (offset * 2)));
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- offset = 0;
- srcX = 0;
- } else {
- if (offset == 0) {
- index++;
- offset = 3;
- } else {
- offset--;
- }
- }
- }
- return;
- }
- if (depth == 4) {
- index = (y * bytesPerLine) + (x >> 1);
- boolean high = (x & 0x1) == 0;
- while (n > 0) {
- theByte = pixels[i] & 0x0F;
- if (high) {
- data[index] = (byte) ((data[index] & 0x0F) | (theByte << 4));
- } else {
- data[index] = (byte) ((data[index] & 0xF0) | theByte);
- }
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- high = true;
- srcX = 0;
- } else {
- if (!high)
- index++;
- high = !high;
- }
- }
- return;
- }
- if (depth == 8) {
- index = (y * bytesPerLine) + x;
- for (int j = 0; j < putWidth; j++) {
- data[index] = (byte) (pixels[i] & 0xFF);
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index++;
- }
- }
- return;
- }
- SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
- }
-
- /**
- * Sets the pixel values starting at offset <code>x</code> in
- * scanline <code>y</code> in the receiver's data to the
- * values from the array <code>pixels</code> starting at
- * <code>startIndex</code>.
- *
- * @param x the x position of the pixel to set
- * @param y the y position of the pixel to set
- * @param putWidth the width of the pixels to set
- * @param pixels the pixels to set
- * @param startIndex the index at which to begin setting
- *
- * @exception IndexOutOfBoundsException if putWidth is too large
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if pixels is null</li>
- * <li>ERROR_INVALID_ARGUMENT - if x or y is out of bounds</li>
- * <li>ERROR_INVALID_ARGUMENT - if putWidth is negative</li>
- * </ul>
- * @exception RuntimeException <ul>
- * <li>ERROR_UNSUPPORTED_DEPTH if the depth is not one of 1, 2, 4, 8, 16, 24 or 32</li>
- * </ul>
- */
- public void setPixels(int x, int y, int putWidth, int[] pixels, int startIndex) {
- if (pixels == null)
- SWT.error(SWT.ERROR_NULL_ARGUMENT);
- if (putWidth < 0 || x >= width || y >= height || x < 0 || y < 0)
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- if (putWidth == 0)
- return;
- int index;
- int theByte;
- int mask;
- int n = putWidth;
- int i = startIndex;
- int pixel;
- int srcX = x, srcY = y;
- if (depth == 1) {
- index = (y * bytesPerLine) + (x >> 3);
- while (n > 0) {
- mask = 1 << (7 - (srcX & 0x7));
- if ((pixels[i] & 0x1) == 1) {
- data[index] = (byte) ((data[index] & 0xFF) | mask);
- } else {
- data[index] = (byte) ((data[index] & 0xFF) & (mask ^ -1));
- }
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- if (mask == 1) {
- index++;
- }
- }
- }
- return;
- }
- if (depth == 2) {
- byte[] masks = {(byte) 0xFC, (byte) 0xF3, (byte) 0xCF, (byte) 0x3F};
- index = (y * bytesPerLine) + (x >> 2);
- int offset = 3 - (x % 4);
- while (n > 0) {
- theByte = pixels[i] & 0x3;
- data[index] = (byte) ((data[index] & masks[offset]) | (theByte << (offset * 2)));
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- offset = 3;
- srcX = 0;
- } else {
- if (offset == 0) {
- index++;
- offset = 3;
- } else {
- offset--;
- }
- }
- }
- return;
- }
- if (depth == 4) {
- index = (y * bytesPerLine) + (x >> 1);
- boolean high = (x & 0x1) == 0;
- while (n > 0) {
- theByte = pixels[i] & 0x0F;
- if (high) {
- data[index] = (byte) ((data[index] & 0x0F) | (theByte << 4));
- } else {
- data[index] = (byte) ((data[index] & 0xF0) | theByte);
- }
- i++;
- n--;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- high = true;
- srcX = 0;
- } else {
- if (!high)
- index++;
- high = !high;
- }
- }
- return;
- }
- if (depth == 8) {
- index = (y * bytesPerLine) + x;
- for (int j = 0; j < putWidth; j++) {
- data[index] = (byte) (pixels[i] & 0xFF);
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index++;
- }
- }
- return;
-
- }
- if (depth == 16) {
- index = (y * bytesPerLine) + (x * 2);
- for (int j = 0; j < putWidth; j++) {
- pixel = pixels[i];
- data[index] = (byte) (pixel & 0xFF);
- data[index + 1] = (byte) ((pixel >> 8) & 0xFF);
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index += 2;
- }
- }
- return;
- }
- if (depth == 24) {
- index = (y * bytesPerLine) + (x * 3);
- for (int j = 0; j < putWidth; j++) {
- pixel = pixels[i];
- data[index] = (byte) ((pixel >> 16) & 0xFF);
- data[index + 1] = (byte) ((pixel >> 8) & 0xFF);
- data[index + 2] = (byte) (pixel & 0xFF);
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index += 3;
- }
- }
- return;
- }
- if (depth == 32) {
- index = (y * bytesPerLine) + (x * 4);
- for (int j = 0; j < putWidth; j++) {
- pixel = pixels[i];
- data[index] = (byte) ((pixel >> 24) & 0xFF);
- data[index + 1] = (byte) ((pixel >> 16) & 0xFF);
- data[index + 2] = (byte) ((pixel >> 8) & 0xFF);
- data[index + 3] = (byte) (pixel & 0xFF);
- i++;
- srcX++;
- if (srcX >= width) {
- srcY++;
- index = srcY * bytesPerLine;
- srcX = 0;
- } else {
- index += 4;
- }
- }
- return;
- }
- SWT.error(SWT.ERROR_UNSUPPORTED_DEPTH);
- }
-
- /**
- * Returns a palette with 2 colors: black & white.
- */
- static PaletteData bwPalette() {
- return new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)});
- }
-
- /**
- * Gets the offset of the most significant bit for
- * the given mask.
- */
- static int getMSBOffset(int mask) {
- for (int i = 31; i >= 0; i--) {
- if (((mask >> i) & 0x1) != 0)
- return i + 1;
- }
- return 0;
- }
-
- /**
- * Finds the closest match.
- */
- static int closestMatch(int depth, byte red, byte green, byte blue, int redMask, int greenMask, int blueMask, byte[] reds, byte[] greens, byte[] blues) {
- if (depth > 8) {
- int rshift = 32 - getMSBOffset(redMask);
- int gshift = 32 - getMSBOffset(greenMask);
- int bshift = 32 - getMSBOffset(blueMask);
- return (((red << 24) >>> rshift) & redMask) | (((green << 24) >>> gshift) & greenMask) | (((blue << 24) >>> bshift) & blueMask);
- }
- int r, g, b;
- int minDistance = 0x7fffffff;
- int nearestPixel = 0;
- int n = reds.length;
- for (int j = 0; j < n; j++) {
- r = (reds[j] & 0xFF) - (red & 0xFF);
- g = (greens[j] & 0xFF) - (green & 0xFF);
- b = (blues[j] & 0xFF) - (blue & 0xFF);
- int distance = r * r + g * g + b * b;
- if (distance < minDistance) {
- nearestPixel = j;
- if (distance == 0)
- break;
- minDistance = distance;
- }
- }
- return nearestPixel;
- }
-
- static final ImageData convertMask(ImageData mask) {
- if (mask.depth == 1)
- return mask;
- PaletteData palette = new PaletteData(new RGB[] {new RGB(0, 0, 0), new RGB(255, 255, 255)});
- ImageData newMask = new ImageData(mask.width, mask.height, 1, palette);
- /* Find index of black in mask palette */
- int blackIndex = 0;
- RGB[] rgbs = mask.getRGBs();
- if (rgbs != null) {
- while (blackIndex < rgbs.length) {
- if (rgbs[blackIndex].equals(palette.colors[0]))
- break;
- blackIndex++;
- }
- }
- int[] pixels = new int[mask.width];
- for (int y = 0; y < mask.height; y++) {
- mask.getPixels(0, y, mask.width, pixels, 0);
- for (int i = 0; i < pixels.length; i++) {
- if (pixels[i] == blackIndex) {
- pixels[i] = 0;
- } else {
- pixels[i] = 1;
- }
- }
- newMask.setPixels(0, y, mask.width, pixels, 0);
- }
- return newMask;
- }
-
- static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
- if (pad == newPad)
- return data;
- int stride = (width * depth + 7) / 8;
- int bpl = (stride + (pad - 1)) / pad * pad;
- int newBpl = (stride + (newPad - 1)) / newPad * newPad;
- byte[] newData = new byte[height * newBpl];
- int srcIndex = 0, destIndex = 0;
- for (int y = 0; y < height; y++) {
- System.arraycopy(data, srcIndex, newData, destIndex, stride);
- srcIndex += bpl;
- destIndex += newBpl;
- }
- return newData;
- }
-
- /**
- * Blit operation bits to be OR'ed together to specify the desired operation.
- */
- static final int BLIT_SRC = 1, // copy source directly, else applies logic operations
- BLIT_ALPHA = 2, // enable alpha blending
- BLIT_DITHER = 4; // enable dithering in low color modes
-
- /**
- * Alpha mode, values 0 - 255 specify global alpha level
- */
- static final int ALPHA_OPAQUE = 255, // Fully opaque (ignores any alpha data)
- ALPHA_TRANSPARENT = 0, // Fully transparent (ignores any alpha data)
- ALPHA_CHANNEL_SEPARATE = -1, // Use alpha channel from separate alphaData
- ALPHA_CHANNEL_SOURCE = -2, // Use alpha channel embedded in sourceData
- ALPHA_MASK_UNPACKED = -3, // Use transparency mask formed by bytes in alphaData (non-zero is opaque)
- ALPHA_MASK_PACKED = -4, // Use transparency mask formed by packed bits in alphaData
- ALPHA_MASK_INDEX = -5, // Consider source palette indices transparent if in alphaData array
- ALPHA_MASK_RGB = -6; // Consider source RGBs transparent if in RGB888 format alphaData array
-
- /**
- * Byte and bit order constants.
- */
- static final int LSB_FIRST = 0;
- static final int MSB_FIRST = 1;
-
- /**
- * Data types (internal)
- */
- /*
- private static final int
- // direct / true color formats with arbitrary masks & shifts
- TYPE_GENERIC_8 = 0,
- TYPE_GENERIC_16_MSB = 1,
- TYPE_GENERIC_16_LSB = 2,
- TYPE_GENERIC_24 = 3,
- TYPE_GENERIC_32_MSB = 4,
- TYPE_GENERIC_32_LSB = 5,
- // palette indexed color formats
- TYPE_INDEX_8 = 6,
- TYPE_INDEX_4 = 7,
- TYPE_INDEX_2 = 8,
- TYPE_INDEX_1_MSB = 9,
- TYPE_INDEX_1_LSB = 10;
- */
- /**
- * Computes the required channel shift from a mask.
- */
- static int getChannelShift(int mask) {
- if (mask == 0)
- return 0;
- int i;
- for (i = 0; ((mask & 1) == 0) && (i < 32); ++i) {
- mask >>>= 1;
- }
- return i;
- }
-
- /**
- * Computes the required channel width (depth) from a mask.
- */
- static int getChannelWidth(int mask, int shift) {
- if (mask == 0)
- return 0;
- int i;
- mask >>>= shift;
- for (i = shift; ((mask & 1) != 0) && (i < 32); ++i) {
- mask >>>= 1;
- }
- return i - shift;
- }
-
- /**
- * Extracts a field from packed RGB data given a mask for that field.
- */
- static byte getChannelField(int data, int mask) {
- final int shift = getChannelShift(mask);
- return ANY_TO_EIGHT[getChannelWidth(mask, shift)][(data & mask) >>> shift];
- }
-
- /*
- * Fill in dithered gradated values for a color channel
- */
- static final void buildDitheredGradientChannel(int from, int to, int steps, int bandWidth, int bandHeight, boolean vertical, byte[] bitmapData, int dp, int bytesPerLine, int bits) {
- final int mask = 0xff00 >>> bits;
- int val = from << 16;
- final int inc = ((to << 16) - val) / steps + 1;
- if (vertical) {
- for (int dy = 0; dy < bandHeight; ++dy, dp += bytesPerLine) {
- for (int dx = 0, dptr = dp; dx < bandWidth; ++dx, dptr += 4) {
- final int thresh = DITHER_MATRIX[dy & 7][dx] >>> bits;
- int temp = val + thresh;
- if (temp > 0xffffff)
- bitmapData[dptr] = -1;
- else
- bitmapData[dptr] = (byte) ((temp >>> 16) & mask);
- }
- val += inc;
- }
- } else {
- for (int dx = 0; dx < bandWidth; ++dx, dp += 4) {
- for (int dy = 0, dptr = dp; dy < bandHeight; ++dy, dptr += bytesPerLine) {
- final int thresh = DITHER_MATRIX[dy][dx & 7] >>> bits;
- int temp = val + thresh;
- if (temp > 0xffffff)
- bitmapData[dptr] = -1;
- else
- bitmapData[dptr] = (byte) ((temp >>> 16) & mask);
- }
- val += inc;
- }
- }
- }
- }
-
- static class LEDataInputStream extends InputStream {
- int position;
- InputStream in;
-
- /**
- * The byte array containing the bytes to read.
- */
- protected byte[] buf;
-
- /**
- * The current position within the byte array <code>buf</code>. A value
- * equal to buf.length indicates no bytes available. A value of
- * 0 indicates the buffer is full.
- */
- protected int pos;
-
- public LEDataInputStream(InputStream input) {
- this(input, 512);
- }
-
- public LEDataInputStream(InputStream input, int bufferSize) {
- this.in = input;
- if (bufferSize > 0) {
- buf = new byte[bufferSize];
- pos = bufferSize;
- } else
- throw new IllegalArgumentException();
- }
-
- public void close() throws IOException {
- buf = null;
- if (in != null) {
- in.close();
- in = null;
- }
- }
-
- /**
- * Answer how many bytes were read.
- */
- public int getPosition() {
- return position;
- }
-
- /**
- * Answers how many bytes are available for reading without blocking
- */
- public int available() throws IOException {
- if (buf == null)
- throw new IOException();
- return (buf.length - pos) + in.available();
- }
-
- /**
- * Answer the next byte of the input stream.
- */
- public int read() throws IOException {
- if (buf == null)
- throw new IOException();
- position++;
- if (pos < buf.length)
- return (buf[pos++] & 0xFF);
- return in.read();
- }
-
- /**
- * Don't imitate the JDK behaviour of reading a random number
- * of bytes when you can actually read them all.
- */
- public int read(byte b[], int off, int len) throws IOException {
- int result;
- int left = len;
- result = readData(b, off, len);
- while (true) {
- if (result == -1)
- return -1;
- position += result;
- if (result == left)
- return len;
- left -= result;
- off += result;
- result = readData(b, off, left);
- }
- }
-
- /**
- * Reads at most <code>length</code> bytes from this LEDataInputStream and
- * stores them in byte array <code>buffer</code> starting at <code>offset</code>.
- * <p>
- * Answer the number of bytes actually read or -1 if no bytes were read and
- * end of stream was encountered. This implementation reads bytes from
- * the pushback buffer first, then the target stream if more bytes are required
- * to satisfy <code>count</code>.
- * </p>
- * @param buffer the byte array in which to store the read bytes.
- * @param offset the offset in <code>buffer</code> to store the read bytes.
- * @param length the maximum number of bytes to store in <code>buffer</code>.
- *
- * @return int the number of bytes actually read or -1 if end of stream.
- *
- * @exception java.io.IOException if an IOException occurs.
- */
- private int readData(byte[] buffer, int offset, int length) throws IOException {
- if (buf == null)
- throw new IOException();
- if (offset < 0 || offset > buffer.length || length < 0 || (length > buffer.length - offset)) {
- throw new ArrayIndexOutOfBoundsException();
- }
-
- int cacheCopied = 0;
- int newOffset = offset;
-
- // Are there pushback bytes available?
- int available = buf.length - pos;
- if (available > 0) {
- cacheCopied = (available >= length) ? length : available;
- System.arraycopy(buf, pos, buffer, newOffset, cacheCopied);
- newOffset += cacheCopied;
- pos += cacheCopied;
- }
-
- // Have we copied enough?
- if (cacheCopied == length)
- return length;
-
- int inCopied = in.read(buffer, newOffset, length - cacheCopied);
-
- if (inCopied > 0)
- return inCopied + cacheCopied;
- if (cacheCopied == 0)
- return inCopied;
- return cacheCopied;
- }
-
- /**
- * Answer an integer comprised of the next
- * four bytes of the input stream.
- */
- public int readInt() throws IOException {
- byte[] buf = new byte[4];
- read(buf);
- return ((((((buf[3] & 0xFF) << 8) | (buf[2] & 0xFF)) << 8) | (buf[1] & 0xFF)) << 8) | (buf[0] & 0xFF);
- }
-
- /**
- * Answer a short comprised of the next
- * two bytes of the input stream.
- */
- public short readShort() throws IOException {
- byte[] buf = new byte[2];
- read(buf);
- return (short) (((buf[1] & 0xFF) << 8) | (buf[0] & 0xFF));
- }
-
- /**
- * Push back the entire content of the given buffer <code>b</code>.
- * <p>
- * The bytes are pushed so that they would be read back b[0], b[1], etc.
- * If the push back buffer cannot handle the bytes copied from <code>b</code>,
- * an IOException will be thrown and no byte will be pushed back.
- * </p>
- *
- * @param b the byte array containing bytes to push back into the stream
- *
- * @exception java.io.IOException if the pushback buffer is too small
- */
- public void unread(byte[] b) throws IOException {
- int length = b.length;
- if (length > pos)
- throw new IOException();
- position -= length;
- pos -= length;
- System.arraycopy(b, 0, buf, pos, length);
- }
- }
-
- public static abstract class FileFormat {
- LEDataInputStream inputStream;
- ImageLoader loader;
- int compression;
-
- byte[] bitInvertData(byte[] data, int startIndex, int endIndex) {
- // Destructively bit invert data in the given byte array.
- for (int i = startIndex; i < endIndex; i++) {
- data[i] = (byte) (255 - data[i - startIndex]);
- }
- return data;
- }
-
- /**
- * Return whether or not the specified input stream
- * represents a supported file format.
- */
- abstract boolean isFileFormat(LEDataInputStream stream);
-
- abstract ImageData[] loadFromByteStream();
-
- public ImageData[] loadFromStream(LEDataInputStream stream) {
- try {
- inputStream = stream;
- return loadFromByteStream();
- } catch (Exception e) {
- SWT.error(SWT.ERROR_IO, e);
- return null;
- }
- }
-
- public static ImageData[] load(InputStream is, ImageLoader loader) {
- LEDataInputStream stream = new LEDataInputStream(is);
- boolean isSupported = false;
- FileFormat fileFormat = new WinICOFileFormat();
- if (fileFormat.isFileFormat(stream))
- isSupported = true;
- else {
- fileFormat = new WinBMPFileFormat();
- if (fileFormat.isFileFormat(stream))
- isSupported = true;
- }
- if (!isSupported)
- SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);
- fileFormat.loader = loader;
- return fileFormat.loadFromStream(stream);
- }
- }
-
- static class WinBMPFileFormat extends FileFormat {
- static final int BMPFileHeaderSize = 14;
- static final int BMPHeaderFixedSize = 40;
- int importantColors;
-
- void decompressData(byte[] src, byte[] dest, int stride, int cmp) {
- if (cmp == 1) { // BMP_RLE8_COMPRESSION
- if (decompressRLE8Data(src, src.length, stride, dest, dest.length) <= 0)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- return;
- }
- if (cmp == 2) { // BMP_RLE4_COMPRESSION
- if (decompressRLE4Data(src, src.length, stride, dest, dest.length) <= 0)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- return;
- }
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- }
-
- int decompressRLE4Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) {
- int sp = 0;
- int se = numBytes;
- int dp = 0;
- int de = destSize;
- int x = 0, y = 0;
- while (sp < se) {
- int len = src[sp] & 0xFF;
- sp++;
- if (len == 0) {
- len = src[sp] & 0xFF;
- sp++;
- switch (len) {
- case 0 : /* end of line */
- y++;
- x = 0;
- dp = y * stride;
- if (dp >= de)
- return -1;
- break;
- case 1 : /* end of bitmap */
- return 1;
- case 2 : /* delta */
- x += src[sp] & 0xFF;
- sp++;
- y += src[sp] & 0xFF;
- sp++;
- dp = y * stride + x / 2;
- if (dp >= de)
- return -1;
- break;
- default : /* absolute mode run */
- if ((len & 1) != 0) /* odd run lengths not currently supported */
- return -1;
- x += len;
- len = len / 2;
- if (len > (se - sp))
- return -1;
- if (len > (de - dp))
- return -1;
- for (int i = 0; i < len; i++) {
- dest[dp] = src[sp];
- dp++;
- sp++;
- }
- if ((sp & 1) != 0)
- sp++; /* word align sp? */
- break;
- }
- } else {
- if ((len & 1) != 0)
- return -1;
- x += len;
- len = len / 2;
- byte theByte = src[sp];
- sp++;
- if (len > (de - dp))
- return -1;
- for (int i = 0; i < len; i++) {
- dest[dp] = theByte;
- dp++;
- }
- }
- }
- return 1;
- }
-
- int decompressRLE8Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) {
- int sp = 0;
- int se = numBytes;
- int dp = 0;
- int de = destSize;
- int x = 0, y = 0;
- while (sp < se) {
- int len = src[sp] & 0xFF;
- sp++;
- if (len == 0) {
- len = src[sp] & 0xFF;
- sp++;
- switch (len) {
- case 0 : /* end of line */
- y++;
- x = 0;
- dp = y * stride;
- if (dp >= de)
- return -1;
- break;
- case 1 : /* end of bitmap */
- return 1;
- case 2 : /* delta */
- x += src[sp] & 0xFF;
- sp++;
- y += src[sp] & 0xFF;
- sp++;
- dp = y * stride + x;
- if (dp >= de)
- return -1;
- break;
- default : /* absolute mode run */
- if (len > (se - sp))
- return -1;
- if (len > (de - dp))
- return -1;
- for (int i = 0; i < len; i++) {
- dest[dp] = src[sp];
- dp++;
- sp++;
- }
- if ((sp & 1) != 0)
- sp++; /* word align sp? */
- x += len;
- break;
- }
- } else {
- byte theByte = src[sp];
- sp++;
- if (len > (de - dp))
- return -1;
- for (int i = 0; i < len; i++) {
- dest[dp] = theByte;
- dp++;
- }
- x += len;
- }
- }
- return 1;
- }
-
- boolean isFileFormat(LEDataInputStream stream) {
- try {
- byte[] header = new byte[18];
- stream.read(header);
- stream.unread(header);
- int infoHeaderSize = (header[14] & 0xFF) | ((header[15] & 0xFF) << 8) | ((header[16] & 0xFF) << 16) | ((header[17] & 0xFF) << 24);
- return header[0] == 0x42 && header[1] == 0x4D && infoHeaderSize >= BMPHeaderFixedSize;
- } catch (Exception e) {
- return false;
- }
- }
-
- byte[] loadData(byte[] infoHeader) {
- int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
- int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
- int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
- int stride = (width * bitCount + 7) / 8;
- stride = (stride + 3) / 4 * 4; // Round up to 4 byte multiple
- byte[] data = loadData(infoHeader, stride);
- flipScanLines(data, stride, height);
- return data;
- }
-
- byte[] loadData(byte[] infoHeader, int stride) {
- int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
- int dataSize = height * stride;
- byte[] data = new byte[dataSize];
- int cmp = (infoHeader[16] & 0xFF) | ((infoHeader[17] & 0xFF) << 8) | ((infoHeader[18] & 0xFF) << 16) | ((infoHeader[19] & 0xFF) << 24);
- if (cmp == 0) { // BMP_NO_COMPRESSION
- try {
- if (inputStream.read(data) != dataSize)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- } else {
- int compressedSize = (infoHeader[20] & 0xFF) | ((infoHeader[21] & 0xFF) << 8) | ((infoHeader[22] & 0xFF) << 16) | ((infoHeader[23] & 0xFF) << 24);
- byte[] compressed = new byte[compressedSize];
- try {
- if (inputStream.read(compressed) != compressedSize)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- decompressData(compressed, data, stride, cmp);
- }
- return data;
- }
-
- int[] loadFileHeader() {
- int[] header = new int[5];
- try {
- header[0] = inputStream.readShort();
- header[1] = inputStream.readInt();
- header[2] = inputStream.readShort();
- header[3] = inputStream.readShort();
- header[4] = inputStream.readInt();
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- if (header[0] != 0x4D42)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- return header;
- }
-
- ImageData[] loadFromByteStream() {
- int[] fileHeader = loadFileHeader();
- byte[] infoHeader = new byte[BMPHeaderFixedSize];
- try {
- inputStream.read(infoHeader);
- } catch (Exception e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
- int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
- int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
- PaletteData palette = loadPalette(infoHeader);
- if (inputStream.getPosition() < fileHeader[4]) {
- // Seek to the specified offset
- try {
- inputStream.skip(fileHeader[4] - inputStream.getPosition());
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- }
- byte[] data = loadData(infoHeader);
- this.compression = (infoHeader[16] & 0xFF) | ((infoHeader[17] & 0xFF) << 8) | ((infoHeader[18] & 0xFF) << 16) | ((infoHeader[19] & 0xFF) << 24);
- this.importantColors = (infoHeader[36] & 0xFF) | ((infoHeader[37] & 0xFF) << 8) | ((infoHeader[38] & 0xFF) << 16) | ((infoHeader[39] & 0xFF) << 24);
- // int xPelsPerMeter = (infoHeader[24] & 0xFF) | ((infoHeader[25] & 0xFF) << 8) | ((infoHeader[26] & 0xFF) << 16) | ((infoHeader[27] & 0xFF) << 24);
- // int yPelsPerMeter = (infoHeader[28] & 0xFF) | ((infoHeader[29] & 0xFF) << 8) | ((infoHeader[30] & 0xFF) << 16) | ((infoHeader[31] & 0xFF) << 24);
- int type = (this.compression == 1 /*BMP_RLE8_COMPRESSION*/) || (this.compression == 2 /*BMP_RLE4_COMPRESSION*/) ? SWT.IMAGE_BMP_RLE : SWT.IMAGE_BMP;
- return new ImageData[] {ImageData.internal_new(width, height, bitCount, palette, 4, data, 0, null, null, -1, -1, type, 0, 0, 0, 0)};
- }
-
- PaletteData loadPalette(byte[] infoHeader) {
- int depth = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
- if (depth <= 8) {
- int numColors = (infoHeader[32] & 0xFF) | ((infoHeader[33] & 0xFF) << 8) | ((infoHeader[34] & 0xFF) << 16) | ((infoHeader[35] & 0xFF) << 24);
- if (numColors == 0) {
- numColors = 1 << depth;
- } else {
- if (numColors > 256)
- numColors = 256;
- }
- byte[] buf = new byte[numColors * 4];
- try {
- if (inputStream.read(buf) != buf.length)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- return paletteFromBytes(buf, numColors);
- }
- if (depth == 16)
- return new PaletteData(0x7C00, 0x3E0, 0x1F);
- if (depth == 24)
- return new PaletteData(0xFF, 0xFF00, 0xFF0000);
- return new PaletteData(0xFF00, 0xFF0000, 0xFF000000);
- }
-
- PaletteData paletteFromBytes(byte[] bytes, int numColors) {
- int bytesOffset = 0;
- RGB[] colors = new RGB[numColors];
- for (int i = 0; i < numColors; i++) {
- colors[i] = new RGB(bytes[bytesOffset + 2] & 0xFF, bytes[bytesOffset + 1] & 0xFF, bytes[bytesOffset] & 0xFF);
- bytesOffset += 4;
- }
- return new PaletteData(colors);
- }
-
- /**
- * Answer a byte array containing the BMP representation of
- * the given device independent palette.
- */
- static byte[] paletteToBytes(PaletteData pal) {
- int n = pal.colors == null ? 0 : (pal.colors.length < 256 ? pal.colors.length : 256);
- byte[] bytes = new byte[n * 4];
- int offset = 0;
- for (int i = 0; i < n; i++) {
- RGB col = pal.colors[i];
- bytes[offset] = (byte) col.blue;
- bytes[offset + 1] = (byte) col.green;
- bytes[offset + 2] = (byte) col.red;
- offset += 4;
- }
- return bytes;
- }
-
- void flipScanLines(byte[] data, int stride, int height) {
- int i1 = 0;
- int i2 = (height - 1) * stride;
- for (int i = 0; i < height / 2; i++) {
- for (int index = 0; index < stride; index++) {
- byte b = data[index + i1];
- data[index + i1] = data[index + i2];
- data[index + i2] = b;
- }
- i1 += stride;
- i2 -= stride;
- }
- }
-
- }
-
- static class WinICOFileFormat extends FileFormat {
-
- static final byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad) {
- if (pad == newPad)
- return data;
- int stride = (width * depth + 7) / 8;
- int bpl = (stride + (pad - 1)) / pad * pad;
- int newBpl = (stride + (newPad - 1)) / newPad * newPad;
- byte[] newData = new byte[height * newBpl];
- int srcIndex = 0, destIndex = 0;
- for (int y = 0; y < height; y++) {
- System.arraycopy(data, srcIndex, newData, destIndex, newBpl);
- srcIndex += bpl;
- destIndex += newBpl;
- }
- return newData;
- }
-
- /**
- * Answer the size in bytes of the file representation of the given
- * icon
- */
- int iconSize(ImageData i) {
- int shapeDataStride = (i.width * i.depth + 31) / 32 * 4;
- int maskDataStride = (i.width + 31) / 32 * 4;
- int dataSize = (shapeDataStride + maskDataStride) * i.height;
- int paletteSize = i.palette.colors != null ? i.palette.colors.length * 4 : 0;
- return WinBMPFileFormat.BMPHeaderFixedSize + paletteSize + dataSize;
- }
-
- boolean isFileFormat(LEDataInputStream stream) {
- try {
- byte[] header = new byte[4];
- stream.read(header);
- stream.unread(header);
- return header[0] == 0 && header[1] == 0 && header[2] == 1 && header[3] == 0;
- } catch (Exception e) {
- return false;
- }
- }
-
- boolean isValidIcon(ImageData i) {
- switch (i.depth) {
- case 1 :
- case 4 :
- case 8 :
- if (i.palette.isDirect)
- return false;
- int size = i.palette.colors.length;
- return size == 2 || size == 16 || size == 32 || size == 256;
- case 24 :
- case 32 :
- return i.palette.isDirect;
- }
- return false;
- }
-
- int loadFileHeader(LEDataInputStream byteStream) {
- int[] fileHeader = new int[3];
- try {
- fileHeader[0] = byteStream.readShort();
- fileHeader[1] = byteStream.readShort();
- fileHeader[2] = byteStream.readShort();
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- if ((fileHeader[0] != 0) || (fileHeader[1] != 1))
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- int numIcons = fileHeader[2];
- if (numIcons <= 0)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- return numIcons;
- }
-
- int loadFileHeader(LEDataInputStream byteStream, boolean hasHeader) {
- int[] fileHeader = new int[3];
- try {
- if (hasHeader) {
- fileHeader[0] = byteStream.readShort();
- fileHeader[1] = byteStream.readShort();
- } else {
- fileHeader[0] = 0;
- fileHeader[1] = 1;
- }
- fileHeader[2] = byteStream.readShort();
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- if ((fileHeader[0] != 0) || (fileHeader[1] != 1))
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- int numIcons = fileHeader[2];
- if (numIcons <= 0)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- return numIcons;
- }
-
- ImageData[] loadFromByteStream() {
- int numIcons = loadFileHeader(inputStream);
- int[][] headers = loadIconHeaders(numIcons);
- ImageData[] icons = new ImageData[headers.length];
- for (int i = 0; i < icons.length; i++) {
- icons[i] = loadIcon(headers[i]);
- }
- return icons;
- }
-
- /**
- * Load one icon from the byte stream.
- */
- ImageData loadIcon(int[] iconHeader) {
- byte[] infoHeader = loadInfoHeader(iconHeader);
- WinBMPFileFormat bmpFormat = new WinBMPFileFormat();
- bmpFormat.inputStream = inputStream;
- PaletteData palette = bmpFormat.loadPalette(infoHeader);
- byte[] shapeData = bmpFormat.loadData(infoHeader);
- int width = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
- int height = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
- int depth = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
- infoHeader[14] = 1;
- infoHeader[15] = 0;
- byte[] maskData = bmpFormat.loadData(infoHeader);
- maskData = convertPad(maskData, width, height, 1, 4, 2);
- bitInvertData(maskData, 0, maskData.length);
- return ImageData.internal_new(width, height, depth, palette, 4, shapeData, 2, maskData, null, -1, -1, SWT.IMAGE_ICO, 0, 0, 0, 0);
- }
-
- int[][] loadIconHeaders(int numIcons) {
- int[][] headers = new int[numIcons][7];
- try {
- for (int i = 0; i < numIcons; i++) {
- headers[i][0] = inputStream.read();
- headers[i][1] = inputStream.read();
- headers[i][2] = inputStream.readShort();
- headers[i][3] = inputStream.readShort();
- headers[i][4] = inputStream.readShort();
- headers[i][5] = inputStream.readInt();
- headers[i][6] = inputStream.readInt();
- }
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- return headers;
- }
-
- byte[] loadInfoHeader(int[] iconHeader) {
- int width = iconHeader[0];
- int height = iconHeader[1];
- int numColors = iconHeader[2]; // the number of colors is in the low byte, but the high byte must be 0
- if (numColors == 0)
- numColors = 256; // this is specified: '00' represents '256' (0x100) colors
- if ((numColors != 2) && (numColors != 8) && (numColors != 16) && (numColors != 32) && (numColors != 256))
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- if (inputStream.getPosition() < iconHeader[6]) {
- // Seek to the specified offset
- try {
- inputStream.skip(iconHeader[6] - inputStream.getPosition());
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- return null;
- }
- }
- byte[] infoHeader = new byte[WinBMPFileFormat.BMPHeaderFixedSize];
- try {
- inputStream.read(infoHeader);
- } catch (IOException e) {
- SWT.error(SWT.ERROR_IO, e);
- }
- if (((infoHeader[12] & 0xFF) | ((infoHeader[13] & 0xFF) << 8)) != 1)
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- int infoWidth = (infoHeader[4] & 0xFF) | ((infoHeader[5] & 0xFF) << 8) | ((infoHeader[6] & 0xFF) << 16) | ((infoHeader[7] & 0xFF) << 24);
- int infoHeight = (infoHeader[8] & 0xFF) | ((infoHeader[9] & 0xFF) << 8) | ((infoHeader[10] & 0xFF) << 16) | ((infoHeader[11] & 0xFF) << 24);
- int bitCount = (infoHeader[14] & 0xFF) | ((infoHeader[15] & 0xFF) << 8);
- if (height == infoHeight && bitCount == 1)
- height /= 2;
- if (!((width == infoWidth) && (height * 2 == infoHeight) && (bitCount == 1 || bitCount == 4 || bitCount == 8 || bitCount == 24 || bitCount == 32)))
- SWT.error(SWT.ERROR_INVALID_IMAGE);
- infoHeader[8] = (byte) (height & 0xFF);
- infoHeader[9] = (byte) ((height >> 8) & 0xFF);
- infoHeader[10] = (byte) ((height >> 16) & 0xFF);
- infoHeader[11] = (byte) ((height >> 24) & 0xFF);
- return infoHeader;
- }
- }
-
- static class SWT {
- public static final int IMAGE_ICO = 3;
- public static final int ERROR_IO = 39;
- public static final int ERROR_INVALID_IMAGE = 40;
- public static final int ERROR_NULL_ARGUMENT = 4;
- public static final int ERROR_INVALID_ARGUMENT = 5;
- public static final int ERROR_CANNOT_BE_ZERO = 7;
- public static final int IMAGE_UNDEFINED = -1;
- public static final int ERROR_UNSUPPORTED_DEPTH = 38;
- public static final int TRANSPARENCY_MASK = 1 << 1;
- public static final int ERROR_UNSUPPORTED_FORMAT = 42;
- public static final int TRANSPARENCY_ALPHA = 1 << 0;
- public static final int TRANSPARENCY_NONE = 0x0;
- public static final int TRANSPARENCY_PIXEL = 1 << 2;
- public static final int IMAGE_BMP = 0;
- public static final int IMAGE_BMP_RLE = 1;
-
- public static void error(int code) {
- throw new RuntimeException("Error " + code); //$NON-NLS-1$
- }
-
- public static void error(int code, Throwable t) {
- throw new RuntimeException(t);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java
deleted file mode 100644
index 457323fc7..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractAdvice.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-
-public class AbstractAdvice implements IPublisherAdvice {
-
- public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version) {
- return matchConfig(configSpec, includeDefault) && matchId(id) && matchVersion(version);
- }
-
- protected boolean matchVersion(Version version) {
- if (version == null)
- return true;
- Version adviceVersion = getVersion();
- if (adviceVersion != null)
- return version.equals(adviceVersion);
- VersionRange range = getVersionRange();
- if (range != null)
- return range.isIncluded(version);
- return true;
- }
-
- protected Version getVersion() {
- return null;
- }
-
- protected VersionRange getVersionRange() {
- return null;
- }
-
- protected boolean matchId(String id) {
- if (id == null)
- return true;
- String adviceId = getId();
- return adviceId == null ? true : adviceId.equals(id);
- }
-
- protected String getId() {
- return null;
- }
-
- protected boolean matchConfig(String configSpec, boolean includeDefault) {
- String adviceConfigSpec = getConfigSpec();
- if (adviceConfigSpec == null)
- return includeDefault;
- String[] full = AbstractPublisherAction.parseConfigSpec(configSpec);
- String[] partial = AbstractPublisherAction.parseConfigSpec(adviceConfigSpec);
- for (int i = 0; i < partial.length; i++) {
- String string = partial[i];
- if (string != null && !string.equals(full[i]))
- return false;
- }
- return true;
- }
-
- protected String getConfigSpec() {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
deleted file mode 100644
index 77c6e0681..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherAction.java
+++ /dev/null
@@ -1,552 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.io.*;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactDescriptor;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.QuotedTokenizer;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.actions.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-
-public abstract class AbstractPublisherAction implements IPublisherAction {
- public static final String CONFIG_ANY = "ANY"; //$NON-NLS-1$
- public static final String CONFIG_SEGMENT_SEPARATOR = "."; //$NON-NLS-1$
-
- protected IPublisherInfo info;
-
- /**
- * Convert a list of tokens into an array. The list separator has to be
- * specified.
- */
- public static String[] getArrayFromString(String list, String separator) {
- if (list == null || list.trim().equals("")) //$NON-NLS-1$
- return new String[0];
- List<String> result = new ArrayList<String>();
- for (QuotedTokenizer tokens = new QuotedTokenizer(list, separator); tokens.hasMoreTokens();) {
- String token = tokens.nextToken().trim();
- if (!token.equals("")) //$NON-NLS-1$
- result.add(token);
- }
- return result.toArray(new String[result.size()]);
- }
-
- /**
- * Returns a string array of { ws, os, arch } as parsed from the given string
- * @param configSpec the string to parse
- * @return the ws, os, arch form of the given string
- */
- public static String[] parseConfigSpec(String configSpec) {
- String[] result = getArrayFromString(configSpec, CONFIG_SEGMENT_SEPARATOR);
- for (int i = 0; i < result.length; i++)
- if (result[i].equals("*")) //$NON-NLS-1$
- result[i] = CONFIG_ANY;
-
- if (result.length < 3) {
- String[] temp = new String[3];
- System.arraycopy(result, 0, temp, 0, result.length);
- for (int i = result.length; i < temp.length; i++) {
- temp[i] = CONFIG_ANY;
- }
- result = temp;
- }
- return result;
- }
-
- /**
- * Returns the canonical form of config spec with the given ws, os and arch.
- * Note that the result is intended to be machine readable (i.e., parseConfigSpec
- * will parse the the result).
- * @param ws the window system
- * @param os the operating system
- * @param arch the machine architecture
- * @return the machine readable format of the given config spec
- */
- public static String createConfigSpec(String ws, String os, String arch) {
- return ws + '.' + os + '.' + arch;
- }
-
- protected void addSelfCapability(InstallableUnitDescription root) {
- root.setCapabilities(new IProvidedCapability[] {createSelfCapability(root.getId(), root.getVersion())});
- }
-
- /**
- * Returns the LDAP filter form that matches the given config spec. Returns
- * an empty String if the spec does not identify an ws, os or arch.
- * @param configSpec a config spec to filter
- * @return the LDAP filter for the given spec. <code>null</code> if the given spec does not
- * parse into a filter.
- */
- protected IMatchExpression<IInstallableUnit> createFilterSpec(String configSpec) {
- String[] config = parseConfigSpec(configSpec);
- if (config[0] != null || config[1] != null || config[2] != null) {
- String filterWs = config[0] != null && config[0] != CONFIG_ANY ? "(osgi.ws=" + config[0] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String filterOs = config[1] != null && config[1] != CONFIG_ANY ? "(osgi.os=" + config[1] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- String filterArch = config[2] != null && config[2] != CONFIG_ANY ? "(osgi.arch=" + config[2] + ")" : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (filterWs.length() == 0 && filterOs.length() == 0 && filterArch.length() == 0)
- return null;
- return InstallableUnit.parseFilter("(& " + filterWs + filterOs + filterArch + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return null;
- }
-
- protected boolean filterMatches(IMatchExpression<IInstallableUnit> filter, String configSpec) {
- if (filter == null)
- return true;
-
- String[] config = parseConfigSpec(configSpec);
- return filter.isMatch(InstallableUnit.contextIU(config[0], config[1], config[2]));
- }
-
- /**
- * Returns the normalized string form of the given config spec. This is useful for putting
- * in IU ids etc. Note that the result is not intended to be machine readable (i.e., parseConfigSpec
- * may not work on the result).
- * @param configSpec the config spec to format
- * @return the readable format of the given config spec
- */
- protected String createIdString(String configSpec) {
- String[] config = parseConfigSpec(configSpec);
- return config[0] + '.' + config[1] + '.' + config[2];
- }
-
- protected String createCUIdString(String id, String type, String flavor, String configSpec) {
- return flavor + id + "." + type + "." + createIdString(configSpec); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Creates and returns a collection of RequiredCapabilities for the IUs represented
- * by the given collection. The collection may include a mixture of IInstallableUnits
- * or VersionedNames.
- * @param children descriptions of the IUs on which requirements are to be made
- * @return a collection of RequiredCapabilities representing the given IUs
- */
- protected Collection<IRequirement> createIURequirements(Collection<? extends IVersionedId> children) {
- ArrayList<IRequirement> result = new ArrayList<IRequirement>(children.size());
- for (IVersionedId next : children) {
- if (next instanceof IInstallableUnit) {
- IInstallableUnit iu = (IInstallableUnit) next;
- VersionRange range = new VersionRange(iu.getVersion(), true, iu.getVersion(), true);
- result.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, iu.getFilter() == null ? null : iu.getFilter(), false, false));
- } else {
- Version version = next.getVersion();
- VersionRange range = (version == null || Version.emptyVersion.equals(version)) ? VersionRange.emptyRange : new VersionRange(version, true, version, true);
- IMatchExpression<IInstallableUnit> filter = getFilterAdvice(next);
- result.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, next.getId(), range, filter, false, false));
- }
- }
- return result;
- }
-
- private IMatchExpression<IInstallableUnit> getFilterAdvice(IVersionedId name) {
- if (info == null)
- return null;
- Collection<IFilterAdvice> filterAdvice = info.getAdvice(CONFIG_ANY, true, name.getId(), name.getVersion(), IFilterAdvice.class);
- for (IFilterAdvice advice : filterAdvice) {
- IMatchExpression<IInstallableUnit> result = advice.getFilter(name.getId(), name.getVersion(), false);
- if (result != null)
- return result;
- }
- return null;
- }
-
- protected InstallableUnitDescription createIUShell(String id, Version version) {
- InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription();
- root.setId(id);
- root.setVersion(version);
- return root;
- }
-
- protected IArtifactDescriptor createPack200ArtifactDescriptor(IArtifactKey key, File pathOnDisk, String installSize) {
- //TODO this size calculation is bogus
- ArtifactDescriptor result = new ArtifactDescriptor(key);
- if (pathOnDisk != null) {
- result.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, installSize);
- // TODO - this is wrong but I'm testing a work-around for bug 205842
- result.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
- }
- IProcessingStepDescriptor[] steps = new IProcessingStepDescriptor[] {new ProcessingStepDescriptor("org.eclipse.equinox.p2.processing.Pack200Unpacker", null, true)}; //$NON-NLS-1$
- result.setProcessingSteps(steps);
- result.setProperty(IArtifactDescriptor.FORMAT, IArtifactDescriptor.FORMAT_PACKED);
- return result;
- }
-
- protected InstallableUnitDescription createParentIU(Collection<? extends IVersionedId> children, String id, Version version) {
- InstallableUnitDescription root = createIUShell(id, version);
- root.addRequirements(createIURequirements(children));
- addSelfCapability(root);
- return root;
- }
-
- //This is to hide FileUtils from other actions
- protected IPathComputer createParentPrefixComputer(int segmentsToKeep) {
- return FileUtils.createParentPrefixComputer(segmentsToKeep);
- }
-
- //This is to hide FileUtils from other actions
- protected IPathComputer createRootPrefixComputer(final File root) {
- return FileUtils.createRootPathComputer(root);
- }
-
- protected IProvidedCapability createSelfCapability(String installableUnitId, Version installableUnitVersion) {
- return MetadataFactory.createProvidedCapability(PublisherHelper.IU_NAMESPACE, installableUnitId, installableUnitVersion);
- }
-
- protected static InstallableUnitDescription[] processAdditionalInstallableUnitsAdvice(IInstallableUnit iu, IPublisherInfo publisherInfo) {
- Collection<IAdditionalInstallableUnitAdvice> advice = publisherInfo.getAdvice(null, false, iu.getId(), iu.getVersion(), IAdditionalInstallableUnitAdvice.class);
- if (advice.isEmpty())
- return null;
-
- List<InstallableUnitDescription> ius = new ArrayList<InstallableUnitDescription>();
- for (IAdditionalInstallableUnitAdvice entry : advice) {
- InstallableUnitDescription[] others = entry.getAdditionalInstallableUnitDescriptions(iu);
- if (others != null)
- ius.addAll(Arrays.asList(others));
- }
- return ius.toArray(new InstallableUnitDescription[ius.size()]);
- }
-
- /**
- * Add all of the advised artifact properties for the given IU and artifact descriptor.
- * @param iu the IU
- * @param descriptor the descriptor to decorate
- * @param info the publisher info supplying the advice
- */
- protected static void processArtifactPropertiesAdvice(IInstallableUnit iu, IArtifactDescriptor descriptor, IPublisherInfo info) {
- if (!(descriptor instanceof SimpleArtifactDescriptor))
- return;
-
- Collection<IPropertyAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
- for (IPropertyAdvice entry : advice) {
- Map<String, String> props = entry.getArtifactProperties(iu, descriptor);
- if (props == null)
- continue;
- for (Entry<String, String> pe : props.entrySet()) {
- ((SimpleArtifactDescriptor) descriptor).setRepositoryProperty(pe.getKey(), pe.getValue());
- }
- }
- }
-
- /**
- * Add all of the advised IU properties for the given IU.
- * @param iu the IU to decorate
- * @param info the publisher info supplying the advice
- */
- protected static void processInstallableUnitPropertiesAdvice(InstallableUnitDescription iu, IPublisherInfo info) {
- Collection<IPropertyAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IPropertyAdvice.class);
- for (IPropertyAdvice entry : advice) {
- Map<String, String> props = entry.getInstallableUnitProperties(iu);
- if (props == null)
- continue;
- for (Entry<String, String> pe : props.entrySet()) {
- iu.setProperty(pe.getKey(), pe.getValue());
- }
- }
- }
-
- /**
- * Add any update descriptor advice to the given IU
- * @param iu the IU to decorate
- * @param info the publisher info supplying the advice
- */
- protected static void processUpdateDescriptorAdvice(InstallableUnitDescription iu, IPublisherInfo info) {
- Collection<IUpdateDescriptorAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), IUpdateDescriptorAdvice.class);
-
- if (advice.isEmpty())
- return;
-
- for (IUpdateDescriptorAdvice entry : advice) {
- //process the IU Descriptor
- IUpdateDescriptor updateDescriptor = entry.getUpdateDescriptor(iu);
- if (updateDescriptor != null) {
- iu.setUpdateDescriptor(updateDescriptor);
- }
- }
- }
-
- /**
- * Add all of the advised provided and required capabilities for the given installable unit.
- * @param iu the IU to decorate
- * @param info the publisher info supplying the advice
- */
- protected static void processCapabilityAdvice(InstallableUnitDescription iu, IPublisherInfo info) {
- Collection<ICapabilityAdvice> advice = info.getAdvice(null, false, iu.getId(), iu.getVersion(), ICapabilityAdvice.class);
- if (advice.isEmpty())
- return;
-
- for (ICapabilityAdvice entry : advice) {
- //process required capabilities
- IRequirement[] requiredAdvice = entry.getRequiredCapabilities(iu);
- if (requiredAdvice != null) {
- List<IRequirement> current = iu.getRequirements();
- Set<IRequirement> resultRequiredCapabilities = new HashSet<IRequirement>(current);
-
- // remove current required capabilities that match (same name and namespace) advice.
- for (int j = 0; j < current.size(); j++) {
- IRequirement curr = current.get(j);
- IRequiredCapability currentRequiredCapability = null;
- if (curr instanceof IRequiredCapability)
- currentRequiredCapability = (IRequiredCapability) curr;
- else
- continue;
- for (int k = 0; k < requiredAdvice.length; k++) {
- IRequiredCapability requiredCapability = null;
- if (requiredAdvice[k] instanceof IRequiredCapability)
- requiredCapability = (IRequiredCapability) requiredAdvice[k];
- else
- continue;
- if (requiredCapability.getNamespace().equals(currentRequiredCapability.getNamespace()) && requiredCapability.getName().equals(currentRequiredCapability.getName())) {
- resultRequiredCapabilities.remove(currentRequiredCapability);
- break;
- }
- }
- }
- // add all advice
- resultRequiredCapabilities.addAll(Arrays.asList(requiredAdvice));
- iu.setRequirements(resultRequiredCapabilities.toArray(new IRequirement[resultRequiredCapabilities.size()]));
- }
-
- //process meta required capabilities
- IRequirement[] metaRequiredAdvice = entry.getMetaRequiredCapabilities(iu);
- if (metaRequiredAdvice != null) {
- Collection<IRequirement> current = iu.getMetaRequirements();
- Set<IRequirement> resultMetaRequiredCapabilities = new HashSet<IRequirement>(current);
-
- // remove current meta-required capabilities that match (same name and namespace) advice.
- for (IRequirement curr : current) {
- IRequiredCapability currentMetaRequiredCapability = null;
- if (curr instanceof IRequiredCapability)
- currentMetaRequiredCapability = (IRequiredCapability) curr;
- else
- continue;
- for (int k = 0; k < metaRequiredAdvice.length; k++) {
- IRequiredCapability metaRequiredCapability = null;
- if (metaRequiredAdvice[k] instanceof IRequiredCapability)
- metaRequiredCapability = (IRequiredCapability) metaRequiredAdvice[k];
- else
- continue;
- if (metaRequiredCapability.getNamespace().equals(currentMetaRequiredCapability.getNamespace()) && metaRequiredCapability.getName().equals(currentMetaRequiredCapability.getName())) {
- resultMetaRequiredCapabilities.remove(currentMetaRequiredCapability);
- break;
- }
- }
- }
-
- // add all advice
- resultMetaRequiredCapabilities.addAll(Arrays.asList(metaRequiredAdvice));
- iu.setMetaRequirements(resultMetaRequiredCapabilities.toArray(new IRequirement[resultMetaRequiredCapabilities.size()]));
- }
-
- //process provided capabilities
- IProvidedCapability[] providedAdvice = entry.getProvidedCapabilities(iu);
- if (providedAdvice != null) {
- Collection<IProvidedCapability> current = iu.getProvidedCapabilities();
- Set<IProvidedCapability> resultProvidedCapabilities = new HashSet<IProvidedCapability>(current);
- for (IProvidedCapability currentProvidedCapability : current) {
- for (int k = 0; k < providedAdvice.length; k++) {
- IProvidedCapability providedCapability = providedAdvice[k];
- if (providedCapability.getNamespace().equals(currentProvidedCapability.getNamespace()) && providedCapability.getName().equals(currentProvidedCapability.getName())) {
- resultProvidedCapabilities.remove(currentProvidedCapability);
- break;
- }
- }
- }
- resultProvidedCapabilities.addAll(Arrays.asList(providedAdvice));
- iu.setCapabilities(resultProvidedCapabilities.toArray(new IProvidedCapability[resultProvidedCapabilities.size()]));
- }
- }
- }
-
- /**
- * Adds all applicable touchpoint advice to the given installable unit.
- * @param iu The installable unit to add touchpoint advice to
- * @param currentInstructions The set of touchpoint instructions assembled for this IU so far
- * @param info The publisher info
- */
- protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info) {
- processTouchpointAdvice(iu, currentInstructions, info, null);
- }
-
- protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info, String configSpec) {
- Collection<ITouchpointAdvice> advice = info.getAdvice(configSpec, false, iu.getId(), iu.getVersion(), ITouchpointAdvice.class);
- if (currentInstructions == null) {
- if (advice == null || advice.isEmpty())
- return;
- currentInstructions = CollectionUtils.emptyMap();
- }
-
- ITouchpointData result = MetadataFactory.createTouchpointData(currentInstructions);
- if (advice != null) {
- for (ITouchpointAdvice entry : advice) {
- result = entry.getTouchpointData(result);
- }
- }
- iu.addTouchpointData(result);
- }
-
- /**
- * Publishes the artifact by zipping the <code>files</code> using <code>root</code>
- * as a base for relative paths. Then copying the zip into the repository.
- * @param descriptor used to identify the zip.
- * @param inclusion the file to be published. files can be <code>null</code> but no action is taken.
- * @param publisherInfo the publisher info.
- */
- protected void publishArtifact(IArtifactDescriptor descriptor, File inclusion, IPublisherInfo publisherInfo) {
- // no files to publish so this is done.
- if (inclusion == null)
- return;
- // if the destination already contains the descriptor, there is nothing to do.
- IArtifactRepository destination = publisherInfo.getArtifactRepository();
- if (destination == null || destination.contains(descriptor))
- return;
-
- // if all we are doing is indexing things then add the descriptor and get on with it
- if ((publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) == 0) {
- destination.addDescriptor(descriptor);
- return;
- }
-
- // if the file is already in the same location the repo will put it, just add the descriptor and exit
- if (destination instanceof IFileArtifactRepository) {
- File descriptorFile = ((IFileArtifactRepository) destination).getArtifactFile(descriptor);
- if (inclusion.equals(descriptorFile)) {
- destination.addDescriptor(descriptor);
- return;
- }
- }
-
- try {
- OutputStream output = destination.getOutputStream(descriptor);
- if (output == null)
- return;
- output = new BufferedOutputStream(output);
- FileUtils.copyStream(new BufferedInputStream(new FileInputStream(inclusion)), true, output, true);
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
- }
- }
-
- /**
- * Publishes the artifact by zipping the <code>files</code> using <code>root</code>
- * as a base for relative paths. Then copying the zip into the repository.
- * @param descriptor used to identify the zip.
- * @param inclusions and folders to be included in the zip. files can be null.
- * @param exclusions and folders to be excluded in the zip. files can be null.
- * @param publisherInfo the publisher info.
- * @param prefixComputer
- */
- protected void publishArtifact(IArtifactDescriptor descriptor, File[] inclusions, File[] exclusions, IPublisherInfo publisherInfo, IPathComputer prefixComputer) {
- // no files to publish so this is done.
- if (inclusions == null || inclusions.length < 1)
- return;
- // if the destination already contains the descriptor, there is nothing to do.
- IArtifactRepository destination = publisherInfo.getArtifactRepository();
- if (destination == null || destination.contains(descriptor))
- return;
- // if all we are doing is indexing things then add the descriptor and get on with it
- if ((publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) == 0) {
- destination.addDescriptor(descriptor);
- return;
- }
-
- // TODO need to implement the overwrite story in the repos
- // boolean overwrite = (info.getArtifactOptions() & IPublisherInfo.A_OVERWRITE) > 0;
- // if there is just one file and the mode is as-is, just copy the file into the repo
- // otherwise, zip up the files and copy the zip into the repo
- File tempFile = null;
- try {
- OutputStream output = destination.getOutputStream(descriptor);
- if (output == null)
- return;
- output = new BufferedOutputStream(output);
- tempFile = File.createTempFile("p2.generator", ""); //$NON-NLS-1$ //$NON-NLS-2$
- FileUtils.zip(inclusions, exclusions, tempFile, prefixComputer);
- if (output != null)
- FileUtils.copyStream(new BufferedInputStream(new FileInputStream(tempFile)), true, output, true);
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error publishing artifacts", e)); //$NON-NLS-1$
- e.printStackTrace();
- } finally {
- if (tempFile != null)
- tempFile.delete();
- }
- }
-
- /**
- * Loop over the known metadata repositories looking for the given IU.
- * Return the first IU found.
- * @param iuId the id of the IU to look for
- * @return the first matching IU or <code>null</code> if none.
- */
- protected IInstallableUnit queryForIU(IPublisherResult publisherResult, String iuId, Version version) {
- IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(iuId, version);
- if (version == null || Version.emptyVersion.equals(version))
- query = QueryUtil.createLatestQuery(query);
-
- IQueryResult<IInstallableUnit> collector = Collector.emptyCollector();
- NullProgressMonitor progress = new NullProgressMonitor();
- if (publisherResult != null)
- collector = publisherResult.query(query, progress);
- if (collector.isEmpty() && info.getMetadataRepository() != null)
- collector = info.getMetadataRepository().query(query, progress);
- if (collector.isEmpty() && info.getContextMetadataRepository() != null)
- collector = info.getContextMetadataRepository().query(query, progress);
- if (!collector.isEmpty())
- return collector.iterator().next();
- return null;
- }
-
- /**
- * Loop over the known metadata repositories looking for the given IU within a particular range
- * @param publisherResult
- * @param iuId the id of the IU to look for
- * @param versionRange the version range to consider
- * @return The the IUs with the matching ids in the given range
- */
- protected IQueryResult<IInstallableUnit> queryForIUs(IPublisherResult publisherResult, String iuId, VersionRange versionRange) {
- IQuery<IInstallableUnit> query = null;
- IQueryResult<IInstallableUnit> queryResult = Collector.emptyCollector();
- query = QueryUtil.createIUQuery(iuId, versionRange);
- NullProgressMonitor progress = new NullProgressMonitor();
- if (publisherResult != null)
- queryResult = publisherResult.query(query, progress);
- if (queryResult.isEmpty() && info.getMetadataRepository() != null)
- queryResult = info.getMetadataRepository().query(query, progress);
- if (queryResult.isEmpty() && info.getContextMetadataRepository() != null)
- queryResult = info.getContextMetadataRepository().query(query, progress);
- return queryResult;
- }
-
- public abstract IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor);
-
- public void setPublisherInfo(IPublisherInfo info) {
- this.info = info;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
deleted file mode 100644
index 6e3385e33..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/AbstractPublisherApplication.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*******************************************************************************
- * 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.ServiceReference;
-
-public abstract class AbstractPublisherApplication implements IApplication {
-
- // The mapping rules for in-place generation need to construct paths into the structure
- // of an eclipse installation; in the future the default artifact mapping declared in
- // SimpleArtifactRepository may change, for example, to not have a 'bundles' directory
- // instead of a 'plugins' directory, so a separate constant is defined and used here.
- static final protected String[][] INPLACE_MAPPING_RULES = { {"(& (classifier=osgi.bundle) (format=packed)", "${repoUrl}/features/${id}_${version}.jar.pack.gz"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=osgi.bundle))", "${repoUrl}/plugins/${id}_${version}.jar"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=binary))", "${repoUrl}/binary/${id}_${version}"}, //$NON-NLS-1$//$NON-NLS-2$
- {"(& (classifier=org.eclipse.update.feature))", "${repoUrl}/features/${id}_${version}.jar"}}; //$NON-NLS-1$//$NON-NLS-2$
-
- static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
-
- protected PublisherInfo info;
- protected String source;
- protected URI metadataLocation;
- protected String metadataRepoName;
- protected URI artifactLocation;
- protected String artifactRepoName;
- protected URI[] contextMetadataRepositories;
- protected URI[] contextArtifactRepositories;
- //whether repository xml files should be compressed
- protected boolean compress = false;
- protected boolean inplace = false;
- protected boolean append = false;
- protected boolean reusePackedFiles = false;
- protected String[] configurations;
- private IStatus status;
-
- private ServiceReference<IProvisioningAgent> agentRef;
-
- protected IProvisioningAgent agent;
-
- /**
- * Returns the error message for this application, or the empty string
- * if the application terminated successfully.
- */
- public IStatus getStatus() {
- return status;
- }
-
- protected void initialize(PublisherInfo publisherInfo) throws ProvisionException {
- if (inplace) {
- File location = new File(source);
- if (metadataLocation == null)
- metadataLocation = location.toURI();
- if (artifactLocation == null)
- artifactLocation = location.toURI();
- publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
- }
- initializeRepositories(publisherInfo);
- }
-
- protected IStatus createConfigurationEror(String message) {
- return new Status(IStatus.ERROR, "org.eclipse.equinox.p2.publisher", message); //$NON-NLS-1$
- }
-
- private boolean isEmpty(IArtifactRepository repo) {
- IQueryResult<IArtifactKey> result = repo.query(QueryUtil.createLimitQuery(ArtifactKeyQuery.ALL_KEYS, 1), null);
- return result.isEmpty();
- }
-
- protected void initializeRepositories(PublisherInfo publisherInfo) throws ProvisionException {
- if (artifactLocation != null) {
- IArtifactRepository repo = Publisher.createArtifactRepository(agent, artifactLocation, artifactRepoName, compress, reusePackedFiles);
- if (!append && !isEmpty(repo)) {
- File repoLocation = URIUtil.toFile(artifactLocation);
- if (repoLocation != null && source != null) {
- if (repoLocation.isFile())
- repoLocation = repoLocation.getParentFile();
- if (repoLocation.equals(new File(source)))
- throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNoAppendDestroysInput, URIUtil.toUnencodedString(artifactLocation)));
- }
- repo.removeAll();
- }
- publisherInfo.setArtifactRepository(repo);
- } else if ((publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0)
- throw new ProvisionException(createConfigurationEror(Messages.exception_noArtifactRepo));
- if (metadataLocation == null)
- throw new ProvisionException(createConfigurationEror(Messages.exception_noMetadataRepo));
- publisherInfo.setMetadataRepository(Publisher.createMetadataRepository(agent, metadataLocation, metadataRepoName, append, compress));
-
- if (contextMetadataRepositories != null && contextMetadataRepositories.length > 0) {
- CompositeMetadataRepository contextMetadata = CompositeMetadataRepository.createMemoryComposite(agent);
- if (contextMetadata != null) {
- for (int i = 0; i < contextMetadataRepositories.length; i++)
- contextMetadata.addChild(contextMetadataRepositories[i]);
- if (contextMetadata.getChildren().size() > 0)
- publisherInfo.setContextMetadataRepository(contextMetadata);
- }
- }
- if (contextArtifactRepositories != null && contextArtifactRepositories.length > 0) {
- CompositeArtifactRepository contextArtifact = CompositeArtifactRepository.createMemoryComposite(agent);
- if (contextArtifact != null) {
- for (int i = 0; i < contextArtifactRepositories.length; i++)
- contextArtifact.addChild(contextArtifactRepositories[i]);
-
- if (contextArtifact.getChildren().size() > 0)
- publisherInfo.setContextArtifactRepository(contextArtifact);
- }
- }
- }
-
- protected void processCommandLineArguments(String[] args, PublisherInfo publisherInfo) throws Exception {
- if (args == null)
- return;
- for (int i = 0; i < args.length; i++) {
- // check for args without parameters (i.e., a flag arg)
- processFlag(args[i], publisherInfo);
-
- // check for args with parameters. If we are at the last argument or if the next one
- // has a '-' as the first character, then we can't have an arg with a parm so continue.
- if (i == args.length - 1 || args[i + 1].startsWith("-")) //$NON-NLS-1$
- continue;
- processParameter(args[i], args[++i], publisherInfo);
- }
- }
-
- @SuppressWarnings("unused")
- protected void processParameter(String arg, String parameter, PublisherInfo publisherInfo) throws URISyntaxException {
- try {
- if (arg.equalsIgnoreCase("-metadataRepository") || arg.equalsIgnoreCase("-mr")) //$NON-NLS-1$ //$NON-NLS-2$
- metadataLocation = URIUtil.fromString(parameter);
-
- if (arg.equalsIgnoreCase("-artifactRepository") || arg.equalsIgnoreCase("-ar")) //$NON-NLS-1$ //$NON-NLS-2$
- artifactLocation = URIUtil.fromString(parameter);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException(NLS.bind(Messages.exception_repoMustBeURL, parameter));
- }
-
- if (arg.equalsIgnoreCase("-metadataRepositoryName")) //$NON-NLS-1$
- metadataRepoName = parameter;
-
- if (arg.equalsIgnoreCase("-source")) { //$NON-NLS-1$
- // check here to see if the location actually exists so we can fail gracefully now rather than unpredictably later
- // see bug 272956 where we would fail with an NPE if someone gave us a URL instead of a file-system path
- if (!new File(parameter).exists())
- throw new IllegalArgumentException(NLS.bind(Messages.exception_sourcePath, parameter));
- source = parameter;
- }
-
- if (arg.equalsIgnoreCase("-artifactRepositoryName")) //$NON-NLS-1$
- artifactRepoName = parameter;
-
- if (arg.equalsIgnoreCase("-configs")) //$NON-NLS-1$
- publisherInfo.setConfigurations(AbstractPublisherAction.getArrayFromString(parameter, ",")); //$NON-NLS-1$
-
- if (arg.equalsIgnoreCase("-contextMetadata")) //$NON-NLS-1$
- setContextRepositories(processRepositoryList(parameter), contextArtifactRepositories);
-
- if (arg.equalsIgnoreCase("-contextArtifacts")) //$NON-NLS-1$
- setContextRepositories(contextMetadataRepositories, processRepositoryList(parameter));
- }
-
- private URI[] processRepositoryList(String parameter) {
- String[] list = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
- if (list == null || list.length == 0)
- return null;
-
- List<URI> result = new ArrayList<URI>(list.length);
- if (result != null) {
- for (int i = 0; i < list.length; i++) {
- try {
- result.add(URIUtil.fromString(list[i]));
- } catch (URISyntaxException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- return result.toArray(new URI[result.size()]);
- }
-
- protected void processFlag(String arg, PublisherInfo publisherInfo) {
- if (arg.equalsIgnoreCase("-publishArtifacts") || arg.equalsIgnoreCase("-pa")) //$NON-NLS-1$ //$NON-NLS-2$
- publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_PUBLISH);
-
- if (arg.equalsIgnoreCase("-publishArtifactRepository") || arg.equalsIgnoreCase("-par")) //$NON-NLS-1$ //$NON-NLS-2$
- publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_INDEX);
-
- if (arg.equalsIgnoreCase("-overwriteArtifacts")) //$NON-NLS-1$
- publisherInfo.setArtifactOptions(publisherInfo.getArtifactOptions() | IPublisherInfo.A_OVERWRITE);
-
- if (arg.equalsIgnoreCase("-append")) //$NON-NLS-1$
- append = true;
-
- if (arg.equalsIgnoreCase("-compress")) //$NON-NLS-1$
- compress = true;
-
- if (arg.equalsIgnoreCase("-reusePack200Files")) //$NON-NLS-1$
- reusePackedFiles = true;
-
- if (arg.equalsIgnoreCase("-inplace")) //$NON-NLS-1$
- inplace = true;
- }
-
- private void setupAgent() throws ProvisionException {
- agentRef = Activator.getContext().getServiceReference(IProvisioningAgent.class);
- if (agentRef != null) {
- agent = Activator.getContext().getService(agentRef);
- if (agent != null)
- return;
- }
- ServiceReference<IProvisioningAgentProvider> providerRef = Activator.getContext().getServiceReference(IProvisioningAgentProvider.class);
- if (providerRef == null)
- throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
- IProvisioningAgentProvider provider = Activator.getContext().getService(providerRef);
- if (provider == null)
- throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
- //obtain agent for currently running system
- agent = provider.createAgent(null);
- Activator.getContext().ungetService(providerRef);
- }
-
- public Object run(String args[]) throws Exception {
- try {
- info = createPublisherInfo();
- processCommandLineArguments(args, info);
- Object result = run(info);
- if (result != IApplication.EXIT_OK) {
- System.out.println(NLS.bind(Messages.message_publisherArguments, null));
- for (int i = 0; i < args.length; i++)
- System.out.println(args[i]);
- }
- return result;
- } catch (Exception e) {
- if (e.getMessage() != null)
- System.err.println(e.getMessage());
- else
- e.printStackTrace(System.err);
- throw e;
- }
- }
-
- protected PublisherInfo createPublisherInfo() {
- return new PublisherInfo();
- }
-
- public Object run(PublisherInfo publisherInfo) throws Exception {
- try {
- this.info = publisherInfo;
- setupAgent();
- initialize(publisherInfo);
- System.out.println(NLS.bind(Messages.message_generatingMetadata, publisherInfo.getSummary()));
-
- long before = System.currentTimeMillis();
- IPublisherAction[] actions = createActions();
- Publisher publisher = createPublisher(publisherInfo);
- IStatus result = publisher.publish(actions, new NullProgressMonitor());
- long after = System.currentTimeMillis();
-
- if (result.isOK()) {
- System.out.println(NLS.bind(Messages.message_generationCompleted, String.valueOf((after - before) / 1000)));
- return IApplication.EXIT_OK;
- }
- // TODO: improve the string representation of the result
- System.out.println(result);
- Throwable th = result.getException();
- if (th != null) {
- System.out.println();
- System.out.println(NLS.bind(Messages.message_resultException, null));
- th.printStackTrace(System.out);
- System.out.println();
- }
- } catch (ProvisionException e) {
- status = e.getStatus();
- if (status.getSeverity() == IStatus.ERROR && status.getMessage() != null) {
- System.out.println(status.getMessage());
- }
- }
- return new Integer(1);
- }
-
- protected abstract IPublisherAction[] createActions();
-
- protected Publisher createPublisher(PublisherInfo publisherInfo) {
- return new Publisher(publisherInfo);
- }
-
- public Object start(IApplicationContext context) throws Exception {
- return run((String[]) context.getArguments().get("application.args")); //$NON-NLS-1$
- }
-
- public void stop() {
- if (agentRef != null) {
- Activator.getContext().ungetService(agentRef);
- agentRef = null;
- }
- }
-
- public void setArtifactLocation(URI location) {
- this.artifactLocation = location;
- }
-
- public void setMetadataLocation(URI location) {
- this.metadataLocation = location;
- }
-
- public boolean reuseExistingPack200Files() {
- return reusePackedFiles;
- }
-
- public void setReuseExistingPackedFiles(boolean value) {
- reusePackedFiles = value;
- }
-
- public void setCompress(boolean value) {
- compress = value;
- }
-
- public void setContextRepositories(URI[] metadata, URI[] artifacts) {
- this.contextMetadataRepositories = metadata;
- this.contextArtifactRepositories = artifacts;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAction.java
deleted file mode 100644
index c53215a53..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAction.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-
-public interface IPublisherAction {
-
- IStatus perform(IPublisherInfo info, IPublisherResult results, IProgressMonitor monitor);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java
deleted file mode 100644
index a0777d456..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherAdvice.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-public interface IPublisherAdvice {
-
- public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java
deleted file mode 100644
index bba320f9c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherInfo.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-public interface IPublisherInfo {
-
- /**
- * A bitwise flag to say whether or not the index for the artifact repository should
- * be updated.
- */
- public static final int A_INDEX = 1;
-
- /**
- * A bitwise flag to say whether or the artifacts themselves should be published.
- */
- public static final int A_PUBLISH = 2;
-
- /**
- * A bitwise flag to say whether or not to overwrite disk content discovered
- * in the repository when publishing an artifact
- */
- public static final int A_OVERWRITE = 4;
-
- /**
- * A bitwise flag indicating that MD5 hash should not be generated when
- * publishing an artifact. When this flag is not specified the MD5 hash will
- * be generated by default.
- */
- public static final int A_NO_MD5 = 8;
-
- /**
- * Returns the artifact repository into which any publishable artifacts are published
- * or <code>null</code> if none.
- * @return a destination artifact repository or <code>null</code>
- */
- public IArtifactRepository getArtifactRepository();
-
- /**
- * Returns the metadata repository into which any publishable metadata is published
- * or <code>null</code> if none.
- * @return a destination metadata repository or <code>null</code>
- */
- public IMetadataRepository getMetadataRepository();
-
- /**
- * Returns whether or not artifacts themselves should be published.
- * @return <code>true</code> if artifacts should be published.
- * <code>false</code> otherwise.
- */
- public int getArtifactOptions();
-
- /**
- * Returns the registered advice for the given configuration of WS, OS and ARCH where the
- * advice is of the given type. If mergeDefault is <code>true</code> then the advice for
- * the default configuration is merged into the result.
- * @param configSpec the configuration to query. Note that the given configuration
- * must specify values for WS, OS and ARCH.
- * @param type the type of advice to look for
- * @param includeDefault whether or not to merge in the advice common to all configurations
- * @return the set of advice of the given type for the given configuration
- */
- public <T extends IPublisherAdvice> Collection<T> getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class<T> type);
-
- /**
- * Add the given advice to the set of publishing advices.
- * @param advice the advice to retain
- */
- public void addAdvice(IPublisherAdvice advice);
-
- /**
- * Returns the configurations being published. Each configuration is a string of the form
- * ws.os.arch describing the window system, operating system, and architecture of each
- * configuration.
- * @return The configurations being published
- * @see AbstractPublisherAction#createConfigSpec(String, String, String)
- */
- public String[] getConfigurations();
-
- /**
- * Returns the artifact repository given to the publisher as context for
- * the publisher actions. May be <code>null</code>. Note that multiple
- * repositories may be represented as one composite repository.
- *
- * @return the context artifact repository or <code>null</code> if none.
- */
- public IArtifactRepository getContextArtifactRepository();
-
- /**
- * Returns the metadata repository given to the publisher as context for
- * the publisher actions. May be <code>null</code>. Note that multiple
- * repositories may be represented as one composite repository.
- *
- * @return the context metadata repository or <code>null</code> if none.
- */
- public IMetadataRepository getContextMetadataRepository();
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java
deleted file mode 100644
index 44a56d4b0..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/IPublisherResult.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.IQueryable;
-
-/**
- * Publisher results represent the result of running a publishing operation. A result is a
- * collection of IInstallableUnits that were created or read duing the operation. The result
- * IUs are categorized either as "roots" or "non-roots". The meaning of these types is
- * determined by the actions involved in the operation and it is up to the consumer of the
- * result to interpret the collections.
- */
-public interface IPublisherResult extends IQueryable<IInstallableUnit> {
- /**
- * Merge mode setting that causes all root results to be merged into
- * the root of the merged results and all non-roots to become non-roots.
- */
- public static final int MERGE_MATCHING = 0;
-
- /**
- * Merge mode setting that causes all root and non-root result entries to
- * be placed in the root collection of the result.
- */
- public static final int MERGE_ALL_ROOT = 1;
-
- /**
- * Merge mode setting that causes all root and non-root result entries to
- * be placed in the non-root collection of the result.
- */
- public static final int MERGE_ALL_NON_ROOT = 2;
-
- /**
- * An opaque token used to identify the root elements of a result.
- */
- public static final String ROOT = "root"; //$NON-NLS-1$
-
- /**
- * An opaque token used to identify the non-root elements of a result.
- */
- public static final String NON_ROOT = "non_root"; //$NON-NLS-1$
-
- /**
- * Add the given IU to this result and identify it as the given type
- * @see #ROOT
- * @see #NON_ROOT
- *
- * @param iu the IU to add
- * @param type the type of the IU in this result
- */
- public void addIU(IInstallableUnit iu, String type);
-
- /**
- * Add all of the given IUs to this result and identify it as the given type
- * @see #ROOT
- * @see #NON_ROOT
- *
- * @param ius the IUs to add
- * @param type the type of the IUs in this result
- */
- public void addIUs(Collection<IInstallableUnit> ius, String type);
-
- /**
- * Returns the IUs of the given type with the given id in this result.
- * @param id the id of the IUs to look for
- * @param type the type of IUs to look for in this result
- * @return the requested IUs
- * @see #ROOT
- * @see #NON_ROOT
- */
- public Collection<IInstallableUnit> getIUs(String id, String type);
-
- /**
- * Returns the first available IU of the given type with the given id in this result.
- * @param id the id of the IU to look for
- * @param type the type of IU to look for in this result
- * @return the requested IU
- * @see #ROOT
- * @see #NON_ROOT
- * @deprecated This method should be removed as it essentially returns a random IU
- * with the given ID. There are some uses for this but not many and they can use #getIUs
- */
- public IInstallableUnit getIU(String id, String type);
-
- /**
- * Returns the IU of the given type with the given id and version in this result.
- * @param id the id of the IU to look for
- * @param version the version of the IU to look for
- * @param type the type of IU to look for in this result
- * @return the requested IU
- * @see #ROOT
- * @see #NON_ROOT
- */
- public IInstallableUnit getIU(String id, Version version, String type);
-
- /**
- * Merges the given result in this result according to the given mode.
- * @see #MERGE_ALL_NON_ROOT
- * @see #MERGE_ALL_ROOT
- * @see #MERGE_MATCHING
- * @param result the result to merge into this result
- * @param mode the merge mode to use
- */
- public void merge(IPublisherResult result, int mode);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
deleted file mode 100644
index 49eeb0cab..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/Publisher.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.net.URI;
-import java.util.Collection;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-public class Publisher {
- static final public String PUBLISH_PACK_FILES_AS_SIBLINGS = "publishPackFilesAsSiblings"; //$NON-NLS-1$
- private static final long SERVICE_TIMEOUT = 5000;
-
- private IPublisherInfo info;
- private IPublisherResult results;
-
- /**
- * Returns a metadata repository that corresponds to the given settings. If a repository at the
- * given location already exists, it is updated with the settings and returned. If no repository
- * is found then a new Simple repository is created, configured and returned
- * @param agent the provisioning agent to use when creating the repository
- * @param location the URL location of the repository
- * @param name the name of the repository
- * @param append whether or not the repository should appended or cleared
- * @param compress whether or not to compress the repository index
- * @return the discovered or created repository
- * @throws ProvisionException
- */
- public static IMetadataRepository createMetadataRepository(IProvisioningAgent agent, URI location, String name, boolean append, boolean compress) throws ProvisionException {
- try {
- IMetadataRepository result = loadMetadataRepository(agent, location, true, true);
- if (result != null && result.isModifiable()) {
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
- if (!append)
- result.removeAll();
- return result;
- }
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
-
- // the given repo location is not an existing repo so we have to create something
- IMetadataRepositoryManager manager = getService(agent, IMetadataRepositoryManager.SERVICE_NAME);
- String repositoryName = name == null ? location + " - metadata" : name; //$NON-NLS-1$
- IMetadataRepository result = manager.createRepository(location, repositoryName, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- if (result != null) {
- manager.removeRepository(result.getLocation());
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
- return result;
- }
- // I don't think we can really get here, but just in case, we better throw a provisioning exception
- String msg = org.eclipse.equinox.internal.p2.metadata.repository.Messages.repoMan_internalError;
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.INTERNAL_ERROR, msg, null));
- }
-
- /**
- * Load a metadata repository from the given location.
- * @param location the URI location of the repository
- * @param modifiable whether to ask the manager for a modifiable repository
- * @param removeFromManager remove the loaded repository from the manager if it wasn't already loaded
- * @return the loaded repository
- * @throws ProvisionException
- */
- public static IMetadataRepository loadMetadataRepository(IProvisioningAgent agent, URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
- IMetadataRepositoryManager manager = getService(agent, IMetadataRepositoryManager.SERVICE_NAME);
- boolean existing = manager.contains(location);
-
- IMetadataRepository result = manager.loadRepository(location, modifiable ? IRepositoryManager.REPOSITORY_HINT_MODIFIABLE : 0, null);
- if (!existing && removeFromManager)
- manager.removeRepository(location);
- return result;
- }
-
- /**
- * Returns an artifact repository that corresponds to the given settings. If a repository at the
- * given location already exists, it is updated with the settings and returned. If no repository
- * is found then a new Simple repository is created, configured and returned
- * @param agent the provisioning agent to use when creating the repository
- * @param location the URL location of the repository
- * @param name the name of the repository
- * @param compress whether or not to compress the repository index
- * @param reusePackedFiles whether or not to include discovered Pack200 files in the repository
- * @return the discovered or created repository
- * @throws ProvisionException
- */
- public static IArtifactRepository createArtifactRepository(IProvisioningAgent agent, URI location, String name, boolean compress, boolean reusePackedFiles) throws ProvisionException {
- try {
- IArtifactRepository result = loadArtifactRepository(agent, location, true, true);
- if (result != null && result.isModifiable()) {
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
- if (reusePackedFiles)
- result.setProperty(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
- return result;
- }
- } catch (ProvisionException e) {
- //fall through and create a new repository
- }
-
- IArtifactRepositoryManager manager = getService(agent, IArtifactRepositoryManager.SERVICE_NAME);
- String repositoryName = name != null ? name : location + " - artifacts"; //$NON-NLS-1$
- IArtifactRepository result = manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
- if (result != null) {
- manager.removeRepository(result.getLocation());
- if (reusePackedFiles)
- result.setProperty(PUBLISH_PACK_FILES_AS_SIBLINGS, "true"); //$NON-NLS-1$
- result.setProperty(IRepository.PROP_COMPRESSED, compress ? "true" : "false"); //$NON-NLS-1$//$NON-NLS-2$
- return result;
- }
- // I don't think we can really get here, but just in case, we better throw a provisioning exception
- String msg = org.eclipse.equinox.internal.p2.artifact.repository.Messages.repoMan_internalError;
- throw new ProvisionException(new Status(IStatus.ERROR, Activator.ID, ProvisionException.INTERNAL_ERROR, msg, null));
- }
-
- /**
- * Load an artifact repository from the given location.
- * @param location the URI location of the repository
- * @param modifiable whether to ask the manager for a modifiable repository
- * @param removeFromManager remove the loaded repository from the manager if it wasn't already loaded
- * @return the loaded repository
- * @throws ProvisionException
- */
- public static IArtifactRepository loadArtifactRepository(IProvisioningAgent agent, URI location, boolean modifiable, boolean removeFromManager) throws ProvisionException {
- IArtifactRepositoryManager manager = getService(agent, IArtifactRepositoryManager.SERVICE_NAME);
- boolean existing = manager.contains(location);
-
- IArtifactRepository result = manager.loadRepository(location, modifiable ? IRepositoryManager.REPOSITORY_HINT_MODIFIABLE : 0, null);
- if (!existing && removeFromManager)
- manager.removeRepository(location);
- return result;
- }
-
- public Publisher(IPublisherInfo info) {
- this.info = info;
- results = new PublisherResult();
- }
-
- /**
- * Obtains a service from the agent, waiting for a reasonable timeout period
- * if the service is not yet available. This method never returns <code>null</code>;
- * an exception is thrown if the service could not be obtained.
- *
- * @param <T> The type of the service to return
- * @param agent The agent to obtain the service from
- * @param serviceName The name of the service to obtain
- * @return The service instance
- */
- @SuppressWarnings("unchecked")
- protected static <T> T getService(IProvisioningAgent agent, String serviceName) {
- T service = (T) agent.getService(serviceName);
- if (service != null)
- return service;
- long start = System.currentTimeMillis();
- do {
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- //ignore and keep waiting
- }
- service = (T) agent.getService(serviceName);
- if (service != null)
- return service;
- } while ((System.currentTimeMillis() - start) < SERVICE_TIMEOUT);
- //could not obtain the service
- throw new IllegalStateException("Unable to obtain required service: " + serviceName); //$NON-NLS-1$
- }
-
- public Publisher(IPublisherInfo info, IPublisherResult results) {
- this.info = info;
- this.results = results;
- }
-
- class ArtifactProcess implements IRunnableWithProgress {
-
- private final IPublisherAction[] actions;
- private final IPublisherInfo info;
- private IStatus result = null;
-
- public ArtifactProcess(IPublisherAction[] actions, IPublisherInfo info) {
- this.info = info;
- this.actions = actions;
- }
-
- public void run(IProgressMonitor monitor) {
- MultiStatus finalStatus = new MultiStatus("this", 0, "publishing result", null); //$NON-NLS-1$//$NON-NLS-2$
- for (int i = 0; i < actions.length; i++) {
- if (monitor.isCanceled()) {
- result = Status.CANCEL_STATUS;
- return;
- }
- IStatus status = actions[i].perform(info, results, monitor);
- finalStatus.merge(status);
- monitor.worked(1);
- }
- result = finalStatus;
- }
-
- public IStatus getStatus() {
- return result;
- }
-
- }
-
- public IStatus publish(IPublisherAction[] actions, IProgressMonitor monitor) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- SubMonitor sub = SubMonitor.convert(monitor, actions.length);
- if (Tracing.DEBUG_PUBLISHING)
- Tracing.debug("Invoking publisher"); //$NON-NLS-1$
- try {
- ArtifactProcess artifactProcess = new ArtifactProcess(actions, info);
-
- IStatus finalStatus = null;
- if (info.getArtifactRepository() != null) {
- finalStatus = info.getArtifactRepository().executeBatch(artifactProcess, sub);
- if (finalStatus.isOK())
- // If the batch process didn't report any errors, then
- // Use the status from our actions
- finalStatus = artifactProcess.getStatus();
- } else {
- artifactProcess.run(sub);
- finalStatus = artifactProcess.getStatus();
- }
-
- if (Tracing.DEBUG_PUBLISHING)
- Tracing.debug("Publishing complete. Result=" + finalStatus); //$NON-NLS-1$
- if (!finalStatus.isOK())
- return finalStatus;
- } finally {
- sub.done();
- }
- // if there were no errors, publish all the ius.
- IMetadataRepository metadataRepository = info.getMetadataRepository();
- if (metadataRepository != null) {
- Collection<IInstallableUnit> ius = results.getIUs(null, null);
- metadataRepository.addInstallableUnits(ius);
- }
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java
deleted file mode 100644
index a72a78a7b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherInfo.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.util.*;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-public class PublisherInfo implements IPublisherInfo {
-
- private int artifactOptions = 0;
- private IMetadataRepository metadataRepository;
- private IArtifactRepository artifactRepository;
- private IMetadataRepository contextMetadataRepository;
- private IArtifactRepository contextArtifactRepository;
- private String[] configurations = new String[0];
- private List<IPublisherAdvice> adviceList = new ArrayList<IPublisherAdvice>(11);
-
- public void addAdvice(IPublisherAdvice advice) {
- adviceList.add(advice);
- }
-
- public List<IPublisherAdvice> getAdvice() {
- return adviceList;
- }
-
- @SuppressWarnings("unchecked")
- public <T extends IPublisherAdvice> Collection<T> getAdvice(String configSpec, boolean includeDefault, String id, Version version, Class<T> type) {
- ArrayList<T> result = new ArrayList<T>();
- for (IPublisherAdvice advice : adviceList) {
- if (type.isInstance(advice) && advice.isApplicable(configSpec, includeDefault, id, version))
- // Ideally, we would use Class.cast here but it was introduced in Java 1.5
- result.add((T) advice);
- }
- return result;
- }
-
- public IArtifactRepository getArtifactRepository() {
- return artifactRepository;
- }
-
- public IMetadataRepository getMetadataRepository() {
- return metadataRepository;
- }
-
- public IArtifactRepository getContextArtifactRepository() {
- return contextArtifactRepository;
- }
-
- public IMetadataRepository getContextMetadataRepository() {
- return contextMetadataRepository;
- }
-
- public int getArtifactOptions() {
- return artifactOptions;
- }
-
- public void setArtifactRepository(IArtifactRepository value) {
- artifactRepository = value;
- }
-
- public void setMetadataRepository(IMetadataRepository value) {
- metadataRepository = value;
- }
-
- public void setContextArtifactRepository(IArtifactRepository value) {
- contextArtifactRepository = value;
- }
-
- public void setContextMetadataRepository(IMetadataRepository value) {
- contextMetadataRepository = value;
- }
-
- public void setArtifactOptions(int value) {
- artifactOptions = value;
- }
-
- public String[] getConfigurations() {
- return configurations;
- }
-
- public void setConfigurations(String[] value) {
- configurations = value;
- }
-
- public String getSummary() {
- return "."; //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java
deleted file mode 100644
index cf7d2a092..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/PublisherResult.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- * Cloudsmith Inc. - query indexes
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.IUMap;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.metadata.expression.CompoundIterator;
-import org.eclipse.equinox.internal.p2.metadata.index.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.index.IIndex;
-import org.eclipse.equinox.p2.query.IQueryResult;
-
-public class PublisherResult extends IndexProvider<IInstallableUnit> implements IPublisherResult {
-
- final IUMap rootIUs = new IUMap();
- final IUMap nonRootIUs = new IUMap();
-
- private IIndex<IInstallableUnit> idIndex;
-
- public void addIU(IInstallableUnit iu, String type) {
- if (type == ROOT)
- rootIUs.add(iu);
- if (type == NON_ROOT)
- nonRootIUs.add(iu);
- }
-
- public void addIUs(Collection<IInstallableUnit> ius, String type) {
- for (IInstallableUnit iu : ius)
- addIU(iu, type);
- }
-
- public IInstallableUnit getIU(String id, Version version, String type) {
- if (type == null || type == ROOT) {
- IInstallableUnit result = rootIUs.get(id, version);
- if (result != null)
- return result;
- }
- if (type == null || type == NON_ROOT) {
- IInstallableUnit result = nonRootIUs.get(id, version);
- if (result != null)
- return result;
- }
- return null;
- }
-
- // TODO this method really should not be needed as it just returns the first
- // matching IU non-deterministically.
- public IInstallableUnit getIU(String id, String type) {
- if (type == null || type == ROOT) {
- IQueryResult<IInstallableUnit> ius = rootIUs.get(id);
- if (!ius.isEmpty())
- return ius.iterator().next();
- }
- if (type == null || type == NON_ROOT) {
- IQueryResult<IInstallableUnit> ius = nonRootIUs.get(id);
- if (!ius.isEmpty())
- return ius.iterator().next();
- }
- return null;
- }
-
- /**
- * Returns the IUs in this result with the given id.
- */
- public Collection<IInstallableUnit> getIUs(String id, String type) {
- if (type == null) {
- // TODO can this be optimized?
- ArrayList<IInstallableUnit> result = new ArrayList<IInstallableUnit>();
- result.addAll(rootIUs.get(id).toUnmodifiableSet());
- result.addAll(nonRootIUs.get(id).toUnmodifiableSet());
- return result;
- }
- if (type == ROOT)
- return rootIUs.get(id).toUnmodifiableSet();
- if (type == NON_ROOT)
- return nonRootIUs.get(id).toUnmodifiableSet();
- return null;
- }
-
- public void merge(IPublisherResult result, int mode) {
- if (mode == MERGE_MATCHING) {
- addIUs(result.getIUs(null, ROOT), ROOT);
- addIUs(result.getIUs(null, NON_ROOT), NON_ROOT);
- } else if (mode == MERGE_ALL_ROOT) {
- addIUs(result.getIUs(null, ROOT), ROOT);
- addIUs(result.getIUs(null, NON_ROOT), ROOT);
- } else if (mode == MERGE_ALL_NON_ROOT) {
- addIUs(result.getIUs(null, ROOT), NON_ROOT);
- addIUs(result.getIUs(null, NON_ROOT), NON_ROOT);
- }
- }
-
- public synchronized IIndex<IInstallableUnit> getIndex(String memberName) {
- if (InstallableUnit.MEMBER_ID.equals(memberName)) {
- if (idIndex == null) {
- ArrayList<IIndex<IInstallableUnit>> indexes = new ArrayList<IIndex<IInstallableUnit>>();
- indexes.add(new IdIndex(nonRootIUs));
- indexes.add(new IdIndex(rootIUs));
- idIndex = new CompoundIndex<IInstallableUnit>(indexes);
- }
- return idIndex;
- }
- return null;
- }
-
- public Iterator<IInstallableUnit> everything() {
- ArrayList<Iterator<IInstallableUnit>> iterators = new ArrayList<Iterator<IInstallableUnit>>();
- iterators.add(nonRootIUs.iterator());
- iterators.add(rootIUs.iterator());
- return new CompoundIterator<IInstallableUnit>(iterators.iterator());
- }
-
- public Object getManagedProperty(Object client, String memberName, Object key) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java
deleted file mode 100644
index 583cd3340..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IAdditionalInstallableUnitAdvice.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IAdditionalInstallableUnitAdvice extends IPublisherAdvice {
-
- public InstallableUnitDescription[] getAdditionalInstallableUnitDescriptions(IInstallableUnit iu);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java
deleted file mode 100644
index 11366d384..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ICapabilityAdvice.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 EclipseSource 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:
- * Eclipse Source - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import org.eclipse.equinox.p2.metadata.IProvidedCapability;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface ICapabilityAdvice extends IPublisherAdvice {
-
- public IProvidedCapability[] getProvidedCapabilities(InstallableUnitDescription iu);
-
- public IRequirement[] getRequiredCapabilities(InstallableUnitDescription iu);
-
- public IRequirement[] getMetaRequiredCapabilities(InstallableUnitDescription iu);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java
deleted file mode 100644
index 732826f68..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFeatureRootAdvice.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.p2.publisher.FileSetDescriptor;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IFeatureRootAdvice extends IPublisherAdvice {
-
- /**
- * Return an array of configSpecs for which this advice is applicable.
- * @see IPublisherAdvice#isApplicable(String, boolean, String, org.eclipse.equinox.p2.metadata.Version)
- * @return String [] : Array of configSpec ("ws,os,arch")
- */
- public String[] getConfigurations();
-
- public IPathComputer getRootFileComputer(String configSpec);
-
- public FileSetDescriptor getDescriptor(String configSpec);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java
deleted file mode 100644
index b26edb4ce..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IFilterAdvice.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 EclipseSource 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:
- * EclipseSource - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-/**
- * Filter advice helps actions figure out where an IU with a given id and version
- * is applicable. For example, when some IU being published depends on another,
- * it is possible that the prerequisite is not applicable in all scenarios. In that case
- * it is useful for new IU to spec its requirement using an applicability filter. This
- * advice can supply that filter.
- */
-public interface IFilterAdvice extends IPublisherAdvice {
- /**
- * Returns the filter to use for depending on the IU with the given id.
- * If an exact match is desired, only IUs with the given version are considered
- * as sources of filter information. If in-exact matches are acceptable, the
- * advisor will attempt to find the most relevant IU (typically the one with the highest
- * version less than that supplied) to supply the version information.
- *
- * @param id the id of the target IU
- * @param version the version of the target IU
- * @param exact whether or not to consider information for IUs whose
- * version does not match the supplied version
- * @return the filter to use when depending on the given IU or <code>null</code>
- * if none.
- */
- public IMatchExpression<IInstallableUnit> getFilter(String id, Version version, boolean exact);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java
deleted file mode 100644
index a6deae374..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ILicenseAdvice.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-/**
- * Provides advice about a license.
- */
-public interface ILicenseAdvice extends IPublisherAdvice {
-
- public String getLicenseURL();
-
- public String getLicenseText();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java
deleted file mode 100644
index 587488131..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IPropertyAdvice.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import java.util.Map;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-
-public interface IPropertyAdvice extends IPublisherAdvice {
-
- /**
- * Returns the set of extra properties to be associated with the IU
- */
- public Map<String, String> getInstallableUnitProperties(InstallableUnitDescription iu);
-
- /**
- * Returns the set of extra properties to be associated with the artifact descriptor
- * being published
- */
- public Map<String, String> getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootFilesAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootFilesAdvice.java
deleted file mode 100644
index c830838d5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootFilesAdvice.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.File;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IRootFilesAdvice extends IPublisherAdvice {
-
- public File getRoot();
-
- public File[] getIncludedFiles();
-
- public File[] getExcludedFiles();
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java
deleted file mode 100644
index 9cd432b1c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IRootIUAdvice.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherResult;
-
-public interface IRootIUAdvice extends IPublisherAdvice {
-
- /**
- * Returns the list of children of the root for this publishing operation.
- * Returned elements are either the String id of the IUs, a VersionedName describing
- * the IU or the IUs themselves.
- * @param result
- * @return the collection of children
- */
- public Collection<? extends Object> getChildren(IPublisherResult result);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java
deleted file mode 100644
index 1551b7237..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/ITouchpointAdvice.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.ITouchpointData;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-/**
- * Touchpoint advice provides information related to the touch points associated
- * with an installable unit being published.
- */
-public interface ITouchpointAdvice extends IPublisherAdvice {
- /**
- * Returns a touchpoint data that merges the given touchpoint data
- * with any new touchpoint data contributed by this advice.
- *
- * @param existingData The current set of touchpoint data.
- * @return the merged touchpoint data
- */
- public ITouchpointData getTouchpointData(ITouchpointData existingData);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IUpdateDescriptorAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IUpdateDescriptorAdvice.java
deleted file mode 100644
index 92a5d126f..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IUpdateDescriptorAdvice.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2010 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-/**
- * Advice to set the update descriptor on an IU
- * @author Ian Bull
- */
-public interface IUpdateDescriptorAdvice extends IPublisherAdvice {
-
- public IUpdateDescriptor getUpdateDescriptor(InstallableUnitDescription iu);
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java
deleted file mode 100644
index b2e0d1d49..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/IVersionAdvice.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IVersionAdvice extends IPublisherAdvice {
-
- public static final String NS_BUNDLE = "bundle"; //$NON-NLS-1$
- public static final String NS_FEATURE = "feature"; //$NON-NLS-1$
- public static final String NS_ROOT = "root"; //$NON-NLS-1$
-
- /**
- * Returns the version advice for the given id in the given namespace.
- * @param namespace the namespace in which to look for advice
- * @param id the item for which advice is sought
- * @return the version advice found or <code>null</code> if none
- */
- public Version getVersion(String namespace, String id);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
deleted file mode 100644
index 53234661c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/JREAction.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.*;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.eclipse.osgi.util.ManifestElement;
-import org.osgi.framework.BundleException;
-
-public class JREAction extends AbstractPublisherAction {
- private static final String DEFAULT_JRE_NAME = "a.jre"; //$NON-NLS-1$
- private static final Version DEFAULT_JRE_VERSION = Version.parseVersion("1.6"); //$NON-NLS-1$
- private static final String DEFAULT_PROFILE = "/profiles/JavaSE-1.6.profile"; //$NON-NLS-1$
- private static final String PROFILE_LOCATION = "jre.action.profile.location"; //$NON-NLS-1$
- private static final String PROFILE_NAME = "osgi.java.profile.name"; //$NON-NLS-1$
- private static final String PROFILE_TARGET_VERSION = "org.eclipse.jdt.core.compiler.codegen.targetPlatform"; //$NON-NLS-1$
- private static final String PROFILE_SYSTEM_PACKAGES = "org.osgi.framework.system.packages"; //$NON-NLS-1$
-
- private File jreLocation;
- private String environment;
- private Map<String, String> profileProperties;
-
- public JREAction(File location) {
- this.jreLocation = location;
- }
-
- public JREAction(String environment) {
-
- this.environment = environment;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- initialize(publisherInfo);
- IArtifactDescriptor artifact = createJREData(results);
- if (artifact != null)
- publishArtifact(artifact, new File[] {jreLocation}, null, publisherInfo, createRootPrefixComputer(jreLocation));
- return Status.OK_STATUS;
- }
-
- /**
- * Creates IUs and artifact descriptors for the JRE. The resulting IUs are added
- * to the given set, and the resulting artifact descriptor, if any, is returned.
- * If the jreLocation is <code>null</code>, default information is generated.
- */
- protected IArtifactDescriptor createJREData(IPublisherResult results) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(false);
- iu.setId(DEFAULT_JRE_NAME);
- iu.setVersion(DEFAULT_JRE_VERSION);
- iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
-
- generateJREIUData(iu);
-
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configId = "config." + iu.getId();//$NON-NLS-1$
- cu.setId(configId);
- cu.setVersion(iu.getVersion());
- VersionRange range = iu.getVersion() == Version.emptyVersion ? VersionRange.emptyRange : new VersionRange(iu.getVersion(), true, Version.MAX_VERSION, true);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), range, null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configId, iu.getVersion())});
- cu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- Map<String, String> touchpointData = new HashMap<String, String>();
-
- if (jreLocation == null || !jreLocation.exists()) {
- touchpointData.put("install", ""); //$NON-NLS-1$ //$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- results.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
- results.addIU(MetadataFactory.createInstallableUnit(cu), IPublisherResult.ROOT);
- return null;
- }
-
- //Generate artifact for JRE
- IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, iu.getId(), iu.getVersion());
- iu.setArtifacts(new IArtifactKey[] {key});
- results.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
-
- //Create config info for the CU
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- results.addIU(MetadataFactory.createInstallableUnit(cu), IPublisherResult.ROOT);
-
- //Create the artifact descriptor
- return PublisherHelper.createArtifactDescriptor(info, key, jreLocation);
- }
-
- private IProvidedCapability[] generateJRECapability(String id, Version version) {
- if (profileProperties == null)
- return new IProvidedCapability[0];
-
- try {
- ManifestElement[] jrePackages = ManifestElement.parseHeader(PROFILE_SYSTEM_PACKAGES, profileProperties.get(PROFILE_SYSTEM_PACKAGES));
- IProvidedCapability[] exportedPackageAsCapabilities = new IProvidedCapability[jrePackages.length + 1];
- exportedPackageAsCapabilities[0] = PublisherHelper.createSelfCapability(id, version);
- for (int i = 1; i <= jrePackages.length; i++) {
- exportedPackageAsCapabilities[i] = MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, jrePackages[i - 1].getValue(), null);
- }
- return exportedPackageAsCapabilities;
- } catch (BundleException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return new IProvidedCapability[0];
- }
-
- private void generateJREIUData(InstallableUnitDescription iu) {
- if (profileProperties == null || profileProperties.size() == 0)
- return; //got nothing
-
- String profileLocation = profileProperties.get(PROFILE_LOCATION);
-
- String profileName = profileLocation != null ? new Path(profileLocation).lastSegment() : profileProperties.get(PROFILE_NAME);
- if (profileName.endsWith(".profile")) //$NON-NLS-1$
- profileName = profileName.substring(0, profileName.length() - 8);
- Version version = null;
- int idx = profileName.indexOf('-');
- if (idx != -1) {
- try {
- version = Version.parseVersion(profileName.substring(idx + 1));
- } catch (IllegalArgumentException e) {
- //ignore
- }
- profileName = profileName.substring(0, idx);
- }
- if (version == null) {
- try {
- String targetVersion = profileProperties.get(PROFILE_TARGET_VERSION);
- version = targetVersion != null ? Version.parseVersion(targetVersion) : null;
- } catch (IllegalArgumentException e) {
- //ignore
- }
- }
-
- if (version == null)
- version = DEFAULT_JRE_VERSION;
-
- iu.setVersion(version);
-
- profileName = profileName.replace('-', '.');
- profileName = profileName.replace('/', '.');
- profileName = profileName.replace('_', '.');
- iu.setId("a.jre." + profileName.toLowerCase()); //$NON-NLS-1$
-
- IProvidedCapability[] capabilities = generateJRECapability(iu.getId(), iu.getVersion());
- iu.setCapabilities(capabilities);
- }
-
- private void initialize(IPublisherInfo publisherInfo) {
- this.info = publisherInfo;
-
- if (jreLocation != null) {
- //Look for a JRE profile file to set version and capabilities
- File[] profiles = jreLocation.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.getAbsolutePath().endsWith(".profile"); //$NON-NLS-1$
- }
- });
- if (profiles != null && profiles.length > 0) {
- profileProperties = loadProfile(profiles[0]);
- }
- }
- if (profileProperties == null) {
- String entry = environment != null ? "/profiles/" + environment.replace('/', '_') + ".profile" : DEFAULT_PROFILE; //$NON-NLS-1$ //$NON-NLS-2$
- URL profileURL = Activator.getContext().getBundle().getEntry(entry);
- profileProperties = loadProfile(profileURL);
- }
- }
-
- private Map<String, String> loadProfile(File profileFile) {
- if (profileFile == null || !profileFile.exists())
- return null;
-
- try {
- InputStream stream = new BufferedInputStream(new FileInputStream(profileFile));
- Map<String, String> properties = loadProfile(stream);
- if (properties != null)
- properties.put(PROFILE_LOCATION, profileFile.getAbsolutePath());
- return properties;
- } catch (FileNotFoundException e) {
- //null
- }
- return null;
- }
-
- private Map<String, String> loadProfile(URL profileURL) {
- if (profileURL == null)
- return null;
-
- try {
- InputStream stream = profileURL.openStream();
- return loadProfile(stream);
- } catch (IOException e) {
- //null
- }
- return null;
- }
-
- /**
- * Always closes the stream when done
- */
- private Map<String, String> loadProfile(InputStream stream) {
- if (stream != null) {
- try {
- return CollectionUtils.loadProperties(stream);
- } catch (IOException e) {
- return null;
- } finally {
- try {
- stream.close();
- } catch (IOException e) {
- // error
- }
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java
deleted file mode 100644
index e43e0d0e5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/MergeResultsAction.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.publisher.*;
-
-public class MergeResultsAction extends AbstractPublisherAction {
-
- private IPublisherAction[] actions;
- private int mode;
-
- public MergeResultsAction(IPublisherAction[] actions, int mode) {
- this.actions = actions;
- this.mode = mode;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- MultiStatus finalStatus = new MultiStatus(MergeResultsAction.class.getName(), 0, "publishing result", null); //$NON-NLS-1$
- for (int i = 0; i < actions.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- IPublisherAction action = actions[i];
- IPublisherResult result = new PublisherResult();
- finalStatus.merge(action.perform(publisherInfo, result, monitor));
- results.merge(result, mode);
- }
- if (!finalStatus.isOK())
- return finalStatus;
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java
deleted file mode 100644
index b06a1ace6..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/QueryableFilterAdvice.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 EclipseSource 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:
- * EclipseSource - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * An IFilterAdvice that looks up the desired IU in the publisher's input metadata
- * repository and returns whatever filter is found there.
- */
-public class QueryableFilterAdvice implements IFilterAdvice {
-
- private IQueryable<IInstallableUnit> queryable;
-
- public QueryableFilterAdvice(IQueryable<IInstallableUnit> queryable) {
- this.queryable = queryable;
- }
-
- public IMatchExpression<IInstallableUnit> getFilter(String id, Version version, boolean exact) {
- IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(id, version);
- IQueryResult<IInstallableUnit> result = queryable.query(query, null);
- if (!result.isEmpty())
- return result.iterator().next().getFilter();
- if (exact)
- return null;
-
- query = QueryUtil.createIUQuery(id);
- result = queryable.query(query, null);
- if (!result.isEmpty())
- return result.iterator().next().getFilter();
- return null;
- }
-
- public boolean isApplicable(String configSpec, boolean includeDefault, String id, Version version) {
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java
deleted file mode 100644
index b951094aa..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAction.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-
-public class RootFilesAction extends AbstractPublisherAction {
- private String idBase;
- private Version version;
- private String flavor;
- private boolean createParent = true;
-
- /**
- * Returns the id of the top level IU published by this action for the given id and flavor.
- * @param id the id of the application being published
- * @param flavor the flavor being published
- * @return the if for ius published by this action
- */
- public static String computeIUId(String id, String flavor) {
- return flavor + id + ".rootfiles"; //$NON-NLS-1$
- }
-
- public RootFilesAction(IPublisherInfo info, String idBase, Version version, String flavor) {
- this.idBase = idBase == null ? "org.eclipse" : idBase; //$NON-NLS-1$
- this.version = version;
- this.flavor = flavor;
- }
-
- public void setCreateParent(boolean createParent) {
- this.createParent = createParent;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- setPublisherInfo(publisherInfo);
- IPublisherResult innerResult = new PublisherResult();
- // we have N platforms, generate a CU for each
- // TODO try and find common properties across platforms
- String[] configSpecs = publisherInfo.getConfigurations();
- for (int i = 0; i < configSpecs.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- generateRootFileIUs(configSpecs[i], innerResult);
- }
- // merge the IUs into the final result as non-roots and create a parent IU that captures them all
- results.merge(innerResult, IPublisherResult.MERGE_ALL_NON_ROOT);
- if (createParent)
- publishTopLevelRootFilesIU(innerResult.getIUs(null, IPublisherResult.ROOT), results);
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- return Status.OK_STATUS;
- }
-
- private void publishTopLevelRootFilesIU(Collection<? extends IVersionedId> children, IPublisherResult result) {
- InstallableUnitDescription descriptor = createParentIU(children, computeIUId(idBase, flavor), version);
- descriptor.setSingleton(true);
- IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
- if (rootIU == null)
- return;
- result.addIU(rootIU, IPublisherResult.ROOT);
- }
-
- /**
- * Generates IUs and CUs for the files that make up the root files for a given
- * ws/os/arch combination.
- */
- private void generateRootFileIUs(String configSpec, IPublisherResult result) {
- // Create the IU for the executable
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(true);
- String idPrefix = idBase + ".rootfiles"; //$NON-NLS-1$
- String iuId = idPrefix + '.' + createIdString(configSpec);
- iu.setId(iuId);
- iu.setVersion(version);
- IMatchExpression<IInstallableUnit> filter = createFilterSpec(configSpec);
- iu.setFilter(filter);
- IArtifactKey key = PublisherHelper.createBinaryArtifactKey(iuId, version);
- iu.setArtifacts(new IArtifactKey[] {key});
- iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- IProvidedCapability launcherCapability = MetadataFactory.createProvidedCapability(flavor + idBase, idPrefix, version);
- iu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(iuId, version), launcherCapability});
- result.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
-
- // Create the CU that installs/configures the executable
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = flavor + iuId;
- cu.setId(configUnitId);
- cu.setVersion(version);
- cu.setFilter(filter);
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, iuId, new VersionRange(version, true, version, true), null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-
- //TODO bug 218890, would like the fragment to provide the launcher capability as well, but can't right now.
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, version)});
-
- cu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- Map<String, String> touchpointData = new HashMap<String, String>();
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- processTouchpointAdvice(cu, touchpointData, info, configSpec);
- IInstallableUnit unit = MetadataFactory.createInstallableUnit(cu);
- result.addIU(unit, IPublisherResult.ROOT);
-
- if ((info.getArtifactOptions() & (IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH)) > 0) {
- // Create the artifact descriptor. we have several files so no path on disk
- IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info, key, null);
- IRootFilesAdvice advice = getAdvice(configSpec);
- publishArtifact(descriptor, advice.getIncludedFiles(), advice.getExcludedFiles(), info, createPrefixComputer(advice.getRoot()));
- }
- }
-
- private IPathComputer createPrefixComputer(File root) {
- if (root == null)
- return createParentPrefixComputer(1);
- return createRootPrefixComputer(root);
- }
-
- /**
- * Compiles the <class>IRootFilesAdvice</class> from the <code>info</code> into one <class>IRootFilesAdvice</class>
- * and returns the result.
- * @param configSpec
- * @return a compilation of <class>IRootfilesAdvice</class> from the <code>info</code>.
- */
- private IRootFilesAdvice getAdvice(String configSpec) {
- Collection<IRootFilesAdvice> advice = info.getAdvice(configSpec, true, null, null, IRootFilesAdvice.class);
- ArrayList<File> inclusions = new ArrayList<File>();
- ArrayList<File> exclusions = new ArrayList<File>();
- File root = null;
- for (IRootFilesAdvice entry : advice) {
- // TODO for now we simply get root from the first advice that has one
- if (root == null)
- root = entry.getRoot();
- File[] list = entry.getIncludedFiles();
- if (list != null)
- inclusions.addAll(Arrays.asList(list));
- list = entry.getExcludedFiles();
- if (list != null)
- exclusions.addAll(Arrays.asList(list));
- }
- File[] includeList = inclusions.toArray(new File[inclusions.size()]);
- File[] excludeList = exclusions.toArray(new File[exclusions.size()]);
- return new RootFilesAdvice(root, includeList, excludeList, configSpec);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAdvice.java
deleted file mode 100644
index 2a904e693..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootFilesAdvice.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.File;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-
-public class RootFilesAdvice extends AbstractAdvice implements IRootFilesAdvice {
- private File root;
- private File[] excludedFiles;
- private File[] includedFiles;
- private String configSpec;
-
- public RootFilesAdvice(File root, File[] includedFiles, File[] excludedFiles, String configSpec) {
- this.root = root;
- this.excludedFiles = excludedFiles;
- this.includedFiles = includedFiles;
- this.configSpec = configSpec;
- }
-
- public File getRoot() {
- return root;
- }
-
- protected String getConfigSpec() {
- return configSpec;
- }
-
- public File[] getExcludedFiles() {
- return excludedFiles;
- }
-
- public File[] getIncludedFiles() {
- return includedFiles;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java
deleted file mode 100644
index b6ccec70b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAction.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - Progress monitor handling and error handling
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Collection;
-import java.util.HashSet;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Create a top level IU that lists all the current roots as well as any explicitly identified
- * top level IUs.
- */
-public class RootIUAction extends AbstractPublisherAction {
-
- private Version version;
- private String id;
- private String name;
- private Collection<IVersionAdvice> versionAdvice;
-
- public RootIUAction(String id, Version version, String name) {
- this.id = id;
- this.version = version;
- this.name = name;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- this.info = publisherInfo;
- return generateRootIU(results);
- }
-
- protected IStatus generateRootIU(IPublisherResult result) {
- Collection<? extends IVersionedId> children = getChildren(result);
- InstallableUnitDescription descriptor = createTopLevelIUDescription(children, null, false);
- processUpdateDescriptorAdvice(descriptor, info);
- processCapabilityAdvice(descriptor, info);
- processTouchpointAdvice(descriptor, null, info);
- processInstallableUnitPropertiesAdvice(descriptor, info);
- processLicense(descriptor, info);
- IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
- if (rootIU == null)
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.error_rootIU_generation, new Object[] {name, id, version}));
- result.addIU(rootIU, IPublisherResult.NON_ROOT);
-
- InstallableUnitDescription[] others = processAdditionalInstallableUnitsAdvice(rootIU, info);
- for (int iuIndex = 0; others != null && iuIndex < others.length; iuIndex++) {
- result.addIU(MetadataFactory.createInstallableUnit(others[iuIndex]), IPublisherResult.ROOT);
- }
-
- return Status.OK_STATUS;
- // TODO why do we create a category here?
- // result.addIU(generateDefaultCategory(rootIU, rootCategory), IPublisherResult.NON_ROOT);
- }
-
- protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) {
- Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class);
- if (advice.size() > 0) {
- // Only process the first license we find for this IU.
- ILicenseAdvice entry = advice.iterator().next();
- String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$
- String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$
- if (licenseText.length() > 0 || licenseUrl.length() > 0)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)});
- }
- }
-
- private static URI toURIOrNull(String url) {
- if (url == null)
- return null;
- try {
- return URIUtil.fromString(url);
- } catch (URISyntaxException e) {
- return null;
- }
- }
-
- /**
- * This was copied over from Generator to match up with the call from generateRootIU (above).
- * It is entirely unclear why it was needed. Should review.
- * Short term fix to ensure IUs that have no corresponding category are not lost.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=211521.
- */
- // private IInstallableUnit generateDefaultCategory(IInstallableUnit rootIU) {
- // rootCategory.add(rootIU);
- //
- // InstallableUnitDescription cat = new MetadataFactory.InstallableUnitDescription();
- // cat.setSingleton(true);
- // String categoryId = rootIU.getId() + ".categoryIU"; //$NON-NLS-1$
- // cat.setId(categoryId);
- // cat.setVersion(Version.emptyVersion);
- // cat.setProperty(IInstallableUnit.PROP_NAME, rootIU.getProperty(IInstallableUnit.PROP_NAME));
- // cat.setProperty(IInstallableUnit.PROP_DESCRIPTION, rootIU.getProperty(IInstallableUnit.PROP_DESCRIPTION));
- //
- // ArrayList required = new ArrayList(rootCategory.size());
- // for (Iterator iterator = rootCategory.iterator(); iterator.hasNext();) {
- // IInstallableUnit iu = (IInstallableUnit) iterator.next();
- // required.add(MetadataFactory.createRequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), VersionRange.emptyRange, iu.getFilter(), false, false));
- // }
- // cat.setRequiredCapabilities((RequiredCapability[]) required.toArray(new RequiredCapability[required.size()]));
- // cat.setCapabilities(new ProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, categoryId, Version.emptyVersion)});
- // cat.setArtifacts(new IArtifactKey[0]);
- // cat.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, "true"); //$NON-NLS-1$
- // return MetadataFactory.createInstallableUnit(cat);
- // }
- private Collection<? extends IVersionedId> getChildren(IPublisherResult result) {
- // get any roots that we have accummulated so far and search for
- // children from the advice.
- HashSet<IVersionedId> children = new HashSet<IVersionedId>();
- Collection<IRootIUAdvice> rootAdvice = info.getAdvice(null, true, null, null, IRootIUAdvice.class);
- if (rootAdvice == null)
- return children;
- for (IRootIUAdvice advice : rootAdvice) {
- Collection<? extends Object> list = advice.getChildren(result);
- if (list != null)
- for (Object object : list) {
- // if the advice is a string, look it up in the result. if not there then
- // query the known metadata repos
- if (object instanceof String) {
- String childId = (String) object;
- IInstallableUnit iu = queryForIU(result, childId, getVersionAdvice(childId));
- if (iu != null)
- children.add(iu);
- } else if (object instanceof IVersionedId) {
- children.add((IVersionedId) object);
- }
- }
- }
- return children;
- }
-
- private InstallableUnitDescription createTopLevelIUDescription(Collection<? extends IVersionedId> children, Collection<IRequirement> requires, boolean configureLauncherData) {
- InstallableUnitDescription root = new MetadataFactory.InstallableUnitDescription();
- root.setSingleton(true);
- root.setId(id);
- root.setVersion(version);
- root.setProperty(IInstallableUnit.PROP_NAME, name);
-
- Collection<IRequirement> requiredCapabilities = createIURequirements(children);
- if (requires != null)
- requiredCapabilities.addAll(requires);
- root.setRequirements(requiredCapabilities.toArray(new IRequirement[requiredCapabilities.size()]));
- root.setArtifacts(new IArtifactKey[0]);
-
- root.setProperty("lineUp", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- root.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, VersionRange.emptyRange, IUpdateDescriptor.NORMAL, null));
- root.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- root.setCapabilities(new IProvidedCapability[] {createSelfCapability(id, version)});
- // TODO why is the type OSGI?
- root.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
- return root;
- }
-
- private Version getVersionAdvice(String iuID) {
- if (versionAdvice == null) {
- versionAdvice = info.getAdvice(null, true, null, null, IVersionAdvice.class);
- if (versionAdvice == null)
- return null;
- }
- for (IVersionAdvice advice : versionAdvice) {
- // TODO have to figure a way to know the namespace here. for now just look everywhere
- Version result = advice.getVersion(IInstallableUnit.NAMESPACE_IU_ID, iuID);
- if (result == null)
- result = advice.getVersion(IVersionAdvice.NS_BUNDLE, iuID);
- if (result == null)
- result = advice.getVersion(IVersionAdvice.NS_FEATURE, iuID);
- if (result != null)
- return result;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java
deleted file mode 100644
index 5dbfb5274..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUAdvice.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherResult;
-
-/**
- * Advises publisher actions as to which IUs should be listed as children of an
- * eventual root IU. Each child is described as a VersionedName.
- */
-public class RootIUAdvice extends AbstractAdvice implements IRootIUAdvice {
-
- private Collection<? extends Object> children;
-
- public RootIUAdvice(Collection<? extends Object> children) {
- this.children = children;
- }
-
- public Collection<? extends Object> getChildren(IPublisherResult result) {
- return children;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java
deleted file mode 100644
index bb858bc93..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/RootIUResultFilterAdvice.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.util.Arrays;
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherResult;
-import org.eclipse.equinox.p2.query.IQuery;
-
-public class RootIUResultFilterAdvice extends AbstractAdvice implements IRootIUAdvice {
- private IQuery<IInstallableUnit> query;
-
- public RootIUResultFilterAdvice(IQuery<IInstallableUnit> query) {
- this.query = query;
- }
-
- public Collection<IInstallableUnit> getChildren(IPublisherResult result) {
- Collection<IInstallableUnit> value = result.getIUs(null, IPublisherResult.ROOT);
- if (query == null)
- return value;
- return Arrays.asList(query.perform(value.iterator()).toArray(IInstallableUnit.class));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java
deleted file mode 100644
index 491c40f95..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/actions/VersionAdvice.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.actions;
-
-import java.io.*;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public class VersionAdvice extends AbstractAdvice implements IVersionAdvice {
-
- Map<String, Map<String, Version>> versions = new HashMap<String, Map<String, Version>>(11);
-
- /**
- * Load the given namespace with version mappings from the properties file at
- * the given location. The properties file is expected to be in the normal format
- * produced and consumed by PDE Build.
- * @param namespace the namespace to populate. If "null" is passed
- * in, the version will be stored in the "null" namespace
- * @param location the location of the mapping file
- */
- public void load(String namespace, String location) {
- load(namespace, location, null);
- }
-
- public void load(String namespace, String location, String idSuffix) {
- File file = new File(location);
- if (namespace == null)
- namespace = "null"; //$NON-NLS-1$
-
- Map<String, String> properties;
- InputStream stream = null;
- try {
- stream = new BufferedInputStream(new FileInputStream(file));
- properties = CollectionUtils.loadProperties(stream);
- } catch (IOException e) {
- return;
- } finally {
- if (stream != null)
- try {
- stream.close();
- } catch (IOException e) {
- //nothing
- }
- }
- for (Entry<String, String> entry : properties.entrySet()) {
- String key = entry.getKey();
- if (idSuffix != null)
- key += idSuffix;
- setVersion(namespace, key, Version.parseVersion(entry.getValue()));
- }
- }
-
- /**
- * Returns the version advice for the given id in the given namespace.
- * @param namespace the namespace in which to look for advice
- * @param id the item for which advice is sought
- * @return the version advice found or <code>null</code> if none
- */
- public Version getVersion(String namespace, String id) {
- Map<String, Version> values = versions.get(namespace);
- // if no one says anything then don't say anything. someone else might have an opinion
- if (values != null) {
- Version result = values.get(id);
- if (result != null)
- return result;
- }
-
- values = versions.get("null"); //$NON-NLS-1$
- if (values == null)
- return null;
- return values.get(id);
- }
-
- /**
- * Sets the version advice for the given id in the given namespace.
- * @param namespace the namespace in which to look for advice
- * @param id the item for which advice is sought
- * @param version the version advice for the given id or <code>null</code> to remove advice
- */
- public void setVersion(String namespace, String id, Version version) {
- Map<String, Version> values = versions.get(namespace);
- if (values == null) {
- // if we are clearing values then there is nothing to do
- if (version == null)
- return;
- values = new HashMap<String, Version>();
- versions.put(namespace, values);
- }
- if (version == null)
- values.remove(id);
- else
- values.put(id, version);
- }
-
- public IPublisherAdvice merge(IPublisherAdvice advice) {
- if (!(advice instanceof VersionAdvice))
- return this;
- VersionAdvice source = (VersionAdvice) advice;
- for (String namespace : source.versions.keySet()) {
- Map<String, Version> myValues = versions.get(namespace);
- Map<String, Version> sourceValues = source.versions.get(namespace);
- if (myValues == null)
- versions.put(namespace, sourceValues);
- else if (sourceValues != null)
- versions.put(namespace, merge(myValues, sourceValues));
- }
- return this;
- }
-
- private Map<String, Version> merge(Map<String, Version> myValues, Map<String, Version> sourceValues) {
- Map<String, Version> result = new HashMap<String, Version>(myValues);
- for (String key : sourceValues.keySet()) {
- if (result.get(key) == null)
- result.put(key, sourceValues.get(key));
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java
deleted file mode 100644
index a1353770c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AccumulateConfigDataAction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.File;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.DataLoader;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.p2.publisher.*;
-
-public class AccumulateConfigDataAction extends AbstractPublisherAction {
-
- private String configSpec;
- private DataLoader loader;
-
- public AccumulateConfigDataAction(IPublisherInfo info, String configSpec, File configurationLocation, File executableLocation) {
- this.configSpec = configSpec;
- loader = new DataLoader(configurationLocation, executableLocation);
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- storeConfigData(publisherInfo, configSpec, results);
- return Status.OK_STATUS;
- }
-
- protected void storeConfigData(IPublisherInfo publisherInfo, String config, IPublisherResult result) {
- ConfigData data = loader.getConfigData();
- if (data == null)
- return;
- publisherInfo.addAdvice(new ConfigAdvice(data, config));
- LauncherData launcherData = loader.getLauncherData();
- if (launcherData == null)
- return;
- publisherInfo.addAdvice(new LaunchingAdvice(launcherData, config));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java
deleted file mode 100644
index d3661dfbd..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileAdvice.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.*;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-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.publisher.Activator;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.actions.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-
-/**
- * Publishing advice from a p2 advice file. An advice file (p2.inf) can be embedded
- * in the source of a bundle, feature, or product to specify additional advice to be
- * added to the {@link IInstallableUnit} corresponding to the bundle, feature, or product.
- */
-public class AdviceFileAdvice extends AbstractAdvice implements ITouchpointAdvice, ICapabilityAdvice, IUpdateDescriptorAdvice, IPropertyAdvice, IAdditionalInstallableUnitAdvice {
-
- /**
- * The location of the bundle advice file, relative to the bundle root location.
- */
- public static final IPath BUNDLE_ADVICE_FILE = new Path("META-INF/p2.inf"); //$NON-NLS-1$
-
- private final String id;
- private final Version version;
-
- private Map<String, ITouchpointInstruction> touchpointInstructions;
- private IProvidedCapability[] providedCapabilities;
- private IRequirement[] requiredCapabilities;
- private IRequirement[] metaRequiredCapabilities;
- private Map<String, String> iuProperties;
- private InstallableUnitDescription[] additionalIUs;
- private IUpdateDescriptor updateDescriptor;
- private boolean containsAdvice = false;
-
- /**
- * Creates advice for an advice file at the given location. If <tt>basePath</tt>
- * is a directory, then <tt>adviceFilePath</tt> is appended to this location to
- * obtain the location of the advice file. If <tt>basePath</tt> is a file, then
- * <tt>adviceFilePath</tt> is used to
- * @param id The symbolic id of the installable unit this advice applies to
- * @param version The version of the installable unit this advice applies to
- * @param basePath The root location of the the advice file. This is either the location of
- * the jar containing the advice, or a directory containing the advice file
- * @param adviceFilePath The location of the advice file within the base path. This is
- * either the path of a jar entry, or the path of the advice file within the directory
- * specified by the base path.
- */
- public AdviceFileAdvice(String id, Version version, IPath basePath, IPath adviceFilePath) {
- Assert.isNotNull(id);
- Assert.isNotNull(version);
- Assert.isNotNull(basePath);
- Assert.isNotNull(adviceFilePath);
- this.id = id;
- this.version = version;
-
- Map<String, String> advice = loadAdviceMap(basePath, adviceFilePath);
- if (advice.isEmpty())
- return;
-
- AdviceFileParser parser = new AdviceFileParser(id, version, advice);
- try {
- parser.parse();
- } catch (Exception e) {
- String message = "An error occured while parsing advice file: basePath=" + basePath + ", adviceFilePath=" + adviceFilePath + "."; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- IStatus status = new Status(IStatus.ERROR, Activator.ID, message, e);
- LogHelper.log(status);
- return;
- }
- touchpointInstructions = parser.getTouchpointInstructions();
- providedCapabilities = parser.getProvidedCapabilities();
- requiredCapabilities = parser.getRequiredCapabilities();
- metaRequiredCapabilities = parser.getMetaRequiredCapabilities();
- iuProperties = parser.getProperties();
- additionalIUs = parser.getAdditionalInstallableUnitDescriptions();
- updateDescriptor = parser.getUpdateDescriptor();
- containsAdvice = true;
- }
-
- public boolean containsAdvice() {
- return containsAdvice;
- }
-
- /**
- * Loads the advice file and returns it in map form.
- */
- private static Map<String, String> loadAdviceMap(IPath basePath, IPath adviceFilePath) {
- File location = basePath.toFile();
- if (location == null || !location.exists())
- return CollectionUtils.emptyMap();
-
- ZipFile jar = null;
- InputStream stream = null;
- try {
- if (location.isDirectory()) {
- File adviceFile = new File(location, adviceFilePath.toString());
- if (!adviceFile.isFile())
- return CollectionUtils.emptyMap();
- stream = new BufferedInputStream(new FileInputStream(adviceFile));
- } else if (location.isFile()) {
- jar = new ZipFile(location);
- ZipEntry entry = jar.getEntry(adviceFilePath.toString());
- if (entry == null)
- return CollectionUtils.emptyMap();
-
- stream = new BufferedInputStream(jar.getInputStream(entry));
- }
- return CollectionUtils.loadProperties(stream);
- } catch (IOException e) {
- String message = "An error occured while reading advice file: basePath=" + basePath + ", adviceFilePath=" + adviceFilePath + "."; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- IStatus status = new Status(IStatus.ERROR, Activator.ID, message, e);
- LogHelper.log(status);
- return CollectionUtils.emptyMap();
- } finally {
- if (stream != null)
- try {
- stream.close();
- } catch (IOException e) {
- // ignore secondary failure
- }
- if (jar != null)
- try {
- jar.close();
- } catch (IOException e) {
- // ignore secondary failure
- }
- }
- }
-
- public boolean isApplicable(String configSpec, boolean includeDefault, String candidateId, Version candidateVersion) {
- return id.equals(candidateId) && version.equals(candidateVersion);
- }
-
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.publisher.eclipse.ITouchpointAdvice#getTouchpointData()
- */
- public ITouchpointData getTouchpointData(ITouchpointData existing) {
- return MetadataFactory.mergeTouchpointData(existing, touchpointInstructions);
- }
-
- public IProvidedCapability[] getProvidedCapabilities(InstallableUnitDescription iu) {
- return providedCapabilities;
- }
-
- public IRequirement[] getRequiredCapabilities(InstallableUnitDescription iu) {
- return requiredCapabilities;
- }
-
- public IRequirement[] getMetaRequiredCapabilities(InstallableUnitDescription iu) {
- return metaRequiredCapabilities;
- }
-
- public InstallableUnitDescription[] getAdditionalInstallableUnitDescriptions(IInstallableUnit iu) {
- return additionalIUs;
- }
-
- public IUpdateDescriptor getUpdateDescriptor(InstallableUnitDescription iu) {
- return updateDescriptor;
- }
-
- public Map<String, String> getArtifactProperties(IInstallableUnit iu, IArtifactDescriptor descriptor) {
- return null;
- }
-
- public Map<String, String> getInstallableUnitProperties(InstallableUnitDescription iu) {
- return iuProperties;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java
deleted file mode 100644
index c2d5ce782..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/AdviceFileParser.java
+++ /dev/null
@@ -1,592 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-
-public class AdviceFileParser {
-
- private static final String ADVICE_VERSION = "advice.version"; //$NON-NLS-1$
-
- private static final String QUALIFIER_SUBSTITUTION = "$qualifier$"; //$NON-NLS-1$
- private static final String VERSION_SUBSTITUTION = "$version$"; //$NON-NLS-1$
-
- private static final String UPDATE_DESCRIPTION = "update.description"; //$NON-NLS-1$
- private static final String UPDATE_SEVERITY = "update.severity"; //$NON-NLS-1$
- private static final String UPDATE_RANGE = "update.range"; //$NON-NLS-1$
- private static final String UPDATE_ID = "update.id"; //$NON-NLS-1$
- private static final String CLASSIFIER = "classifier"; //$NON-NLS-1$
- private static final String TOUCHPOINT_VERSION = "touchpoint.version"; //$NON-NLS-1$
- private static final String TOUCHPOINT_ID = "touchpoint.id"; //$NON-NLS-1$
- private static final String COPYRIGHT_LOCATION = "copyright.location"; //$NON-NLS-1$
- private static final String COPYRIGHT = "copyright"; //$NON-NLS-1$
- private static final String ID = "id"; //$NON-NLS-1$
- private static final String SINGLETON = "singleton"; //$NON-NLS-1$
- private static final String IMPORT = "import"; //$NON-NLS-1$
- private static final String RANGE = "range"; //$NON-NLS-1$
- private static final String FILTER = "filter"; //$NON-NLS-1$
- private static final String MULTIPLE = "multiple"; //$NON-NLS-1$
- private static final String OPTIONAL = "optional"; //$NON-NLS-1$
- private static final String GREEDY = "greedy"; //$NON-NLS-1$
- private static final String VERSION = "version"; //$NON-NLS-1$
- private static final String NAMESPACE = "namespace"; //$NON-NLS-1$
- private static final String NAME = "name"; //$NON-NLS-1$
- private static final String LOCATION = "location"; //$NON-NLS-1$
- private static final String VALUE = "value"; //$NON-NLS-1$
-
- private static final String UNITS_PREFIX = "units."; //$NON-NLS-1$
- private static final String INSTRUCTIONS_PREFIX = "instructions."; //$NON-NLS-1$
- private static final String REQUIRES_PREFIX = "requires."; //$NON-NLS-1$
- private static final String META_REQUIREMENTS_PREFIX = "metaRequirements."; //$NON-NLS-1$
- private static final String PROVIDES_PREFIX = "provides."; //$NON-NLS-1$
- private static final String PROPERTIES_PREFIX = "properties."; //$NON-NLS-1$
- private static final String LICENSES_PREFIX = "licenses."; //$NON-NLS-1$
- private static final String ARTIFACTS_PREFIX = "artifacts."; //$NON-NLS-1$
- private static final String HOST_REQUIREMENTS_PREFIX = "hostRequirements."; //$NON-NLS-1$
- private static final String UPDATE_DESCRIPTOR_PREFIX = "update."; //$NON-NLS-1$
-
- public static final Version COMPATIBLE_VERSION = Version.createOSGi(1, 0, 0);
- public static final VersionRange VERSION_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, Version.createOSGi(2, 0, 0), false);
-
- private Map<String, String> adviceProperties = new HashMap<String, String>();
- private List<IProvidedCapability> adviceProvides = new ArrayList<IProvidedCapability>();
- private List<IRequirement> adviceRequires = new ArrayList<IRequirement>();
- private List<IRequirement> adviceMetaRequires = new ArrayList<IRequirement>();
- private IUpdateDescriptor adviceUpdateDescriptor = null;
- private Map<String, ITouchpointInstruction> adviceInstructions = new HashMap<String, ITouchpointInstruction>();
- private List<InstallableUnitDescription> adviceOtherIUs = new ArrayList<InstallableUnitDescription>();
-
- private final Map<String, String> advice;
- private Iterator<String> keysIterator;
- private String current;
- private String hostId;
- private Version hostVersion;
-
- public AdviceFileParser(String id, Version version, Map<String, String> advice) {
- this.hostId = id;
- this.hostVersion = version;
- this.advice = advice;
- }
-
- public void parse() {
- String adviceVersion = advice.get(ADVICE_VERSION);
- if (adviceVersion != null)
- checkAdviceVersion(adviceVersion);
-
- List<String> keys = new ArrayList<String>(advice.keySet());
- Collections.sort(keys);
-
- keysIterator = keys.iterator();
- next();
-
- while (current != null) {
- if (current.startsWith(PROPERTIES_PREFIX))
- parseProperties(PROPERTIES_PREFIX, adviceProperties);
- else if (current.startsWith(UPDATE_DESCRIPTOR_PREFIX))
- this.adviceUpdateDescriptor = parseUpdateDescriptor(UPDATE_DESCRIPTOR_PREFIX, hostId);
- else if (current.startsWith(PROVIDES_PREFIX))
- parseProvides(PROVIDES_PREFIX, adviceProvides);
- else if (current.startsWith(REQUIRES_PREFIX))
- parseRequires(REQUIRES_PREFIX, adviceRequires);
- else if (current.startsWith(META_REQUIREMENTS_PREFIX))
- parseRequires(META_REQUIREMENTS_PREFIX, adviceMetaRequires);
- else if (current.startsWith(INSTRUCTIONS_PREFIX))
- parseInstructions(INSTRUCTIONS_PREFIX, adviceInstructions);
- else if (current.startsWith(UNITS_PREFIX))
- parseUnits(UNITS_PREFIX, adviceOtherIUs);
- else if (current.equals(ADVICE_VERSION)) {
- next();
- } else {
- // we ignore elements we do not understand
- next();
- }
- }
- }
-
- private void checkAdviceVersion(String adviceVersion) {
- Version version = Version.parseVersion(adviceVersion);
- if (!VERSION_TOLERANCE.isIncluded(version))
- throw new IllegalStateException("bad version: " + version + ". Expected range was " + VERSION_TOLERANCE); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- private void next() {
- current = keysIterator.hasNext() ? keysIterator.next() : null;
- }
-
- private String currentValue() {
- return advice.get(current).trim();
- }
-
- private void parseProperties(String prefix, Map<String, String> properties) {
- while (current != null && current.startsWith(prefix)) {
- int dotIndex = current.indexOf('.', prefix.length());
- if (dotIndex == -1)
- throw new IllegalStateException("bad token: " + current); //$NON-NLS-1$
-
- parseProperty(current.substring(0, dotIndex + 1), properties);
- }
- }
-
- private void parseProperty(String prefix, Map<String, String> properties) {
- String propertyName = null;
- String propertyValue = null;
- while (current != null && current.startsWith(prefix)) {
- String token = current.substring(prefix.length());
- if (token.equals(NAME)) {
- propertyName = currentValue();
- } else if (token.equals(VALUE)) {
- propertyValue = currentValue();
- } else {
- // we ignore elements we do not understand
- }
- next();
- }
-
- properties.put(propertyName, propertyValue);
- }
-
- private IUpdateDescriptor parseUpdateDescriptor(String prefix, String id) {
- String name = id;
- String description = null;
- String range = "[0.0.0,$version$)"; //$NON-NLS-1$
- String severity = "0"; //$NON-NLS-1$
-
- while (current != null && current.startsWith(prefix)) {
- String token = current;
- if (token.equals(UPDATE_ID)) {
- name = currentValue();
- } else if (token.equals(UPDATE_DESCRIPTION)) {
- description = currentValue();
- } else if (token.equals(UPDATE_RANGE)) {
- range = currentValue();
- } else if (token.equals(UPDATE_SEVERITY)) {
- severity = currentValue();
- } else {
- // ignore
- }
- next();
- }
-
- range = substituteVersionAndQualifier(range);
- VersionRange versionRange = new VersionRange(range);
- return MetadataFactory.createUpdateDescriptor(name, versionRange, Integer.valueOf(severity), description);
- }
-
- private void parseProvides(String prefix, List<IProvidedCapability> provides) {
- while (current != null && current.startsWith(prefix)) {
- int dotIndex = current.indexOf('.', prefix.length());
- if (dotIndex == -1)
- throw new IllegalStateException("bad token: " + current); //$NON-NLS-1$
-
- parseProvided(current.substring(0, dotIndex + 1), provides);
- }
- }
-
- private void parseProvided(String prefix, List<IProvidedCapability> provides) {
- String namespace = null;
- String name = null;
- Version capabilityVersion = null;
- while (current != null && current.startsWith(prefix)) {
- String token = current.substring(prefix.length());
- if (token.equals(NAME)) {
- name = currentValue();
- } else if (token.equals(NAMESPACE)) {
- namespace = currentValue();
- } else if (token.equals(VERSION)) {
- capabilityVersion = Version.parseVersion(substituteVersionAndQualifier(currentValue()));
- } else {
- // we ignore elements we do not understand
- }
- next();
- }
-
- IProvidedCapability capability = MetadataFactory.createProvidedCapability(namespace, name, capabilityVersion);
- provides.add(capability);
- }
-
- private void parseRequires(String prefix, List<IRequirement> requires) {
- while (current != null && current.startsWith(prefix)) {
- int dotIndex = current.indexOf('.', prefix.length());
- if (dotIndex == -1)
- throw new IllegalStateException("bad token: " + current); //$NON-NLS-1$
-
- parseRequired(current.substring(0, dotIndex + 1), requires);
- }
- }
-
- private void parseRequired(String prefix, List<IRequirement> requires) {
-
- String namespace = null;
- String name = null;
- VersionRange range = null;
- String filter = null;
- boolean optional = false;
- boolean multiple = false;
- boolean greedy = true;
-
- while (current != null && current.startsWith(prefix)) {
- String token = current.substring(prefix.length());
- if (token.equals(GREEDY)) {
- greedy = Boolean.valueOf(currentValue()).booleanValue();
- } else if (token.equals(OPTIONAL)) {
- optional = Boolean.valueOf(currentValue()).booleanValue();
- } else if (token.equals(MULTIPLE)) {
- multiple = Boolean.valueOf(currentValue()).booleanValue();
- } else if (token.equals(FILTER)) {
- filter = currentValue();
- } else if (token.equals(NAME)) {
- name = currentValue();
- } else if (token.equals(NAMESPACE)) {
- namespace = currentValue();
- } else if (token.equals(RANGE)) {
- range = new VersionRange(substituteVersionAndQualifier(currentValue()));
- } else {
- // we ignore elements we do not understand
- }
- next();
- }
- IRequirement capability = MetadataFactory.createRequirement(namespace, name, range, filter, optional, multiple, greedy);
- requires.add(capability);
- }
-
- private void parseInstructions(String prefix, Map<String, ITouchpointInstruction> instructions) {
- while (current != null && current.startsWith(prefix)) {
- int dotIndex = current.indexOf('.', prefix.length());
- if (dotIndex != -1)
- throw new IllegalStateException("bad token: " + current); //$NON-NLS-1$
-
- parseInstruction(current, instructions);
- }
- }
-
- private void parseInstruction(String prefix, Map<String, ITouchpointInstruction> instructions) {
- String phase = current.substring(current.lastIndexOf('.') + 1);
- String body = currentValue();
- next();
-
- prefix += '.';
- String importAttribute = null;
- if (current != null && current.startsWith(prefix)) {
- if (current.substring(prefix.length()).equals(IMPORT)) {
- importAttribute = currentValue();
- } else {
- // we ignore elements we do not understand
- }
- next();
- }
- ITouchpointInstruction instruction = MetadataFactory.createTouchpointInstruction(body, importAttribute);
- instructions.put(phase, instruction);
- }
-
- private void parseUnits(String prefix, List<InstallableUnitDescription> ius) {
- while (current != null && current.startsWith(prefix)) {
- int dotIndex = current.indexOf('.', prefix.length());
- if (dotIndex == -1)
- throw new IllegalStateException("bad token: " + current + " = " + currentValue()); //$NON-NLS-1$ //$NON-NLS-2$
-
- parseUnit(current.substring(0, dotIndex + 1), ius);
- }
- }
-
- private void parseUnit(String prefix, List<InstallableUnitDescription> units) {
- String unitId = null;
- Version unitVersion = null;
- boolean unitSingleton = false;
- String unitFilter = null;
- String unitCopyright = null;
- String unitCopyrightLocation = null;
- String unitTouchpointId = null;
- Version unitTouchpointVersion = null;
-
- String unitUpdateId = null;
- VersionRange unitUpdateRange = null;
- int unitUpdateSeverity = 0;
- String unitUpdateDescription = null;
-
- List<IArtifactKey> unitArtifacts = new ArrayList<IArtifactKey>();
- Map<String, String> unitProperties = new HashMap<String, String>();
- List<IRequirement> unitHostRequirements = new ArrayList<IRequirement>();
- List<IProvidedCapability> unitProvides = new ArrayList<IProvidedCapability>();
- List<IRequirement> unitRequires = new ArrayList<IRequirement>();
- List<IRequirement> unitMetaRequirements = new ArrayList<IRequirement>();
- List<ILicense> unitLicenses = new ArrayList<ILicense>();
- Map<String, ITouchpointInstruction> unitInstructions = new HashMap<String, ITouchpointInstruction>();
- // updatedescriptor ??
-
- while (current != null && current.startsWith(prefix)) {
- String token = current.substring(prefix.length());
- if (token.equals(ID)) {
- unitId = currentValue();
- next();
- } else if (token.equals(VERSION)) {
- unitVersion = Version.parseVersion(substituteVersionAndQualifier(currentValue()));
- next();
- } else if (token.equals(SINGLETON)) {
- unitSingleton = Boolean.valueOf(currentValue()).booleanValue();
- next();
- } else if (token.equals(FILTER)) {
- unitFilter = currentValue();
- next();
- } else if (token.equals(COPYRIGHT)) {
- unitCopyright = currentValue();
- next();
- } else if (token.equals(COPYRIGHT_LOCATION)) {
- unitCopyrightLocation = currentValue();
- next();
- } else if (token.equals(TOUCHPOINT_ID)) {
- unitTouchpointId = currentValue();
- next();
- } else if (token.equals(TOUCHPOINT_VERSION)) {
- unitTouchpointVersion = Version.parseVersion(substituteVersionAndQualifier(currentValue()));
- next();
- } else if (token.equals(UPDATE_ID)) {
- unitUpdateId = currentValue();
- next();
- } else if (token.equals(UPDATE_RANGE)) {
- unitUpdateRange = new VersionRange(substituteVersionAndQualifier(currentValue()));
- next();
- } else if (token.equals(UPDATE_SEVERITY)) {
- unitUpdateSeverity = Integer.parseInt(currentValue());
- next();
- } else if (token.equals(UPDATE_DESCRIPTION)) {
- unitUpdateDescription = currentValue();
- next();
- } else if (token.startsWith(HOST_REQUIREMENTS_PREFIX))
- parseRequires(prefix + HOST_REQUIREMENTS_PREFIX, unitHostRequirements);
- else if (token.startsWith(ARTIFACTS_PREFIX))
- parseArtifacts(prefix + ARTIFACTS_PREFIX, unitArtifacts);
- else if (token.startsWith(LICENSES_PREFIX))
- parseLicenses(prefix + LICENSES_PREFIX, unitLicenses);
- else if (token.startsWith(PROPERTIES_PREFIX))
- parseProperties(prefix + PROPERTIES_PREFIX, unitProperties);
- else if (token.startsWith(PROVIDES_PREFIX))
- parseProvides(prefix + PROVIDES_PREFIX, unitProvides);
- else if (token.startsWith(REQUIRES_PREFIX))
- parseRequires(prefix + REQUIRES_PREFIX, unitRequires);
- else if (token.startsWith(META_REQUIREMENTS_PREFIX))
- parseRequires(prefix + META_REQUIREMENTS_PREFIX, unitMetaRequirements);
- else if (token.startsWith(INSTRUCTIONS_PREFIX))
- parseInstructions(prefix + INSTRUCTIONS_PREFIX, unitInstructions);
- else {
- // we ignore elements we do not understand
- next();
- }
- }
-
- InstallableUnitDescription description = unitHostRequirements.isEmpty() ? new InstallableUnitDescription() : new InstallableUnitFragmentDescription();
- description.setId(unitId);
- description.setVersion(unitVersion);
- description.setSingleton(unitSingleton);
- description.setFilter(unitFilter);
- if (unitCopyright != null || unitCopyrightLocation != null) {
- try {
- URI uri = unitCopyrightLocation != null ? new URI(unitCopyrightLocation) : null;
- description.setCopyright(MetadataFactory.createCopyright(uri, unitCopyright));
- } catch (URISyntaxException e) {
- throw new IllegalStateException("bad copyright URI at token: " + current + ", " + currentValue()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- if (unitTouchpointId != null)
- description.setTouchpointType(MetadataFactory.createTouchpointType(unitTouchpointId, unitTouchpointVersion));
-
- if (unitUpdateId != null)
- description.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(unitUpdateId, unitUpdateRange, unitUpdateSeverity, unitUpdateDescription));
-
- if (!unitLicenses.isEmpty())
- description.setLicenses(unitLicenses.toArray(new ILicense[unitLicenses.size()]));
-
- if (!unitArtifacts.isEmpty())
- description.setArtifacts(unitArtifacts.toArray(new IArtifactKey[unitArtifacts.size()]));
-
- if (!unitHostRequirements.isEmpty())
- ((InstallableUnitFragmentDescription) description).setHost(unitHostRequirements.toArray(new IRequirement[unitHostRequirements.size()]));
-
- if (!unitProperties.isEmpty()) {
- for (Entry<String, String> entry : unitProperties.entrySet()) {
- description.setProperty(entry.getKey(), entry.getValue());
- }
- }
-
- if (!unitProvides.isEmpty())
- description.setCapabilities(unitProvides.toArray(new IProvidedCapability[unitProvides.size()]));
-
- if (!unitRequires.isEmpty())
- description.setRequirements(unitRequires.toArray(new IRequirement[unitRequires.size()]));
-
- if (!unitMetaRequirements.isEmpty())
- description.setMetaRequirements(unitMetaRequirements.toArray(new IRequirement[unitMetaRequirements.size()]));
-
- if (!unitInstructions.isEmpty())
- description.addTouchpointData(MetadataFactory.createTouchpointData(unitInstructions));
-
- adviceOtherIUs.add(description);
- }
-
- private void parseLicenses(String prefix, List<ILicense> licenses) {
- while (current != null && current.startsWith(prefix)) {
- int dotIndex = current.indexOf('.', prefix.length());
- if (dotIndex != -1)
- throw new IllegalStateException("bad token: " + current + " = " + currentValue()); //$NON-NLS-1$ //$NON-NLS-2$
-
- parseLicense(current, licenses);
- }
- }
-
- private void parseLicense(String prefix, List<ILicense> licenses) {
- String body = currentValue();
- next();
-
- prefix += '.';
- String location = null;
- if (current != null && current.startsWith(prefix)) {
- if (current.substring(prefix.length()).equals(LOCATION)) {
- location = currentValue();
- } else {
- // we ignore elements we do not understand
- }
- next();
- }
-
- try {
- URI uri = location != null ? new URI(location) : null;
- ILicense license = MetadataFactory.createLicense(uri, body);
- licenses.add(license);
- } catch (URISyntaxException e) {
- throw new IllegalStateException("bad license URI at token: " + current + ", " + currentValue()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- private void parseArtifacts(String prefix, List<IArtifactKey> artifacts) {
- while (current != null && current.startsWith(prefix)) {
- int dotIndex = current.indexOf('.', prefix.length());
- if (dotIndex == -1)
- throw new IllegalStateException("bad token: " + current + " = " + currentValue()); //$NON-NLS-1$ //$NON-NLS-2$
-
- parseArtifact(current.substring(0, dotIndex + 1), artifacts);
- }
- }
-
- private void parseArtifact(String prefix, List<IArtifactKey> artifacts) {
- String artifactClassifier = null;
- String artifactId = null;
- Version artifactVersion = null;
- while (current != null && current.startsWith(prefix)) {
- String token = current.substring(prefix.length());
- if (token.equals(CLASSIFIER)) {
- artifactClassifier = currentValue();
- } else if (token.equals(ID)) {
- artifactId = currentValue();
- } else if (token.equals(VERSION)) {
- artifactVersion = Version.parseVersion(substituteVersionAndQualifier(currentValue()));
- } else {
- // we ignore elements we do not understand
- }
-
- next();
- }
- IArtifactKey artifactKey = new ArtifactKey(artifactClassifier, artifactId, artifactVersion);
- artifacts.add(artifactKey);
- }
-
- private String substituteVersionAndQualifier(String version) {
- if (version.indexOf(VERSION_SUBSTITUTION) != -1) {
- version = replace(version, VERSION_SUBSTITUTION, hostVersion.toString());
- }
-
- if (version.indexOf(QUALIFIER_SUBSTITUTION) != -1) {
- try {
- String qualifier = PublisherHelper.toOSGiVersion(hostVersion).getQualifier();
- if (qualifier == null)
- qualifier = ""; //$NON-NLS-1$
- if (qualifier.length() == 0) {
- // Note: this works only for OSGi versions and version ranges
- // where the qualifier if present must be at the end of a version string
- version = replace(version, "." + QUALIFIER_SUBSTITUTION, ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- version = replace(version, QUALIFIER_SUBSTITUTION, qualifier);
- } catch (UnsupportedOperationException e) {
- // Version cannot be converted to OSGi
- }
- }
- return version;
- }
-
- // originally from org.eclipse.core.internal.net.StringUtil
- public static String replace(String source, String from, String to) {
- if (from.length() == 0)
- return source;
- StringBuffer buffer = new StringBuffer();
- int current = 0;
- int pos = 0;
- while (pos != -1) {
- pos = source.indexOf(from, current);
- if (pos == -1) {
- buffer.append(source.substring(current));
- } else {
- buffer.append(source.substring(current, pos));
- buffer.append(to);
- current = pos + from.length();
- }
- }
- return buffer.toString();
- }
-
- public Map<String, String> getProperties() {
- if (adviceProperties.isEmpty())
- return null;
- return adviceProperties;
- }
-
- public IRequirement[] getRequiredCapabilities() {
- if (adviceRequires.isEmpty())
- return null;
-
- return adviceRequires.toArray(new IRequirement[adviceRequires.size()]);
- }
-
- public IProvidedCapability[] getProvidedCapabilities() {
- if (adviceProvides.isEmpty())
- return null;
-
- return adviceProvides.toArray(new IProvidedCapability[adviceProvides.size()]);
- }
-
- public IUpdateDescriptor getUpdateDescriptor() {
- return adviceUpdateDescriptor;
- }
-
- public Map<String, ITouchpointInstruction> getTouchpointInstructions() {
- if (adviceInstructions.isEmpty())
- return null;
-
- return adviceInstructions;
- }
-
- public InstallableUnitDescription[] getAdditionalInstallableUnitDescriptions() {
- if (adviceOtherIUs.isEmpty())
- return null;
-
- return adviceOtherIUs.toArray(new InstallableUnitDescription[adviceOtherIUs.size()]);
- }
-
- public IRequirement[] getMetaRequiredCapabilities() {
- if (adviceMetaRequires.isEmpty())
- return null;
-
- return adviceMetaRequires.toArray(new IRequirement[adviceMetaRequires.size()]);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
deleted file mode 100644
index 3c5497a5a..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ApplicationLauncherAction.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
-
-/**
- * Create IUs and CUs that represent the entire launcher for an application. This includes
- * the executable, the launcher fragments as well as the CUs required to install and configure
- * these elements.
- */
-public class ApplicationLauncherAction extends AbstractPublisherAction {
-
- private String flavor;
- private String[] configSpecs;
- private File location;
- private String executableName;
- private Version version;
- private String id;
-
- /**
- * Returns the id of the top level IU published by this action for the given id and flavor.
- * @param id the id of the application being published
- * @param flavor the flavor being published
- * @return the if for ius published by this action
- */
- public static String computeIUId(String id, String flavor) {
- return flavor + id + ".application"; //$NON-NLS-1$
- }
-
- public ApplicationLauncherAction(String id, Version version, String flavor, String executableName, File location, String[] configSpecs) {
- this.flavor = flavor;
- this.configSpecs = configSpecs;
- this.id = id;
- this.version = version;
- this.executableName = executableName;
- this.location = location;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- // Create the basic actions and run them putting the IUs in a temporary result
- Collection<IPublisherAction> actions = createActions(publisherInfo);
- createAdvice(publisherInfo, results);
- IPublisherResult innerResult = new PublisherResult();
- MultiStatus finalStatus = new MultiStatus(ApplicationLauncherAction.class.getName(), 0, "publishing result", null); //$NON-NLS-1$
- for (IPublisherAction action : actions) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- finalStatus.merge(action.perform(publisherInfo, innerResult, monitor));
- }
- if (!finalStatus.isOK())
- return finalStatus;
- // merge the IUs into the final result as non-roots and create a parent IU that captures them all
- results.merge(innerResult, IPublisherResult.MERGE_ALL_NON_ROOT);
- publishApplicationLauncherIU(innerResult.getIUs(null, IPublisherResult.ROOT), results);
- return Status.OK_STATUS;
- }
-
- /**
- * Create advice needed by the actions related to and following this action
- */
- private void createAdvice(IPublisherInfo publisherInfo, IPublisherResult results) {
- createLauncherAdvice(publisherInfo, results);
- }
-
- /**
- * Create and register advice that will tell people what versions of the launcher bundle and
- * fragments are in use in this particular result.
- */
- private void createLauncherAdvice(IPublisherInfo publisherInfo, IPublisherResult results) {
- Collection<IInstallableUnit> ius = getIUs(results.getIUs(null, null), EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER);
- VersionAdvice advice = new VersionAdvice();
- boolean found = false;
- for (IInstallableUnit iu : ius) {
- // skip over source bundles and fragments
- // TODO should we use the source property here rather than magic name matching?
- if (iu.getId().endsWith(".source") || QueryUtil.isFragment(iu)) //$NON-NLS-1$
- continue;
- advice.setVersion(IInstallableUnit.NAMESPACE_IU_ID, iu.getId(), iu.getVersion());
- found = true;
- }
- if (found)
- publisherInfo.addAdvice(advice);
- }
-
- private Collection<IInstallableUnit> getIUs(Collection<IInstallableUnit> ius, String prefix) {
- Set<IInstallableUnit> result = new HashSet<IInstallableUnit>();
- for (IInstallableUnit tmp : ius) {
- if (tmp.getId().startsWith(prefix))
- result.add(tmp);
- }
- return result;
- }
-
- private void publishApplicationLauncherIU(Collection<? extends IVersionedId> children, IPublisherResult result) {
- InstallableUnitDescription descriptor = createParentIU(children, computeIUId(id, flavor), version);
- descriptor.setSingleton(true);
- IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
- if (rootIU == null)
- return;
- result.addIU(rootIU, IPublisherResult.ROOT);
- }
-
- private Collection<IPublisherAction> createActions(IPublisherInfo publisherInfo) {
- Collection<IPublisherAction> actions = new ArrayList<IPublisherAction>();
- actions.add(new EquinoxLauncherCUAction(flavor, configSpecs));
- actions.addAll(createExecutablesActions(configSpecs));
- return actions;
- }
-
- protected Collection<IPublisherAction> createExecutablesActions(String[] configs) {
- Collection<IPublisherAction> actions = new ArrayList<IPublisherAction>(configs.length);
- for (int i = 0; i < configs.length; i++) {
- ExecutablesDescriptor executables = computeExecutables(configs[i]);
- IPublisherAction action = new EquinoxExecutableAction(executables, configs[i], id, version, flavor);
- actions.add(action);
- }
- return actions;
- }
-
- protected ExecutablesDescriptor computeExecutables(String configSpec) {
- // See if we know about an executables feature then use it as the source
- ExecutablesDescriptor result = ExecutablesDescriptor.createExecutablesFromFeature(location, configSpec);
- if (result != null)
- return result;
- // otherwise, assume that we are running against an Eclipse install and do the default thing
- String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1];
- return ExecutablesDescriptor.createDescriptor(os, executableName, location);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java
deleted file mode 100644
index 510da514e..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundleShapeAdvice.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-
-public class BundleShapeAdvice extends AbstractAdvice implements IBundleShapeAdvice {
-
- private String shape;
- private Version version;
- private String id;
-
- public BundleShapeAdvice(String id, Version version, String shape) {
- this.id = id;
- this.version = version;
- this.shape = shape;
- }
-
- protected String getId() {
- return id;
- }
-
- protected Version getVersion() {
- return version;
- }
-
- public String getShape() {
- return shape;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
deleted file mode 100644
index af9a9b82b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
+++ /dev/null
@@ -1,822 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.*;
-import java.util.*;
-import java.util.Map.Entry;
-import java.util.jar.JarFile;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.VersionRange;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.*;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.spi.p2.publisher.LocalizationHelper;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.eclipse.osgi.service.pluginconversion.PluginConversionException;
-import org.eclipse.osgi.service.pluginconversion.PluginConverter;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.ManifestElement;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * Publish IUs for all of the bundles in a given set of locations or described by a set of
- * bundle descriptions. The locations can be actual locations of the bundles or folders
- * of bundles.
- *
- * This action consults the following types of advice:
- * </ul>
- * <li>{@link IAdditionalInstallableUnitAdvice }</li>
- * <li>{@link IBundleShapeAdvice}</li>
- * <li>{@link ICapabilityAdvice}</li>
- * <li>{@link IPropertyAdvice}</li>
- * <li>{@link ITouchpointAdvice}</li>
- * </ul>
- */
-public class BundlesAction extends AbstractPublisherAction {
-
- // TODO reconsider the references to these specific ids in the action. The action should be generic
- protected static final String ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
- protected static final String ORG_ECLIPSE_UPDATE_CONFIGURATOR = "org.eclipse.update.configurator"; //$NON-NLS-1$
- /**
- * A capability name in the {@link PublisherHelper#NAMESPACE_ECLIPSE_TYPE} namespace
- * representing and OSGi bundle resource
- * @see IProvidedCapability#getName()
- */
- public static final String TYPE_ECLIPSE_BUNDLE = "bundle"; //$NON-NLS-1$
-
- /**
- * A capability name in the {@link PublisherHelper#NAMESPACE_ECLIPSE_TYPE} namespace
- * representing a source bundle
- * @see IProvidedCapability#getName()
- */
- public static final String TYPE_ECLIPSE_SOURCE = "source"; //$NON-NLS-1$
-
- public static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
- private static final String CAPABILITY_NS_OSGI_BUNDLE = "osgi.bundle"; //$NON-NLS-1$
- private static final String CAPABILITY_NS_OSGI_FRAGMENT = "osgi.fragment"; //$NON-NLS-1$
-
- public static final IProvidedCapability BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, Version.createOSGi(1, 0, 0));
- public static final IProvidedCapability SOURCE_BUNDLE_CAPABILITY = MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, Version.createOSGi(1, 0, 0));
-
- static final String DEFAULT_BUNDLE_LOCALIZATION = "OSGI-INF/l10n/bundle"; //$NON-NLS-1$
-
- private static final String[] BUNDLE_IU_PROPERTY_MAP = {Constants.BUNDLE_NAME, IInstallableUnit.PROP_NAME, Constants.BUNDLE_DESCRIPTION, IInstallableUnit.PROP_DESCRIPTION, Constants.BUNDLE_VENDOR, IInstallableUnit.PROP_PROVIDER, Constants.BUNDLE_CONTACTADDRESS, IInstallableUnit.PROP_CONTACT, Constants.BUNDLE_DOCURL, IInstallableUnit.PROP_DOC_URL, Constants.BUNDLE_UPDATELOCATION, IInstallableUnit.PROP_BUNDLE_LOCALIZATION, Constants.BUNDLE_LOCALIZATION, IInstallableUnit.PROP_BUNDLE_LOCALIZATION};
- public static final int BUNDLE_LOCALIZATION_INDEX = PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length - 1;
- public static final String DIR = "dir"; //$NON-NLS-1$
- public static final String JAR = "jar"; //$NON-NLS-1$
- private static final String FEATURE_FILENAME_DESCRIPTOR = "feature.xml"; //$NON-NLS-1$
- private static final String PLUGIN_FILENAME_DESCRIPTOR = "plugin.xml"; //$NON-NLS-1$
- private static final String FRAGMENT_FILENAME_DESCRIPTOR = "fragment.xml"; //$NON-NLS-1$
- public static String BUNDLE_SHAPE = "Eclipse-BundleShape"; //$NON-NLS-1$
-
- private File[] locations;
- private BundleDescription[] bundles;
-
- public static IArtifactKey createBundleArtifactKey(String bsn, String version) {
- return new ArtifactKey(OSGI_BUNDLE_CLASSIFIER, bsn, Version.parseVersion(version));
- }
-
- public static IInstallableUnit createBundleConfigurationUnit(String hostId, Version cuVersion, boolean isBundleFragment, GeneratorBundleInfo configInfo, String configurationFlavor, IMatchExpression<IInstallableUnit> filter) {
- if (configInfo == null)
- return null;
-
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = configurationFlavor + hostId;
- cu.setId(configUnitId);
- cu.setVersion(cuVersion);
-
- //Indicate the IU to which this CU apply
- Version hostVersion = Version.parseVersion(configInfo.getVersion());
- VersionRange range = hostVersion == Version.emptyVersion ? VersionRange.emptyRange : new VersionRange(hostVersion, true, Version.MAX_VERSION, true);
- cu.setHost(new IRequirement[] { //
- MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, hostId, range, null, false, false, true), //
- MetadataFactory.createRequirement(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, new VersionRange(Version.createOSGi(1, 0, 0), true, Version.createOSGi(2, 0, 0), false), null, false, false, false)});
-
- //Adds capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, cuVersion), MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- Map<String, String> touchpointData = new HashMap<String, String>();
- touchpointData.put("install", "installBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("configure", createConfigScript(configInfo, isBundleFragment)); //$NON-NLS-1$
- touchpointData.put("unconfigure", createUnconfigScript(configInfo, isBundleFragment)); //$NON-NLS-1$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- cu.setFilter(filter);
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- public static IInstallableUnit createBundleIU(BundleDescription bd, IArtifactKey key, IPublisherInfo info) {
- @SuppressWarnings("unchecked")
- Map<String, String> manifest = (Map<String, String>) bd.getUserObject();
- Map<Locale, Map<String, String>> manifestLocalizations = null;
- if (manifest != null && bd.getLocation() != null)
- manifestLocalizations = getManifestLocalizations(manifest, new File(bd.getLocation()));
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(bd.isSingleton());
- iu.setId(bd.getSymbolicName());
- iu.setVersion(PublisherHelper.fromOSGiVersion(bd.getVersion()));
- iu.setFilter(bd.getPlatformFilter());
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(bd.getSymbolicName(), computeUpdateRange(bd.getVersion()), IUpdateDescriptor.NORMAL, null));
- iu.setArtifacts(new IArtifactKey[] {key});
- iu.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
-
- boolean isFragment = bd.getHost() != null;
- // boolean requiresAFragment = isFragment ? false : requireAFragment(bd, manifest);
-
- //Process the required bundles
- BundleSpecification requiredBundles[] = bd.getRequiredBundles();
- ArrayList<IRequirement> reqsDeps = new ArrayList<IRequirement>();
- // if (requiresAFragment)
- // reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_TYPE_OSGI_FRAGMENTS, bd.getSymbolicName(), VersionRange.emptyRange, null, false, false));
- if (isFragment)
- reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), PublisherHelper.fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
- for (int j = 0; j < requiredBundles.length; j++)
- reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), PublisherHelper.fromOSGiVersionRange(requiredBundles[j].getVersionRange()), null, requiredBundles[j].isOptional(), false));
-
- // Process the import packages
- ImportPackageSpecification osgiImports[] = bd.getImportPackages();
- for (int i = 0; i < osgiImports.length; i++) {
- // TODO we need to sort out how we want to handle wild-carded dynamic imports - for now we ignore them
- ImportPackageSpecification importSpec = osgiImports[i];
- String importPackageName = importSpec.getName();
- if (importPackageName.indexOf('*') != -1)
- continue;
- VersionRange versionRange = PublisherHelper.fromOSGiVersionRange(importSpec.getVersionRange());
- //TODO this needs to be refined to take into account all the attribute handled by imports
- reqsDeps.add(MetadataFactory.createRequirement(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
- }
- iu.setRequirements(reqsDeps.toArray(new IRequirement[reqsDeps.size()]));
-
- // Create set of provided capabilities
- ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
- providedCapabilities.add(PublisherHelper.createSelfCapability(bd.getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion())));
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion())));
-
- // Process the export package
- ExportPackageDescription exports[] = bd.getExportPackages();
- for (int i = 0; i < exports.length; i++) {
- //TODO make sure that we support all the refinement on the exports
- providedCapabilities.add(MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, exports[i].getName(), PublisherHelper.fromOSGiVersion(exports[i].getVersion())));
- }
- // Here we add a bundle capability to identify bundles
- if (manifest != null && manifest.containsKey("Eclipse-SourceBundle")) //$NON-NLS-1$
- providedCapabilities.add(SOURCE_BUNDLE_CAPABILITY);
- else
- providedCapabilities.add(BUNDLE_CAPABILITY);
- if (isFragment)
- providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_FRAGMENT, bd.getHost().getName(), PublisherHelper.fromOSGiVersion(bd.getVersion())));
-
- if (manifestLocalizations != null) {
- for (Entry<Locale, Map<String, String>> locEntry : manifestLocalizations.entrySet()) {
- Locale locale = locEntry.getKey();
- Map<String, String> translatedStrings = locEntry.getValue();
- for (Entry<String, String> entry : translatedStrings.entrySet()) {
- iu.setProperty(locale.toString() + '.' + entry.getKey(), entry.getValue());
- }
- providedCapabilities.add(PublisherHelper.makeTranslationCapability(bd.getSymbolicName(), locale));
- }
- }
- iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
- processUpdateDescriptorAdvice(iu, info);
- processCapabilityAdvice(iu, info);
-
- // Set certain properties from the manifest header attributes as IU properties.
- // The values of these attributes may be localized (strings starting with '%')
- // with the translated values appearing in the localization IU fragments
- // associated with the bundle IU.
- if (manifest != null) {
- int i = 0;
- while (i < BUNDLE_IU_PROPERTY_MAP.length) {
- if (manifest.containsKey(BUNDLE_IU_PROPERTY_MAP[i])) {
- String value = manifest.get(BUNDLE_IU_PROPERTY_MAP[i]);
- if (value != null && value.length() > 0) {
- iu.setProperty(BUNDLE_IU_PROPERTY_MAP[i + 1], value);
- }
- }
- i += 2;
- }
- }
-
- // Define the immutable metadata for this IU. In this case immutable means
- // that this is something that will not impact the configuration.
- Map<String, String> touchpointData = new HashMap<String, String>();
- touchpointData.put("manifest", toManifestString(manifest)); //$NON-NLS-1$
- if (isDir(bd, info))
- touchpointData.put("zipped", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- processTouchpointAdvice(iu, touchpointData, info);
-
- processInstallableUnitPropertiesAdvice(iu, info);
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- static VersionRange computeUpdateRange(org.osgi.framework.Version base) {
- VersionRange updateRange = null;
- if (!base.equals(org.osgi.framework.Version.emptyVersion)) {
- updateRange = new VersionRange(Version.emptyVersion, true, PublisherHelper.fromOSGiVersion(base), false);
- } else {
- updateRange = VersionRange.emptyRange;
- }
- return updateRange;
- }
-
- private IInstallableUnitFragment createHostLocalizationFragment(IInstallableUnit bundleIU, BundleDescription bd, String hostId, String[] hostBundleManifestValues) {
- Map<Locale, Map<String, String>> hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues);
- if (hostLocalizations == null || hostLocalizations.isEmpty())
- return null;
- return createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations);
- }
-
- /*
- * @param hostId
- * @param bd
- * @param locale
- * @param localizedStrings
- * @return installableUnitFragment
- */
- private static IInstallableUnitFragment createLocalizationFragmentOfHost(BundleDescription bd, String hostId, String[] hostManifestValues, Map<Locale, Map<String, String>> hostLocalizations) {
- InstallableUnitFragmentDescription fragment = new MetadataFactory.InstallableUnitFragmentDescription();
- String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
- fragment.setId(fragmentId);
- fragment.setVersion(PublisherHelper.fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
-
- HostSpecification hostSpec = bd.getHost();
- IRequirement[] hostReqs = new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), PublisherHelper.fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
- fragment.setHost(hostReqs);
-
- fragment.setSingleton(true);
- fragment.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
-
- // Create a provided capability for each locale and add the translated properties.
- ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>(hostLocalizations.keySet().size());
- providedCapabilities.add(PublisherHelper.createSelfCapability(fragmentId, fragment.getVersion()));
- for (Entry<Locale, Map<String, String>> localeEntry : hostLocalizations.entrySet()) {
- Locale locale = localeEntry.getKey();
- Map<String, String> translatedStrings = localeEntry.getValue();
- for (Entry<String, String> entry : translatedStrings.entrySet()) {
- fragment.setProperty(locale.toString() + '.' + entry.getKey(), entry.getValue());
- }
- providedCapabilities.add(PublisherHelper.makeTranslationCapability(hostId, locale));
- }
- fragment.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
-
- return MetadataFactory.createInstallableUnitFragment(fragment);
- }
-
- /**
- * @param id
- * @return the id for the iu fragment containing localized properties
- * for the fragment with the given id.
- */
- private static String makeHostLocalizationFragmentId(String id) {
- return id + ".translated_host_properties"; //$NON-NLS-1$
- }
-
- private static String createConfigScript(GeneratorBundleInfo configInfo, boolean isBundleFragment) {
- if (configInfo == null)
- return ""; //$NON-NLS-1$
-
- String configScript = "";//$NON-NLS-1$
- if (!isBundleFragment && configInfo.getStartLevel() != BundleInfo.NO_LEVEL) {
- configScript += "setStartLevel(startLevel:" + configInfo.getStartLevel() + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (!isBundleFragment && configInfo.isMarkedAsStarted()) {
- configScript += "markStarted(started: true);"; //$NON-NLS-1$
- }
-
- if (configInfo.getSpecialConfigCommands() != null) {
- configScript += configInfo.getSpecialConfigCommands();
- }
-
- return configScript;
- }
-
- private static String createDefaultBundleConfigScript(GeneratorBundleInfo configInfo) {
- return createConfigScript(configInfo, false);
- }
-
- public static IInstallableUnit createDefaultBundleConfigurationUnit(GeneratorBundleInfo configInfo, GeneratorBundleInfo unconfigInfo, String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = PublisherHelper.createDefaultConfigUnitId(OSGI_BUNDLE_CLASSIFIER, configurationFlavor);
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(PublisherHelper.NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on bundles
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(PublisherHelper.NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_BUNDLE, VersionRange.emptyRange, null, false, true, false)};
- cu.setHost(reqs);
- Map<String, String> touchpointData = new HashMap<String, String>();
-
- touchpointData.put("install", "installBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("configure", createDefaultBundleConfigScript(configInfo)); //$NON-NLS-1$
- touchpointData.put("unconfigure", createDefaultBundleUnconfigScript(unconfigInfo)); //$NON-NLS-1$
-
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- private static String createDefaultBundleUnconfigScript(GeneratorBundleInfo unconfigInfo) {
- return createUnconfigScript(unconfigInfo, false);
- }
-
- private static String createUnconfigScript(GeneratorBundleInfo unconfigInfo, boolean isBundleFragment) {
- if (unconfigInfo == null)
- return ""; //$NON-NLS-1$
- String unconfigScript = "";//$NON-NLS-1$
- if (!isBundleFragment && unconfigInfo.getStartLevel() != BundleInfo.NO_LEVEL) {
- unconfigScript += "setStartLevel(startLevel:" + BundleInfo.NO_LEVEL + ");"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (!isBundleFragment && unconfigInfo.isMarkedAsStarted()) {
- unconfigScript += "markStarted(started: false);"; //$NON-NLS-1$
- }
-
- if (unconfigInfo.getSpecialUnconfigCommands() != null) {
- unconfigScript += unconfigInfo.getSpecialUnconfigCommands();
- }
- return unconfigScript;
- }
-
- private static boolean isOptional(ImportPackageSpecification importedPackage) {
- if (importedPackage.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_DYNAMIC) || importedPackage.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_OPTIONAL))
- return true;
- return false;
- }
-
- private static String toManifestString(Map<String, String> p) {
- if (p == null)
- return null;
- StringBuffer result = new StringBuffer();
- // See https://bugs.eclipse.org/329386. We are trying to reduce the size of the manifest data in
- // the eclipse touchpoint. We've removed the code that requires it but in order for old clients
- // to still be able to use recent repositories, we're going to keep around the manifest properties
- // they need.
- final String[] interestingKeys = new String[] {Constants.BUNDLE_SYMBOLICNAME, Constants.BUNDLE_VERSION, Constants.FRAGMENT_HOST};
- for (String key : interestingKeys) {
- String value = p.get(key);
- if (value != null)
- result.append(key).append(": ").append(value).append('\n'); //$NON-NLS-1$
- }
- return result.length() == 0 ? null : result.toString();
- }
-
- // Return a map from locale to property set for the manifest localizations
- // from the given bundle directory and given bundle localization path/name
- // manifest property value.
- private static Map<Locale, Map<String, String>> getManifestLocalizations(Map<String, String> manifest, File bundleLocation) {
- Map<Locale, Map<String, String>> localizations;
- Locale defaultLocale = null; // = Locale.ENGLISH; // TODO: get this from GeneratorInfo
- String[] bundleManifestValues = getManifestCachedValues(manifest);
- String bundleLocalization = bundleManifestValues[BUNDLE_LOCALIZATION_INDEX]; // Bundle localization is the last one in the list
-
- if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && //$NON-NLS-1$
- bundleLocation.isFile()) {
- localizations = LocalizationHelper.getJarPropertyLocalizations(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- //localizations = getJarManifestLocalization(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- } else {
- localizations = LocalizationHelper.getDirPropertyLocalizations(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- // localizations = getDirManifestLocalization(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
- }
-
- return localizations;
- }
-
- public static String[] getExternalizedStrings(IInstallableUnit iu) {
- String[] result = new String[PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length];
- int j = 0;
- for (int i = 1; i < BUNDLE_IU_PROPERTY_MAP.length - 1; i += 2) {
- if (iu.getProperty(BUNDLE_IU_PROPERTY_MAP[i]) != null && iu.getProperty(BUNDLE_IU_PROPERTY_MAP[i]).length() > 0 && iu.getProperty(BUNDLE_IU_PROPERTY_MAP[i]).charAt(0) == '%')
- result[j++] = iu.getProperty(BUNDLE_IU_PROPERTY_MAP[i]).substring(1);
- else
- j++;
- }
- // The last string is the location
- result[BUNDLE_LOCALIZATION_INDEX] = iu.getProperty(IInstallableUnit.PROP_BUNDLE_LOCALIZATION);
-
- return result;
- }
-
- public static String[] getManifestCachedValues(Map<String, String> manifest) {
- String[] cachedValues = new String[PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length];
- for (int j = 0; j < PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES.length; j++) {
- String value = manifest.get(PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES[j]);
- if (PublisherHelper.BUNDLE_LOCALIZED_PROPERTIES[j].equals(Constants.BUNDLE_LOCALIZATION)) {
- if (value == null)
- value = DEFAULT_BUNDLE_LOCALIZATION;
- cachedValues[j] = value;
- } else if (value != null && value.length() > 1 && value.charAt(0) == '%') {
- cachedValues[j] = value.substring(1);
- }
- }
- return cachedValues;
- }
-
- // Return a map from locale to property set for the manifest localizations
- // from the given bundle directory and given bundle localization path/name
- // manifest property value.
- public static Map<Locale, Map<String, String>> getHostLocalizations(File bundleLocation, String[] hostBundleManifestValues) {
- Map<Locale, Map<String, String>> localizations;
- Locale defaultLocale = null; // = Locale.ENGLISH; // TODO: get this from GeneratorInfo
- String hostBundleLocalization = hostBundleManifestValues[BUNDLE_LOCALIZATION_INDEX];
- if (hostBundleLocalization == null)
- return null;
-
- if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && //$NON-NLS-1$
- bundleLocation.isFile()) {
- localizations = LocalizationHelper.getJarPropertyLocalizations(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- //localizations = getJarManifestLocalization(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- } else {
- localizations = LocalizationHelper.getDirPropertyLocalizations(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- // localizations = getDirManifestLocalization(bundleLocation, hostBundleLocalization, defaultLocale, hostBundleManifestValues);
- }
-
- return localizations;
- }
-
- private static PluginConverter acquirePluginConverter() {
- return (PluginConverter) ServiceHelper.getService(Activator.getContext(), PluginConverter.class.getName());
- }
-
- private static Dictionary<String, String> convertPluginManifest(File bundleLocation, boolean logConversionException) {
- PluginConverter converter;
- try {
- converter = acquirePluginConverter();
- if (converter == null) {
- String message = NLS.bind(Messages.exception_noPluginConverter, bundleLocation);
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
- return null;
- }
- return converter.convertManifest(bundleLocation, false, null, true, null);
- } catch (PluginConversionException convertException) {
- // only log the exception if we had a plugin.xml or fragment.xml and we failed conversion
- if (bundleLocation.getName().equals(FEATURE_FILENAME_DESCRIPTOR))
- return null;
- if (!new File(bundleLocation, PLUGIN_FILENAME_DESCRIPTOR).exists() && !new File(bundleLocation, FRAGMENT_FILENAME_DESCRIPTOR).exists())
- return null;
- if (logConversionException) {
- IStatus status = new Status(IStatus.WARNING, Activator.ID, 0, NLS.bind(Messages.exception_errorConverting, bundleLocation.getAbsolutePath()), convertException);
- LogHelper.log(status);
- }
- return null;
- }
- }
-
- public static BundleDescription createBundleDescription(Dictionary<String, String> enhancedManifest, File bundleLocation) {
- try {
- BundleDescription descriptor = StateObjectFactory.defaultFactory.createBundleDescription(null, enhancedManifest, bundleLocation == null ? null : bundleLocation.getAbsolutePath(), 1); //TODO Do we need to have a real bundle id
- descriptor.setUserObject(enhancedManifest);
- return descriptor;
- } catch (BundleException e) {
- String message = NLS.bind(Messages.exception_stateAddition, bundleLocation == null ? null : bundleLocation.getAbsoluteFile());
- IStatus status = new Status(IStatus.WARNING, Activator.ID, message, e);
- LogHelper.log(status);
- return null;
- }
- }
-
- public static BundleDescription createBundleDescription(File bundleLocation) {
- Dictionary<String, String> manifest = loadManifest(bundleLocation);
- if (manifest == null)
- return null;
- return createBundleDescription(manifest, bundleLocation);
- }
-
- public static Dictionary<String, String> loadManifest(File bundleLocation) {
- Dictionary<String, String> manifest = basicLoadManifest(bundleLocation);
- if (manifest == null)
- return null;
- // if the bundle itself does not define its shape, infer the shape from the current form
- if (manifest.get(BUNDLE_SHAPE) == null)
- manifest.put(BUNDLE_SHAPE, bundleLocation.isDirectory() ? DIR : JAR);
- return manifest;
- }
-
- public static Dictionary<String, String> basicLoadManifest(File bundleLocation) {
- InputStream manifestStream = null;
- ZipFile jarFile = null;
- try {
- if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && bundleLocation.isFile()) { //$NON-NLS-1$
- jarFile = new ZipFile(bundleLocation, ZipFile.OPEN_READ);
- ZipEntry manifestEntry = jarFile.getEntry(JarFile.MANIFEST_NAME);
- if (manifestEntry != null) {
- manifestStream = jarFile.getInputStream(manifestEntry);
- }
- } else {
- File manifestFile = new File(bundleLocation, JarFile.MANIFEST_NAME);
- if (manifestFile.exists())
- manifestStream = new BufferedInputStream(new FileInputStream(manifestFile));
- }
- } catch (IOException e) {
- String message = NLS.bind(Messages.exception_errorLoadingManifest, bundleLocation);
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, message, e));
- }
- Dictionary<String, String> manifest = null;
- try {
- if (manifestStream != null) {
- try {
- Map<String, String> manifestMap = ManifestElement.parseBundleManifest(manifestStream, null);
- // TODO temporary hack. We are reading a Map but everyone wants a Dictionary so convert.
- // real answer is to have people expect a Map but that is a wider change.
- manifest = new Hashtable<String, String>(manifestMap);
- } catch (IOException e) {
- String message = NLS.bind(Messages.exception_errorReadingManifest, bundleLocation, e.getMessage());
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, e));
- return null;
- } catch (BundleException e) {
- String message = NLS.bind(Messages.exception_errorReadingManifest, bundleLocation, e.getMessage());
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message, e));
- return null;
- }
- } else {
- manifest = convertPluginManifest(bundleLocation, true);
- }
- } finally {
- try {
- if (jarFile != null)
- jarFile.close();
- } catch (IOException e2) {
- //Ignore
- }
- }
-
- if (manifest == null)
- return null;
-
- //Deal with the pre-3.0 plug-in shape who have a default jar manifest.mf
- if (manifest.get(org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME) == null)
- manifest = convertPluginManifest(bundleLocation, true);
- return manifest;
-
- }
-
- public BundlesAction(File[] locations) {
- this.locations = locations;
- }
-
- public BundlesAction(BundleDescription[] bundles) {
- this.bundles = bundles;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- if (bundles == null && locations == null)
- throw new IllegalStateException(Messages.exception_noBundlesOrLocations);
-
- setPublisherInfo(publisherInfo);
-
- try {
- if (bundles == null)
- bundles = getBundleDescriptions(expandLocations(locations), monitor);
- generateBundleIUs(bundles, publisherInfo, results, monitor);
- bundles = null;
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- }
- return Status.OK_STATUS;
- }
-
- protected void publishArtifact(IArtifactDescriptor descriptor, File base, File[] inclusions, IPublisherInfo publisherInfo) {
- IArtifactRepository destination = publisherInfo.getArtifactRepository();
- if (descriptor == null || destination == null)
- return;
-
- // publish the given files
- publishArtifact(descriptor, inclusions, null, publisherInfo, createRootPrefixComputer(base));
- }
-
- protected void publishArtifact(IArtifactDescriptor descriptor, File jarFile, IPublisherInfo publisherInfo) {
- // no files to publish so this is done.
- if (jarFile == null || publisherInfo == null)
- return;
-
- // if the destination already contains the descriptor, there is nothing to do.
- IArtifactRepository destination = publisherInfo.getArtifactRepository();
- if (destination == null || destination.contains(descriptor))
- return;
-
- super.publishArtifact(descriptor, jarFile, publisherInfo);
-
- // if we are assimilating pack200 files then add the packed descriptor
- // into the repo assuming it does not already exist.
- boolean reuse = "true".equals(destination.getProperties().get(AbstractPublisherApplication.PUBLISH_PACK_FILES_AS_SIBLINGS)); //$NON-NLS-1$
- if (reuse && (publisherInfo.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0) {
- File packFile = new Path(jarFile.getAbsolutePath()).addFileExtension("pack.gz").toFile(); //$NON-NLS-1$
- if (packFile.exists()) {
- IArtifactDescriptor ad200 = createPack200ArtifactDescriptor(descriptor.getArtifactKey(), packFile, descriptor.getProperty(IArtifactDescriptor.ARTIFACT_SIZE));
- publishArtifact(ad200, packFile, publisherInfo);
- }
- }
- }
-
- private File[] expandLocations(File[] list) {
- ArrayList<File> result = new ArrayList<File>();
- expandLocations(list, result);
- return result.toArray(new File[result.size()]);
- }
-
- private void expandLocations(File[] list, ArrayList<File> result) {
- if (list == null)
- return;
- for (int i = 0; i < list.length; i++) {
- File location = list[i];
- if (location.isDirectory()) {
- // if the location is itself a bundle, just add it. Otherwise r down
- if (new File(location, JarFile.MANIFEST_NAME).exists())
- result.add(location);
- else if (new File(location, "plugin.xml").exists() || new File(location, "fragment.xml").exists()) //$NON-NLS-1$ //$NON-NLS-2$
- result.add(location); //old style bundle without manifest
- else
- expandLocations(location.listFiles(), result);
- } else {
- result.add(location);
- }
- }
- }
-
- //TODO remove this method
- protected void generateBundleIUs(BundleDescription[] bundleDescriptions, IPublisherResult result, IProgressMonitor monitor) {
- generateBundleIUs(bundleDescriptions, null, result, monitor);
- }
-
- protected void generateBundleIUs(BundleDescription[] bundleDescriptions, IPublisherInfo info, IPublisherResult result, IProgressMonitor monitor) {
-
- // This assumes that hosts are processed before fragments because for each fragment the host
- // is queried for the strings that should be translated.
- for (int i = 0; i < bundleDescriptions.length; i++) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
-
- BundleDescription bd = bundleDescriptions[i];
- if (bd != null && bd.getSymbolicName() != null && bd.getVersion() != null) {
- //First check to see if there is already an IU around for this
- IInstallableUnit bundleIU = queryForIU(result, bundleDescriptions[i].getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion()));
- IArtifactKey key = createBundleArtifactKey(bd.getSymbolicName(), bd.getVersion().toString());
- if (bundleIU == null) {
- createAdviceFileAdvice(bundleDescriptions[i], info);
- // Create the bundle IU according to any shape advice we have
- bundleIU = createBundleIU(bd, key, info);
- }
-
- File location = new File(bd.getLocation());
- IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(info, key, location);
- processArtifactPropertiesAdvice(bundleIU, ad, info);
-
- // Publish according to the shape on disk
- File bundleLocation = new File(bd.getLocation());
- if (bundleLocation.isDirectory())
- publishArtifact(ad, bundleLocation, bundleLocation.listFiles(), info);
- else
- publishArtifact(ad, bundleLocation, info);
-
- IInstallableUnit fragment = null;
- if (isFragment(bd)) {
- // TODO: Need a test case for multiple hosts
- String hostId = bd.getHost().getName();
- VersionRange hostVersionRange = PublisherHelper.fromOSGiVersionRange(bd.getHost().getVersionRange());
- IQueryResult<IInstallableUnit> hosts = queryForIUs(result, hostId, hostVersionRange);
-
- for (Iterator<IInstallableUnit> itor = hosts.iterator(); itor.hasNext();) {
- IInstallableUnit host = itor.next();
- String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
- fragment = queryForIU(result, fragmentId, PublisherHelper.fromOSGiVersion(bd.getVersion()));
- if (fragment == null) {
- String[] externalizedStrings = getExternalizedStrings(host);
- fragment = createHostLocalizationFragment(bundleIU, bd, hostId, externalizedStrings);
- }
- }
-
- }
-
- result.addIU(bundleIU, IPublisherResult.ROOT);
- if (fragment != null)
- result.addIU(fragment, IPublisherResult.NON_ROOT);
-
- InstallableUnitDescription[] others = processAdditionalInstallableUnitsAdvice(bundleIU, info);
- for (int iuIndex = 0; others != null && iuIndex < others.length; iuIndex++) {
- result.addIU(MetadataFactory.createInstallableUnit(others[iuIndex]), IPublisherResult.ROOT);
- }
- }
- }
- }
-
- /**
- * Adds advice for any p2.inf file found in this bundle.
- */
- private void createAdviceFileAdvice(BundleDescription bundleDescription, IPublisherInfo publisherInfo) {
- String location = bundleDescription.getLocation();
- if (location == null)
- return;
-
- AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundleDescription.getVersion()), new Path(location), AdviceFileAdvice.BUNDLE_ADVICE_FILE);
- if (advice.containsAdvice())
- publisherInfo.addAdvice(advice);
-
- }
-
- private static boolean isDir(BundleDescription bundle, IPublisherInfo info) {
- Collection<IBundleShapeAdvice> advice = info.getAdvice(null, true, bundle.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundle.getVersion()), IBundleShapeAdvice.class);
- // if the advice has a shape, use it
- if (advice != null && !advice.isEmpty()) {
- // we know there is some advice but if there is more than one, take the first.
- String shape = advice.iterator().next().getShape();
- if (shape != null)
- return shape.equals(IBundleShapeAdvice.DIR);
- }
- // otherwise go with whatever we figured out from the manifest or the shape on disk
- @SuppressWarnings("unchecked")
- Map<String, String> manifest = (Map<String, String>) bundle.getUserObject();
- String format = manifest.get(BUNDLE_SHAPE);
- return DIR.equals(format);
- }
-
- private boolean isFragment(BundleDescription bd) {
- return (bd.getHost() != null ? true : false);
- }
-
- // TODO reconsider the special cases here for the configurators. Perhaps these should be in their own actions.
- protected BundleDescription[] getBundleDescriptions(File[] bundleLocations, IProgressMonitor monitor) {
- if (bundleLocations == null)
- return new BundleDescription[0];
- boolean addSimpleConfigurator = false;
- boolean scIn = false;
- for (int i = 0; i < bundleLocations.length; i++) {
- if (!addSimpleConfigurator)
- addSimpleConfigurator = bundleLocations[i].toString().indexOf(ORG_ECLIPSE_UPDATE_CONFIGURATOR) > 0;
- if (!scIn) {
- scIn = bundleLocations[i].toString().indexOf(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR) > 0;
- if (scIn)
- break;
- }
- }
- if (scIn)
- addSimpleConfigurator = false;
- BundleDescription[] result = new BundleDescription[bundleLocations.length + (addSimpleConfigurator ? 1 : 0)];
- for (int i = 0; i < bundleLocations.length; i++) {
- if (monitor.isCanceled())
- throw new OperationCanceledException();
- result[i] = createBundleDescription(bundleLocations[i]);
- }
- if (addSimpleConfigurator) {
- // Add simple configurator to the list of bundles
- try {
- Bundle simpleConfigBundle = getBundle(ORG_ECLIPSE_EQUINOX_SIMPLECONFIGURATOR);
- if (simpleConfigBundle == null)
- LogHelper.log(new Status(IStatus.INFO, Activator.ID, Messages.message_noSimpleconfigurator));
- else {
- File location = FileLocator.getBundleFile(simpleConfigBundle);
- result[result.length - 1] = createBundleDescription(location);
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- return result;
- }
-
- // This method is based on core.runtime's InternalPlatform.getBundle(...) with a difference just in how we get PackageAdmin
- private static Bundle getBundle(String symbolicName) {
- PackageAdmin packageAdmin = ServiceHelper.getService(Activator.getContext(), PackageAdmin.class);
- if (packageAdmin == null)
- return null;
- Bundle[] matchingBundles = packageAdmin.getBundles(symbolicName, null);
- if (matchingBundles == null)
- return null;
- //Return the first bundle that is not installed or uninstalled
- for (int i = 0; i < matchingBundles.length; i++) {
- if ((matchingBundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
- return matchingBundles[i];
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java
deleted file mode 100644
index a095a5556..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigAdvice.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.util.Map;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-
-public class ConfigAdvice extends AbstractAdvice implements IConfigAdvice {
-
- private ConfigData data;
- private String configSpec;
-
- public ConfigAdvice(ConfigData data, String configSpec) {
- this.data = data;
- this.configSpec = configSpec;
- }
-
- public BundleInfo[] getBundles() {
- return data.getBundles();
- }
-
- protected String getConfigSpec() {
- return configSpec;
- }
-
- public Map<String, String> getProperties() {
- return CollectionUtils.toMap(data.getProperties());
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java
deleted file mode 100644
index 3d77fdebf..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ConfigCUsAction.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.File;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.metadata.TouchpointInstruction;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.eclipse.osgi.util.ManifestElement;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
-/**
- * Publish CUs for all the configuration data in the current result.
- * This adds config-specific CUs to capture start levels etc found in the config.ini
- * etc for is os, ws, arch combination seen so far.
- */
-public class ConfigCUsAction extends AbstractPublisherAction {
-
- protected static final String ORG_ECLIPSE_UPDATE_CONFIGURATOR = "org.eclipse.update.configurator"; //$NON-NLS-1$
- protected static final String DEFAULT_START_LEVEL = "osgi.bundles.defaultStartLevel"; //$NON-NLS-1$
- private static Collection<String> PROPERTIES_TO_SKIP;
- private static HashSet<String> PROGRAM_ARGS_TO_SKIP;
- protected Version version;
- protected String id;
- protected String flavor;
- IPublisherResult outerResults = null;
-
- // TODO consider moving this filtering to the LaunchingAdvice and ConfigAdvice so
- // it is not hardcoded in the action.
- static {
- PROPERTIES_TO_SKIP = new HashSet<String>();
- PROPERTIES_TO_SKIP.add("osgi.frameworkClassPath"); //$NON-NLS-1$
- PROPERTIES_TO_SKIP.add("osgi.framework"); //$NON-NLS-1$
- PROPERTIES_TO_SKIP.add("osgi.bundles"); //$NON-NLS-1$
- PROPERTIES_TO_SKIP.add("eof"); //$NON-NLS-1$
- PROPERTIES_TO_SKIP.add("eclipse.p2.profile"); //$NON-NLS-1$
- PROPERTIES_TO_SKIP.add("eclipse.p2.data.area"); //$NON-NLS-1$
- PROPERTIES_TO_SKIP.add("org.eclipse.update.reconcile"); //$NON-NLS-1$
- PROPERTIES_TO_SKIP.add("org.eclipse.equinox.simpleconfigurator.configUrl"); //$NON-NLS-1$
-
- PROGRAM_ARGS_TO_SKIP = new HashSet<String>();
- PROGRAM_ARGS_TO_SKIP.add("--launcher.library"); //$NON-NLS-1$
- PROGRAM_ARGS_TO_SKIP.add("-startup"); //$NON-NLS-1$
- PROGRAM_ARGS_TO_SKIP.add("-configuration"); //$NON-NLS-1$
- }
-
- public static String getAbstractCUCapabilityNamespace(String id, String type, String flavor, String configSpec) {
- return flavor + id;
- }
-
- public static String getAbstractCUCapabilityId(String id, String type, String flavor, String configSpec) {
- return id + "." + type; //$NON-NLS-1$
- }
-
- /**
- * Returns the id of the top level IU published by this action for the given id and flavor.
- * @param id the id of the application being published
- * @param flavor the flavor being published
- * @return the if for ius published by this action
- */
- public static String computeIUId(String id, String flavor) {
- return flavor + id + ".configuration"; //$NON-NLS-1$
- }
-
- public ConfigCUsAction(IPublisherInfo info, String flavor, String id, Version version) {
- this.flavor = flavor;
- this.id = id;
- this.version = version;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- IPublisherResult innerResult = new PublisherResult();
- this.outerResults = results;
- this.info = publisherInfo;
- // we have N platforms, generate a CU for each
- // TODO try and find common properties across platforms
- String[] configSpecs = publisherInfo.getConfigurations();
- for (int i = 0; i < configSpecs.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- String configSpec = configSpecs[i];
- Collection<IConfigAdvice> configAdvice = publisherInfo.getAdvice(configSpec, false, id, version, IConfigAdvice.class);
- BundleInfo[] bundles = fillInBundles(configAdvice, results);
- publishBundleCUs(publisherInfo, bundles, configSpec, innerResult);
- publishConfigIUs(configAdvice, innerResult, configSpec);
- Collection<IExecutableAdvice> launchingAdvice = publisherInfo.getAdvice(configSpec, false, id, version, IExecutableAdvice.class);
- publishIniIUs(launchingAdvice, innerResult, configSpec);
- }
- // merge the IUs into the final result as non-roots and create a parent IU that captures them all
- results.merge(innerResult, IPublisherResult.MERGE_ALL_NON_ROOT);
- publishTopLevelConfigurationIU(innerResult.getIUs(null, IPublisherResult.ROOT), results);
- return Status.OK_STATUS;
- }
-
- private void publishTopLevelConfigurationIU(Collection<? extends IVersionedId> children, IPublisherResult result) {
- InstallableUnitDescription descriptor = createParentIU(children, computeIUId(id, flavor), version);
- descriptor.setSingleton(true);
- IInstallableUnit rootIU = MetadataFactory.createInstallableUnit(descriptor);
- if (rootIU == null)
- return;
- result.addIU(rootIU, IPublisherResult.ROOT);
- }
-
- // there seem to be cases where the bundle infos are not filled in with symbolic name and version.
- // fill in the missing data.
- private BundleInfo[] fillInBundles(Collection<IConfigAdvice> configAdvice, IPublisherResult results) {
- ArrayList<BundleInfo> result = new ArrayList<BundleInfo>();
- for (IConfigAdvice advice : configAdvice) {
-
- int defaultStart = BundleInfo.NO_LEVEL;
- Map<String, String> adviceProperties = advice.getProperties();
- if (adviceProperties.containsKey(DEFAULT_START_LEVEL)) {
- try {
- defaultStart = Integer.parseInt(adviceProperties.get(DEFAULT_START_LEVEL));
- } catch (NumberFormatException e) {
- //don't know default
- }
- }
-
- BundleInfo[] bundles = advice.getBundles();
- for (int i = 0; i < bundles.length; i++) {
- BundleInfo bundleInfo = bundles[i];
-
- if (bundleInfo.getStartLevel() != BundleInfo.NO_LEVEL && bundleInfo.getStartLevel() == defaultStart) {
- bundleInfo.setStartLevel(BundleInfo.NO_LEVEL);
- }
-
- // prime the result with the current info. This will be replaced if there is more info...
- if ((bundleInfo.getSymbolicName() != null && bundleInfo.getVersion() != null) || bundleInfo.getLocation() == null)
- result.add(bundles[i]);
- else {
- try {
- File location = new File(bundleInfo.getLocation());
- Dictionary<String, String> manifest = BundlesAction.loadManifest(location);
- if (manifest == null)
- continue;
- GeneratorBundleInfo newInfo = new GeneratorBundleInfo(bundleInfo);
- ManifestElement[] element = ManifestElement.parseHeader("dummy-bsn", manifest.get(Constants.BUNDLE_SYMBOLICNAME)); //$NON-NLS-1$
- newInfo.setSymbolicName(element[0].getValue());
- newInfo.setVersion(manifest.get(Constants.BUNDLE_VERSION));
- result.add(newInfo);
- } catch (BundleException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- }
- return result.toArray(new BundleInfo[result.size()]);
- }
-
- /**
- * Publish the IUs that capture the eclipse.ini information such as vmargs and program args, etc
- */
- private void publishIniIUs(Collection<IExecutableAdvice> launchingAdvice, IPublisherResult results, String configSpec) {
- if (launchingAdvice.isEmpty())
- return;
-
- String configureData = ""; //$NON-NLS-1$
- String unconfigureData = ""; //$NON-NLS-1$
- if (!launchingAdvice.isEmpty()) {
- String[] dataStrings = getLauncherConfigStrings(launchingAdvice);
- configureData += dataStrings[0];
- unconfigureData += dataStrings[1];
- }
- // if there is nothing to configure or unconfigure, then don't even bother generating this IU
- if (configureData.length() == 0 && unconfigureData.length() == 0)
- return;
-
- Map<String, String> touchpointData = new HashMap<String, String>();
- touchpointData.put("configure", configureData); //$NON-NLS-1$
- touchpointData.put("unconfigure", unconfigureData); //$NON-NLS-1$
- IInstallableUnit cu = createCU(id, version, "ini", flavor, configSpec, touchpointData); //$NON-NLS-1$
- results.addIU(cu, IPublisherResult.ROOT);
- }
-
- /**
- * Publish the IUs that capture the config.ini information such as properties etc
- */
- private void publishConfigIUs(Collection<IConfigAdvice> configAdvice, IPublisherResult results, String configSpec) {
- if (configAdvice.isEmpty())
- return;
-
- String configureData = ""; //$NON-NLS-1$
- String unconfigureData = ""; //$NON-NLS-1$
- if (!configAdvice.isEmpty()) {
- String[] dataStrings = getConfigurationStrings(configAdvice);
- configureData += dataStrings[0];
- unconfigureData += dataStrings[1];
- }
- // if there is nothing to configure or unconfigure, then don't even bother generating this IU
- if (configureData.length() == 0 && unconfigureData.length() == 0)
- return;
-
- Map<String, String> touchpointData = new HashMap<String, String>();
- touchpointData.put("configure", configureData); //$NON-NLS-1$
- touchpointData.put("unconfigure", unconfigureData); //$NON-NLS-1$
- IInstallableUnit cu = createCU(id, version, "config", flavor, configSpec, touchpointData); //$NON-NLS-1$
- results.addIU(cu, IPublisherResult.ROOT);
- }
-
- /**
- * Create a CU whose id is flavor+id.type.configspec with the given version.
- * The resultant IU has the self capability and an abstract capabilty in the flavor+id namespace
- * with the name id.type and the given version. This allows others to create an abstract
- * dependency on having one of these things around but not having to list out the configs.
- */
- private IInstallableUnit createCU(String cuId, Version cuVersion, String cuType, String cuFlavor, String configSpec, Map<String, String> touchpointData) {
- InstallableUnitDescription cu = new InstallableUnitDescription();
- String resultId = createCUIdString(cuId, cuType, cuFlavor, configSpec);
- cu.setId(resultId);
- cu.setVersion(cuVersion);
- cu.setFilter(createFilterSpec(configSpec));
- IProvidedCapability selfCapability = PublisherHelper.createSelfCapability(resultId, cuVersion);
- String namespace = getAbstractCUCapabilityNamespace(cuId, cuType, cuFlavor, configSpec);
- String abstractId = getAbstractCUCapabilityId(cuId, cuType, cuFlavor, configSpec);
- IProvidedCapability abstractCapability = MetadataFactory.createProvidedCapability(namespace, abstractId, cuVersion);
- cu.setCapabilities(new IProvidedCapability[] {selfCapability, abstractCapability});
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- cu.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- protected String[] getConfigurationStrings(Collection<IConfigAdvice> configAdvice) {
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
- Set<String> properties = new HashSet<String>();
- for (IConfigAdvice advice : configAdvice) {
- for (Entry<String, String> aProperty : advice.getProperties().entrySet()) {
- String key = aProperty.getKey();
- if (shouldPublishProperty(key) && !properties.contains(key)) {
- properties.add(key);
- Map<String, String> parameters = new LinkedHashMap<String, String>();
- parameters.put("propName", key); //$NON-NLS-1$
- parameters.put("propValue", aProperty.getValue()); //$NON-NLS-1$
- configurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$
- parameters.put("propValue", ""); //$NON-NLS-1$//$NON-NLS-2$
- unconfigurationData += TouchpointInstruction.encodeAction("setProgramProperty", parameters); //$NON-NLS-1$
- }
- }
- }
- return new String[] {configurationData, unconfigurationData};
- }
-
- private boolean shouldPublishProperty(String key) {
- return !PROPERTIES_TO_SKIP.contains(key);
- }
-
- private boolean shouldPublishJvmArg(String key) {
- return true;
- }
-
- private boolean shouldPublishProgramArg(String key) {
- return !PROGRAM_ARGS_TO_SKIP.contains(key);
- }
-
- protected String[] getLauncherConfigStrings(Collection<IExecutableAdvice> launchingAdvice) {
- String configurationData = ""; //$NON-NLS-1$
- String unconfigurationData = ""; //$NON-NLS-1$
-
- Map<String, String> touchpointParameters = new LinkedHashMap<String, String>();
- Set<String> jvmSet = new HashSet<String>();
- Set<String> programSet = new HashSet<String>();
- for (IExecutableAdvice advice : launchingAdvice) {
- String[] jvmArgs = advice.getVMArguments();
- for (int i = 0; i < jvmArgs.length; i++)
- if (shouldPublishJvmArg(jvmArgs[i]) && !jvmSet.contains(jvmArgs[i])) {
- jvmSet.add(jvmArgs[i]);
- touchpointParameters.clear();
- touchpointParameters.put("jvmArg", jvmArgs[i]); //$NON-NLS-1$
- configurationData += TouchpointInstruction.encodeAction("addJvmArg", touchpointParameters); //$NON-NLS-1$
- unconfigurationData += TouchpointInstruction.encodeAction("removeJvmArg", touchpointParameters); //$NON-NLS-1$
- }
- String[] programArgs = advice.getProgramArguments();
- for (int i = 0; i < programArgs.length; i++)
- if (shouldPublishProgramArg(programArgs[i]) && !programSet.contains(programArgs[i])) {
- if (programArgs[i].startsWith("-")) //$NON-NLS-1$
- programSet.add(programArgs[i]);
- touchpointParameters.clear();
- touchpointParameters.put("programArg", programArgs[i]); //$NON-NLS-1$
- configurationData += TouchpointInstruction.encodeAction("addProgramArg", touchpointParameters); //$NON-NLS-1$
- unconfigurationData += TouchpointInstruction.encodeAction("removeProgramArg", touchpointParameters); //$NON-NLS-1$
- } else if (i + 1 < programArgs.length && !programArgs[i + 1].startsWith("-")) { //$NON-NLS-1$
- // if we are not publishing then skip over the following arg as it is assumed to be a parameter
- // to this command line arg.
- i++;
- }
- }
- return new String[] {configurationData, unconfigurationData};
- }
-
- /**
- * Publish the CUs related to the given set of bundles. This generally covers the start-level and
- * and whether or not the bundle is to be started.
- */
- protected void publishBundleCUs(IPublisherInfo publisherInfo, BundleInfo[] bundles, String configSpec, IPublisherResult result) {
- if (bundles == null)
- return;
-
- String cuIdPrefix = ""; //$NON-NLS-1$
- IMatchExpression<IInstallableUnit> filter = null;
- if (configSpec != null) {
- cuIdPrefix = createIdString(configSpec);
- filter = createFilterSpec(configSpec);
- }
-
- for (int i = 0; i < bundles.length; i++) {
- GeneratorBundleInfo bundle = createGeneratorBundleInfo(bundles[i], result);
- if (bundle == null)
- continue;
-
- IInstallableUnit iu = bundle.getIU();
-
- // If there is no host, or the filters don't match, skip this one.
- if (iu == null || !filterMatches(iu.getFilter(), configSpec))
- continue;
-
- // TODO need to factor this out into its own action
- if (bundle.getSymbolicName().equals(ORG_ECLIPSE_UPDATE_CONFIGURATOR)) {
- bundle.setStartLevel(BundleInfo.NO_LEVEL);
- bundle.setMarkedAsStarted(false);
- bundle.setSpecialConfigCommands("setProgramProperty(propName:org.eclipse.update.reconcile, propValue:false);"); //$NON-NLS-1$
- bundle.setSpecialUnconfigCommands("setProgramProperty(propName:org.eclipse.update.reconcile, propValue:);"); //$NON-NLS-1$
- } else if (bundle.getStartLevel() == BundleInfo.NO_LEVEL && !bundle.isMarkedAsStarted()) {
- // this bundle does not require any particular configuration, the plug-in default IU will handle installing it
- continue;
- }
-
- IInstallableUnit cu = null;
- if (this.version != null && !this.version.equals(Version.emptyVersion))
- cu = BundlesAction.createBundleConfigurationUnit(bundle.getSymbolicName(), this.version, false, bundle, flavor + cuIdPrefix, filter);
- else
- cu = BundlesAction.createBundleConfigurationUnit(bundle.getSymbolicName(), Version.parseVersion(bundle.getVersion()), false, bundle, flavor + cuIdPrefix, filter);
-
- if (cu != null) {
- // Product Query will run against the repo, make sure these CUs are in before then
- // TODO review the aggressive addition to the metadata repo. perhaps the query can query the result as well.
- // IMetadataRepository metadataRepository = info.getMetadataRepository();
- // if (metadataRepository != null) {
- // metadataRepository.addInstallableUnits(new IInstallableUnit[] {cu});
- // }
- result.addIU(cu, IPublisherResult.ROOT);
- }
- }
- }
-
- protected GeneratorBundleInfo createGeneratorBundleInfo(BundleInfo bundleInfo, IPublisherResult result) {
- String name = bundleInfo.getSymbolicName();
-
- //query for a matching IU
- IInstallableUnit iu = queryForIU(outerResults, name, Version.create(bundleInfo.getVersion()));
- if (iu != null) {
- if (iu.getVersion() == null)
- bundleInfo.setVersion("0.0.0"); //$NON-NLS-1$
- else
- bundleInfo.setVersion(iu.getVersion().toString());
- GeneratorBundleInfo newInfo = new GeneratorBundleInfo(bundleInfo);
- newInfo.setIU(iu);
- return newInfo;
- }
-
- if (bundleInfo.getLocation() != null || bundleInfo.getVersion() != null)
- return new GeneratorBundleInfo(bundleInfo);
- //harder: try id_version
- int i = name.indexOf('_');
- while (i > -1) {
- try {
- Version bundleVersion = Version.parseVersion(name.substring(i));
- bundleInfo.setSymbolicName(name.substring(0, i));
- bundleInfo.setVersion(bundleVersion.toString());
- return new GeneratorBundleInfo(bundleInfo);
- } catch (IllegalArgumentException e) {
- // the '_' found was probably part of the symbolic id
- i = name.indexOf('_', i);
- }
- }
-
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java
deleted file mode 100644
index 30734f329..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/DefaultCUsAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-
-/**
- * Publish IUs that install/configure the standard things like bundles, features and source bundles
- */
-public class DefaultCUsAction extends AbstractPublisherAction {
-
- private String flavor;
- private int startLevel;
- private boolean start;
-
- public DefaultCUsAction(IPublisherInfo info, String flavor, int startLevel, boolean start) {
- this.flavor = flavor;
- this.startLevel = startLevel;
- this.start = start;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- setPublisherInfo(publisherInfo);
- generateDefaultConfigIU(results);
- return Status.OK_STATUS;
- }
-
- protected void generateDefaultConfigIU(IPublisherResult result) {
- // TODO this is a bit of a hack. We need to have the default IU fragment generated with code that configures
- // and unconfigures. The Generator should be decoupled from any particular provider but it is not clear
- // that we should add the create* methods to IGeneratorInfo...
- // MockBundleDescription bd1 = new MockBundleDescription("defaultConfigure");
- // MockBundleDescription bd2 = new MockBundleDescription("defaultUnconfigure");
- result.addIU(BundlesAction.createDefaultBundleConfigurationUnit(createDefaultConfigurationBundleInfo(), createDefaultUnconfigurationBundleInfo(), flavor), IPublisherResult.ROOT);
- result.addIU(PublisherHelper.createDefaultFeatureConfigurationUnit(flavor), IPublisherResult.ROOT);
- result.addIU(PublisherHelper.createDefaultConfigurationUnitForSourceBundles(flavor), IPublisherResult.ROOT);
- }
-
- protected GeneratorBundleInfo createDefaultConfigurationBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName("defaultConfigure"); //$NON-NLS-1$
- result.setVersion("1.0.0"); //$NON-NLS-1$
- result.setStartLevel(startLevel);
- result.setMarkedAsStarted(start);
- // These should just be in the install section now
- // result.setSpecialConfigCommands("installBundle(bundle:${artifact});");
- return result;
- }
-
- protected GeneratorBundleInfo createDefaultUnconfigurationBundleInfo() {
- GeneratorBundleInfo result = new GeneratorBundleInfo();
- result.setSymbolicName("defaultUnconfigure"); //$NON-NLS-1$
- result.setVersion("1.0.0"); //$NON-NLS-1$
- // These should just be in the uninstall section now
- // result.setSpecialConfigCommands("uninstallBundle(bundle:${artifact});");
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java
deleted file mode 100644
index 184714a01..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EclipseInstallAction.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.*;
-
-public class EclipseInstallAction extends AbstractPublisherAction {
- protected String source;
- protected String id;
- protected Version version;
- protected String name;
- protected String executableName;
- protected String flavor;
- protected IVersionedId[] topLevel;
- protected String[] nonRootFiles;
- protected boolean start = false;
-
- protected EclipseInstallAction() {
- //hidden
- }
-
- public EclipseInstallAction(String source, String id, Version version, String name, String executableName, String flavor, IVersionedId[] topLevel, String[] nonRootFiles, boolean start) {
- this.source = source;
- this.id = id;
- this.version = version;
- this.name = name == null ? id : name;
- this.executableName = executableName == null ? "eclipse" : executableName; //$NON-NLS-1$
- this.flavor = flavor;
- this.topLevel = topLevel;
- this.nonRootFiles = nonRootFiles;
- this.start = start;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- monitor = SubMonitor.convert(monitor);
- this.info = publisherInfo;
- IPublisherAction[] actions = createActions();
- MultiStatus finalStatus = new MultiStatus(EclipseInstallAction.class.getName(), 0, "publishing result", null); //$NON-NLS-1$
- for (int i = 0; i < actions.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- finalStatus.merge(actions[i].perform(publisherInfo, results, monitor));
- }
- if (!finalStatus.isOK())
- return finalStatus;
- return Status.OK_STATUS;
- }
-
- protected IPublisherAction[] createActions() {
- createAdvice();
- ArrayList<IPublisherAction> actions = new ArrayList<IPublisherAction>();
- // create an action that just publishes the raw bundles and features
- IPublisherAction action = new MergeResultsAction(new IPublisherAction[] {createFeaturesAction(), createBundlesAction()}, IPublisherResult.MERGE_ALL_ROOT);
- actions.add(action);
- actions.add(createApplicationExecutableAction(info.getConfigurations()));
- actions.add(createRootFilesAction());
- actions.addAll(createAccumulateConfigDataActions(info.getConfigurations()));
- actions.add(createJREAction());
- actions.add(createConfigCUsAction());
- actions.add(createDefaultCUsAction());
- actions.add(createRootIUAction());
- return actions.toArray(new IPublisherAction[actions.size()]);
- }
-
- private void createAdvice() {
- createRootFilesAdvice();
- createRootAdvice();
- }
-
- protected void createRootAdvice() {
- if (topLevel != null)
- info.addAdvice(new RootIUAdvice(getTopLevel()));
- info.addAdvice(new RootIUResultFilterAdvice(null));
- }
-
- protected IPublisherAction createDefaultCUsAction() {
- return new DefaultCUsAction(info, flavor, 4, start);
- }
-
- protected IPublisherAction createRootIUAction() {
- return new RootIUAction(id, version, name);
- }
-
- protected Collection<IVersionedId> getTopLevel() {
- return Arrays.asList(topLevel);
- }
-
- protected IPublisherAction createJREAction() {
- return new JREAction((File) null);
- }
-
- protected IPublisherAction createApplicationExecutableAction(String[] configSpecs) {
- return new ApplicationLauncherAction(id, version, flavor, executableName, getExecutablesLocation(), configSpecs);
- }
-
- protected Collection<IPublisherAction> createAccumulateConfigDataActions(String[] configs) {
- File configuration = new File(source, "configuration/config.ini"); //$NON-NLS-1$
- if (!configuration.exists())
- configuration = null;
-
- Collection<IPublisherAction> result = new ArrayList<IPublisherAction>(configs.length);
- for (int i = 0; i < configs.length; i++) {
- String configSpec = configs[i];
- String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1];
- File executable = ExecutablesDescriptor.findExecutable(os, computeExecutableLocation(configSpec), "eclipse"); //$NON-NLS-1$
- if (!executable.exists())
- executable = null;
- IPublisherAction action = new AccumulateConfigDataAction(info, configSpec, configuration, executable);
- result.add(action);
- }
-
- return result;
- }
-
- protected IPublisherAction createConfigCUsAction() {
- return new ConfigCUsAction(info, flavor, id, version);
- }
-
- protected IPublisherAction createFeaturesAction() {
- return new FeaturesAction(new File[] {new File(source, "features")}); //$NON-NLS-1$
- }
-
- protected Collection<IPublisherAction> createExecutablesActions(String[] configSpecs) {
- Collection<IPublisherAction> result = new ArrayList<IPublisherAction>(configSpecs.length);
- for (int i = 0; i < configSpecs.length; i++) {
- ExecutablesDescriptor executables = computeExecutables(configSpecs[i]);
- IPublisherAction action = new EquinoxExecutableAction(executables, configSpecs[i], id, version, flavor);
- result.add(action);
- }
- return result;
- }
-
- protected IPublisherAction createRootFilesAction() {
- return new RootFilesAction(info, id, version, flavor);
- }
-
- protected void createRootFilesAdvice() {
- File[] baseExclusions = computeRootFileExclusions();
- if (baseExclusions != null)
- info.addAdvice(new RootFilesAdvice(null, null, baseExclusions, null));
- String[] configs = info.getConfigurations();
- for (int i = 0; i < configs.length; i++)
- info.addAdvice(computeRootFileAdvice(configs[i]));
- }
-
- protected IPublisherAdvice computeRootFileAdvice(String configSpec) {
- File root = computeRootFileRoot(configSpec);
- File[] inclusions = computeRootFileInclusions(configSpec);
- File[] exclusions = computeRootFileExclusions(configSpec);
- return new RootFilesAdvice(root, inclusions, exclusions, configSpec);
- }
-
- protected File[] computeRootFileExclusions(String configSpec) {
- ExecutablesDescriptor executables = computeExecutables(configSpec);
- File[] files = executables.getFiles();
- File[] result = new File[files.length + 1];
- System.arraycopy(files, 0, result, 0, files.length);
- result[files.length] = executables.getIniLocation();
- return result;
- }
-
- protected File[] computeRootFileExclusions() {
- if (nonRootFiles == null || nonRootFiles.length == 0)
- return null;
- ArrayList<File> result = new ArrayList<File>();
- for (int i = 0; i < nonRootFiles.length; i++) {
- String filename = nonRootFiles[i];
- File file = new File(filename);
- if (file.isAbsolute())
- result.add(file);
- else
- result.add(new File(source, filename));
- }
- return result.toArray(new File[result.size()]);
- }
-
- protected ExecutablesDescriptor computeExecutables(String configSpec) {
- String os = AbstractPublisherAction.parseConfigSpec(configSpec)[1];
- // TODO here we should not assume that the executable is called "eclipse"
- return ExecutablesDescriptor.createDescriptor(os, "eclipse", computeExecutableLocation(configSpec)); //$NON-NLS-1$
- }
-
- protected File computeRootFileRoot(String configSpec) {
- return new File(source);
- }
-
- protected File[] computeRootFileInclusions(String configSpec) {
- return new File[] {new File(source)};
- }
-
- protected File computeExecutableLocation(String configSpec) {
- return new File(source);
- }
-
- protected File getExecutablesLocation() {
- return new File(source);
- }
-
- protected IPublisherAction createBundlesAction() {
- // TODO need to add in the simple configorator and reconciler bundle descriptions.
- // TODO bundles action needs to take bundleDescriptions directly rather than just files.
- return new BundlesAction(new File[] {new File(source, "plugins")}); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java
deleted file mode 100644
index 7f9a4db2c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.BrandingIron;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.ExecutablesDescriptor;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.eclipse.osgi.service.environment.Constants;
-
-/**
- * Given the description of an executable, this action publishes optionally
- * non-destructively brands the executable, publishes the resultant artifacts
- * and publishes the required IUs to identify the branded executable, configure
- * the executable and set it up as the launcher for a profile.
- * <p>
- * This action works on one platform configuration only.
- * <p>
- * This action consults the following types of advice:
- * </ul>
- * <li>{@link IBrandingAdvice}</li>
- * </ul>
- */
-public class EquinoxExecutableAction extends AbstractPublisherAction {
- private static String TYPE = "executable"; //$NON-NLS-1$
-
- protected String configSpec;
- protected String idBase;
- protected Version version;
- protected ExecutablesDescriptor executables;
- protected String flavor;
-
- protected EquinoxExecutableAction() {
- //hidden
- }
-
- public EquinoxExecutableAction(ExecutablesDescriptor executables, String configSpec, String idBase, Version version, String flavor) {
- this.executables = executables;
- this.configSpec = configSpec;
- this.idBase = idBase == null ? "org.eclipse" : idBase; //$NON-NLS-1$
- this.version = version;
- this.flavor = flavor;
- }
-
- public IStatus perform(IPublisherInfo publisherinfo, IPublisherResult result, IProgressMonitor monitor) {
- setPublisherInfo(publisherinfo);
- ExecutablesDescriptor brandedExecutables = brandExecutables(executables);
- try {
- if (publishExecutableIU(brandedExecutables, result))
- publishExecutableCU(brandedExecutables, result);
- publishExecutableSetter(brandedExecutables, result);
- } finally {
- if (brandedExecutables.isTemporary())
- FileUtils.deleteAll(brandedExecutables.getLocation());
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Publishes the IUs that cause the executable to be actually set as the launcher for
- * the profile
- */
- private void publishExecutableSetter(ExecutablesDescriptor brandedExecutables, IPublisherResult result) {
- InstallableUnitDescription iud = new MetadataFactory.InstallableUnitDescription();
- String executableName = brandedExecutables.getExecutableName();
- String id = getExecutableId() + '.' + executableName;
- iud.setId(id);
- iud.setVersion(version);
- iud.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
- iud.setCapabilities(new IProvidedCapability[] {createSelfCapability(id, version)});
- iud.setFilter(createFilterSpec(configSpec));
- Map<String, String> touchpointData = new HashMap<String, String>();
- touchpointData.put("configure", "setLauncherName(name:" + executableName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- touchpointData.put("unconfigure", "setLauncherName()"); //$NON-NLS-1$ //$NON-NLS-2$
- iud.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- result.addIU(MetadataFactory.createInstallableUnit(iud), IPublisherResult.ROOT);
- }
-
- /**
- * Publishes IUs and CUs for the files that make up the launcher for a given
- * ws/os/arch combination.
- */
- protected boolean publishExecutableIU(ExecutablesDescriptor execDescriptor, IPublisherResult result) {
- String[] config = parseConfigSpec(configSpec);
- if (execDescriptor.getFiles().length == 0 && (config.length == 0 || CONFIG_ANY.equalsIgnoreCase(config[0]))) {
- return false; //no cu required
- }
- boolean publishCU = true;
-
- // Create the IU for the executable
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- String id = getExecutableId();
- iu.setId(id);
- iu.setVersion(version);
- IMatchExpression<IInstallableUnit> filter = createFilterSpec(configSpec);
- iu.setFilter(filter);
- iu.setSingleton(true);
- iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- String namespace = ConfigCUsAction.getAbstractCUCapabilityNamespace(idBase, TYPE, flavor, configSpec);
- String capabilityId = ConfigCUsAction.getAbstractCUCapabilityId(idBase, TYPE, flavor, configSpec);
- IProvidedCapability executableCapability = MetadataFactory.createProvidedCapability(namespace, capabilityId, version);
- IProvidedCapability selfCapability = createSelfCapability(id, version);
- iu.setCapabilities(new IProvidedCapability[] {selfCapability, executableCapability});
-
- //Create the artifact descriptor. we have several files so no path on disk
- if (execDescriptor.getFiles().length == 0) {
- publishCU = false;
- } else {
- IArtifactKey key = PublisherHelper.createBinaryArtifactKey(id, version);
- iu.setArtifacts(new IArtifactKey[] {key});
- IArtifactDescriptor descriptor = PublisherHelper.createArtifactDescriptor(info, key, null);
- publishArtifact(descriptor, execDescriptor.getFiles(), null, info, createRootPrefixComputer(execDescriptor.getLocation()));
- if (execDescriptor.isTemporary())
- FileUtils.deleteAll(execDescriptor.getLocation());
- }
- // setup a requirement between the executable and the launcher fragment that has the shared library
- if (config.length > 0 && !CONFIG_ANY.equalsIgnoreCase(config[0])) {
- String ws = config[0];
- String os = config[1];
- String arch = config[2];
- String launcherFragment = EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + ws + '.' + os;
- if (!(Constants.OS_MACOSX.equals(os) && !Constants.ARCH_X86_64.equals(arch)))
- launcherFragment += '.' + arch;
- iu.setRequirements(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, launcherFragment, VersionRange.emptyRange, filter, false, false)});
- }
- result.addIU(MetadataFactory.createInstallableUnit(iu), IPublisherResult.ROOT);
- return publishCU;
- }
-
- private String getExecutableId() {
- return createCUIdString(idBase, TYPE, "", configSpec); //$NON-NLS-1$
- }
-
- // Create the CU that installs (e.g., unzips) the executable
- private void publishExecutableCU(ExecutablesDescriptor execDescriptor, IPublisherResult result) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String id = createCUIdString(idBase, TYPE, flavor, configSpec);
- cu.setId(id);
- cu.setVersion(version);
- cu.setFilter(createFilterSpec(configSpec));
- String executableId = getExecutableId();
- cu.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, executableId, new VersionRange(version, true, version, true), null, false, false)});
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- //TODO bug 218890, would like the fragment to provide the launcher capability as well, but can't right now.
- cu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(id, version)});
- cu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- String[] config = parseConfigSpec(configSpec);
- String os = config[1];
- Map<String, String> touchpointData = computeInstallActions(execDescriptor, os);
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- IInstallableUnit unit = MetadataFactory.createInstallableUnit(cu);
- result.addIU(unit, IPublisherResult.ROOT);
- }
-
- private Map<String, String> computeInstallActions(ExecutablesDescriptor execDescriptor, String os) {
- Map<String, String> touchpointData = new HashMap<String, String>();
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- if (Constants.OS_MACOSX.equals(os)) {
- String execName = execDescriptor.getExecutableName();
- configurationData += " chmod(targetDir:${installFolder}/" + execName + ".app/Contents/MacOS/, targetFile:" + execName + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- } else if (!Constants.OS_WIN32.equals(os)) {
- // We are on linux/unix. by default set all of the files to be executable.
- File[] fileList = execDescriptor.getFiles();
- for (int i = 0; i < fileList.length; i++)
- configurationData += " chmod(targetDir:${installFolder}, targetFile:" + fileList[i].getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- return touchpointData;
- }
-
- /**
- * Brands a copy of the given executable descriptor with the information in the
- * current product definition. The files described in the descriptor are also copied
- * to a temporary location to avoid destructive modification.
- *
- * @param descriptor the executable descriptor to brand.
- * @return the new descriptor
- */
- protected ExecutablesDescriptor brandExecutables(ExecutablesDescriptor descriptor) {
- ExecutablesDescriptor result = new ExecutablesDescriptor(descriptor);
- result.makeTemporaryCopy();
- IBrandingAdvice advice = getBrandingAdvice();
- if (advice == null)
- partialBrandExecutables(result);
- else
- fullBrandExecutables(result, advice);
- return result;
- }
-
- private IBrandingAdvice getBrandingAdvice() {
- // there is expected to only be one branding advice for a given configspec so
- // just return the first one we find.
- Collection<IBrandingAdvice> advice = info.getAdvice(configSpec, true, null, null, IBrandingAdvice.class);
- for (Iterator<IBrandingAdvice> i = advice.iterator(); i.hasNext();)
- return i.next();
- return null;
- }
-
- protected void fullBrandExecutables(ExecutablesDescriptor descriptor, IBrandingAdvice advice) {
- BrandingIron iron = new BrandingIron();
- iron.setIcons(advice.getIcons());
- String name = advice.getExecutableName();
- if (name == null)
- name = "eclipse"; //$NON-NLS-1$
- iron.setName(name);
- iron.setOS(advice.getOS());
- iron.setRoot(descriptor.getLocation().getAbsolutePath());
- try {
- iron.brand();
- descriptor.setExecutableName(name, true);
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- protected void partialBrandExecutables(ExecutablesDescriptor descriptor) {
- File[] list = descriptor.getFiles();
- for (int i = 0; i < list.length; i++)
- mungeExecutableFileName(list[i], descriptor);
- descriptor.setExecutableName("eclipse", true); //$NON-NLS-1$
- }
-
- // TODO This method is a temporary hack to rename the launcher.exe files
- // to eclipse.exe (or "launcher" to "eclipse"). Eventually we will either hand-craft
- // metadata/artifacts for launchers, or alter the delta pack to contain eclipse-branded
- // launchers.
- private void mungeExecutableFileName(File file, ExecutablesDescriptor descriptor) {
- if (file.getName().equals("launcher")) { //$NON-NLS-1$
- File newFile = new File(file.getParentFile(), "eclipse"); //$NON-NLS-1$
- file.renameTo(newFile);
- descriptor.replace(file, newFile);
- } else if (file.getName().equals("launcher.exe")) { //$NON-NLS-1$
- File newFile = new File(file.getParentFile(), "eclipse.exe"); //$NON-NLS-1$
- file.renameTo(newFile);
- descriptor.replace(file, newFile);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java
deleted file mode 100644
index abcafe7ef..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxLauncherCUAction.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.util.Collection;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.GeneratorBundleInfo;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.IVersionAdvice;
-import org.eclipse.osgi.service.environment.Constants;
-
-/**
- * Create CUs for all Equinox launcher related IUs for the given set of configurations
- * such that the launcher is configured as the startup code and the fragments
- * are configured as the launcher.library.
- * <p>
- * This action expects to have find the versions of the launcher and launcher fragments
- * via IVersionAdvice in the supplied info object.
- * </p>
- */
-public class EquinoxLauncherCUAction extends AbstractPublisherAction {
-
- public static final String ORG_ECLIPSE_EQUINOX_LAUNCHER = "org.eclipse.equinox.launcher"; //$NON-NLS-1$
-
- private String flavor;
- private String[] configSpecs;
-
- public EquinoxLauncherCUAction(String flavor, String[] configSpecs) {
- this.flavor = flavor;
- this.configSpecs = configSpecs;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- setPublisherInfo(publisherInfo);
- publishCU(ORG_ECLIPSE_EQUINOX_LAUNCHER, null, results);
- publishLauncherFragmentCUs(results);
- return Status.OK_STATUS;
- }
-
- /**
- * For each of the configurations we are publishing, create a launcher fragment
- * CU if there is version advice for the fragment.
- */
- private void publishLauncherFragmentCUs(IPublisherResult results) {
- String id = null;
- for (int i = 0; i < configSpecs.length; i++) {
- String configSpec = configSpecs[i];
- String[] specs = Utils.getTokens(configSpec, "."); //$NON-NLS-1$
- if (specs.length > 0 && !AbstractPublisherAction.CONFIG_ANY.equalsIgnoreCase(specs[0])) {
- if (specs.length > 2 && Constants.OS_MACOSX.equals(specs[1]) && !Constants.ARCH_X86_64.equals(specs[2])) {
- //launcher fragment for mac only has arch for x86_64
- id = ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + specs[0] + '.' + specs[1];
- } else {
- id = ORG_ECLIPSE_EQUINOX_LAUNCHER + '.' + configSpec;
- }
- publishCU(id, configSpec, results);
- }
- }
- }
-
- /**
- * Publish a CU for the IU of the given id in the given config spec. If the IU is the
- * launcher bundle iu then set it up as the startup JAR. If it is a launcher fragment then
- * configure it in as the launcher.library for this configuration.
- */
- private void publishCU(String id, String configSpec, IPublisherResult results) {
- Collection<IVersionAdvice> advice = info.getAdvice(configSpec, true, id, null, IVersionAdvice.class);
- for (IVersionAdvice versionSpec : advice) {
- Version version = versionSpec.getVersion(IInstallableUnit.NAMESPACE_IU_ID, id);
- if (version == null)
- continue;
- GeneratorBundleInfo bundle = new GeneratorBundleInfo();
- bundle.setSymbolicName(id);
- bundle.setVersion(version.toString());
- if (id.equals(ORG_ECLIPSE_EQUINOX_LAUNCHER)) {
- bundle.setSpecialConfigCommands("addProgramArg(programArg:-startup);addProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- bundle.setSpecialUnconfigCommands("removeProgramArg(programArg:-startup);removeProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- } else {
- bundle.setSpecialConfigCommands("addProgramArg(programArg:--launcher.library);addProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- bundle.setSpecialUnconfigCommands("removeProgramArg(programArg:--launcher.library);removeProgramArg(programArg:@artifact);"); //$NON-NLS-1$
- }
- IMatchExpression<IInstallableUnit> filter = configSpec == null ? null : createFilterSpec(configSpec);
- IInstallableUnit cu = BundlesAction.createBundleConfigurationUnit(id, version, false, bundle, flavor, filter);
- if (cu != null)
- results.addIU(cu, IPublisherResult.ROOT);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java
deleted file mode 100644
index b57f0eafa..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/Feature.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.util.*;
-
-/**
- *
- * Feature information
- */
-public class Feature {
-
- private final String id;
- private String version;
- private String label;
- private String image;
- private String pluginId;
- private boolean primary = false;
- private boolean exclusive = false;
- private String application;
- private String colocationAffinity;
-
- private URLEntry description;
- private URLEntry license;
- private URLEntry copyright;
-
- private String installHandler;
- private String installHandlerURL;
- private String installHandlerLibrary;
-
- private URLEntry updateSite;
- private ArrayList<URLEntry> discoverySites;
-
- private ArrayList<FeatureEntry> entries;
- private String providerName;
- private String os;
- private String ws;
- private String arch;
- private String nl;
-
- private String location;
-
- private Map<Locale, Map<String, String>> localizations;
-
- public Feature(String id, String version) {
- if (id == null)
- throw new IllegalArgumentException();
- this.id = id;
- this.version = version;
- }
-
- public void addDiscoverySite(String siteLabel, String url) {
- if (siteLabel == null && url == null)
- return;
-
- if (this.discoverySites == null)
- this.discoverySites = new ArrayList<URLEntry>();
-
- URLEntry entry = new URLEntry(url, siteLabel);
- this.discoverySites.add(entry);
- }
-
- public void addEntry(FeatureEntry plugin) {
- if (entries == null)
- entries = new ArrayList<FeatureEntry>();
- entries.add(plugin);
- }
-
- public String getApplication() {
- return application;
- }
-
- public String getArch() {
- return arch;
- }
-
- public String getColocationAffinity() {
- return colocationAffinity;
- }
-
- public String getCopyright() {
- if (copyright != null)
- return copyright.getAnnotation();
- return null;
- }
-
- public String getCopyrightURL() {
- if (copyright != null)
- return copyright.getURL();
- return null;
- }
-
- public String getDescription() {
- if (description != null)
- return description.getAnnotation();
- return null;
- }
-
- public String getDescriptionURL() {
- if (description != null)
- return description.getURL();
- return null;
- }
-
- public URLEntry[] getDiscoverySites() {
- if (discoverySites == null)
- return new URLEntry[0];
- return discoverySites.toArray(new URLEntry[discoverySites.size()]);
- }
-
- public FeatureEntry[] getEntries() {
- if (entries == null)
- return new FeatureEntry[0];
- return entries.toArray(new FeatureEntry[entries.size()]);
- }
-
- public String getId() {
- return id;
- }
-
- public String getImage() {
- return image;
- }
-
- public String getInstallHandler() {
- return installHandler;
- }
-
- public String getInstallHandlerLibrary() {
- return installHandlerLibrary;
- }
-
- public String getInstallHandlerURL() {
- return installHandlerURL;
- }
-
- public String getLabel() {
- return label;
- }
-
- public String getLicense() {
- if (license != null)
- return license.getAnnotation();
- return null;
- }
-
- public String getLicenseURL() {
- if (license != null)
- return license.getURL();
- return null;
- }
-
- public Map<Locale, Map<String, String>> getLocalizations() {
- return this.localizations;
- }
-
- public String getLocation() {
- return this.location;
- }
-
- public String getNL() {
- return nl;
- }
-
- public String getOS() {
- return os;
- }
-
- public String getPlugin() {
- return pluginId;
- }
-
- public String getProviderName() {
- return providerName;
- }
-
- public URLEntry getUpdateSite() {
- return updateSite;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getWS() {
- return ws;
- }
-
- public boolean isExclusive() {
- return exclusive;
- }
-
- public boolean isPrimary() {
- return primary;
- }
-
- public void setApplication(String application) {
- this.application = application;
- }
-
- public void setColocationAffinity(String colocationAffinity) {
- this.colocationAffinity = colocationAffinity;
- }
-
- public void setCopyright(String copyright) {
- if (this.copyright == null)
- this.copyright = new URLEntry();
- this.copyright.setAnnotation(copyright);
- }
-
- public void setCopyrightURL(String copyrightURL) {
- if (this.copyright == null)
- this.copyright = new URLEntry();
- this.copyright.setURL(copyrightURL);
- }
-
- public void setDescription(String description) {
- if (this.description == null)
- this.description = new URLEntry();
- this.description.setAnnotation(description);
- }
-
- public void setDescriptionURL(String descriptionURL) {
- if (this.description == null)
- this.description = new URLEntry();
- this.description.setURL(descriptionURL);
- }
-
- public void setEnvironment(String os, String ws, String arch, String nl) {
- this.os = os;
- this.ws = ws;
- this.arch = arch;
- this.nl = nl;
- }
-
- public void setExclusive(boolean exclusive) {
- this.exclusive = exclusive;
- }
-
- public void setImage(String image) {
- this.image = image;
- }
-
- public void setInstallHandler(String installHandler) {
- this.installHandler = installHandler;
- }
-
- public void setInstallHandlerLibrary(String installHandlerLibrary) {
- this.installHandlerLibrary = installHandlerLibrary;
- }
-
- public void setInstallHandlerURL(String installHandlerURL) {
- this.installHandlerURL = installHandlerURL;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
- public void setLicense(String license) {
- if (this.license == null)
- this.license = new URLEntry();
- this.license.setAnnotation(license);
- }
-
- public void setLicenseURL(String licenseURL) {
- if (this.license == null)
- this.license = new URLEntry();
- this.license.setURL(licenseURL);
- }
-
- public void setLocalizations(Map<Locale, Map<String, String>> localizations) {
- this.localizations = localizations;
- }
-
- public void setLocation(String location) {
- this.location = location;
- }
-
- public void setPlugin(String pluginId) {
- this.pluginId = pluginId;
- }
-
- public void setPrimary(boolean primary) {
- this.primary = primary;
- }
-
- public void setProviderName(String value) {
- providerName = value;
- }
-
- public void setUpdateSiteLabel(String updateSiteLabel) {
- if (this.updateSite == null)
- this.updateSite = new URLEntry();
- this.updateSite.setAnnotation(updateSiteLabel);
- }
-
- public void setUpdateSiteURL(String updateSiteURL) {
- if (this.updateSite == null)
- this.updateSite = new URLEntry();
- this.updateSite.setURL(updateSiteURL);
- }
-
- public void setURL(String value) {
- //
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- /**
- * For debugging purposes only.
- */
- public String toString() {
- return "Feature " + id + " version: " + version; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
deleted file mode 100644
index 53c865604..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeatureEntry.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import org.eclipse.equinox.p2.metadata.Version;
-
-/**
- */
-public class FeatureEntry {
- private final String id;
- private String version;
- private String url;
- private String os;
- private String ws;
- private String arch;
- private String nl;
- private String match;
- private final boolean isPlugin;
- private boolean isFragment = false;
- private boolean isRequires = false;
- private boolean unpack = true;
- private boolean optional = false;
- private boolean isPatch = false;
- private String filter;
-
- public static FeatureEntry createRequires(String id, String version, String match, String filter, boolean isPlugin) {
- FeatureEntry result = new FeatureEntry(id, version, isPlugin);
- result.match = match;
- result.isRequires = true;
- // for requires we don't care what the form is so leave it as false (JAR'd)
- result.unpack = false;
- if (filter != null)
- result.setFilter(filter);
- return result;
- }
-
- public FeatureEntry(String id, String version, boolean isPlugin) {
- this.id = id;
- this.version = Version.parseVersion(version).toString();
- this.isPlugin = isPlugin;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final FeatureEntry other = (FeatureEntry) obj;
- if (id == null) {
- if (other.id != null)
- return false;
- } else if (!id.equals(other.id))
- return false;
- if (version == null) {
- if (other.version != null)
- return false;
- } else if (!version.equals(other.version))
- return false;
-
- if (isPlugin() != other.isPlugin())
- return false;
- if (isRequires() != other.isRequires())
- return false;
- return true;
- }
-
- public String getArch() {
- return arch;
- }
-
- public String getFilter() {
- return filter;
- }
-
- public String getId() {
- return id;
- }
-
- public String getMatch() {
- return match;
- }
-
- public String getNL() {
- return nl;
- }
-
- public String getOS() {
- return os;
- }
-
- public String getURL() {
- return url;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getWS() {
- return ws;
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((id == null) ? 0 : id.hashCode());
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
- }
-
- public boolean isFragment() {
- return isFragment;
- }
-
- public boolean isOptional() {
- return optional;
- }
-
- public boolean isPlugin() {
- return isPlugin;
- }
-
- public boolean isRequires() {
- return isRequires;
- }
-
- public boolean isUnpack() {
- return unpack;
- }
-
- public void setEnvironment(String os, String ws, String arch, String nl) {
- this.os = os;
- this.ws = ws;
- this.arch = arch;
- this.nl = nl;
- }
-
- public void setFilter(String filter) {
- this.filter = filter;
-
- }
-
- public void setFragment(boolean value) {
- isFragment = value;
- }
-
- public void setOptional(boolean value) {
- optional = value;
- }
-
- public void setUnpack(boolean value) {
- unpack = value;
- }
-
- public void setURL(String value) {
- url = value;
- }
-
- public void setVersion(String value) {
- version = Version.parseVersion(value).toString();
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
- result.append(isRequires ? "Requires: " : ""); //$NON-NLS-1$ //$NON-NLS-2$
- result.append(isPlugin ? "Plugin: " : "Feature: "); //$NON-NLS-1$ //$NON-NLS-2$
- result.append(id != null ? id.toString() : ""); //$NON-NLS-1$
- result.append(version != null ? " " + version.toString() : ""); //$NON-NLS-1$ //$NON-NLS-2$
- return result.toString();
- }
-
- public boolean isPatch() {
- return isPatch;
- }
-
- public void setPatch(boolean patch) {
- this.isPatch = patch;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
deleted file mode 100644
index 8467d1a5c..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAction.java
+++ /dev/null
@@ -1,659 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.publisher.*;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitPatchDescription;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryReference;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
-import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Publish IUs for all of the features in the given set of locations. The locations can
- * be actual locations of the features or folders of features.
- */
-public class FeaturesAction extends AbstractPublisherAction {
- public static final String INSTALL_FEATURES_FILTER = "(org.eclipse.update.install.features=true)"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_APPLICATION_PROP = "org.eclipse.update.feature.application"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PLUGIN_PROP = "org.eclipse.update.feature.plugin"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_EXCLUSIVE_PROP = "org.eclipse.update.feature.exclusive"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PRIMARY_PROP = "org.eclipse.update.feature.primary"; //$NON-NLS-1$
-
- protected Feature[] features;
- private File[] locations;
-
- public static IArtifactKey createFeatureArtifactKey(String id, String version) {
- return new ArtifactKey(PublisherHelper.ECLIPSE_FEATURE_CLASSIFIER, id, Version.parseVersion(version));
- }
-
- public static IInstallableUnit createFeatureJarIU(Feature feature, IPublisherInfo info) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- String id = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/false);
- iu.setId(id);
- Version version = Version.parseVersion(feature.getVersion());
- iu.setVersion(version);
-
- // set properties for other feature attributes
- iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
- if (feature.getDescription() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION, feature.getDescription());
- if (feature.getDescriptionURL() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION_URL, feature.getDescriptionURL());
- if (feature.getProviderName() != null)
- iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
- if (feature.getLicense() != null)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
- if (feature.getCopyright() != null)
- iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
- if (feature.getApplication() != null)
- iu.setProperty(UPDATE_FEATURE_APPLICATION_PROP, feature.getApplication());
- if (feature.getPlugin() != null)
- iu.setProperty(UPDATE_FEATURE_PLUGIN_PROP, feature.getPlugin());
- if (feature.isExclusive())
- iu.setProperty(UPDATE_FEATURE_EXCLUSIVE_PROP, Boolean.TRUE.toString());
- if (feature.isPrimary())
- iu.setProperty(UPDATE_FEATURE_PRIMARY_PROP, Boolean.TRUE.toString());
-
- // The required capabilities are not specified at this level because we don't want the feature jar to be attractive to install.
- iu.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
- iu.setFilter(INSTALL_FEATURES_FILTER);
- iu.setSingleton(true);
-
- if (feature.getInstallHandler() != null && feature.getInstallHandler().trim().length() > 0) {
- String installHandlerProperty = "handler=" + feature.getInstallHandler(); //$NON-NLS-1$
-
- if (feature.getInstallHandlerLibrary() != null)
- installHandlerProperty += ", library=" + feature.getInstallHandlerLibrary(); //$NON-NLS-1$
-
- if (feature.getInstallHandlerURL() != null)
- installHandlerProperty += ", url=" + feature.getInstallHandlerURL(); //$NON-NLS-1$
-
- iu.setProperty(PublisherHelper.ECLIPSE_INSTALL_HANDLER_PROP, installHandlerProperty);
- }
-
- ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
- providedCapabilities.add(PublisherHelper.createSelfCapability(id, version));
- providedCapabilities.add(PublisherHelper.FEATURE_CAPABILITY);
- providedCapabilities.add(MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_UPDATE_FEATURE, feature.getId(), version));
-
- iu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(id, version), PublisherHelper.FEATURE_CAPABILITY, MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_UPDATE_FEATURE, feature.getId(), version)});
- iu.setArtifacts(new IArtifactKey[] {createFeatureArtifactKey(feature.getId(), version.toString())});
-
- Map<String, String> touchpointData = new HashMap<String, String>();
- touchpointData.put("zipped", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- Map<Locale, Map<String, String>> localizations = feature.getLocalizations();
- if (localizations != null) {
- for (Entry<Locale, Map<String, String>> locEntry : localizations.entrySet()) {
- Locale locale = locEntry.getKey();
- Map<String, String> translatedStrings = locEntry.getValue();
- for (Entry<String, String> entry : translatedStrings.entrySet()) {
- iu.setProperty(locale.toString() + '.' + entry.getKey(), entry.getValue());
- }
- providedCapabilities.add(PublisherHelper.makeTranslationCapability(id, locale));
- }
- }
-
- processInstallableUnitPropertiesAdvice(iu, info);
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- private static String getTransformedId(String original, boolean isPlugin, boolean isGroup) {
- return (isPlugin ? original : original + (isGroup ? ".feature.group" : ".feature.jar")); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- /**
- * Returns a URI corresponding to the given URL in string form, or null
- * if a well formed URI could not be created.
- */
- private static URI toURIOrNull(String url) {
- if (url == null)
- return null;
- try {
- return URIUtil.fromString(url);
- } catch (URISyntaxException e) {
- return null;
- }
- }
-
- public FeaturesAction(Feature[] features) {
- this.features = features;
- }
-
- public FeaturesAction(File[] locations) {
- this.locations = locations;
- }
-
- /**
- * Looks for advice in a p2.inf file inside the feature location.
- */
- private void createAdviceFileAdvice(Feature feature, IPublisherInfo publisherInfo) {
- //assume p2.inf is co-located with feature.xml
- String location = feature.getLocation();
- if (location != null) {
- String groupId = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/true);
- AdviceFileAdvice advice = new AdviceFileAdvice(groupId, Version.parseVersion(feature.getVersion()), new Path(location), new Path("p2.inf")); //$NON-NLS-1$
- if (advice.containsAdvice())
- publisherInfo.addAdvice(advice);
- }
- }
-
- /**
- * Gather any advice we can from the given feature. In particular, it may have
- * information about the shape of the bundles it includes. The discovered advice is
- * added to the given result.
- * @param feature the feature to process
- * @param publisherInfo the publishing info to update
- */
- private void createBundleShapeAdvice(Feature feature, IPublisherInfo publisherInfo) {
- FeatureEntry entries[] = feature.getEntries();
- for (int i = 0; i < entries.length; i++) {
- FeatureEntry entry = entries[i];
- if (entry.isUnpack() && entry.isPlugin() && !entry.isRequires())
- publisherInfo.addAdvice(new BundleShapeAdvice(entry.getId(), Version.parseVersion(entry.getVersion()), IBundleShapeAdvice.DIR));
- }
- }
-
- protected IInstallableUnit createFeatureRootFileIU(String featureId, String featureVersion, File location, FileSetDescriptor descriptor) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setSingleton(true);
- String id = featureId + '_' + descriptor.getKey();
- iu.setId(id);
- Version version = Version.parseVersion(featureVersion);
- iu.setVersion(version);
- iu.setCapabilities(new IProvidedCapability[] {PublisherHelper.createSelfCapability(id, version)});
- iu.setTouchpointType(PublisherHelper.TOUCHPOINT_NATIVE);
- String configSpec = descriptor.getConfigSpec();
- if (configSpec != null && configSpec.length() > 0)
- iu.setFilter(createFilterSpec(configSpec));
-
- Map<String, String> touchpointData = new HashMap<String, String>(2);
- String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$
- touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$
- iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- // prime the IU with an artifact key that will correspond to the zipped up root files.
- IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, iu.getId(), iu.getVersion());
- iu.setArtifacts(new IArtifactKey[] {key});
- setupLinks(iu, descriptor);
- setupPermissions(iu, descriptor);
-
- IInstallableUnit iuResult = MetadataFactory.createInstallableUnit(iu);
- // need to return both the iu and any files.
- return iuResult;
- }
-
- protected IInstallableUnit createGroupIU(Feature feature, List<IInstallableUnit> childIUs, IPublisherInfo publisherInfo) {
- if (isPatch(feature))
- return createPatchIU(feature, childIUs, publisherInfo);
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- String id = getGroupId(feature.getId());
- iu.setId(id);
- Version version = PublisherHelper.fromOSGiVersion(new org.osgi.framework.Version(feature.getVersion()));
- iu.setVersion(version);
-
- iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
- if (feature.getDescription() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION, feature.getDescription());
- if (feature.getDescriptionURL() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION_URL, feature.getDescriptionURL());
- if (feature.getProviderName() != null)
- iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
- if (feature.getLicense() != null)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
- if (feature.getCopyright() != null)
- iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, BundlesAction.computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
-
- FeatureEntry entries[] = feature.getEntries();
- List<IRequirement> required = new ArrayList<IRequirement>(entries.length + (childIUs == null ? 0 : childIUs.size()));
- for (int i = 0; i < entries.length; i++) {
- VersionRange range = getVersionRange(entries[i]);
- String requiredId = getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true);
- required.add(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, requiredId, range, getFilter(entries[i]), entries[i].isOptional(), false));
- }
-
- // link in all the children (if any) as requirements.
- // TODO consider if these should be linked as exact version numbers. Should be ok but may be brittle.
- if (childIUs != null) {
- for (int i = 0; i < childIUs.size(); i++) {
- IInstallableUnit child = childIUs.get(i);
- IMatchExpression<IInstallableUnit> filter = child.getFilter();
- required.add(MetadataFactory.createRequirement(PublisherHelper.IU_NAMESPACE, child.getId(), new VersionRange(child.getVersion(), true, child.getVersion(), true), filter, false, false));
- }
- }
- iu.setRequirements(required.toArray(new IRequirement[required.size()]));
- iu.setTouchpointType(ITouchpointType.NONE);
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- processTouchpointAdvice(iu, null, publisherInfo);
- processInstallableUnitPropertiesAdvice(iu, publisherInfo);
-
- //Create a fake entry to reuse the logic to create the filters
- FeatureEntry entry = new FeatureEntry("fake", "0.0.0", false); //$NON-NLS-1$ //$NON-NLS-2$
- entry.setEnvironment(feature.getOS(), feature.getWS(), feature.getArch(), feature.getNL());
- iu.setFilter(getFilter(entry));
-
- // Create set of provided capabilities
- ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
- providedCapabilities.add(createSelfCapability(id, version));
-
- Map<Locale, Map<String, String>> localizations = feature.getLocalizations();
- if (localizations != null) {
- for (Entry<Locale, Map<String, String>> locEntry : localizations.entrySet()) {
- Locale locale = locEntry.getKey();
- Map<String, String> translatedStrings = locEntry.getValue();
- for (Entry<String, String> e : translatedStrings.entrySet()) {
- iu.setProperty(locale.toString() + '.' + e.getKey(), e.getValue());
- }
- providedCapabilities.add(PublisherHelper.makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
- processUpdateDescriptorAdvice(iu, info);
- processCapabilityAdvice(iu, publisherInfo);
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- protected String getGroupId(String featureId) {
- return getTransformedId(featureId, /*isPlugin*/false, /*isGroup*/true);
- }
-
- private IInstallableUnit createPatchIU(Feature feature, List<IInstallableUnit> childIUs, IPublisherInfo publisherInfo) {
- InstallableUnitPatchDescription iu = new MetadataFactory.InstallableUnitPatchDescription();
- String id = getTransformedId(feature.getId(), /*isPlugin*/false, /*isGroup*/true);
- iu.setId(id);
- Version version = Version.parseVersion(feature.getVersion());
- iu.setVersion(version);
- iu.setProperty(IInstallableUnit.PROP_NAME, feature.getLabel());
- if (feature.getDescription() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION, feature.getDescription());
- if (feature.getDescriptionURL() != null)
- iu.setProperty(IInstallableUnit.PROP_DESCRIPTION_URL, feature.getDescriptionURL());
- if (feature.getProviderName() != null)
- iu.setProperty(IInstallableUnit.PROP_PROVIDER, feature.getProviderName());
- if (feature.getLicense() != null)
- iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(feature.getLicenseURL()), feature.getLicense())});
- if (feature.getCopyright() != null)
- iu.setCopyright(MetadataFactory.createCopyright(toURIOrNull(feature.getCopyrightURL()), feature.getCopyright()));
- iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, BundlesAction.computeUpdateRange(new org.osgi.framework.Version(feature.getVersion())), IUpdateDescriptor.NORMAL, null));
-
- FeatureEntry entries[] = feature.getEntries();
- ArrayList<IRequirement> applicabilityScope = new ArrayList<IRequirement>();
- ArrayList<IRequirement> patchRequirements = new ArrayList<IRequirement>();
- ArrayList<IRequirementChange> requirementChanges = new ArrayList<IRequirementChange>();
- for (int i = 0; i < entries.length; i++) {
- VersionRange range = getVersionRange(entries[i]);
- IRequirement req = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, getFilter(entries[i]), entries[i].isOptional(), false);
- if (entries[i].isRequires()) {
- applicabilityScope.add(req);
- if (applicabilityScope.size() == 1) {
- iu.setLifeCycle(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), range, null, false, false, false));
- }
- continue;
- }
- if (entries[i].isPlugin()) {
- IRequirement from = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, getTransformedId(entries[i].getId(), entries[i].isPlugin(), /*isGroup*/true), VersionRange.emptyRange, getFilter(entries[i]), entries[i].isOptional(), false);
- requirementChanges.add(MetadataFactory.createRequirementChange(from, req));
- continue;
- }
- patchRequirements.add(req);
- }
-
- //Always add a requirement on the IU containing the feature jar
- if (childIUs != null) {
- for (int i = 0; i < childIUs.size(); i++) {
- IInstallableUnit child = childIUs.get(i);
- patchRequirements.add(MetadataFactory.createRequirement(PublisherHelper.IU_NAMESPACE, child.getId(), new VersionRange(child.getVersion(), true, child.getVersion(), true), child.getFilter(), false, false));
- }
- }
- iu.setRequirements(patchRequirements.toArray(new IRequirement[patchRequirements.size()]));
- iu.setApplicabilityScope(new IRequirement[][] {applicabilityScope.toArray(new IRequirement[applicabilityScope.size()])});
- iu.setRequirementChanges(requirementChanges.toArray(new IRequirementChange[requirementChanges.size()]));
-
- iu.setTouchpointType(ITouchpointType.NONE);
- processTouchpointAdvice(iu, null, publisherInfo);
- processInstallableUnitPropertiesAdvice(iu, publisherInfo);
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, Boolean.TRUE.toString());
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_PATCH, Boolean.TRUE.toString());
- // TODO: shouldn't the filter for the group be constructed from os, ws, arch, nl
- // of the feature?
- // iu.setFilter(filter);
-
- // Create set of provided capabilities
- ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
- providedCapabilities.add(createSelfCapability(id, version));
-
- Map<Locale, Map<String, String>> localizations = feature.getLocalizations();
- if (localizations != null) {
- for (Entry<Locale, Map<String, String>> locEntry : localizations.entrySet()) {
- Locale locale = locEntry.getKey();
- Map<String, String> translatedStrings = locEntry.getValue();
- for (Entry<String, String> e : translatedStrings.entrySet()) {
- iu.setProperty(locale.toString() + '.' + e.getKey(), e.getValue());
- }
- providedCapabilities.add(PublisherHelper.makeTranslationCapability(id, locale));
- }
- }
-
- iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
- processUpdateDescriptorAdvice(iu, info);
- processCapabilityAdvice(iu, publisherInfo);
- return MetadataFactory.createInstallableUnitPatch(iu);
- }
-
- private File[] expandLocations(File[] list) {
- ArrayList<File> result = new ArrayList<File>();
- expandLocations(list, result);
- return result.toArray(new File[result.size()]);
- }
-
- private void expandLocations(File[] list, ArrayList<File> result) {
- if (list == null)
- return;
- for (int i = 0; i < list.length; i++) {
- File location = list[i];
- if (location.isDirectory()) {
- // if the location is itself a feature, just add it. Otherwise r down
- if (new File(location, "feature.xml").exists()) //$NON-NLS-1$
- result.add(location);
- else
- expandLocations(location.listFiles(), result);
- } else {
- result.add(location);
- }
- }
- }
-
- protected void generateFeatureIUs(Feature[] featureList, IPublisherResult result) {
- // Build Feature IUs, and add them to any corresponding categories
- for (int i = 0; i < featureList.length; i++) {
- Feature feature = featureList[i];
- //first gather any advice that might help us
- createBundleShapeAdvice(feature, info);
- createAdviceFileAdvice(feature, info);
-
- ArrayList<IInstallableUnit> childIUs = new ArrayList<IInstallableUnit>();
-
- IInstallableUnit featureJarIU = queryForIU(result, getTransformedId(feature.getId(), false, false), Version.parseVersion(feature.getVersion()));
- if (featureJarIU == null)
- featureJarIU = generateFeatureJarIU(feature, info);
-
- if (featureJarIU != null) {
- publishFeatureArtifacts(feature, featureJarIU, info);
- result.addIU(featureJarIU, IPublisherResult.NON_ROOT);
- childIUs.add(featureJarIU);
- }
-
- IInstallableUnit groupIU = queryForIU(result, getGroupId(feature.getId()), Version.parseVersion(feature.getVersion()));
- if (groupIU == null) {
- childIUs.addAll(generateRootFileIUs(feature, result, info));
- groupIU = createGroupIU(feature, childIUs, info);
- }
- if (groupIU != null) {
- result.addIU(groupIU, IPublisherResult.ROOT);
- InstallableUnitDescription[] others = processAdditionalInstallableUnitsAdvice(groupIU, info);
- for (int iuIndex = 0; others != null && iuIndex < others.length; iuIndex++) {
- result.addIU(MetadataFactory.createInstallableUnit(others[iuIndex]), IPublisherResult.ROOT);
- }
- }
- generateSiteReferences(feature, result, info);
- }
- }
-
- protected IInstallableUnit generateFeatureJarIU(Feature feature, IPublisherInfo publisherInfo) {
- return createFeatureJarIU(feature, publisherInfo);
- }
-
- protected ArrayList<IInstallableUnit> generateRootFileIUs(Feature feature, IPublisherResult result, IPublisherInfo publisherInfo) {
- ArrayList<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
-
- Collection<IFeatureRootAdvice> collection = publisherInfo.getAdvice(null, false, feature.getId(), Version.parseVersion(feature.getVersion()), IFeatureRootAdvice.class);
- if (collection.size() == 0)
- return ius;
-
- IFeatureRootAdvice advice = collection.iterator().next();
- String[] configs = advice.getConfigurations();
- for (int i = 0; i < configs.length; i++) {
- String config = configs[i];
-
- FileSetDescriptor descriptor = advice.getDescriptor(config);
- if (descriptor != null && descriptor.size() > 0) {
- IInstallableUnit iu = createFeatureRootFileIU(feature.getId(), feature.getVersion(), null, descriptor);
-
- File[] files = descriptor.getFiles();
- IArtifactKey artifactKey = iu.getArtifacts().iterator().next();
- ArtifactDescriptor artifactDescriptor = new ArtifactDescriptor(artifactKey);
- IPathComputer computer = advice.getRootFileComputer(config);
- if (computer == null)
- computer = FileUtils.createDynamicPathComputer(1);
- publishArtifact(artifactDescriptor, files, null, publisherInfo, computer);
-
- result.addIU(iu, IPublisherResult.NON_ROOT);
- ius.add(iu);
- }
- }
-
- return ius;
- }
-
- /**
- * Generates and publishes a reference to an update site location
- * @param location The update site location
- * @param nickname The update site label
- * @param featureId the identifier of the feature where the error occurred, or null
- * @param collector The list into which the references are added
- */
- private void generateSiteReference(String location, String nickname, String featureId, List<IRepositoryReference> collector) {
- if (location == null) {
- String message = featureId == null ? NLS.bind(Messages.exception_invalidSiteReference, location) : NLS.bind(Messages.exception_invalidSiteReferenceInFeature, location, featureId);
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
- return;
- }
-
- try {
- URI associateLocation = new URI(location);
- collector.add(new RepositoryReference(associateLocation, nickname, IRepository.TYPE_METADATA, IRepository.NONE));
- collector.add(new RepositoryReference(associateLocation, nickname, IRepository.TYPE_ARTIFACT, IRepository.NONE));
- } catch (URISyntaxException e) {
- String message = featureId == null ? NLS.bind(Messages.exception_invalidSiteReference, location) : NLS.bind(Messages.exception_invalidSiteReferenceInFeature, location, featureId);
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, message));
- }
- }
-
- protected void generateSiteReferences(Feature feature, IPublisherResult result, IPublisherInfo publisherInfo) {
- if (publisherInfo.getMetadataRepository() == null)
- return;
-
- //publish feature site references
- URLEntry updateURL = feature.getUpdateSite();
- //don't enable feature update sites by default since this results in too many
- //extra sites being loaded and searched (Bug 234177)
- List<IRepositoryReference> collector = new ArrayList<IRepositoryReference>();
- if (updateURL != null)
- generateSiteReference(updateURL.getURL(), updateURL.getAnnotation(), feature.getId(), collector);
- URLEntry[] discoverySites = feature.getDiscoverySites();
- for (int i = 0; i < discoverySites.length; i++)
- generateSiteReference(discoverySites[i].getURL(), discoverySites[i].getAnnotation(), feature.getId(), collector);
- if (!collector.isEmpty())
- publisherInfo.getMetadataRepository().addReferences(collector);
- }
-
- protected Feature[] getFeatures(File[] featureLocations) {
- ArrayList<Feature> result = new ArrayList<Feature>(featureLocations.length);
- for (int i = 0; i < featureLocations.length; i++) {
- Feature feature = new FeatureParser().parse(featureLocations[i]);
- if (feature != null) {
- feature.setLocation(featureLocations[i].getAbsolutePath());
- result.add(feature);
- }
- }
- return result.toArray(new Feature[result.size()]);
- }
-
- private IMatchExpression<IInstallableUnit> getFilter(FeatureEntry entry) {
- StringBuffer result = new StringBuffer();
- result.append("(&"); //$NON-NLS-1$
- if (entry.getFilter() != null)
- result.append(entry.getFilter());
- expandFilter(entry.getOS(), "osgi.os", result); //$NON-NLS-1$
- expandFilter(entry.getWS(), "osgi.ws", result); //$NON-NLS-1$
- expandFilter(entry.getArch(), "osgi.arch", result);//$NON-NLS-1$
- expandFilter(entry.getNL(), "osgi.nl", result); //$NON-NLS-1$
- if (result.length() == 2)
- return null;
- result.append(')');
- return InstallableUnit.parseFilter(result.toString());
- }
-
- private void expandFilter(String filter, String osgiFilterValue, StringBuffer result) {
- if (filter != null && filter.length() != 0) {
- StringTokenizer token = new StringTokenizer(filter, ","); //$NON-NLS-1$
- if (token.countTokens() == 1)
- result.append('(' + osgiFilterValue + '=' + filter + ')');
- else {
- result.append("(|"); //$NON-NLS-1$
- while (token.hasMoreElements()) {
- result.append('(' + osgiFilterValue + '=' + token.nextToken() + ')');
- }
- result.append(')');
- }
- }
- }
-
- protected VersionRange getVersionRange(FeatureEntry entry) {
- String versionSpec = entry.getVersion();
- if (versionSpec == null)
- return VersionRange.emptyRange;
- Version version = Version.parseVersion(versionSpec);
- if (version.equals(Version.emptyVersion))
- return VersionRange.emptyRange;
- if (!entry.isRequires())
- return new VersionRange(version, true, version, true);
- String match = entry.getMatch();
- if (match == null)
- // TODO should really be returning VersionRange.emptyRange here...
- return null;
- if (match.equals("perfect")) //$NON-NLS-1$
- return new VersionRange(version, true, version, true);
-
- org.osgi.framework.Version osgiVersion = PublisherHelper.toOSGiVersion(version);
- if (match.equals("equivalent")) { //$NON-NLS-1$
- Version upper = Version.createOSGi(osgiVersion.getMajor(), osgiVersion.getMinor() + 1, 0);
- return new VersionRange(version, true, upper, false);
- }
- if (match.equals("compatible")) { //$NON-NLS-1$
- Version upper = Version.createOSGi(osgiVersion.getMajor() + 1, 0, 0);
- return new VersionRange(version, true, upper, false);
- }
- if (match.equals("greaterOrEqual")) //$NON-NLS-1$
- return new VersionRange(version, true, new VersionRange(null).getMaximum(), true);
- return null;
- }
-
- private boolean isPatch(Feature feature) {
- FeatureEntry[] entries = feature.getEntries();
- for (int i = 0; i < entries.length; i++) {
- if (entries[i].isPatch())
- return true;
- }
- return false;
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- if (features == null && locations == null)
- throw new IllegalStateException(Messages.exception_noFeaturesOrLocations);
- this.info = publisherInfo;
- if (features == null)
- features = getFeatures(expandLocations(locations));
- generateFeatureIUs(features, results);
- return Status.OK_STATUS;
- }
-
- protected void publishFeatureArtifacts(Feature feature, IInstallableUnit featureIU, IPublisherInfo publisherInfo) {
- // add all the artifacts associated with the feature
- // TODO this is a little strange. If there are several artifacts, how do we know which files go with
- // which artifacts when we publish them? For now it would be surprising to have more than one
- // artifact per feature IU.
- Collection<IArtifactKey> artifacts = featureIU.getArtifacts();
- for (IArtifactKey artifactKey : artifacts) {
- File file = new File(feature.getLocation());
- ArtifactDescriptor ad = (ArtifactDescriptor) PublisherHelper.createArtifactDescriptor(info, artifactKey, file);
- processArtifactPropertiesAdvice(featureIU, ad, publisherInfo);
- ad.setProperty(IArtifactDescriptor.DOWNLOAD_CONTENTTYPE, IArtifactDescriptor.TYPE_ZIP);
- // if the artifact is a dir then zip it up.
- if (file.isDirectory())
- publishArtifact(ad, new File[] {file}, null, publisherInfo, createRootPrefixComputer(file));
- else
- publishArtifact(ad, file, publisherInfo);
- }
- }
-
- private void setupLinks(InstallableUnitDescription iu, FileSetDescriptor descriptor) {
- String[] links = getArrayFromString(descriptor.getLinks(), ","); //$NON-NLS-1$
- StringBuffer linkActions = new StringBuffer();
-
- int i = 0;
- while (i < links.length) {
- //format is [target,name]*
- String target = links[i++];
- if (i < links.length) {
- String name = links[i++];
- linkActions.append("ln(linkTarget:" + target); //$NON-NLS-1$
- linkActions.append(",targetDir:${installFolder},linkName:" + name); //$NON-NLS-1$
- linkActions.append(");"); //$NON-NLS-1$
- }
-
- }
-
- if (linkActions.length() > 0) {
- Map<String, String> touchpointData = new HashMap<String, String>();
- //we do ln during configure to avoid complicating branding which uses the install phase
- touchpointData.put("configure", linkActions.toString()); //$NON-NLS-1$
- iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- }
- }
-
- private void setupPermissions(InstallableUnitDescription iu, FileSetDescriptor descriptor) {
- Map<String, String> touchpointData = new HashMap<String, String>();
- String[][] permsList = descriptor.getPermissions();
- for (int i = 0; i < permsList.length; i++) {
- String[] permSpec = permsList[i];
- String configurationData = " chmod(targetDir:${installFolder}, targetFile:" + permSpec[1] + ", permissions:" + permSpec[0] + ");"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- touchpointData.put("install", configurationData); //$NON-NLS-1$
- iu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java
deleted file mode 100644
index 516cb99b8..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/FeaturesAndBundlesPublisherApplication.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.RootIUAction;
-import org.eclipse.equinox.p2.publisher.actions.RootIUResultFilterAdvice;
-
-/**
- * <p>
- * This application generates meta-data and artifact repositories from a set of features and bundles.
- * If -source <localdir> parameter is given, it specifies the directory under which to find the features
- * and bundles (in the standard "features" and "plugins" sub-directories).
- * </p><p>
- * Optionally, the -features <csv of file locations> and -bundles <csv of file locations> arguments can
- * be specified. If given, these override the defaults derived from a supplied -source parameter.
- * </p>
- */
-public class FeaturesAndBundlesPublisherApplication extends AbstractPublisherApplication {
-
- protected File[] features = null;
- protected File[] bundles = null;
-
- protected String rootIU = null;
- protected String rootVersion = null;
-
- public FeaturesAndBundlesPublisherApplication() {
- // nothing to do
- }
-
- protected void processParameter(String arg, String parameter, PublisherInfo pinfo) throws URISyntaxException {
- super.processParameter(arg, parameter, pinfo);
-
- if (arg.equalsIgnoreCase("-features")) //$NON-NLS-1$
- features = createFiles(parameter);
-
- if (arg.equalsIgnoreCase("-bundles")) //$NON-NLS-1$
- bundles = createFiles(parameter);
-
- if (arg.equalsIgnoreCase("-iu")) //$NON-NLS-1$
- rootIU = parameter;
-
- if (arg.equalsIgnoreCase("-version")) //$NON-NLS-1$
- rootVersion = parameter;
- }
-
- private File[] createFiles(String parameter) {
- String[] filespecs = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
- File[] result = new File[filespecs.length];
- for (int i = 0; i < filespecs.length; i++)
- result[i] = new File(filespecs[i]);
- return result;
- }
-
- protected IPublisherAction[] createActions() {
- ArrayList<IPublisherAction> result = new ArrayList<IPublisherAction>();
- if (features == null)
- features = new File[] {new File(source, "features")}; //$NON-NLS-1$
- result.add(new FeaturesAction(features));
- if (bundles == null)
- bundles = new File[] {new File(source, "plugins")}; //$NON-NLS-1$
- result.add(new BundlesAction(bundles));
-
- if (rootIU != null) {
- result.add(new RootIUAction(rootIU, Version.parseVersion(rootVersion), rootIU));
- info.addAdvice(new RootIUResultFilterAdvice(null));
- }
-
- return result.toArray(new IPublisherAction[result.size()]);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java
deleted file mode 100644
index 6f4952079..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBrandingAdvice.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 EclipseSource 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:
- * EclipseSource - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-/**
- * Advice for branding executables and other element while publishing.
- */
-public interface IBrandingAdvice extends IPublisherAdvice {
-
- /**
- * Returns the OS that this branding advice is relevant for.
- */
- public String getOS();
-
- /**
- * Returns the list of icon files to be used in branding an executable.
- * The nature of the returned values and the images they represent is
- * platform-specific.
- *
- * @return the list of icons used in branding an executable or <code>null</code> if none.
- */
- public String[] getIcons();
-
- /**
- * Returns the name of the launcher. This should be the OS-independent
- * name. That is, ".exe" etc. should not be included.
- *
- * @return the name of the branded launcher or <code>null</code> if none.
- */
- public String getExecutableName();
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java
deleted file mode 100644
index 8ad1badd5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IBundleShapeAdvice.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IBundleShapeAdvice extends IPublisherAdvice {
- public static final String DIR = BundlesAction.DIR;
- public static final String JAR = BundlesAction.JAR;
-
- public String getShape();
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java
deleted file mode 100644
index 6c8eefd6a..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IConfigAdvice.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Code 9 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:
- * Code 9 - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.util.Map;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-public interface IConfigAdvice extends IPublisherAdvice {
-
- public BundleInfo[] getBundles();
-
- public Map<String, String> getProperties();
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java
deleted file mode 100644
index 7d46675f3..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/IExecutableAdvice.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * EclipseSource - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import org.eclipse.equinox.p2.publisher.IPublisherAdvice;
-
-/**
- * Advice for executables while publishing.
- */
-public interface IExecutableAdvice extends IPublisherAdvice {
-
- /**
- * Returns the VM arguments for this executable.
- * @return The list of VM Arguments for this executable or empty array for none
- */
- public String[] getVMArguments();
-
- /**
- * Returns the program arguments for this executable.
- *
- * @return The list of program arguments for tihs executable or empty array for none
- */
- public String[] getProgramArguments();
-
- /**
- * Returns the name of the launcher. This should be the OS-independent
- * name. That is, ".exe" etc. should not be included.
- *
- * @return the name of the branded launcher or <code>null</code> if none.
- */
- public String getExecutableName();
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java
deleted file mode 100644
index ae180c257..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/InstallPublisherApplication.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.publisher.*;
-
-public class InstallPublisherApplication extends AbstractPublisherApplication {
-
- protected String id;
- protected Version version = Version.parseVersion("1.0.0"); //$NON-NLS-1$
- protected String name;
- protected String executableName;
- protected String flavor;
- protected IVersionedId[] topLevel;
- protected boolean start;
- protected String[] rootExclusions;
-
- public InstallPublisherApplication() {
- //hidden
- }
-
- protected void processFlag(String arg, PublisherInfo publisherInfo) {
- super.processFlag(arg, publisherInfo);
-
- if (arg.equalsIgnoreCase("-startAll")) //$NON-NLS-1$
- start = true;
- }
-
- protected void initialize(PublisherInfo publisherInfo) throws ProvisionException {
- super.initialize(publisherInfo);
-
- if (publisherInfo.getConfigurations().length == 0)
- publisherInfo.setConfigurations(new String[] {""}); //$NON-NLS-1$
- }
-
- protected void processParameter(String arg, String parameter, PublisherInfo publisherInfo) throws URISyntaxException {
- super.processParameter(arg, parameter, publisherInfo);
-
- if (arg.equalsIgnoreCase("-id")) //$NON-NLS-1$
- id = parameter;
-
- if (arg.equalsIgnoreCase("-version")) //$NON-NLS-1$
- version = Version.parseVersion(parameter);
-
- if (arg.equalsIgnoreCase("-name")) //$NON-NLS-1$
- name = parameter;
-
- if (arg.equalsIgnoreCase("-executable")) //$NON-NLS-1$
- executableName = parameter;
-
- if (arg.equalsIgnoreCase("-flavor")) //$NON-NLS-1$
- flavor = parameter;
-
- if (arg.equalsIgnoreCase("-top")) //$NON-NLS-1$
- topLevel = createVersionedIdList(parameter);
-
- if (arg.equalsIgnoreCase("-rootExclusions")) //$NON-NLS-1$
- rootExclusions = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
- }
-
- private IVersionedId[] createVersionedIdList(String parameter) {
- String[] list = AbstractPublisherAction.getArrayFromString(parameter, ","); //$NON-NLS-1$
- IVersionedId[] result = new IVersionedId[list.length];
- for (int i = 0; i < result.length; i++)
- result[i] = VersionedId.parse(list[i]);
- return result;
- }
-
- protected IPublisherAction[] createActions() {
- ArrayList<IPublisherAction> result = new ArrayList<IPublisherAction>();
- result.add(createEclipseInstallAction());
- return result.toArray(new IPublisherAction[result.size()]);
- }
-
- private IPublisherAction createEclipseInstallAction() {
- String[] exclusions = getBaseExclusions();
- if (rootExclusions != null) {
- String[] result = new String[exclusions.length + rootExclusions.length];
- System.arraycopy(exclusions, 0, result, 0, exclusions.length);
- System.arraycopy(rootExclusions, 0, result, exclusions.length, rootExclusions.length);
- exclusions = result;
- }
- return new EclipseInstallAction(source, id, version, name, executableName, flavor, topLevel, exclusions, start);
- }
-
- protected String[] getBaseExclusions() {
- return new String[] {"plugins", "features", "configuration", "p2", "artifacts.xml"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java
deleted file mode 100644
index 72647823e..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/LaunchingAdvice.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-
-public class LaunchingAdvice extends AbstractAdvice implements IExecutableAdvice {
-
- private LauncherData data;
- private String configSpec;
-
- public LaunchingAdvice(LauncherData data, String configSpec) {
- this.data = data;
- this.configSpec = configSpec;
- }
-
- protected String getConfigSpec() {
- return configSpec;
- }
-
- public String[] getProgramArguments() {
- return data.getProgramArgs();
- }
-
- public String[] getVMArguments() {
- return data.getJvmArgs();
- }
-
- public String getExecutableName() {
- return data.getLauncherName();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
deleted file mode 100644
index 2f803f4c0..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.metadata.VersionedId;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.*;
-
-public class ProductAction extends AbstractPublisherAction {
- protected String source;
- protected String id;
- protected Version version;
- protected String name;
- protected String executableName;
- protected String flavor;
- protected boolean start = false;
- //protected String productLocation;
- protected File executablesFeatureLocation;
- protected IProductDescriptor product;
- protected IPublisherResult publisherResults;
-
- public ProductAction(String source, IProductDescriptor product, String flavor, File executablesFeatureLocation) {
- super();
- this.source = source;
- this.flavor = flavor;
- this.executablesFeatureLocation = executablesFeatureLocation;
- this.product = product;
- //this.productLocation = productLocation;
- }
-
- protected IPublisherAction[] createActions(IPublisherResult results) {
- // generate the advice we can up front.
- createAdvice();
-
- // create all the actions needed to publish a product
- ArrayList<IPublisherAction> actions = new ArrayList<IPublisherAction>();
- // products include the executable so add actions to publish them
- if (getExecutablesLocation() != null)
- actions.add(createApplicationExecutableAction(info.getConfigurations()));
- // add the actions that just configure things.
- actions.add(createConfigCUsAction());
- actions.add(createJREAction());
- actions.add(createDefaultCUsAction());
- actions.add(createRootIUAction());
- return actions.toArray(new IPublisherAction[actions.size()]);
- }
-
- protected IPublisherAction createApplicationExecutableAction(String[] configSpecs) {
- return new ApplicationLauncherAction(id, version, flavor, executableName, getExecutablesLocation(), configSpecs);
- }
-
- protected IPublisherAction createDefaultCUsAction() {
- return new DefaultCUsAction(info, flavor, 4, false);
- }
-
- protected IPublisherAction createRootIUAction() {
- return new RootIUAction(id, version, name);
- }
-
- protected IPublisherAction createConfigCUsAction() {
- return new ConfigCUsAction(info, flavor, id, version);
- }
-
- protected IPublisherAction createJREAction() {
- //TODO set a proper execution environment
- return new JREAction((String) null);
- }
-
- public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
- monitor = SubMonitor.convert(monitor);
- this.info = publisherInfo;
- publisherResults = results;
- IPublisherAction[] actions = createActions(results);
- MultiStatus finalStatus = new MultiStatus(EclipseInstallAction.class.getName(), 0, "publishing result", null); //$NON-NLS-1$
- for (int i = 0; i < actions.length; i++) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- finalStatus.merge(actions[i].perform(publisherInfo, results, monitor));
- }
- if (!finalStatus.isOK())
- return finalStatus;
-
- return Status.OK_STATUS;
- }
-
- private void createAdvice() {
- executableName = product.getLauncherName();
- createProductAdvice();
- createAdviceFileAdvice();
- createRootAdvice();
- info.addAdvice(new RootIUResultFilterAdvice(null));
- }
-
- /**
- * Create advice for a p2.inf file co-located with the product file, if any.
- */
- private void createAdviceFileAdvice() {
- File productFileLocation = product.getLocation();
- if (productFileLocation == null)
- return;
-
- AdviceFileAdvice advice = new AdviceFileAdvice(product.getId(), Version.parseVersion(product.getVersion()), new Path(productFileLocation.getParent()), new Path("p2.inf")); //$NON-NLS-1$
- if (advice.containsAdvice())
- info.addAdvice(advice);
- }
-
- private void createRootAdvice() {
- Collection<IVersionedId> list;
- if (product.useFeatures())
- // TODO: We need a real namespace here
- list = versionElements(listElements(product.getFeatures(), ".feature.group"), IInstallableUnit.NAMESPACE_IU_ID); //$NON-NLS-1$
- else
- //TODO: We need a real namespace here
- list = versionElements(listElements(product.getBundles(true), null), IInstallableUnit.NAMESPACE_IU_ID);
- info.addAdvice(new RootIUAdvice(list));
- }
-
- private void createProductAdvice() {
- id = product.getId();
- version = Version.parseVersion(product.getVersion());
- name = product.getProductName();
- if (name == null || name.length() == 0) // If the name is not defined, use the ID
- name = product.getId();
-
- String[] configSpecs = info.getConfigurations();
- for (int i = 0; i < configSpecs.length; i++)
- info.addAdvice(new ProductFileAdvice(product, configSpecs[i]));
- }
-
- private Collection<IVersionedId> versionElements(Collection<IVersionedId> elements, String namespace) {
- Collection<IVersionAdvice> versionAdvice = info.getAdvice(null, true, null, null, IVersionAdvice.class);
- List<IVersionedId> result = new ArrayList<IVersionedId>();
- for (IVersionedId element : elements) {
- Version elementVersion = element.getVersion();
- if (elementVersion == null || Version.emptyVersion.equals(elementVersion)) {
- Iterator<IVersionAdvice> advice = versionAdvice.iterator();
- while (advice.hasNext()) {
- elementVersion = advice.next().getVersion(namespace, element.getId());
- break;
- }
- }
-
- // if advisedVersion is null, we get the highest version
- IInstallableUnit unit = queryForIU(publisherResults, element.getId(), elementVersion);
- if (unit != null) {
- result.add(unit);
- } else if (elementVersion != null) {
- //best effort
- result.add(new VersionedId(element.getId(), elementVersion));
- }
- //TODO we could still add a requirement on version 0.0.0 to get any version, but if the
- //bundle is platform specific we will have broken metadata due to a missing filter
- }
- return result;
- }
-
- private Collection<IVersionedId> listElements(List<IVersionedId> elements, String suffix) {
- if (suffix == null || suffix.length() == 0)
- return elements;
- ArrayList<IVersionedId> result = new ArrayList<IVersionedId>(elements.size());
- for (IVersionedId elementName : elements) {
- result.add(new VersionedId(elementName.getId() + suffix, elementName.getVersion()));
- }
- return result;
- }
-
- protected File getExecutablesLocation() {
- if (executablesFeatureLocation != null)
- return executablesFeatureLocation;
- if (source != null)
- return new File(source);
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java
deleted file mode 100644
index e054e7fc5..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductFileAdvice.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * EclipseSource - ongoing development
- * IBM Corporation - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.DataLoader;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.ConfigData;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.publisher.AbstractAdvice;
-import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
-import org.eclipse.equinox.p2.publisher.actions.ILicenseAdvice;
-
-/**
- * Provide advice derived from the .product file. The product can give some info on
- * launching as well as the configuration (bundles, properties, ...)
- */
-public class ProductFileAdvice extends AbstractAdvice implements ILicenseAdvice, IExecutableAdvice, IConfigAdvice, IBrandingAdvice {
- private final static String OSGI_SPLASH_PATH = "osgi.splashPath"; //$NON-NLS-1$
- private final static String SPLASH_PREFIX = "platform:/base/plugins/"; //$NON-NLS-1$
- private IProductDescriptor product;
- private String configSpec;
- private String ws;
- private String os;
- private String arch;
- private ConfigData configData = null;
-
- protected String getId() {
- return product.getId();
- }
-
- protected Version getVersion() {
- return Version.parseVersion(product.getVersion());
- }
-
- /**
- * Constructs a new ProductFileAdvice for a given product file and a
- * particular configuration. Configurations are
- * specified as: ws.os.arch where:
- * ws is the windowing system
- * os is the operating system
- * arch is the architecture
- */
- public ProductFileAdvice(IProductDescriptor product, String configSpec) {
- this.product = product;
- this.configSpec = configSpec;
-
- String[] config = AbstractPublisherAction.parseConfigSpec(configSpec);
- ws = config[0];
- if (ws == null)
- ws = AbstractPublisherAction.CONFIG_ANY;
- os = config[1];
- if (os == null)
- os = AbstractPublisherAction.CONFIG_ANY;
- arch = config[2];
- if (arch == null)
- arch = AbstractPublisherAction.CONFIG_ANY;
-
- configData = getConfigData();
- }
-
- /**
- * Returns the program arguments for this product.
- */
- public String[] getProgramArguments() {
- String line = product.getProgramArguments(os);
- return AbstractPublisherAction.getArrayFromString(line, " "); //$NON-NLS-1$
- }
-
- /**
- * Returns the VM arguments for this product.
- */
- public String[] getVMArguments() {
- String line = product.getVMArguments(os);
- return AbstractPublisherAction.getArrayFromString(line, " "); //$NON-NLS-1$
- }
-
- /**
- * Returns the Bundles that constitute this product. These
- * bundles may be specified in the .product file, .product file configuration
- * area, config.ini file, or a combination of these three places.
- */
- public BundleInfo[] getBundles() {
- return configData.getBundles();
- }
-
- /**
- * Returns the properties associated with this product. These
- * properties may be defined in the .product file, the config.ini
- * file, or both.
- */
- public Map<String, String> getProperties() {
- Map<String, String> result = new HashMap<String, String>();
- CollectionUtils.putAll(configData.getProperties(), result);
- result.putAll(product.getConfigurationProperties());
- return result;
- }
-
- /**
- * Returns the name of the launcher. This should be the OS-independent
- * name. That is, ".exe" etc. should not be included.
- *
- * @return the name of the branded launcher or <code>null</code> if none.
- */
- public String getExecutableName() {
- return product.getLauncherName();
- }
-
- /**
- * Returns the product file parser that this advice is working on
- */
- public IProductDescriptor getProductFile() {
- return product;
- }
-
- /**
- * Returns the icons defined for this product
- */
- public String[] getIcons() {
- return product.getIcons(os);
- }
-
- /**
- * Returns the operating system that this advice is configured to work with.
- */
- public String getOS() {
- return this.os;
- }
-
- /**
- * Returns the license text for this product
- */
- public String getLicenseURL() {
- return product.getLicenseURL();
- }
-
- /**
- * Returns the license URL for this product
- */
- public String getLicenseText() {
- return product.getLicenseText();
- }
-
- private ConfigData getConfigData() {
- DataLoader loader = createDataLoader();
- ConfigData result;
- if (loader != null) {
- result = loader.getConfigData();
- } else
- result = generateConfigData();
-
- addProductFileBundles(result); // these are the bundles specified in the <plugins/> tag
- addProductFileConfigBundles(result); // these are the bundles specified in the <configurations> tag in the product file
-
- if (product.getProductId() != null)
- result.setProperty("eclipse.product", product.getProductId()); //$NON-NLS-1$
- if (product.getApplication() != null)
- result.setProperty("eclipse.application", product.getApplication()); //$NON-NLS-1$
- String location = getSplashLocation();
- if (location != null)
- result.setProperty(OSGI_SPLASH_PATH, SPLASH_PREFIX + location);
- return result;
- }
-
- private void addProductFileConfigBundles(ConfigData data) {
- Set<BundleInfo> versionBoundBundles = new HashSet<BundleInfo>();
- Map<String, List<BundleInfo>> unboundedBundles = new HashMap<String, List<BundleInfo>>();
-
- BundleInfo[] bundles = data.getBundles();
- for (int i = 0; i < bundles.length; i++) {
- // For each bundle we know about, cache it. If the bundle doesn't have a version
- // add it to a list of bundles by name
- BundleInfo bundleInfo = bundles[i];
- if (bundleInfo.getVersion().equals(BundleInfo.EMPTY_VERSION)) {
- addUnboundedBundle(unboundedBundles, bundleInfo);
- } else {
- versionBoundBundles.add(bundleInfo);
- addUnboundedBundle(unboundedBundles, bundleInfo);
- }
- }
-
- List<BundleInfo> bundleInfos = product.getBundleInfos();
- for (BundleInfo bundleInfo : bundleInfos) {
- // For each bundle that has configuration information, if the bundle is in the
- // bundles bound by version, add the "configured" bundle instead
- // If the bundle is not bound to a version, then replace all bounded versions
- // with this one. Otherwise, just add this one (don't replace)
- if (versionBoundBundles.contains(bundleInfo)) {
- // If we found a version with the same name and version, replace it with the "configured" bundle
- data.removeBundle(bundleInfo);
- data.addBundle(bundleInfo);
- } else if (bundleInfo.getVersion().equals(BundleInfo.EMPTY_VERSION)) {
- // If we don't have a version number, look for all bundles that match by name
- List<BundleInfo> list = unboundedBundles.get(bundleInfo.getSymbolicName());
- if (list == null)
- data.addBundle(bundleInfo);
- else
- for (BundleInfo target : list) {
- target.setStartLevel(bundleInfo.getStartLevel());
- target.setMarkedAsStarted(bundleInfo.isMarkedAsStarted());
- }
- } else {
- // Otherwise we have a version, but we could not match it, so just add this one.
- data.addBundle(bundleInfo);
- }
-
- }
- }
-
- private void addUnboundedBundle(Map<String, List<BundleInfo>> data, BundleInfo bundleInfo) {
- if (!data.containsKey(bundleInfo.getSymbolicName()))
- data.put(bundleInfo.getSymbolicName(), new LinkedList<BundleInfo>());
- data.get(bundleInfo.getSymbolicName()).add(bundleInfo);
- }
-
- private void addProductFileBundles(ConfigData data) {
- List<IVersionedId> bundles = product.getBundles(true);
- Set<BundleInfo> set = new HashSet<BundleInfo>();
- set.addAll(Arrays.asList(data.getBundles()));
-
- for (IVersionedId vid : bundles) {
- BundleInfo bundleInfo = new BundleInfo();
- bundleInfo.setSymbolicName(vid.getId());
- bundleInfo.setVersion(vid.getVersion().toString());
- if (!set.contains(bundleInfo))
- data.addBundle(bundleInfo);
- }
- }
-
- private ConfigData generateConfigData() {
- ConfigData result = new ConfigData(null, null, null, null);
- if (product.useFeatures())
- return result;
-
- // Add all the bundles here. We replace / update them later
- // if we find configuration information
- List<IVersionedId> bundles = product.getBundles(true);
- for (IVersionedId vid : bundles) {
- BundleInfo bundleInfo = new BundleInfo();
- bundleInfo.setSymbolicName(vid.getId());
- bundleInfo.setVersion(vid.getVersion().toString());
- result.addBundle(bundleInfo);
- }
- return result;
- }
-
- private String getSplashLocation() {
- return product.getSplashLocation();
- }
-
- protected String getConfigSpec() {
- return configSpec;
- }
-
- protected boolean matchConfig(String spec, boolean includeDefault) {
- if (spec != null) {
- String targetWS = AbstractPublisherAction.parseConfigSpec(spec)[0];
- if (targetWS == null)
- targetWS = AbstractPublisherAction.CONFIG_ANY;
- if (!ws.equals(targetWS) && !ws.equals(AbstractPublisherAction.CONFIG_ANY) && !targetWS.equals(AbstractPublisherAction.CONFIG_ANY)) {
- return false;
- }
-
- String targetOS = AbstractPublisherAction.parseConfigSpec(spec)[1];
- if (targetOS == null)
- targetOS = AbstractPublisherAction.CONFIG_ANY;
- if (!os.equals(targetOS) && !os.equals(AbstractPublisherAction.CONFIG_ANY) && !targetOS.equals(AbstractPublisherAction.CONFIG_ANY)) {
- return false;
- }
-
- String targetArch = AbstractPublisherAction.parseConfigSpec(spec)[2];
- if (targetArch == null)
- targetArch = AbstractPublisherAction.CONFIG_ANY;
- if (!arch.equals(targetArch) && !arch.equals(AbstractPublisherAction.CONFIG_ANY) && !targetArch.equals(AbstractPublisherAction.CONFIG_ANY)) {
- return false;
- }
- }
- return true;
- }
-
- private DataLoader createDataLoader() {
- String location = product.getConfigIniPath(os);
- if (location == null)
- location = product.getConfigIniPath(null);
- if (location == null)
- return null;
-
- File configFile = new File(location);
- // We are assuming we are always relative from the product file
- // However PDE tooling puts us relative from the workspace, that "relative" path also looks like an absolute path on linux
- // Build may have copied the file to the correct place for us
- if (!configFile.isAbsolute() || !configFile.exists())
- configFile = new File(product.getLocation().getParentFile(), location);
-
- //We don't really have an executable location, get something reasonable based on the config.ini location
- File parent = configFile.getParentFile();
- if (parent.getName().equals("configuration") && parent.getParentFile() != null) //$NON-NLS-1$
- parent = parent.getParentFile();
- return new DataLoader(configFile, parent);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java
deleted file mode 100644
index eba846360..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductPublisherApplication.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 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:
- * Code 9 - initial API and implementation
- * IBM - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
-import org.eclipse.osgi.util.NLS;
-
-public class ProductPublisherApplication extends AbstractPublisherApplication {
-
- private String product;
- private String executables;
- private String flavor;
-
- public ProductPublisherApplication() {
- //hidden
- }
-
- protected IPublisherAction[] createActions() {
- ArrayList<IPublisherAction> result = new ArrayList<IPublisherAction>();
- result.add(createProductAction());
- return result.toArray(new IPublisherAction[result.size()]);
- }
-
- private IPublisherAction createProductAction() {
- IProductDescriptor productDescriptor = null;
- try {
- productDescriptor = new ProductFile(product);
- } catch (Exception e) {
- throw new IllegalArgumentException(NLS.bind(Messages.exception_errorLoadingProductFile, product, e.toString()));
- }
- File executablesFeature = executables == null ? null : new File(executables);
- return new ProductAction(source, productDescriptor, flavor, executablesFeature);
- }
-
- protected void processParameter(String arg, String parameter, PublisherInfo publisherInfo) throws URISyntaxException {
- super.processParameter(arg, parameter, publisherInfo);
-
- if (arg.equalsIgnoreCase("-productFile")) //$NON-NLS-1$
- product = parameter;
- if (arg.equalsIgnoreCase("-executables")) //$NON-NLS-1$
- executables = parameter;
- if (arg.equalsIgnoreCase("-flavor")) //$NON-NLS-1$
- flavor = parameter;
- if (arg.equalsIgnoreCase("-pluginVersionsAdvice")) { //$NON-NLS-1$
- VersionAdvice versionAdvice = new VersionAdvice();
- versionAdvice.load(IInstallableUnit.NAMESPACE_IU_ID, parameter, null);
- info.addAdvice(versionAdvice);
- }
- if (arg.equalsIgnoreCase("-featureVersionsAdvice")) { //$NON-NLS-1$
- VersionAdvice versionAdvice = new VersionAdvice();
- versionAdvice.load(IInstallableUnit.NAMESPACE_IU_ID, parameter, ".feature.group"); //$NON-NLS-1$
- info.addAdvice(versionAdvice);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java
deleted file mode 100644
index b9566e8a8..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/URLEntry.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.publisher.eclipse;
-
-public class URLEntry {
- private String annotation;
- private String url;
-
- public URLEntry() {
- //empty
- }
-
- public URLEntry(String url, String annotation) {
- this.url = url;
- this.annotation = annotation;
- }
-
- public void setAnnotation(String annotation) {
- this.annotation = annotation;
- }
-
- public String getAnnotation() {
- return annotation;
- }
-
- public void setURL(String url) {
- this.url = url;
- }
-
- public String getURL() {
- return url;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java
deleted file mode 100644
index 32d1e2ec1..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/LocalizationHelper.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.spi.p2.publisher;
-
-import java.io.*;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-
-/**
- * Helper functions supporting the processing of localized
- * property files.
- *
- */
-public final class LocalizationHelper {
-
- private static final String PROPERTIES_FILE_EXTENSION = ".properties"; //$NON-NLS-1$
- private static final Locale DEFAULT_LOCALE = new Locale("df", "LT"); //$NON-NLS-1$//$NON-NLS-2$
- private static LocalizationHelper instance = new LocalizationHelper();
-
- // Extract the locale string from the properties file with the given filename
- // where the locale string follows the given prefix. For example, return "zh_HK"
- // from filename == "plugin_zh_HK.properties" and prefix == "plugin".
- static public String getLocaleString(String filename, String prefix) {
- String localeString = null;
- if (filename.startsWith(prefix) && filename.endsWith(PROPERTIES_FILE_EXTENSION)) {
- if (filename.length() > prefix.length() + PROPERTIES_FILE_EXTENSION.length()) {
- localeString = filename.substring(prefix.length() + 1, filename.length() - PROPERTIES_FILE_EXTENSION.length());
- } else {
- localeString = ""; //$NON-NLS-1$
- }
- }
- return localeString;
- }
-
- // Get the locale corresponding to the given locale string
- static public Locale getLocale(String localeString) {
- Locale locale = DEFAULT_LOCALE;
- if (localeString.length() == 5 && localeString.indexOf('_') == 2) {
- locale = new Locale(localeString.substring(0, 2), localeString.substring(3, 5));
- } else if (localeString.length() == 2) {
- locale = new Locale(localeString.substring(0, 2));
- }
- return locale;
- }
-
- // For the given root directory and path to localization files within that directory
- // get a map from locale to property set for the localization property files.
- public static Map<Locale, Map<String, String>> getDirPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
- File fullPath = new File(root, localizationPath);
- File localizationDir = fullPath.getParentFile();
- final String localizationFile = fullPath.getName();
- String[] localizationFiles = LocalizationHelper.getLocalizationFiles(localizationDir, localizationFile);
-
- HashMap<Locale, Map<String, String>> localizations = null;
-
- if (localizationFiles != null && localizationFiles.length > 0) {
- localizations = new HashMap<Locale, Map<String, String>>(localizationFiles.length);
- for (int i = 0; i < localizationFiles.length; i++) {
- String nextFile = localizationFiles[i];
- Locale nextLocale = getLocale(LocalizationHelper.getLocaleString(nextFile, localizationFile));
-
- try {
- Map<String, String> properties = loadProperties(localizationDir, nextFile);
- Map<String, String> localizedStrings = getLocalizedProperties(propertyKeys, properties);
- if (localizedStrings.size() > 0) {
- localizations.put(nextLocale, localizedStrings);
- if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
- localizations.put(nextLocale, localizedStrings);
- }
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
- }
-
- return localizations;
- }
-
- public static Map<Locale, Map<String, String>> getJarPropertyLocalizations(File root, String localizationPath, Locale defaultLocale, String[] propertyKeys) {
- ZipFile jarFile = null;
- Map<Locale, Map<String, String>> localizations = new HashMap<Locale, Map<String, String>>(4);
- try {
- jarFile = new ZipFile(root, ZipFile.OPEN_READ);
- for (Enumeration<? extends ZipEntry> entries = jarFile.entries(); entries.hasMoreElements();) {
- ZipEntry nextEntry = entries.nextElement();
- String nextName = nextEntry.getName();
- String localeString = LocalizationHelper.getLocaleString(nextName, localizationPath);
-
- if (!nextEntry.isDirectory() && localeString != null) {
- Locale nextLocale = LocalizationHelper.getLocale(localeString);
- InputStream stream = null;
- try {
- stream = jarFile.getInputStream(nextEntry);
- Map<String, String> properties = CollectionUtils.loadProperties(stream);
- Map<String, String> localizedStrings = LocalizationHelper.getLocalizedProperties(propertyKeys, properties);
- if (localizedStrings.size() > 0) {
- localizations.put(nextLocale, localizedStrings);
- if (DEFAULT_LOCALE.equals(nextLocale) && defaultLocale != null) {
- localizations.put(nextLocale, localizedStrings);
- }
- }
- } finally {
- if (stream != null)
- stream.close();
- }
- }
- }
- } catch (IOException ioe) {
- ioe.printStackTrace();
- } finally {
- if (jarFile != null) {
- try {
- jarFile.close();
- } catch (IOException ioe) {
- // do nothing
- }
- }
- }
-
- return localizations;
- }
-
- // Load a property set from given root and file with the given name
- private static Map<String, String> loadProperties(File root, String propertyFilename) throws IOException {
- InputStream propertyStream = null;
- try {
- try {
- if (root.isDirectory())
- propertyStream = new FileInputStream(new File(root, propertyFilename));
- else {
- URLConnection connection = new URL("jar:" + root.toURL().toExternalForm() + "!/" + propertyFilename).openConnection(); //$NON-NLS-1$ //$NON-NLS-2$
- connection.setUseCaches(false);
- propertyStream = connection.getInputStream();
- }
- } catch (FileNotFoundException e) {
- // if there is no messages file then just return;
- return CollectionUtils.emptyMap();
- }
- return CollectionUtils.loadProperties(propertyStream);
- } finally {
- if (propertyStream != null)
- propertyStream.close();
- }
- }
-
- // Given a list of keys and the corresponding localized property set,
- // return a new property set with those keys and the localized values.
- static public Map<String, String> getLocalizedProperties(String[] propertyKeys, Map<String, String> properties) {
- Map<String, String> localizedProperties = new HashMap<String, String>();
- for (int i = 0; i < propertyKeys.length; i++) {
- String key = propertyKeys[i];
- if (key != null) {
- String localizedValue = properties.get(key);
- if (localizedValue != null)
- localizedProperties.put(key, localizedValue);
- }
- }
- return localizedProperties;
- }
-
- public static String[] getLocalizationFiles(File localizationDir, final String filenamePrefix) {
- return localizationDir.list(instance.new FileFilter() {
- public boolean accept(File directory, String filename) {
- return (getLocaleString(filename, filenamePrefix) != null ? true : false);
- }
- });
- }
-
- private abstract class FileFilter implements FilenameFilter {
-
- public FileFilter() {
- // Nothing to do
- }
-
- /* (non-Javadoc)
- * @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
- */
- public abstract boolean accept(File directory, String filename);
- }
-
- private LocalizationHelper() {
- //
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
deleted file mode 100644
index 907c1d791..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/spi/p2/publisher/PublisherHelper.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * 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
- * Genuitec, LLC - added license support
- * Code 9 - Ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.spi.p2.publisher;
-
-import java.io.*;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.*;
-import java.util.Map.Entry;
-import org.eclipse.equinox.internal.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
-import org.eclipse.equinox.p2.publisher.IPublisherInfo;
-import org.eclipse.equinox.p2.publisher.PublisherInfo;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-import org.osgi.framework.Constants;
-
-/**
- * This class was originally the MetadataGeneratorHelper from the Generator.
- * Much of the code has been deprecated and will be removed.
- */
-public class PublisherHelper {
- /**
- * A capability namespace representing the type of Eclipse resource (bundle, feature, source bundle, etc)
- * @see IProvidedCapability#getNamespace()
- */
- public static final String NAMESPACE_ECLIPSE_TYPE = "org.eclipse.equinox.p2.eclipse.type"; //$NON-NLS-1$
-
- public static final String NAMESPACE_FLAVOR = "org.eclipse.equinox.p2.flavor"; //$NON-NLS-1$"
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing a feature
- * @see IProvidedCapability#getName()
- */
- public static final String TYPE_ECLIPSE_FEATURE = "feature"; //$NON-NLS-1$
-
- /**
- * A capability name in the {@link #NAMESPACE_ECLIPSE_TYPE} namespace
- * representing a source bundle
- * @see IProvidedCapability#getName()
- */
- public static final String TYPE_ECLIPSE_SOURCE = "source"; //$NON-NLS-1$
-
- /**
- * A capability namespace representing the localization (translation)
- * of strings from a specified IU in a specified locale
- * @see IProvidedCapability#getNamespace()
- * TODO: this should be in API, probably in IInstallableUnit
- */
- public static final String NAMESPACE_IU_LOCALIZATION = "org.eclipse.equinox.p2.localization"; //$NON-NLS-1$
-
- // Only certain properties in the bundle manifest are assumed to be localized.
- public static final String[] BUNDLE_LOCALIZED_PROPERTIES = {Constants.BUNDLE_NAME, Constants.BUNDLE_DESCRIPTION, Constants.BUNDLE_VENDOR, Constants.BUNDLE_CONTACTADDRESS, Constants.BUNDLE_DOCURL, Constants.BUNDLE_UPDATELOCATION, Constants.BUNDLE_LOCALIZATION};
-
- public static final String CAPABILITY_NS_JAVA_PACKAGE = "java.package"; //$NON-NLS-1$
-
- public static final String CAPABILITY_NS_UPDATE_FEATURE = "org.eclipse.update.feature"; //$NON-NLS-1$
-
- public static final String ECLIPSE_FEATURE_CLASSIFIER = "org.eclipse.update.feature"; //$NON-NLS-1$
- public static final String OSGI_BUNDLE_CLASSIFIER = "osgi.bundle"; //$NON-NLS-1$
- public static final String BINARY_ARTIFACT_CLASSIFIER = "binary"; //$NON-NLS-1$
-
- public static final String INSTALL_FEATURES_FILTER = "(org.eclipse.update.install.features=true)"; //$NON-NLS-1$
-
- public static final String IU_NAMESPACE = IInstallableUnit.NAMESPACE_IU_ID;
-
- public static final String ECLIPSE_INSTALL_HANDLER_PROP = "org.eclipse.update.installHandler"; //$NON-NLS-1$
-
- public static final ITouchpointType TOUCHPOINT_NATIVE = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
- public static final ITouchpointType TOUCHPOINT_OSGI = MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.osgi", Version.createOSGi(1, 0, 0)); //$NON-NLS-1$
-
- public static final IProvidedCapability FEATURE_CAPABILITY = MetadataFactory.createProvidedCapability(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, Version.createOSGi(1, 0, 0));
-
- public static IArtifactDescriptor createArtifactDescriptor(IArtifactKey key, File pathOnDisk) {
- return createArtifactDescriptor(null, null, key, pathOnDisk);
- }
-
- /**
- * Creates an artifact descriptor for the given key and path.
- * @param info the publisher info
- * @param key the key of the artifact to publish
- * @param pathOnDisk the path of the artifact on disk
- * @return a new artifact descriptor
- */
- public static IArtifactDescriptor createArtifactDescriptor(IPublisherInfo info, IArtifactKey key, File pathOnDisk) {
- return createArtifactDescriptor(info, info.getArtifactRepository(), key, pathOnDisk);
- }
-
- private static IArtifactDescriptor createArtifactDescriptor(IPublisherInfo info, IArtifactRepository artifactRepo, IArtifactKey key, File pathOnDisk) {
- IArtifactDescriptor result = artifactRepo != null ? artifactRepo.createArtifactDescriptor(key) : new ArtifactDescriptor(key);
- if (result instanceof ArtifactDescriptor) {
- ArtifactDescriptor descriptor = (ArtifactDescriptor) result;
- if (pathOnDisk != null) {
- descriptor.setProperty(IArtifactDescriptor.ARTIFACT_SIZE, Long.toString(pathOnDisk.length()));
- descriptor.setProperty(IArtifactDescriptor.DOWNLOAD_SIZE, Long.toString(pathOnDisk.length()));
- }
- if (info == null || (info.getArtifactOptions() & IPublisherInfo.A_NO_MD5) == 0) {
- String md5 = computeMD5(pathOnDisk);
- if (md5 != null)
- descriptor.setProperty(IArtifactDescriptor.DOWNLOAD_MD5, md5);
- }
- }
- return result;
- }
-
- private static String computeMD5(File file) {
- if (file == null || file.isDirectory() || !file.exists())
- return null;
- MessageDigest md5Checker;
- try {
- md5Checker = MessageDigest.getInstance("MD5"); //$NON-NLS-1$
- } catch (NoSuchAlgorithmException e) {
- return null;
- }
- InputStream fis = null;
- try {
- fis = new BufferedInputStream(new FileInputStream(file));
- int read = -1;
- while ((read = fis.read()) != -1) {
- md5Checker.update((byte) read);
- }
- byte[] digest = md5Checker.digest();
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < digest.length; i++) {
- if ((digest[i] & 0xFF) < 0x10)
- buf.append('0');
- buf.append(Integer.toHexString(digest[i] & 0xFF));
- }
- return buf.toString();
- } catch (FileNotFoundException e) {
- return null;
- } catch (IOException e) {
- return null;
- } finally {
- if (fis != null)
- try {
- fis.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- public static IProvidedCapability makeTranslationCapability(String hostId, Locale locale) {
- return MetadataFactory.createProvidedCapability(NAMESPACE_IU_LOCALIZATION, locale.toString(), Version.createOSGi(1, 0, 0));
- }
-
- public static String createDefaultConfigUnitId(String classifier, String configurationFlavor) {
- return configurationFlavor + "." + classifier + ".default"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public static IInstallableUnit createDefaultFeatureConfigurationUnit(String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId(ECLIPSE_FEATURE_CLASSIFIER, configurationFlavor);
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on features
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_FEATURE, VersionRange.emptyRange, null, true, true, false)};
- cu.setHost(reqs);
-
- cu.setFilter(INSTALL_FEATURES_FILTER);
- Map<String, String> touchpointData = new HashMap<String, String>();
- touchpointData.put("install", "installFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
- touchpointData.put("uninstall", "uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)"); //$NON-NLS-1$//$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
-
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- public static IInstallableUnit createDefaultConfigurationUnitForSourceBundles(String configurationFlavor) {
- InstallableUnitFragmentDescription cu = new InstallableUnitFragmentDescription();
- String configUnitId = createDefaultConfigUnitId("source", configurationFlavor); //$NON-NLS-1$
- cu.setId(configUnitId);
- Version configUnitVersion = Version.createOSGi(1, 0, 0);
- cu.setVersion(configUnitVersion);
-
- // Add capabilities for fragment, self, and describing the flavor supported
- cu.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
- cu.setCapabilities(new IProvidedCapability[] {createSelfCapability(configUnitId, configUnitVersion), MetadataFactory.createProvidedCapability(NAMESPACE_FLAVOR, configurationFlavor, Version.createOSGi(1, 0, 0))});
-
- // Create a required capability on source providers
- IRequirement[] reqs = new IRequirement[] {MetadataFactory.createRequirement(NAMESPACE_ECLIPSE_TYPE, TYPE_ECLIPSE_SOURCE, VersionRange.emptyRange, null, true, true, false)};
- cu.setHost(reqs);
- Map<String, String> touchpointData = new HashMap<String, String>();
-
- touchpointData.put("install", "addSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- touchpointData.put("uninstall", "removeSourceBundle(bundle:${artifact})"); //$NON-NLS-1$ //$NON-NLS-2$
- cu.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
- return MetadataFactory.createInstallableUnit(cu);
- }
-
- private static void addExtraProperties(IInstallableUnit iiu, Map<String, String> extraProperties) {
- if (iiu instanceof InstallableUnit) {
- InstallableUnit iu = (InstallableUnit) iiu;
-
- for (Entry<String, String> entry : extraProperties.entrySet()) {
- iu.setProperty(entry.getKey(), entry.getValue());
- }
- }
- }
-
- public static IInstallableUnit[] createEclipseIU(BundleDescription bd, boolean isFolderPlugin, IArtifactKey key, Map<String, String> extraProperties) {
- ArrayList<IInstallableUnit> iusCreated = new ArrayList<IInstallableUnit>(1);
- IPublisherInfo info = new PublisherInfo();
- String shape = isFolderPlugin ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
- info.addAdvice(new BundleShapeAdvice(bd.getSymbolicName(), fromOSGiVersion(bd.getVersion()), shape));
- IInstallableUnit iu = BundlesAction.createBundleIU(bd, key, info);
- addExtraProperties(iu, extraProperties);
- iusCreated.add(iu);
- return (iusCreated.toArray(new IInstallableUnit[iusCreated.size()]));
- }
-
- public static ArtifactKey createBinaryArtifactKey(String id, Version version) {
- return new ArtifactKey(BINARY_ARTIFACT_CLASSIFIER, id, version);
- }
-
- public static IProvidedCapability createSelfCapability(String installableUnitId, Version installableUnitVersion) {
- return MetadataFactory.createProvidedCapability(IU_NAMESPACE, installableUnitId, installableUnitVersion);
- }
-
- /**
- * Convert <code>version</code> into its OSGi equivalent if possible.
- *
- * @param version The version to convert. Can be <code>null</code>
- * @return The converted version or <code>null</code> if the argument was <code>null</code>
- * @throws UnsupportedOperationException if the version could not be converted into an OSGi version
- */
- public static org.osgi.framework.Version toOSGiVersion(Version version) {
- if (version == null)
- return null;
- if (version == Version.emptyVersion)
- return org.osgi.framework.Version.emptyVersion;
- if (version == Version.MAX_VERSION)
- return new org.osgi.framework.Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
-
- BasicVersion bv = (BasicVersion) version;
- return new org.osgi.framework.Version(bv.getMajor(), bv.getMinor(), bv.getMicro(), bv.getQualifier());
- }
-
- /**
- * Create an omni version from an OSGi <code>version</code>.
- * @param version The OSGi version. Can be <code>null</code>.
- * @return The created omni version
- */
- public static Version fromOSGiVersion(org.osgi.framework.Version version) {
- if (version == null)
- return null;
- if (version.getMajor() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE && version.getMicro() == Integer.MAX_VALUE)
- return Version.MAX_VERSION;
- return Version.createOSGi(version.getMajor(), version.getMinor(), version.getMicro(), version.getQualifier());
- }
-
- public static org.eclipse.osgi.service.resolver.VersionRange toOSGiVersionRange(VersionRange range) {
- if (range.equals(VersionRange.emptyRange))
- return org.eclipse.osgi.service.resolver.VersionRange.emptyRange;
- return new org.eclipse.osgi.service.resolver.VersionRange(toOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), toOSGiVersion(range.getMaximum()), range.getIncludeMinimum());
- }
-
- public static VersionRange fromOSGiVersionRange(org.eclipse.osgi.service.resolver.VersionRange range) {
- if (range.equals(org.eclipse.osgi.service.resolver.VersionRange.emptyRange))
- return VersionRange.emptyRange;
- return new VersionRange(fromOSGiVersion(range.getMinimum()), range.getIncludeMinimum(), fromOSGiVersion(range.getMaximum()), range.getIncludeMaximum());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java b/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
deleted file mode 100644
index 04f18ebd7..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/AbstractPublishTask.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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 - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.ant;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.tools.ant.Task;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository;
-import org.eclipse.equinox.internal.p2.publisher.Activator;
-import org.eclipse.equinox.internal.p2.publisher.Messages;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.osgi.util.NLS;
-
-public abstract class AbstractPublishTask extends Task {
- protected static final String ANT_PROPERTY_PREFIX = "${"; //$NON-NLS-1$
-
- /**
- * Support nested repository elements that looking something like
- * <repo location="file:/foo" metadata="true" artifact="true" />
- * Both metadata and artifact are optional:
- * 1) if neither are set, the repo is used for both metadata and artifacts
- * 2) if only one is true, the repo is that type and not the other
- */
- static public class RepoEntry {
- private URI repoLocation;
- private Boolean metadata = null;
- private Boolean artifact = null;
-
- /**
- * If not set, default is true if we aren't set as an artifact repo
- */
- public boolean isMetadataRepository() {
- if (metadata != null)
- return metadata.booleanValue();
- return !Boolean.TRUE.equals(artifact);
- }
-
- /**
- * If not set, default is true if we aren't set as an metadata repo
- */
- public boolean isArtifactRepository() {
- if (artifact != null)
- return artifact.booleanValue();
- return !Boolean.TRUE.equals(metadata);
- }
-
- public URI getRepositoryLocation() {
- return repoLocation;
- }
-
- public void setLocation(String location) {
- try {
- repoLocation = URIUtil.fromString(location);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Repository location (" + location + ") must be a URL."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public void setMetadata(boolean metadata) {
- this.metadata = Boolean.valueOf(metadata);
- }
-
- public void setArtifact(boolean artifact) {
- this.artifact = Boolean.valueOf(artifact);
- }
- }
-
- protected boolean compress = false;
- protected boolean reusePackedFiles = false;
- protected boolean append = true;
- protected boolean publish = true;
- protected String source = null;
- protected URI metadataLocation;
- protected String metadataRepoName;
- protected URI artifactLocation;
- protected String artifactRepoName;
- protected PublisherInfo provider = null;
- protected List<RepoEntry> contextRepositories = new ArrayList<RepoEntry>();
-
- protected IProvisioningAgent getProvisioningAgent() {
- return (IProvisioningAgent) ServiceHelper.getService(Activator.context, IProvisioningAgent.SERVICE_NAME);
- }
-
- protected IStatus createConfigurationEror(String message) {
- return new Status(IStatus.ERROR, "org.eclipse.equinox.p2.publisher", message); //$NON-NLS-1$
- }
-
- private boolean isEmpty(IArtifactRepository repo) {
- IQueryResult<IArtifactKey> result = repo.query(QueryUtil.createLimitQuery(ArtifactKeyQuery.ALL_KEYS, 1), null);
- return result.isEmpty();
- }
-
- protected void initializeRepositories(PublisherInfo info) throws ProvisionException {
- if (artifactLocation != null) {
- IArtifactRepository repo = Publisher.createArtifactRepository(getProvisioningAgent(), artifactLocation, artifactRepoName, compress, reusePackedFiles);
- if (!append && !isEmpty(repo)) {
- File repoLocation = URIUtil.toFile(artifactLocation);
- if (repoLocation != null && source != null) {
- if (repoLocation.isFile())
- repoLocation = repoLocation.getParentFile();
- if (repoLocation.equals(new File(source)))
- throw new IllegalArgumentException(NLS.bind(Messages.exception_artifactRepoNoAppendDestroysInput, URIUtil.toUnencodedString(artifactLocation)));
- }
- repo.removeAll();
- }
- info.setArtifactRepository(repo);
- } else if ((info.getArtifactOptions() & IPublisherInfo.A_PUBLISH) > 0)
- throw new ProvisionException(createConfigurationEror(Messages.exception_noArtifactRepo));
- if (metadataLocation == null)
- throw new ProvisionException(createConfigurationEror(Messages.exception_noMetadataRepo));
- info.setMetadataRepository(Publisher.createMetadataRepository(getProvisioningAgent(), metadataLocation, metadataRepoName, append, compress));
-
- if (contextRepositories.size() > 0) {
- CompositeMetadataRepository contextMetadata = CompositeMetadataRepository.createMemoryComposite(getProvisioningAgent());
- CompositeArtifactRepository contextArtifact = CompositeArtifactRepository.createMemoryComposite(getProvisioningAgent());
-
- for (RepoEntry entry : contextRepositories) {
- if (contextMetadata != null && entry.isMetadataRepository())
- contextMetadata.addChild(entry.getRepositoryLocation());
- if (contextArtifact != null && entry.isArtifactRepository())
- contextArtifact.addChild(entry.getRepositoryLocation());
- }
-
- if (contextMetadata != null && contextMetadata.getChildren().size() > 0)
- info.setContextMetadataRepository(contextMetadata);
-
- if (contextArtifact != null && contextArtifact.getChildren().size() > 0)
- info.setContextArtifactRepository(contextArtifact);
- }
- }
-
- protected PublisherInfo getInfo() {
- if (provider == null)
- provider = new PublisherInfo();
-
- if (publish)
- provider.setArtifactOptions(provider.getArtifactOptions() | IPublisherInfo.A_PUBLISH);
- return provider;
- }
-
- public void setCompress(String value) {
- compress = Boolean.valueOf(value).booleanValue();
- }
-
- public void setReusePackedFiles(String value) {
- reusePackedFiles = Boolean.valueOf(value).booleanValue();
- }
-
- public void setAppend(String value) {
- append = Boolean.valueOf(value).booleanValue();
- }
-
- public void setPublishArtifacts(String value) {
- publish = Boolean.valueOf(value).booleanValue();
- }
-
- public void setArtifactRepository(String location) {
- try {
- artifactLocation = URIUtil.fromString(location);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Artifact repository location (" + location + ") must be a URL."); //$NON-NLS-1$//$NON-NLS-2$
- }
- }
-
- public void setArtifactRepositoryName(String value) {
- artifactRepoName = value;
- }
-
- public void setMetadataRepository(String location) {
- try {
- metadataLocation = URIUtil.fromString(location);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Metadata repository location (" + location + ") must be a URL."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- public void setMetadataRepositoryName(String value) {
- metadataRepoName = value;
- }
-
- public void setRepository(String location) {
- setArtifactRepository(location);
- setMetadataRepository(location);
- }
-
- public void setRepositoryName(String name) {
- setArtifactRepositoryName(name);
- setMetadataRepositoryName(name);
- }
-
- // nested <contextRepository/> elements
- public void addConfiguredContextRepository(RepoEntry repo) {
- contextRepositories.add(repo);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java b/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java
deleted file mode 100644
index 0c8bcab19..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/FeaturesAndBundlesPublisherTask.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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 - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.ant;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.types.FileSet;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.publisher.IPublisherAction;
-import org.eclipse.equinox.p2.publisher.Publisher;
-import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
-import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
-
-public class FeaturesAndBundlesPublisherTask extends AbstractPublishTask {
- private ArrayList<Object> features = new ArrayList<Object>();
- private ArrayList<Object> bundles = new ArrayList<Object>();
-
- public void execute() throws BuildException {
- try {
- initializeRepositories(getInfo());
- } catch (ProvisionException e) {
- throw new BuildException("Unable to configure repositories", e); //$NON-NLS-1$
- }
-
- File[] f = getLocations(features);
- File[] b = getLocations(bundles);
-
- ArrayList<IPublisherAction> actions = new ArrayList<IPublisherAction>();
- if (f.length > 0)
- actions.add(new FeaturesAction(f));
- if (b.length > 0)
- actions.add(new BundlesAction(b));
-
- if (actions.size() > 0)
- new Publisher(getInfo()).publish(actions.toArray(new IPublisherAction[actions.size()]), new NullProgressMonitor());
- }
-
- private File[] getLocations(List<Object> collection) {
- ArrayList<Object> results = new ArrayList<Object>();
- for (Object obj : collection) {
- if (obj instanceof FileSet) {
- FileSet set = (FileSet) obj;
-
- DirectoryScanner scanner = set.getDirectoryScanner(getProject());
- String[][] elements = new String[][] {scanner.getIncludedDirectories(), scanner.getIncludedFiles()};
- for (int i = 0; i < 2; i++) {
- for (int j = 0; j < elements[i].length; j++) {
- results.add(new File(set.getDir(), elements[i][j]));
- }
- }
- } else if (obj instanceof File) {
- results.add(obj);
- }
- }
- return results.toArray(new File[results.size()]);
- }
-
- public FileSet createFeatures() {
- FileSet set = new FileSet();
- features.add(set);
- return set;
- }
-
- public FileSet createBundles() {
- FileSet set = new FileSet();
- bundles.add(set);
- return set;
- }
-
- public void setSource(String source) {
- super.source = source;
- features.add(new File(source, "features")); //$NON-NLS-1$
- bundles.add(new File(source, "plugins")); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java b/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java
deleted file mode 100644
index 2a4af026b..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/ProductPublisherTask.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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 - Initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.ant;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
-import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.actions.VersionAdvice;
-import org.eclipse.equinox.p2.publisher.eclipse.ProductAction;
-
-public class ProductPublisherTask extends AbstractPublishTask {
-
- public static class ConfigElement {
- public String os;
- public String ws;
- public String arch;
-
- public void setOs(String os) {
- this.os = os;
- }
-
- public void setWs(String ws) {
- this.ws = ws;
- }
-
- public void setArch(String arch) {
- this.arch = arch;
- }
-
- public String toString() {
- return ws + '.' + os + '.' + arch;
- }
- }
-
- public static class AdviceElement {
- public String kind;
- public String file;
-
- public void setKind(String kind) {
- this.kind = kind;
- }
-
- public void setFile(String file) {
- this.file = file;
- }
- }
-
- private String flavor;
- private String productFile;
- private String executables;
- private List<ConfigElement> configurations = new ArrayList<ConfigElement>(3);
- private List<AdviceElement> advice = new ArrayList<AdviceElement>(3);
-
- public void execute() throws BuildException {
- try {
- initializeRepositories(getInfo());
- } catch (ProvisionException e) {
- throw new BuildException("Unable to configure repositories", e); //$NON-NLS-1$
- }
-
- IProductDescriptor productDescriptor = null;
- try {
- productDescriptor = new ProductFile(productFile);
- } catch (Exception e) {
- if (productFile == null)
- throw new IllegalArgumentException("unable to load product file"); //$NON-NLS-1$
- }
-
- if (flavor == null || flavor.startsWith(ANT_PROPERTY_PREFIX))
- flavor = "tooling"; //$NON-NLS-1$
-
- IPublisherAction action = new ProductAction(source, productDescriptor, flavor, executables != null ? new File(executables) : null);
- new Publisher(getInfo()).publish(new IPublisherAction[] {action}, new NullProgressMonitor());
- }
-
- protected PublisherInfo getInfo() {
- String[] configStrings = new String[configurations.size()];
- for (int i = 0; i < configurations.size(); i++) {
- configStrings[i] = configurations.get(i).toString();
- }
-
- PublisherInfo info = super.getInfo();
- info.setConfigurations(configStrings);
- processAdvice(info);
- return info;
- }
-
- protected void processAdvice(PublisherInfo info) {
- for (AdviceElement element : advice) {
- if (element.kind == null || element.file == null)
- continue;
-
- if (element.kind.equals("featureVersions") || element.kind.equals("pluginVersions")) { //$NON-NLS-1$ //$NON-NLS-2$
- VersionAdvice versionAdvice = new VersionAdvice();
- versionAdvice.load(IInstallableUnit.NAMESPACE_IU_ID, element.file, element.kind.startsWith("features") ? ".feature.group" : null); //$NON-NLS-1$ //$NON-NLS-2$
- info.addAdvice(versionAdvice);
- }
- }
- }
-
- public void setFlavor(String flavor) {
- this.flavor = flavor;
- }
-
- public void setProductFile(String productFile) {
- this.productFile = productFile;
- }
-
- public void setExecutables(String executables) {
- this.executables = executables;
- }
-
- public void setSource(String source) {
- super.source = source;
- }
-
- public void addConfiguredConfig(ConfigElement config) {
- this.configurations.add(config);
- }
-
- public void addConfiguredAdvice(AdviceElement element) {
- this.advice.add(element);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java b/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
deleted file mode 100644
index d25b04174..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/PublisherTask.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.ant;
-
-import java.io.File;
-import org.apache.tools.ant.BuildException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IVersionedId;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.publisher.*;
-import org.eclipse.equinox.p2.publisher.eclipse.EclipseInstallAction;
-
-/**
- * An Ant task to call the p2 publisher application.
- *
- * @since 1.0
- */
-public class PublisherTask extends AbstractPublishTask {
-
- protected boolean inplace = false;
- protected String[] configurations;
- protected String mode;
- private String flavor;
- private String operation;
- private String operationValue;
- private String root;
- private String rootVersion;
- private String versionAdvice;
- private String rootName;
- private String executableName;
- private IVersionedId[] topLevel;
- private boolean start;
- private String[] nonRootFiles;
-
- /* (non-Javadoc)
- * @see org.apache.tools.ant.Task#execute()
- */
- public void execute() throws BuildException {
- try {
- initialize(getInfo());
- } catch (ProvisionException e) {
- throw new BuildException("Unable to configure repositories", e); //$NON-NLS-1$
- }
- createVersionAdvice();
- IPublisherAction[] actions = createActions();
- //TODO Do something with publisher result
- new Publisher(getInfo()).publish(actions, new NullProgressMonitor());
- }
-
- private IPublisherAction[] createActions() {
- if (operation == null)
- // TODO what to do in this case?
- return new IPublisherAction[] {};
- if (operation.equals("-update")) //$NON-NLS-1$
- // TODO fix this up. watch for circularities
- // return new IPublishingAction[] {new LocalUpdateSiteAction(operationValue)};
- return new IPublisherAction[] {};
- if (operation.equals("-source")) //$NON-NLS-1$
- // TODO what to do in this case?
- return new IPublisherAction[] {new EclipseInstallAction(operationValue, root, Version.parseVersion(rootVersion), rootName, executableName, flavor, topLevel, nonRootFiles, start)};
- // TODO what to do in this case?
- return new IPublisherAction[] {};
- }
-
- private void createVersionAdvice() {
- if (versionAdvice == null)
- return;
- // TODO read the version advice and add the IVersionAdvice
- }
-
- protected void initialize(PublisherInfo info) throws ProvisionException {
- if (inplace) {
- File sourceLocation = new File(source);
- if (metadataLocation == null)
- metadataLocation = sourceLocation.toURI();
- if (artifactLocation == null)
- artifactLocation = sourceLocation.toURI();
- info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
- } else
- info.setArtifactOptions(info.getArtifactOptions() | IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH | IPublisherInfo.A_OVERWRITE);
- initializeRepositories(info);
- }
-
- public void setBase(String value) {
- source = value;
- }
-
- public void setBundles(String value) {
- //TODO Remove - currently exists for compatibility with generator task
- }
-
- public void setConfig(String value) {
- operation = "-config"; //$NON-NLS-1$
- operationValue = value;
- }
-
- public void setInplace(String value) {
- operation = "-inplace"; //$NON-NLS-1$
- operationValue = value;
- }
-
- public void setSource(String location) {
- super.source = location;
- operation = "-source"; //$NON-NLS-1$
- operationValue = location;
- }
-
- public void setUpdateSite(String value) {
- operation = "-update"; //$NON-NLS-1$
- operationValue = value;
- }
-
- /**
- * @deprecated
- */
- public void setExe(String value) {
- executableName = value;
- }
-
- public void setFeatures(String value) {
- //TODO Remove - currently exists for compatibility with generator task
- }
-
- public void setFlavor(String value) {
- flavor = value;
- }
-
- /**
- * @deprecated
- */
- public void setLauncherConfig(String value) {
- //TODO Remove - currently exists for compatibility with generator task
- }
-
- public void setNoDefaultIUs(String value) {
- //TODO Remove - currently exists for compatibility with generator task
- }
-
- /**
- * @deprecated
- */
- public void setP2OS(String value) {
- //TODO Remove - currently exists for compatibility with generator task
- }
-
- public void setProductFile(String file) {
- //TODO Remove - currently exists for compatibility with generator task
- }
-
- public void setPublishArtifactRepository(String value) {
- getInfo().setArtifactOptions(getInfo().getArtifactOptions() | IPublisherInfo.A_INDEX);
- }
-
- public void setPublishArtifacts(String value) {
- getInfo().setArtifactOptions(getInfo().getArtifactOptions() | IPublisherInfo.A_PUBLISH);
- }
-
- public void setRoot(String value) {
- root = value;
- }
-
- public void setRootVersion(String value) {
- rootVersion = value;
- }
-
- public void setMode(String value) {
- mode = value;
- }
-
- public void setVersionAdvice(String value) {
- versionAdvice = value;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/TaskMessages.java b/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/TaskMessages.java
deleted file mode 100644
index 6893edd95..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/TaskMessages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.publisher.ant;
-
-import org.eclipse.osgi.util.NLS;
-
-public class TaskMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.generator.ant.messages";//$NON-NLS-1$
-
- public static String exception_errorOccurredCallingGenerator;
- public static String exception_errorArtifactRepo;
- public static String exception_errorMetadataRepo;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, TaskMessages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/messages.properties b/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/messages.properties
deleted file mode 100644
index 2c2eb1c97..000000000
--- a/bundles/org.eclipse.equinox.p2.publisher/src_ant/org/eclipse/equinox/internal/p2/publisher/ant/messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-
-exception_errorOccurredCallingGenerator = An error occurred when calling generator.
-exception_errorArtifactRepo = Error setting artifact repository {0}.
-exception_errorMetadataRepo = Error setting metadata repository {0}.
diff --git a/bundles/org.eclipse.equinox.p2.ql/.classpath b/bundles/org.eclipse.equinox.p2.ql/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.ql/.cvsignore b/bundles/org.eclipse.equinox.p2.ql/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.ql/.project b/bundles/org.eclipse.equinox.p2.ql/.project
deleted file mode 100644
index bf129f044..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ql</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index b069b3cf4..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Nov 12 08:11:03 CET 2009
-eclipse.preferences.version=1
-encoding//model/p2ql.ecorediag=UTF-8
diff --git a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 62ea9274b..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,347 +0,0 @@
-#Tue Dec 22 17:40:14 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=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
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 014501b61..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:57:54 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF
deleted file mode 100644
index c7c846581..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ql;singleton:=true
-Bundle-Version: 2.0.100.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.p2.ql;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.1"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)"
diff --git a/bundles/org.eclipse.equinox.p2.ql/about.html b/bundles/org.eclipse.equinox.p2.ql/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ql/build.properties b/bundles/org.eclipse.equinox.p2.ql/build.properties
deleted file mode 100644
index e0cf562f5..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: build.properties,v 1.3 2010/01/23 22:21:13 johna Exp $
-
-bin.includes = .,\
- META-INF/,\
- plugin.properties,\
- about.html,\
- OSGI-INF/
-jars.compile.order = .
-source.. = src/
-output.. = bin/
-src.includes = about.html,\
- model/,\
- OSGI-INF/
-javacTarget=jsr14
-javacSource=1.5
-javacWarnings..=+fieldHiding
diff --git a/bundles/org.eclipse.equinox.p2.ql/model/p2ql.bnf b/bundles/org.eclipse.equinox.p2.ql/model/p2ql.bnf
deleted file mode 100644
index 476f54187..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/model/p2ql.bnf
+++ /dev/null
@@ -1,67 +0,0 @@
-condition
- : orExpression ( '?' orExpression ':' orExpression )?
- ;
-
-orExpression : andExpression ( '||' andExpression )* ;
-
-andExpression : binaryExpression ( '&&' binaryExpression )* ;
-
-binaryExpression : notExpression ( op notExpression )?;
-
-op : '=' | '!=' | '>' | '>=' | '<' | '<=' | '~=' ;
-
-notExpression
- : '!' notExpression
- | collectionExpression
- ;
-
-collectionExpression
- : memberExpression ( '.' collectionFunction )*
- ;
-
-memberExpression : constructor ( ( '.' ID ) | ( '[' memberExpression ']' ) )* ;
-
-constructor
- : ( filter | version | range | class ) '(' unaryExpression ')'
- | set '(' ( collectionExpression ( ',' collectionExpression )* )? ')'
- | unaryExpression
- ;
-
-collectionFunction
- : ( select | reject | exists | all | traverse ) '(' lambdaDefinition ')'
- | limit '(' memberExpression ')'
- | unique '(' memberExpression? ')'
- | latest '(' lambdaDefinition? ')'
- ;
-
-lambdaDefinition
- : initializer ( ',' initializer )* ( ',' '{' lambda '}' )?
- | '{' lambda '}'
- | lambda
- ;
-
-initializer
- : '_'
- | condition
- ;
-
-lambda
- : ( ID ( ',' ID )* )? '|' condition
- ;
-
-unaryExpression
- : '(' condition ')'
- | '[' condition ( ',' condition )* ']' // #array construct
- | '/' regexpPattern '/'
- | STRING
- | INT
- | parameter
- | 'null'
- | 'true'
- | 'false'
- | ID
- ;
-
-parameter
- : '$' INT | ID
- ;
diff --git a/bundles/org.eclipse.equinox.p2.ql/plugin.properties b/bundles/org.eclipse.equinox.p2.ql/plugin.properties
deleted file mode 100644
index cd7799fdd..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/plugin.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: plugin.properties,v 1.1 2009/12/01 17:41:31 helindbe Exp $
-
-pluginName =p2 query language
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.ql/pom.xml b/bundles/org.eclipse.equinox.p2.ql/pom.xml
deleted file mode 100644
index cffd94b54..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ql</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java b/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java
deleted file mode 100644
index 60b277ccb..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLExpression.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.ql;
-
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- * @since 2.0
- */
-public interface IQLExpression extends IExpression {
- //
-}
diff --git a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java b/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java
deleted file mode 100644
index b87c00959..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/IQLFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.ql;
-
-import org.eclipse.equinox.p2.metadata.expression.IExpressionFactory;
-
-/**
- * This interface provides all the factory methods needed to create the all possible
- * nodes of the expression tree.
- */
-public interface IQLFactory extends IExpressionFactory {
- //
-}
diff --git a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html b/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html
deleted file mode 100644
index b23b0f12e..000000000
--- a/bundles/org.eclipse.equinox.p2.ql/src/org/eclipse/equinox/p2/ql/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-A query language specialized in the querying of p2 constructs.
-<h2>
-Package Specification</h2>
-<p>
-This package specifies a query language specialized in the handling p2 constructs.
-service.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfoReader.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfoReader.java
deleted file mode 100644
index c84d4e2a6..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileInfoReader.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, IBM Corporation, and others.
- * The code, documentation and other materials contained herein have been
- * licensed under the Eclipse Public License - v 1.0 by the copyright holder
- * listed above, as the Initial Contributor under such license. The text of
- * such license is available at www.eclipse.org.
- * Contributors:
- * IBM Corporation - initial implementation
- * Cloudsmith Inc - modified API, and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.repository;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.ecf.core.*;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.filetransfer.*;
-import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemBrowseEvent;
-import org.eclipse.ecf.filetransfer.events.IRemoteFileSystemEvent;
-import org.eclipse.ecf.filetransfer.identity.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The FileInfoReader is a {@link Job} similar to {@link FileReader}, but without the support
- * from ECF (there is currently no way to wait on a BrowseRequest job, as this is internal to
- * ECF). If such support is added, this class is easily modified.
- *
- */
-public class FileInfoReader extends Job implements IRemoteFileSystemListener {
- private Exception exception;
- private IProgressMonitor theMonitor;
- private final int connectionRetryCount;
- private final long connectionRetryDelay;
- private final IConnectContext connectContext;
- final Boolean[] barrier = new Boolean[1];
- private IRemoteFile[] remoteFiles;
- private IRemoteFileSystemRequest browseRequest;
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus run(IProgressMonitor monitor) {
- synchronized (barrier) {
- while (barrier[0] == null) {
- try {
- barrier.wait(1000);
- if (theMonitor.isCanceled() && browseRequest != null)
- browseRequest.cancel();
- } catch (InterruptedException e) {
- //ignore
- }
- }
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Waits until request is processed (barrier[0] is non null).
- * This is a bit of a hack, as it would be better if the ECFBrowser worked in similar fashion to
- * file transfer were a custom job can be supplied.
- * TODO: log an issue for ECF.
- */
- private void waitOnSelf() {
- schedule();
- while (barrier[0] == null) {
- boolean logged = false;
- try {
- join();
- } catch (InterruptedException e) {
- if (!logged)
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Unexpected interrupt while waiting on ECF browse request", e)); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Create a new FileInfoReader that will retry failed connection attempts and sleep some amount of time between each
- * attempt.
- */
- public FileInfoReader(IConnectContext aConnectContext) {
- super(Messages.repo_loading); // job label - TODO: this is a bad label
- barrier[0] = null;
- // Hide this job.
- setSystem(true);
- setUser(false);
- connectionRetryCount = RepositoryPreferences.getConnectionRetryCount();
- connectionRetryDelay = RepositoryPreferences.getConnectionMsRetryDelay();
- connectContext = aConnectContext;
- }
-
- /**
- * Get the requested information.
- * @return IRemoteFile[] or null if there was an error.
- * @throws CoreException
- * @throws FileNotFoundException
- * @throws AuthenticationFailedException
- * @throws JREHttpClientRequiredException
- */
- public IRemoteFile[] getRemoteFiles(URI location, IProgressMonitor monitor) throws AuthenticationFailedException, FileNotFoundException, CoreException, JREHttpClientRequiredException {
- if (monitor != null)
- monitor.beginTask(location.toString(), 1);
- try {
- sendBrowseRequest(location, monitor);
- waitOnSelf();
- // throw any exception received in a callback
- checkException(location, connectionRetryCount);
-
- return remoteFiles;
- } finally {
- if (monitor != null) {
- monitor.done();
- }
- }
-
- }
-
- public IRemoteFile getRemoteFile(URI location, IProgressMonitor monitor) throws AuthenticationFailedException, FileNotFoundException, CoreException, JREHttpClientRequiredException {
-
- getRemoteFiles(location, monitor);
- return remoteFiles != null && remoteFiles.length > 0 ? remoteFiles[0] : null;
- }
-
- public long getLastModified(URI location, IProgressMonitor monitor) throws AuthenticationFailedException, FileNotFoundException, CoreException, JREHttpClientRequiredException {
- IRemoteFile file = getRemoteFile(location, monitor);
- if (file == null)
- throw new FileNotFoundException(location.toString());
- return file.getInfo().getLastModified();
- }
-
- public void handleRemoteFileEvent(IRemoteFileSystemEvent event) {
- exception = event.getException();
- if (exception != null) {
- synchronized (barrier) {
- barrier[0] = Boolean.TRUE;
- barrier.notify();
- }
- } else if (event instanceof IRemoteFileSystemBrowseEvent) {
- IRemoteFileSystemBrowseEvent fsbe = (IRemoteFileSystemBrowseEvent) event;
- remoteFiles = fsbe.getRemoteFiles();
- if (theMonitor != null)
- theMonitor.worked(1);
- synchronized (barrier) {
- barrier[0] = Boolean.TRUE;
- barrier.notify();
- }
- } else {
- synchronized (barrier) {
- barrier[0] = Boolean.FALSE; // ended by unknown reason
- barrier.notify();
- }
- }
- }
-
- protected void sendBrowseRequest(URI uri, IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException {
- IContainer container;
- try {
- container = ContainerFactory.getDefault().createContainer();
- } catch (ContainerCreateException e) {
- throw RepositoryStatusHelper.fromMessage(Messages.ecf_configuration_error);
- }
-
- IRemoteFileSystemBrowserContainerAdapter adapter = (IRemoteFileSystemBrowserContainerAdapter) container.getAdapter(IRemoteFileSystemBrowserContainerAdapter.class);
- if (adapter == null) {
- throw RepositoryStatusHelper.fromMessage(Messages.ecf_configuration_error);
- }
-
- adapter.setConnectContextForAuthentication(connectContext);
-
- this.exception = null;
- this.theMonitor = monitor;
- for (int retryCount = 0;; retryCount++) {
- if (monitor != null && monitor.isCanceled())
- throw new OperationCanceledException();
-
- try {
- IFileID fileID = FileIDFactory.getDefault().createFileID(adapter.getBrowseNamespace(), uri.toString());
- browseRequest = adapter.sendBrowseRequest(fileID, this);
- } catch (RemoteFileSystemException e) {
- exception = e;
- } catch (FileCreateException e) {
- exception = e;
- }
- if (checkException(uri, retryCount))
- break;
- }
- }
-
- protected Exception getException() {
- return exception;
- }
-
- /**
- * Utility method to check exception condition and determine if retry should be done.
- * If there was an exception it is translated into one of the specified exceptions and thrown.
- *
- * @param uri the URI being read - used for logging purposes
- * @param attemptCounter - the current attempt number (start with 0)
- * @return true if the exception is an IOException and attemptCounter < connectionRetryCount, false otherwise
- * @throws CoreException
- * @throws FileNotFoundException
- * @throws AuthenticationFailedException
- * @throws JREHttpClientRequiredException
- */
- private boolean checkException(URI uri, int attemptCounter) throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException {
- // note that 'exception' could have been captured in a callback
- if (exception != null) {
- // check if HTTP client needs to be changed
- RepositoryStatusHelper.checkJREHttpClientRequired(exception);
-
- // if this is a authentication failure - it is not meaningful to continue
- RepositoryStatusHelper.checkPermissionDenied(exception);
-
- // if this is a file not found - it is not meaningful to continue
- RepositoryStatusHelper.checkFileNotFound(exception, uri);
-
- Throwable t = RepositoryStatusHelper.unwind(exception);
- if (t instanceof CoreException)
- throw RepositoryStatusHelper.unwindCoreException((CoreException) t);
-
- if (t instanceof IOException && attemptCounter < connectionRetryCount) {
- // TODO: Retry only certain exceptions or filter out
- // some exceptions not worth retrying
- //
- exception = null;
- try {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.connection_to_0_failed_on_1_retry_attempt_2, new String[] {uri.toString(), t.getMessage(), String.valueOf(attemptCounter)}), t));
-
- Thread.sleep(connectionRetryDelay);
- return false;
- } catch (InterruptedException e) {
- /* ignore */
- }
- }
- throw RepositoryStatusHelper.wrap(exception);
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java
deleted file mode 100644
index fcc92c214..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/FileReader.java
+++ /dev/null
@@ -1,502 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 Cloudsmith 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:
- * Cloudsmith Inc - initial API and implementation
- * IBM Corporation - ongoing development
- * Sonatype Inc - ongoing development
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.repository;
-
-import java.io.*;
-import java.net.SocketTimeoutException;
-import java.net.URI;
-import java.util.Date;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.filetransfer.*;
-import org.eclipse.ecf.filetransfer.events.*;
-import org.eclipse.ecf.filetransfer.identity.*;
-import org.eclipse.ecf.filetransfer.service.IRetrieveFileTransferFactory;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * FileReader is an ECF FileTransferJob implementation.
- */
-public final class FileReader extends FileTransferJob implements IFileTransferListener {
- /**
- * Class used to suppress warnings about a job being blocked by another job.
- * Since we are running a job that will always be blocked by another job that
- * is actually performing the transfer, these messages are unnecessary and ugly.
- */
- static class SuppressBlockedMonitor extends SubProgressMonitor {
- public SuppressBlockedMonitor(IProgressMonitor monitor, int ticks) {
- super(monitor, ticks);
- }
-
- public void setBlocked(IStatus reason) {
- //do nothing
- }
-
- public void clearBlocked() {
- //do nothing
- }
- }
-
- private static IFileReaderProbe testProbe;
- private boolean closeStreamWhenFinished = false;
- private Exception exception;
- private FileInfo fileInfo;
- private long lastProgressCount;
- private long lastStatsCount;
- protected IProgressMonitor theMonitor;
- private OutputStream theOutputStream;
- private ProgressStatistics statistics;
- private final int connectionRetryCount;
- private final long connectionRetryDelay;
- private final IConnectContext connectContext;
- private URI requestUri;
- protected IFileTransferConnectStartEvent connectEvent;
- private Job cancelJob;
- private boolean monitorStarted;
-
- /**
- * Create a new FileReader that will retry failed connection attempts and sleep some amount of time between each
- * attempt.
- */
- public FileReader(IConnectContext aConnectContext) {
- super(Messages.FileTransport_reader); // job label
-
- // Hide this job.
- setSystem(true);
- setUser(false);
- connectionRetryCount = RepositoryPreferences.getConnectionRetryCount();
- connectionRetryDelay = RepositoryPreferences.getConnectionMsRetryDelay();
- connectContext = aConnectContext;
- }
-
- public FileInfo getLastFileInfo() {
- return fileInfo;
- }
-
- /**
- * A job to handle cancelation when trying to establish a socket connection.
- * At this point we don't have a transfer job running yet, so we need a separate
- * job to monitor for cancelation.
- */
- protected class CancelHandler extends Job {
- private boolean done = false;
-
- protected CancelHandler() {
- super(Messages.FileTransport_cancelCheck);
- setSystem(true);
- }
-
- public IStatus run(IProgressMonitor jobMonitor) {
- while (!done && !jobMonitor.isCanceled()) {
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- return Status.CANCEL_STATUS;
- }
- if (theMonitor != null && theMonitor.isCanceled())
- if (connectEvent != null)
- connectEvent.cancel();
- }
- return Status.OK_STATUS;
- }
-
- protected void canceling() {
- //wake up from sleep in run method
- Thread t = getThread();
- if (t != null)
- t.interrupt();
- }
-
- }
-
- public synchronized void handleTransferEvent(IFileTransferEvent event) {
- if (event instanceof IFileTransferConnectStartEvent) {
- // keep the connect event to be able to cancel the transfer
- connectEvent = (IFileTransferConnectStartEvent) event;
- cancelJob = new CancelHandler();
- //schedule with a delay to avoid the overhead of an extra job on a fast connection
- cancelJob.schedule(500);
- } else if (event instanceof IIncomingFileTransferReceiveStartEvent) {
- //we no longer need the cancel handler because we are about to fork the transfer job
- if (cancelJob != null)
- cancelJob.cancel();
- IIncomingFileTransfer source = ((IIncomingFileTransferEvent) event).getSource();
- try {
- FileInfo fi = new FileInfo();
- Date lastModified = source.getRemoteLastModified();
- if (lastModified != null)
- fi.setLastModified(lastModified.getTime());
- fi.setName(source.getRemoteFileName());
- fi.setSize(source.getFileLength());
- fileInfo = fi;
-
- ((IIncomingFileTransferReceiveStartEvent) event).receive(theOutputStream, this);
- } catch (IOException e) {
- exception = e;
- return;
- }
- long fileLength = source.getFileLength();
- ProgressStatistics stats = new ProgressStatistics(requestUri, source.getRemoteFileName(), fileLength);
- setStatistics(stats);
-
- if (theMonitor != null) {
- theMonitor.beginTask(null, 1000);
- monitorStarted = true;
- theMonitor.subTask(stats.report());
- lastStatsCount = 0;
- lastProgressCount = 0;
- }
- onStart(source);
- } else if (event instanceof IIncomingFileTransferReceiveDataEvent) {
- IIncomingFileTransfer source = ((IIncomingFileTransferEvent) event).getSource();
- if (theMonitor != null) {
- if (theMonitor.isCanceled()) {
- source.cancel();
- return;
- }
-
- long br = source.getBytesReceived();
- long count = br - lastStatsCount;
- lastStatsCount = br;
- ProgressStatistics stats = getStatistics();
- if (stats != null) {
- stats.increase(count);
- fileInfo.setAverageSpeed(stats.getAverageSpeed());
- if (stats.shouldReport()) {
- count = br - lastProgressCount;
- lastProgressCount = br;
- theMonitor.subTask(stats.report());
- theMonitor.worked((int) (1000 * count / stats.getTotal()));
- }
- }
- }
- onData(source);
- } else if (event instanceof IIncomingFileTransferReceiveDoneEvent) {
- if (closeStreamWhenFinished)
- hardClose(theOutputStream);
-
- if (exception == null)
- exception = ((IIncomingFileTransferReceiveDoneEvent) event).getException();
- onDone(((IIncomingFileTransferReceiveDoneEvent) event).getSource());
- }
- }
-
- public InputStream read(URI url, final IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException {
- final PipedInputStream input = new PipedInputStream();
- PipedOutputStream output;
- try {
- output = new PipedOutputStream(input);
- } catch (IOException e) {
- throw RepositoryStatusHelper.wrap(e);
- }
- RepositoryTracing.debug("Downloading {0}", url); //$NON-NLS-1$
-
- sendRetrieveRequest(url, output, null, true, monitor);
-
- return new InputStream() {
- public int available() throws IOException {
- checkException();
- return input.available();
- }
-
- public void close() throws IOException {
- hardClose(input);
- checkException();
- }
-
- public void mark(int readlimit) {
- input.mark(readlimit);
- }
-
- public boolean markSupported() {
- return input.markSupported();
- }
-
- public int read() throws IOException {
- checkException();
- return input.read();
- }
-
- public int read(byte b[]) throws IOException {
- checkException();
- return input.read(b);
- }
-
- public int read(byte b[], int off, int len) throws IOException {
- checkException();
- return input.read(b, off, len);
- }
-
- public void reset() throws IOException {
- checkException();
- input.reset();
- }
-
- public long skip(long n) throws IOException {
- checkException();
- return input.skip(n);
- }
-
- private void checkException() throws IOException {
- if (getException() == null)
- return;
-
- IOException e;
- Throwable t = RepositoryStatusHelper.unwind(getException());
- if (t instanceof IOException)
- e = (IOException) t;
- else {
- if (t instanceof UserCancelledException) {
- Throwable cause = t;
- t = new OperationCanceledException(t.getMessage());
- t.initCause(cause);
- }
- e = new IOException(t.getMessage());
- e.initCause(t);
- }
- throw e;
- }
- };
- }
-
- public void readInto(URI uri, OutputStream anOutputStream, IProgressMonitor monitor) //
- throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException {
- readInto(uri, anOutputStream, -1, monitor);
- }
-
- public boolean belongsTo(Object family) {
- return family == this;
- }
-
- public void readInto(URI uri, OutputStream anOutputStream, long startPos, IProgressMonitor monitor) //
- throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- try {
- sendRetrieveRequest(uri, anOutputStream, (startPos != -1 ? new DownloadRange(startPos) : null), false, monitor);
- Job.getJobManager().join(this, new SuppressBlockedMonitor(monitor, 0));
- if (monitor.isCanceled() && connectEvent != null)
- connectEvent.cancel();
- // check and throw exception if received in callback
- checkException(uri, connectionRetryCount);
- } catch (InterruptedException e) {
- monitor.setCanceled(true);
- throw new OperationCanceledException();
- } finally {
- // kill the cancelJob, if there is one
- if (cancelJob != null) {
- cancelJob.cancel();
- cancelJob = null;
- }
- // If monitor was never started, make sure it is balanced
- if (!monitorStarted)
- monitor.beginTask(null, 1);
- monitorStarted = false;
- monitor.done();
- }
- }
-
- protected void sendRetrieveRequest(URI uri, OutputStream outputStream, DownloadRange range, boolean closeStreamOnFinish, //
- IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException {
-
- IRetrieveFileTransferFactory factory = Activator.getDefault().getRetrieveFileTransferFactory();
- if (factory == null) {
- throw RepositoryStatusHelper.fromMessage(Messages.ecf_configuration_error);
- }
- IRetrieveFileTransferContainerAdapter adapter = factory.newInstance();
-
- adapter.setConnectContextForAuthentication(connectContext);
-
- this.exception = null;
- this.closeStreamWhenFinished = closeStreamOnFinish;
- this.fileInfo = null;
- this.statistics = null;
- this.lastProgressCount = 0L;
- this.lastStatsCount = 0L;
- this.theMonitor = monitor;
- this.monitorStarted = false;
- this.theOutputStream = outputStream;
- this.requestUri = uri;
-
- for (int retryCount = 0;; retryCount++) {
- if (monitor != null && monitor.isCanceled())
- throw new OperationCanceledException();
-
- try {
- IFileID fileID = FileIDFactory.getDefault().createFileID(adapter.getRetrieveNamespace(), uri.toString());
- if (range != null)
- adapter.sendRetrieveRequest(fileID, range, this, null);
- else
- adapter.sendRetrieveRequest(fileID, this, null);
- } catch (IncomingFileTransferException e) {
- exception = e;
- } catch (FileCreateException e) {
- exception = e;
- } catch (Throwable t) {
- if (exception != null)
- exception.printStackTrace();
- }
- if (checkException(uri, retryCount))
- break;
- }
- }
-
- /**
- * Utility method to check exception condition and determine if retry should be done.
- * If there was an exception it is translated into one of the specified exceptions and thrown.
- *
- * @param uri the URI being read - used for logging purposes
- * @param attemptCounter - the current attempt number (start with 0)
- * @return true if the exception is an IOException and attemptCounter < connectionRetryCount, false otherwise
- * @throws CoreException
- * @throws FileNotFoundException
- * @throws AuthenticationFailedException
- */
- private boolean checkException(URI uri, int attemptCounter) throws CoreException, FileNotFoundException, AuthenticationFailedException, JREHttpClientRequiredException {
- // note that 'exception' could have been captured in a callback
- if (exception != null) {
- // check if HTTP client needs to be changed
- RepositoryStatusHelper.checkJREHttpClientRequired(exception);
-
- // if this is an 'authentication failure' - it is not meaningful to continue
- RepositoryStatusHelper.checkPermissionDenied(exception);
-
- // if this is a 'file not found' - it is not meaningful to continue
- RepositoryStatusHelper.checkFileNotFound(exception, uri);
-
- Throwable t = RepositoryStatusHelper.unwind(exception);
- if (t instanceof CoreException)
- throw RepositoryStatusHelper.unwindCoreException((CoreException) t);
-
- // not meaningful to try 'timeout again' - if a server is that busy, we
- // need to wait for quite some time before retrying- it is not likely it is
- // just a temporary network thing.
- if (t instanceof SocketTimeoutException)
- throw RepositoryStatusHelper.wrap(t);
-
- if (t instanceof IOException && attemptCounter < connectionRetryCount) {
- // TODO: Retry only certain exceptions or filter out
- // some exceptions not worth retrying
- //
- exception = null;
- try {
- LogHelper.log(new Status(IStatus.WARNING, Activator.ID, NLS.bind(Messages.connection_to_0_failed_on_1_retry_attempt_2, new String[] {uri.toString(), t.getMessage(), String.valueOf(attemptCounter)}), t));
-
- Thread.sleep(connectionRetryDelay);
- return false;
- } catch (InterruptedException e) {
- /* ignore */
- }
- }
- throw RepositoryStatusHelper.wrap(exception);
- }
- return true;
- }
-
- protected Exception getException() {
- return exception;
- }
-
- /**
- * Closes input and output streams
- * @param aStream
- */
- public static void hardClose(Object aStream) {
- if (aStream != null) {
- try {
- if (aStream instanceof OutputStream)
- ((OutputStream) aStream).close();
- else if (aStream instanceof InputStream)
- ((InputStream) aStream).close();
- } catch (IOException e) { /* ignore */
- }
- }
- }
-
- private static class DownloadRange implements IFileRangeSpecification {
-
- private long startPosition;
-
- public DownloadRange(long startPos) {
- startPosition = startPos;
- }
-
- public long getEndPosition() {
- return -1;
- }
-
- public long getStartPosition() {
- return startPosition;
- }
-
- }
-
- private void onDone(IIncomingFileTransfer source) {
- if (testProbe != null)
- testProbe.onDone(this, source, theMonitor);
- }
-
- private void onStart(IIncomingFileTransfer source) {
- if (testProbe != null)
- testProbe.onStart(this, source, theMonitor);
- }
-
- private void onData(IIncomingFileTransfer source) {
- if (testProbe != null)
- testProbe.onData(this, source, theMonitor);
- }
-
- /**
- * Sets a testing probe that can intercept events on the file reader for testing purposes.
- * This method should only ever be called from automated test suites.
- */
- public static void setTestProbe(IFileReaderProbe probe) {
- testProbe = probe;
- }
-
- /**
- * Sets the progress statistics. This method is synchronized because the field
- * is accessed from both the transfer thread and the thread initiating the transfer
- * and we need to ensure field values are consistent across threads.
- *
- * @param statistics the statistics to set, or <code>null</code>
- */
- private synchronized void setStatistics(ProgressStatistics statistics) {
- this.statistics = statistics;
- }
-
- /**
- * Returns the progress statistics. This method is synchronized because the field
- * is accessed from both the transfer thread and the thread initiating the transfer
- * and we need to ensure field values are consistent across threads.
- *
- * @return the statistics, or <code>null</code>
- */
- private synchronized ProgressStatistics getStatistics() {
- return statistics;
- }
-
- /**
- * An interface to allow automated tests to hook into file reader events
- * @see #setTestProbe
- */
- public interface IFileReaderProbe {
- public void onStart(FileReader reader, IIncomingFileTransfer source, IProgressMonitor monitor);
-
- public void onData(FileReader reader, IIncomingFileTransfer source, IProgressMonitor monitor);
-
- public void onDone(FileReader reader, IIncomingFileTransfer source, IProgressMonitor monitor);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java
deleted file mode 100644
index aae393d0f..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatus.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.repository;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-import java.io.FileNotFoundException;
-import java.net.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.ecf.core.identity.IDCreateException;
-import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
-import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Utility class to transform transport errors into error messages.
- *
- */
-public class RepositoryStatus {
-
- public static String codeToMessage(int code, String toDownload) {
- switch (code) {
- case 400 :
- return NLS.bind(Messages.TransportErrorTranslator_400, toDownload);
- case 401 :
- return NLS.bind(Messages.TransportErrorTranslator_401, toDownload);
- case 402 :
- return NLS.bind(Messages.TransportErrorTranslator_402, toDownload);
- case 403 :
- return NLS.bind(Messages.TransportErrorTranslator_403, toDownload);
- case 404 :
- return NLS.bind(Messages.TransportErrorTranslator_404, toDownload);
- case 405 :
- return NLS.bind(Messages.TransportErrorTranslator_405, toDownload);
- case 406 :
- return NLS.bind(Messages.TransportErrorTranslator_406, toDownload);
- case 407 :
- return NLS.bind(Messages.TransportErrorTranslator_407, toDownload);
- case 408 :
- return NLS.bind(Messages.TransportErrorTranslator_408, toDownload);
- case 409 :
- return NLS.bind(Messages.TransportErrorTranslator_409, toDownload);
- case 410 :
- return NLS.bind(Messages.TransportErrorTranslator_410, toDownload);
- case 411 :
- return NLS.bind(Messages.TransportErrorTranslator_411, toDownload);
- case 412 :
- return NLS.bind(Messages.TransportErrorTranslator_412, toDownload);
- case 413 :
- return NLS.bind(Messages.TransportErrorTranslator_413, toDownload);
- case 414 :
- return NLS.bind(Messages.TransportErrorTranslator_414, toDownload);
- case 415 :
- return NLS.bind(Messages.TransportErrorTranslator_415, toDownload);
- case 416 :
- return NLS.bind(Messages.TransportErrorTranslator_416, toDownload);
- case 417 :
- return NLS.bind(Messages.TransportErrorTranslator_417, toDownload);
- case 418 :
- return NLS.bind(Messages.TransportErrorTranslator_418, toDownload);
- case 422 :
- return NLS.bind(Messages.TransportErrorTranslator_422, toDownload);
- case 423 :
- return NLS.bind(Messages.TransportErrorTranslator_423, toDownload);
- case 424 :
- return NLS.bind(Messages.TransportErrorTranslator_424, toDownload);
- case 425 :
- return NLS.bind(Messages.TransportErrorTranslator_425, toDownload);
- case 426 :
- return NLS.bind(Messages.TransportErrorTranslator_426, toDownload);
- case 449 :
- return NLS.bind(Messages.TransportErrorTranslator_449, toDownload);
- case 450 :
- return NLS.bind(Messages.TransportErrorTranslator_450, toDownload);
-
- case 500 :
- return NLS.bind(Messages.TransportErrorTranslator_500, toDownload);
- case 501 :
- return NLS.bind(Messages.TransportErrorTranslator_501, toDownload);
- case 502 :
- return NLS.bind(Messages.TransportErrorTranslator_502, toDownload);
- case 503 :
- return NLS.bind(Messages.TransportErrorTranslator_503, toDownload);
- case 504 :
- return NLS.bind(Messages.TransportErrorTranslator_504, toDownload);
- case 505 :
- return NLS.bind(Messages.TransportErrorTranslator_505, toDownload);
- case 506 :
- return NLS.bind(Messages.TransportErrorTranslator_506, toDownload);
- case 507 :
- return NLS.bind(Messages.TransportErrorTranslator_507, toDownload);
- case 508 :
- return NLS.bind(Messages.TransportErrorTranslator_508, toDownload);
- case 510 :
- return NLS.bind(Messages.TransportErrorTranslator_510, toDownload);
-
- default :
- return NLS.bind(Messages.TransportErrorTranslator_UnknownErrorCode, Integer.toString(code), toDownload);
- }
- }
-
- public static DownloadStatus forStatus(IStatus original, URI toDownload) {
- Throwable t = original.getException();
- return forException(t, toDownload);
- }
-
- public static DownloadStatus forException(Throwable t, URI toDownload) {
- if (t instanceof FileNotFoundException || (t instanceof IncomingFileTransferException && ((IncomingFileTransferException) t).getErrorCode() == 404))
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_NOT_FOUND, NLS.bind(Messages.artifact_not_found, toDownload), t);
- if (t instanceof ConnectException)
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, NLS.bind(Messages.TransportErrorTranslator_UnableToConnectToRepository_0, toDownload), t);
- if (t instanceof UnknownHostException)
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_UnknownHost, toDownload), t);
- if (t instanceof IDCreateException) {
- IStatus status = ((IDCreateException) t).getStatus();
- if (status != null && status.getException() != null)
- t = status.getException();
-
- return new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.TransportErrorTranslator_MalformedRemoteFileReference, toDownload), t);
- }
- int code = 0;
-
- // default to report as read repository error
- int provisionCode = ProvisionException.REPOSITORY_FAILED_READ;
-
- if (t instanceof IncomingFileTransferException)
- code = ((IncomingFileTransferException) t).getErrorCode();
- else if (t instanceof BrowseFileTransferException)
- code = ((BrowseFileTransferException) t).getErrorCode();
-
- // Switch on error codes in the HTTP error code range.
- // Note that 404 uses ARTIFACT_NOT_FOUND (as opposed to REPOSITORY_NOT_FOUND, which
- // is determined higher up in the calling chain).
- if (code == 401)
- provisionCode = ProvisionException.REPOSITORY_FAILED_AUTHENTICATION;
- else if (code == 404)
- provisionCode = ProvisionException.ARTIFACT_NOT_FOUND;
-
- // Add more specific translation here
-
- return new DownloadStatus(IStatus.ERROR, Activator.ID, provisionCode, //
- code == 0 ? NLS.bind(Messages.io_failedRead, toDownload) //
- : codeToMessage(code, toDownload.toString()), t);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java
deleted file mode 100644
index ac3d66bd0..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryStatusHelper.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc, and other.
- * The code, documentation and other materials contained herein have been
- * licensed under the Eclipse Public License - v 1.0 by the individual
- * copyright holders listed above, as Initial Contributors under such license.
- * The text of such license is available at www.eclipse.org.
- * Contributors:
- * Cloudsmith Inc. - Initial API and implementation
- * IBM Corporation - Original Implementation of checkPermissionDenied
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.repository;
-
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-import java.io.*;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.filetransfer.BrowseFileTransferException;
-import org.eclipse.ecf.filetransfer.IncomingFileTransferException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * RepositoryStatusHelper is a utility class for processing of exceptions and status.
- */
-public abstract class RepositoryStatusHelper {
-
- private static final long serialVersionUID = 1L;
- protected static final String SERVER_REDIRECT = "Server redirected too many times"; //$NON-NLS-1$
-
- public static IStatus createStatus(String nlsMessage, Object arg) {
- return createExceptionStatus(null, nlsMessage, new Object[] {arg});
- }
-
- public static IStatus createStatus(String nlsMessage, Object arg1, Object arg2) {
- return createExceptionStatus(null, nlsMessage, new Object[] {arg1, arg2});
- }
-
- public static IStatus createStatus(String nlsMessage, Object arg1, Object arg2, Object arg3) {
- return createExceptionStatus(null, nlsMessage, new Object[] {arg1, arg2, arg3});
- }
-
- public static IStatus createStatus(String nlsMessage, Object[] args) {
- return createExceptionStatus(null, nlsMessage, args);
- }
-
- public static IStatus createStatus(String nlsMessage) {
- return createExceptionStatus(null, nlsMessage, new Object[] {});
- }
-
- public static IStatus createExceptionStatus(Throwable cause) {
- return (cause instanceof CoreException) ? ((CoreException) cause).getStatus() : new Status(IStatus.ERROR, Activator.ID, IStatus.OK, cause.getMessage(), cause);
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage, Object[] args) {
- if (args != null && args.length > 0)
- nlsMessage = NLS.bind(nlsMessage, args);
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, nlsMessage, cause);
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage, Object arg1, Object arg2, Object arg3) {
- return createExceptionStatus(cause, nlsMessage, new Object[] {arg1, arg2, arg3});
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage, Object arg1, Object arg2) {
- return createExceptionStatus(cause, nlsMessage, new Object[] {arg1, arg2});
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage, Object arg1) {
- return createExceptionStatus(cause, nlsMessage, new Object[] {arg1});
- }
-
- public static IStatus createExceptionStatus(Throwable cause, String nlsMessage) {
- return createExceptionStatus(cause, nlsMessage, new Object[] {});
- }
-
- public static void deeplyPrint(Throwable e, PrintStream strm, boolean stackTrace) {
- deeplyPrint(e, strm, stackTrace, 0);
- }
-
- public static CoreException fromMessage(String nlsMessage, Object[] args) {
- return fromExceptionMessage(null, nlsMessage, args);
- }
-
- public static CoreException fromMessage(String nlsMessage, Object arg1) {
- return fromExceptionMessage(null, nlsMessage, new Object[] {arg1});
- }
-
- public static CoreException fromMessage(String nlsMessage, Object arg1, Object arg2) {
- return fromExceptionMessage(null, nlsMessage, new Object[] {arg1, arg2});
- }
-
- public static CoreException fromMessage(String nlsMessage, Object arg1, Object arg2, Object arg3) {
- return fromExceptionMessage(null, nlsMessage, new Object[] {arg1, arg2, arg3});
- }
-
- public static CoreException fromMessage(String nlsMessage) {
- return fromExceptionMessage(null, nlsMessage, new Object[] {});
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage, Object[] args) {
- CoreException ce = new CoreException(createExceptionStatus(cause, nlsMessage, args));
- if (cause != null)
- ce.initCause(cause);
- return ce;
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage, Object arg1, Object arg2, Object arg3) {
- return fromExceptionMessage(cause, nlsMessage, new Object[] {arg1, arg2, arg3});
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage, Object arg1, Object arg2) {
- return fromExceptionMessage(cause, nlsMessage, new Object[] {arg1, arg2});
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage, Object arg1) {
- return fromExceptionMessage(cause, nlsMessage, new Object[] {arg1});
- }
-
- public static CoreException fromExceptionMessage(Throwable cause, String nlsMessage) {
- return fromExceptionMessage(cause, nlsMessage, new Object[] {});
- }
-
- public static Throwable unwind(Throwable t) {
- for (;;) {
- Class<? extends Throwable> tc = t.getClass();
-
- // We don't use instanceof operator since we want
- // the explicit class, not subclasses.
- //
- if (tc != RuntimeException.class && tc != InvocationTargetException.class && tc != IOException.class)
- break;
-
- Throwable cause = t.getCause();
- if (cause == null)
- break;
-
- String msg = t.getMessage();
- if (msg != null && !msg.equals(cause.toString()))
- break;
-
- t = cause;
- }
- return t;
- }
-
- public static CoreException unwindCoreException(CoreException exception) {
- IStatus status = exception.getStatus();
- while (status != null && status.getException() instanceof CoreException) {
- exception = (CoreException) status.getException();
- status = exception.getStatus();
- }
- return exception;
- }
-
- public static CoreException wrap(IStatus status) {
- CoreException e = new CoreException(status);
- Throwable t = status.getException();
- if (t != null)
- e.initCause(t);
- return e;
- }
-
- public static CoreException wrap(Throwable t) {
- t = unwind(t);
- if (t instanceof CoreException)
- return unwindCoreException((CoreException) t);
-
- if (t instanceof OperationCanceledException || t instanceof InterruptedException)
- return new CoreException(Status.CANCEL_STATUS);
-
- String msg = t.toString();
- return fromExceptionMessage(t, msg);
- }
-
- private static void appendLevelString(PrintStream strm, int level) {
- if (level > 0) {
- strm.print("[0"); //$NON-NLS-1$
- for (int idx = 1; idx < level; ++idx) {
- strm.print('.');
- strm.print(level);
- }
- strm.print(']');
- }
- }
-
- private static void deeplyPrint(CoreException ce, PrintStream strm, boolean stackTrace, int level) {
- appendLevelString(strm, level);
- if (stackTrace)
- ce.printStackTrace(strm);
- deeplyPrint(ce.getStatus(), strm, stackTrace, level);
- }
-
- private static void deeplyPrint(IStatus status, PrintStream strm, boolean stackTrace, int level) {
- appendLevelString(strm, level);
- String msg = status.getMessage();
- strm.println(msg);
- Throwable cause = status.getException();
- if (cause != null) {
- strm.print("Caused by: "); //$NON-NLS-1$
- if (stackTrace || !(msg.equals(cause.getMessage()) || msg.equals(cause.toString())))
- deeplyPrint(cause, strm, stackTrace, level);
- }
-
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++)
- deeplyPrint(children[i], strm, stackTrace, level + 1);
- }
- }
-
- private static void deeplyPrint(Throwable t, PrintStream strm, boolean stackTrace, int level) {
- if (t instanceof CoreException)
- deeplyPrint((CoreException) t, strm, stackTrace, level);
- else {
- appendLevelString(strm, level);
- if (stackTrace)
- t.printStackTrace(strm);
- else {
- strm.println(t.toString());
- Throwable cause = t.getCause();
- if (cause != null) {
- strm.print("Caused by: "); //$NON-NLS-1$
- deeplyPrint(cause, strm, stackTrace, level);
- }
- }
- }
- }
-
- /**
- * Check if the given exception represents that a switch to the JRE HTTP Client
- * is required. ECF sets the HTTP status code 477 to indicate this.
- * If the JRE HTTP client is required a JREHttpClientRequiredException is thrown.
- */
- public static void checkJREHttpClientRequired(Throwable t) throws JREHttpClientRequiredException {
- if (t instanceof IncomingFileTransferException) {
- if (((IncomingFileTransferException) t).getErrorCode() == 477)
- throw new JREHttpClientRequiredException();
- } else if (t instanceof BrowseFileTransferException) {
- if (((BrowseFileTransferException) t).getErrorCode() == 477)
- throw new JREHttpClientRequiredException();
- }
-
- }
-
- /**
- * Check if the given exception represents a permission failure (401 for HTTP),
- * and throw a AuthenticationFailedException if a permission failure was encountered.
- */
- public static void checkPermissionDenied(Throwable t) throws AuthenticationFailedException {
- // From Use of File Transfer
- if (t instanceof IncomingFileTransferException) {
- if (((IncomingFileTransferException) t).getErrorCode() == 401)
- throw new AuthenticationFailedException();
- IStatus status = ((IncomingFileTransferException) t).getStatus();
- t = status == null ? t : status.getException();
- // From Use of Browse
- } else if (t instanceof BrowseFileTransferException) {
- if (((BrowseFileTransferException) t).getErrorCode() == 401)
- throw new AuthenticationFailedException();
- IStatus status = ((BrowseFileTransferException) t).getStatus();
- t = status == null ? t : status.getException();
- }
-
- if (t == null || !(t instanceof IOException))
- return;
-
- // TODO: is this needed (for 401) now that ECF throws exceptions with codes?
- // try to figure out if we have a 401 by parsing the exception message
- // There is unfortunately no specific (general) exception for "redirected too many times" - which is commonly
- // caused by a failed login. The message and exception are different in different implementations
- // of http client.
- String m = t.getMessage();
- if (m != null && (m.indexOf(" 401 ") != -1 || m.indexOf(SERVER_REDIRECT) != -1)) //$NON-NLS-1$
- throw new AuthenticationFailedException();
- if ("org.apache.commons.httpclient.RedirectException".equals(t.getClass().getName())) //$NON-NLS-1$
- throw new AuthenticationFailedException();
- }
-
- /**
- * Translates exceptions representing "FileNotFound" into FileNotFoundException.
- * @param t the throwable to check
- * @param toDownload the URI the exception was thrown for
- * @throws FileNotFoundException if 't' represents a file not found
- */
- public static void checkFileNotFound(Throwable t, URI toDownload) throws FileNotFoundException {
- if (t instanceof IncomingFileTransferException) {
- IncomingFileTransferException e = (IncomingFileTransferException) t;
- if (e.getErrorCode() == 404 || e.getErrorCode() == 403 || e.getErrorCode() == 300)
- throw new FileNotFoundException(toDownload.toString());
- }
- if (t instanceof BrowseFileTransferException) {
- BrowseFileTransferException e = (BrowseFileTransferException) t;
- if (e.getErrorCode() == 404 || e.getErrorCode() == 403 || e.getErrorCode() == 300)
- throw new FileNotFoundException(toDownload.toString());
- }
-
- if (t instanceof FileNotFoundException)
- throw (FileNotFoundException) t;
- if (t instanceof CoreException) {
- IStatus status = ((CoreException) t).getStatus();
- Throwable e = status == null ? null : status.getException();
- if (e instanceof FileNotFoundException)
- throw (FileNotFoundException) e;
- }
- }
-
- /**
- * Get default "InternalError" ProvisionException.
- * @param t
- * @return a default "InternalError"
- */
- public static ProvisionException internalError(Throwable t) {
- return new ProvisionException(new Status(IStatus.ERROR, Activator.ID, //
- ProvisionException.INTERNAL_ERROR, Messages.repoMan_internalError, t));
- }
-
- public static IStatus malformedAddressStatus(String address, Throwable t) {
- return new Status(IStatus.ERROR, Activator.ID, //
- ProvisionException.REPOSITORY_INVALID_LOCATION, NLS.bind(Messages.exception_malformedRepoURI, address), t);
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
deleted file mode 100644
index f965d83fe..000000000
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/RepositoryTransport.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010, IBM Corporation and other.
- * The code, documentation and other materials contained herein have been
- * licensed under the Eclipse Public License - v 1.0 by the copyright holder
- * listed above, as the Initial Contributor under such license. The text of
- * such license is available at www.eclipse.org.
- *
- * Contributors
- * IBM Corporation - Initial API and implementation.
- * Cloudsmith Inc - Implementation
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.repository;
-
-import java.io.*;
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.ecf.core.security.ConnectContextFactory;
-import org.eclipse.ecf.core.security.IConnectContext;
-import org.eclipse.ecf.filetransfer.UserCancelledException;
-import org.eclipse.equinox.internal.p2.repository.Credentials.LoginCanceledException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.core.UIServices.AuthenticationInfo;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * RepositoryTransport adapts p2 to ECF file download and file browsing.
- * Download is performed by {@link FileReader}, and file browsing is performed by
- * {@link FileInfoReader}.
- */
-public class RepositoryTransport extends Transport {
- private static RepositoryTransport instance;
-
- /**
- * Returns an shared instance of Generic Transport
- */
- public static synchronized RepositoryTransport getInstance() {
- if (instance == null) {
- instance = new RepositoryTransport();
- }
- return instance;
- }
-
- /**
- * Perform a download, writing into the target output stream. Progress is reported on the
- * monitor. If the <code>target</code> is an instance of {@link IStateful} the resulting status
- * is also set on the target. An IStateful target is updated with status even if this methods
- * throws {@link OperationCanceledException}.
- *
- * @returns IStatus, that is a {@link DownloadStatus} on success.
- * @param toDownload URI of file to download
- * @param target OutputStream where result is written
- * @param startPos the starting position of the download, or -1 for from start
- * @param monitor where progress should be reported
- * @throws OperationCanceledException if the operation was canceled.
- */
- public IStatus download(URI toDownload, OutputStream target, long startPos, IProgressMonitor monitor) {
-
- boolean promptUser = false;
- boolean useJREHttp = false;
- AuthenticationInfo loginDetails = null;
- for (int i = RepositoryPreferences.getLoginRetryCount(); i > 0; i--) {
- FileReader reader = null;
- try {
- loginDetails = Credentials.forLocation(toDownload, promptUser, loginDetails);
- IConnectContext context = (loginDetails == null) ? null : ConnectContextFactory.createUsernamePasswordConnectContext(loginDetails.getUserName(), loginDetails.getPassword());
-
- // perform the download
- reader = new FileReader(context);
- reader.readInto(toDownload, target, startPos, monitor);
-
- // check that job ended ok - throw exceptions otherwise
- IStatus result = reader.getResult();
- if (result == null) {
- String msg = NLS.bind(Messages.RepositoryTransport_failedReadRepo, toDownload);
- DownloadStatus ds = new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_READ, msg, null);
- return statusOn(target, ds, reader);
- }
- if (result.getSeverity() == IStatus.CANCEL)
- throw new UserCancelledException();
- if (!result.isOK())
- throw new CoreException(result);
-
- // Download status is expected on success
- DownloadStatus status = new DownloadStatus(IStatus.OK, Activator.ID, Status.OK_STATUS.getMessage());
- return statusOn(target, status, reader);
- } catch (UserCancelledException e) {
- statusOn(target, new DownloadStatus(IStatus.CANCEL, Activator.ID, 1, "", null), reader); //$NON-NLS-1$
- throw new OperationCanceledException();
- } catch (OperationCanceledException e) {
- statusOn(target, new DownloadStatus(IStatus.CANCEL, Activator.ID, 1, "", null), reader); //$NON-NLS-1$
- throw e;
- } catch (CoreException e) {
- if (e.getStatus().getException() == null)
- return statusOn(target, RepositoryStatus.forException(e, toDownload), reader);
- return statusOn(target, RepositoryStatus.forStatus(e.getStatus(), toDownload), reader);
- } catch (FileNotFoundException e) {
- return statusOn(target, RepositoryStatus.forException(e, toDownload), reader);
- } catch (AuthenticationFailedException e) {
- promptUser = true;
- } catch (Credentials.LoginCanceledException e) {
- DownloadStatus status = new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, //
- NLS.bind(Messages.UnableToRead_0_UserCanceled, toDownload), null);
- return statusOn(target, status, null);
- } catch (JREHttpClientRequiredException e) {
- if (!useJREHttp) {
- useJREHttp = true; // only do this once
- i++; // need an extra retry
- Activator.getDefault().useJREHttpClient();
- }
- }
- }
- // reached maximum number of retries without success
- DownloadStatus status = new DownloadStatus(IStatus.ERROR, Activator.ID, ProvisionException.REPOSITORY_FAILED_AUTHENTICATION, //
- NLS.bind(Messages.UnableToRead_0_TooManyAttempts, toDownload), null);
- return statusOn(target, status, null);
- }
-
- /**
- * Perform a download, writing into the target output stream. Progress is reported on the
- * monitor. If the <code>target</code> is an instance of {@link IStateful} the resulting status
- * is also set on the target.
- *
- * @returns IStatus, that is a {@link DownloadStatus} on success.
- * @param toDownload URI of file to download
- * @param target OutputStream where result is written
- * @param monitor where progress should be reported
- * @throws OperationCanceledException if the operation was canceled.
- */
- public IStatus download(URI toDownload, OutputStream target, IProgressMonitor monitor) {
- return download(toDownload, target, -1, monitor);
- }
-
- /**
- * Perform a stream download, writing into an InputStream that is returned. Performs authentication if needed.
- *
- * @returns InputStream a stream with the content from the toDownload URI, or null
- * @param toDownload URI of file to download
- * @param monitor monitor checked for cancellation
- * @throws OperationCanceledException if the operation was canceled.
- * @throws AuthenticationFailedException if authentication failed, or too many attempt were made
- * @throws FileNotFoundException if the toDownload was reported as non existing
- * @throws CoreException on errors
- */
- public InputStream stream(URI toDownload, IProgressMonitor monitor) throws FileNotFoundException, CoreException, AuthenticationFailedException {
-
- boolean promptUser = false;
- boolean useJREHttp = false;
- AuthenticationInfo loginDetails = null;
- for (int i = RepositoryPreferences.getLoginRetryCount(); i > 0; i--) {
- FileReader reader = null;
- try {
- loginDetails = Credentials.forLocation(toDownload, promptUser, loginDetails);
- IConnectContext context = (loginDetails == null) ? null : ConnectContextFactory.createUsernamePasswordConnectContext(loginDetails.getUserName(), loginDetails.getPassword());
-
- // perform the streamed download
- reader = new FileReader(context);
- return reader.read(toDownload, monitor);
- } catch (UserCancelledException e) {
- throw new OperationCanceledException();
- } catch (AuthenticationFailedException e) {
- promptUser = true;
- } catch (CoreException e) {
- // must translate this core exception as it is most likely not informative to a user
- if (e.getStatus().getException() == null)
- throw new CoreException(RepositoryStatus.forException(e, toDownload));
- throw new CoreException(RepositoryStatus.forStatus(e.getStatus(), toDownload));
- } catch (LoginCanceledException e) {
- // i.e. same behavior when user cancels as when failing n attempts.
- throw new AuthenticationFailedException();
- } catch (JREHttpClientRequiredException e) {
- if (!useJREHttp) {
- useJREHttp = true; // only do this once
- i++; // need an extra retry
- Activator.getDefault().useJREHttpClient();
- }
- }
- }
- throw new AuthenticationFailedException();
- }
-
- /**
- * Set the status on the output stream if it implements IStateful.
- * Update the DownloadStatus with information from FileReader.
- * @param target an OutputStream possibly implementing IStateful
- * @param status a DownloadStatus configured with status message, code, etc
- * @param reader a FileReade that was used to download (or null if not known).
- * @throws OperationCanceledException if the operation was canceled by the user.
- * @return the configured DownloadStatus status.
- */
- private static DownloadStatus statusOn(OutputStream target, DownloadStatus status, FileReader reader) {
- if (reader != null) {
- FileInfo fi = reader.getLastFileInfo();
- if (fi != null) {
- status.setFileSize(fi.getSize());
- status.setLastModified(fi.getLastModified());
- status.setTransferRate(fi.getAverageSpeed());
- }
- }
- if (target instanceof IStateful)
- ((IStateful) target).setStatus(status);
- return status;
- }
-
- /**
- * Returns the last modified date for a URI. A last modified of 0 typically indicates that
- * the server response is wrong, but should not be interpreted as a file not found.
- * @param toDownload
- * @param monitor
- * @throws OperationCanceledException if the operation was canceled by the user.
- * @return last modified date (possibly 0)
- */
- public long getLastModified(URI toDownload, IProgressMonitor monitor) throws CoreException, FileNotFoundException, AuthenticationFailedException {
- boolean promptUser = false;
- boolean useJREHttp = false;
- AuthenticationInfo loginDetails = null;
- for (int i = RepositoryPreferences.getLoginRetryCount(); i > 0; i--) {
- try {
- loginDetails = Credentials.forLocation(toDownload, promptUser, loginDetails);
- IConnectContext context = (loginDetails == null) ? null : ConnectContextFactory.createUsernamePasswordConnectContext(loginDetails.getUserName(), loginDetails.getPassword());
- // get the remote info
- FileInfoReader reader = new FileInfoReader(context);
- return reader.getLastModified(toDownload, monitor);
- } catch (UserCancelledException e) {
- throw new OperationCanceledException();
- } catch (CoreException e) {
- // must translate this core exception as it is most likely not informative to a user
- if (e.getStatus().getException() == null)
- throw new CoreException(RepositoryStatus.forException(e, toDownload));
- throw new CoreException(RepositoryStatus.forStatus(e.getStatus(), toDownload));
- } catch (AuthenticationFailedException e) {
- promptUser = true;
- } catch (LoginCanceledException e) {
- // same behavior as if user failed n attempts.
- throw new AuthenticationFailedException();
- } catch (JREHttpClientRequiredException e) {
- if (!useJREHttp) {
- useJREHttp = true; // only do this once
- i++; // need an extra retry
- Activator.getDefault().useJREHttpClient();
- }
- }
-
- }
- // reached maximum number of authentication retries without success
- throw new AuthenticationFailedException();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.sar/.classpath b/bundles/org.eclipse.equinox.p2.sar/.classpath
deleted file mode 100644
index 2fbb7a23e..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.sar/.cvsignore b/bundles/org.eclipse.equinox.p2.sar/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.sar/.project b/bundles/org.eclipse.equinox.p2.sar/.project
deleted file mode 100644
index 594de5fca..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.sar</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 24d9b4c14..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,330 +0,0 @@
-#Fri Feb 22 11:10:10 EST 2008
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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.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.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 56bcc3e9b..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:07 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.sar/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.sar/META-INF/MANIFEST.MF
deleted file mode 100644
index 69950b7ef..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Sar Plug-in
-Bundle-SymbolicName: org.eclipse.equinox.p2.sar;singleton:=true
-Bundle-Version: 0.1.0
-Import-Package: org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Export-Package: org.eclipse.equinox.internal.p2.sar;x-friends:="org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.artifact.processors"
diff --git a/bundles/org.eclipse.equinox.p2.sar/about.html b/bundles/org.eclipse.equinox.p2.sar/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.sar/build.properties b/bundles/org.eclipse.equinox.p2.sar/build.properties
deleted file mode 100644
index ad40ab407..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/bundles/org.eclipse.equinox.p2.sar/pom.xml b/bundles/org.eclipse.equinox.p2.sar/pom.xml
deleted file mode 100644
index 1ae60841e..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.sar</artifactId>
- <version>0.1.0</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/DirectByteArrayOutputStream.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/DirectByteArrayOutputStream.java
deleted file mode 100644
index a8cc7f663..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/DirectByteArrayOutputStream.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-
-/**
- * The DirectByteArrayOutputStream discloses its guts (internal byte buffer and
- * byte buffer length) to avoid unnecessary allocation of byte arrays usually
- * involved with toByteArray().
- */
-public class DirectByteArrayOutputStream extends ByteArrayOutputStream {
-
- /**
- * Creates a new direct byte array output stream. The buffer capacity is
- * initially as defined by super class.
- */
- public DirectByteArrayOutputStream() {
- super();
- }
-
- /**
- * Creates a new byte array output stream, with a buffer capacity of the
- * specified size, in bytes.
- *
- * @param size
- * the initial size.
- * @throws IllegalArgumentException
- * if size is negative.
- */
- public DirectByteArrayOutputStream(int size) {
- super(size);
- }
-
- /**
- * Return the actual internal byte buffer.
- *
- * @return internal byte buffer
- */
- public final byte[] getBuffer() {
- return super.buf;
- }
-
- /**
- * Return the actual length of the internal byte buffer.
- *
- * @return actual length of the buffer
- */
- public final int getBufferLength() {
- return super.count;
- }
-
- /**
- * Return an input stream containing all the (shared) bytes this output
- * stream has already consumed.
- *
- * @return ByteArrayInputStream
- */
- public ByteArrayInputStream getInputStream() {
- return new ByteArrayInputStream(super.buf, 0, super.count);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarConstants.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarConstants.java
deleted file mode 100644
index 1dcbb4ddc..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarConstants.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-/**
- * Sar constants
- */
-public interface SarConstants {
-
- /** <code>SARFILE_MARKER</code> */
- String SARFILE_MARKER = "SarFile"; //$NON-NLS-1$
-
- /** <code>SARFILE_VERSION</code> */
- int SARFILE_VERSION = 2;
-
- /**
- * Comment for <code>DEFAULT_ENCODING</code>
- */
- String DEFAULT_ENCODING = "UTF-8"; //$NON-NLS-1$
-
- /**
- * Debug
- */
- boolean DEBUG = false;
-}
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarEntry.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarEntry.java
deleted file mode 100644
index 0de0b4b96..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarEntry.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.IOException;
-import java.util.*;
-import java.util.zip.ZipEntry;
-
-/**
- * A SarEntry is the header information for an entry within a
- * org.eclipse.equinox.p2.sar stream.<br>
- * <b>Note: </b>The setTime() and getTime() methods of ZipEntry (our super
- * class) perform time zone dependent (!) conversions. For our serialization and
- * deserialization the stored time has to be time zone neutral. Therefore it is
- * necessary to invert those calculations. This is also the reason for
- * duplicating the javaToDosTime() and dosToJavaTime() methods.
- */
-public class SarEntry extends ZipEntry {
-
- private boolean isEof;
- private boolean isZip;
-
- /**
- * The name of the eof org.eclipse.equinox.p2.sar entry.
- */
- private static final String EOF_ENTRY_NAME = "<eof-org.eclipse.equinox.p2.sar>"; //$NON-NLS-1$
-
- private static final boolean DEBUG = SarConstants.DEBUG;
-
- /**
- * Creates an eof org.eclipse.equinox.p2.sar entry
- */
- public SarEntry() {
- super(EOF_ENTRY_NAME);
- setMethod(ZipEntry.DEFLATED);
- this.isEof = true;
- this.isZip = false;
- }
-
- /**
- * @param zipEntry
- */
- public SarEntry(ZipEntry zipEntry) {
- super(zipEntry);
- this.isZip = false;
- this.isEof = false;
- }
-
- /**
- * @param zipEntry
- * @param isZip
- */
- public SarEntry(ZipEntry zipEntry, boolean isZip) {
- super(zipEntry);
- this.isZip = isZip;
- this.isEof = false;
- }
-
- /**
- * @param sarInputStream
- * @throws IOException
- */
- public SarEntry(SarInputStream sarInputStream) throws IOException {
- // read name!
- super(sarInputStream.readString());
-
- String comment = sarInputStream.readString();
- long compressedSize = sarInputStream.readLong();
- long crc = sarInputStream.readLong();
- byte[] extra = sarInputStream.readBytes();
- int method = sarInputStream.readInt();
- long size = sarInputStream.readLong();
- long dosTime = sarInputStream.readLong();
- boolean isEof = sarInputStream.readBoolean();
- boolean isZip = sarInputStream.readBoolean();
-
- if (DEBUG) {
- System.out.println(getName() + "," + comment + "," + compressedSize + "," + crc + "," + extra + "," + method + "," + size + "," + dosTime + "," + isEof + "," + isZip);
- }
-
- if (method == ZipEntry.STORED) {
- setCompressedSize(compressedSize);
- setCrc(crc);
- setSize(size);
- }
-
- setComment(comment);
- setExtra(extra);
- setMethod(method);
- setTime(dosToJavaTime(dosTime));
- setEof(isEof);
- setZip(isZip);
- }
-
- /**
- * @param sarOutputStream
- * @throws IOException
- */
- public void writeTo(SarOutputStream sarOutputStream) throws IOException {
- String comment = this.getComment();
- long compressedSize = this.getCompressedSize();
- long crc = this.getCrc();
- byte[] extra = this.getExtra();
- int method = this.getMethod();
- String name = this.getName();
- long size = this.getSize();
- long dosTime = javaToDosTime(this.getTime());
- boolean isZip = this.isZip();
- boolean isEof = this.isEof();
-
- if (DEBUG) {
- System.out.println(name + "," + comment + "," + compressedSize + "," + crc + "," + extra + "," + method + "," + size + "," + dosTime + "," + isEof + "," + isZip);
- }
-
- sarOutputStream.writeString(name);
- sarOutputStream.writeString(comment);
- sarOutputStream.writeLong(compressedSize);
- sarOutputStream.writeLong(crc);
- sarOutputStream.writeBytes(extra);
- sarOutputStream.writeInt(method);
- sarOutputStream.writeLong(size);
- sarOutputStream.writeLong(dosTime);
- sarOutputStream.writeBool(isEof);
- sarOutputStream.writeBool(isZip);
- }
-
- /**
- * Is this the eof org.eclipse.equinox.p2.sar entry?
- *
- * @return the answer
- */
- public boolean isEof() {
- return isEof;
- }
-
- private void setEof(boolean isEof) {
- this.isEof = isEof;
- }
-
- /**
- * @return boolean
- */
- public boolean isZip() {
- return isZip;
- }
-
- /**
- * @param isZip
- */
- private void setZip(boolean isZip) {
- this.isZip = isZip;
- }
-
- /*
- * Converts DOS time to Java time (number of milliseconds since epoch).
- */
- public final static long dosToJavaTime(long dtime) {
- GregorianCalendar cal = new GregorianCalendar((int) (((dtime >> 25) & 0x7f) + 80) + 1900, (int) (((dtime >> 21) & 0x0f) - 1), (int) ((dtime >> 16) & 0x1f), (int) ((dtime >> 11) & 0x1f), (int) ((dtime >> 5) & 0x3f), (int) ((dtime << 1) & 0x3e));
- return cal.getTime().getTime();
- }
-
- /*
- * Converts Java time to DOS time.
- */
- public final static long javaToDosTime(long time) {
- GregorianCalendar cal = new GregorianCalendar();
- cal.setTime(new Date(time));
- int year = cal.get(Calendar.YEAR);
- if (year < 1980)
- return (1 << 21) | (1 << 16);
- int month = cal.get(Calendar.MONTH);
- int date = cal.get(Calendar.DAY_OF_MONTH);
- int hours = cal.get(Calendar.HOUR_OF_DAY);
- int minutes = cal.get(Calendar.MINUTE);
- int seconds = cal.get(Calendar.SECOND);
- return (year - 1980) << 25 | (month + 1) << 21 | date << 16 | hours << 11 | minutes << 5 | seconds >> 1;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarInputStream.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarInputStream.java
deleted file mode 100644
index ea2abef3c..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarInputStream.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.*;
-
-/**
- * The SarInputStream reads a streaming archive as an InputStream. Methods are
- * provided to position at each successive entry in the archive, and the read
- * each entry as a normal input stream using read().
- */
-public class SarInputStream extends InputStream {
-
- private final DataInputStream dataInputStream;
- private final int version;
- private InputStream contentStream;
-
- /**
- * Constructor for SarInputStream.
- *
- * @param inputStream
- * the input stream to use
- * @throws IOException
- */
- public SarInputStream(InputStream inputStream) throws IOException {
-
- this.dataInputStream = new DataInputStream(inputStream);
-
- // SarFile marker
- String marker = readString();
- if (!marker.equals(SarConstants.SARFILE_MARKER)) {
- throw new IOException("Does not contain org.eclipse.equinox.p2.sar marker.");
- }
-
- // SarFile version
- version = dataInputStream.readInt();
- if (version != SarConstants.SARFILE_VERSION) {
- throw new IOException("Unsupported version.");
- }
- }
-
- /**
- * Closes this stream.
- *
- * @throws IOException
- * on error
- */
- public void close() throws IOException {
- dataInputStream.close();
- }
-
- /**
- * Since we do not support marking just yet, we return false.
- *
- * @return False.
- */
- public boolean markSupported() {
- return false;
- }
-
- /**
- * Since we do not support marking just yet, we do nothing.
- *
- * @param markLimit
- * The limit to mark.
- */
- public void mark(int markLimit) {
- // nothing
- }
-
- /**
- * Since we do not support marking just yet, we do nothing.
- */
- public void reset() {
- // nothing
- }
-
- /**
- * Get the next entry in this org.eclipse.equinox.p2.sar archive. This will skip
- * over any remaining data in the current entry, if there is one, and place
- * the input stream at the header of the next entry, and read the header and
- * instantiate a new SarEntry from the header bytes and return that entry.
- * If there are no more entries in the archive, null will be returned to
- * indicate that the end of the archive has been reached.
- *
- * @return the next SarEntry in the archive, or null.
- * @throws IOException
- * on error
- */
- public SarEntry getNextEntry() throws IOException {
- SarEntry sarEntry = new SarEntry(this);
- if (sarEntry.isEof())
- return null;
-
- byte[] content = readBytes();
- contentStream = new ByteArrayInputStream(content);
- return sarEntry;
-
- }
-
- /**
- * Close the entry.
- *
- * @throws IOException
- */
- public void closeEntry() throws IOException {
- contentStream.close();
- }
-
- /**
- * @return String
- * @throws IOException
- */
- String readString() throws IOException {
- byte[] bytes = readBytes();
- if (bytes == null)
- return null;
-
- return new String(bytes, SarConstants.DEFAULT_ENCODING);
- }
-
- /**
- * @return byte[]
- * @throws IOException
- */
- byte[] readBytes() throws IOException {
- int length = dataInputStream.readInt();
- if (length == -1)
- return null;
-
- byte[] bytes = new byte[length];
- dataInputStream.readFully(bytes, 0, length);
- return bytes;
- }
-
- /**
- * @return int
- * @throws IOException
- */
- int readInt() throws IOException {
- return dataInputStream.readInt();
- }
-
- /**
- * @return boolean
- * @throws IOException
- */
- boolean readBoolean() throws IOException {
- return dataInputStream.readBoolean();
- }
-
- /**
- * @return long
- * @throws IOException
- */
- long readLong() throws IOException {
- return dataInputStream.readLong();
- }
-
- /**
- * Reads a byte from the current tar archive entry.
- *
- * This method simply calls read( byte[], int, int ).
- *
- * @return The byte read, or -1 at EOF.
- * @throws IOException
- * on error
- */
- public int read() throws IOException {
- return contentStream.read();
- }
-
- /**
- * Reads bytes from the current tar archive entry.
- *
- * This method is aware of the boundaries of the current entry in the
- * archive and will deal with them as if they were this stream's start and
- * EOF.
- *
- * @param buffer
- * The buffer into which to place bytes read.
- * @param offset
- * The offset at which to place bytes read.
- * @param numToRead
- * The number of bytes to read.
- * @return The number of bytes read, or -1 at EOF.
- * @throws IOException
- * on error
- */
- public int read(byte[] buffer, int offset, int numToRead) throws IOException {
- return contentStream.read(buffer, offset, numToRead);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarOutputStream.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarOutputStream.java
deleted file mode 100644
index 650a18e7f..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarOutputStream.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.*;
-
-/**
- * The SarOutputStream writes a stream archive as an OutputStream. Methods are
- * provided to put entries, and then write their contents by writing to this
- * stream using write().
- */
-public class SarOutputStream extends OutputStream {
-
- private boolean finished;
- private final DataOutputStream dataOutputStream;
- private final DirectByteArrayOutputStream entryContent;
-
- /**
- * @param outputStream
- * @throws IOException
- */
- public SarOutputStream(OutputStream outputStream) throws IOException {
- dataOutputStream = new DataOutputStream(outputStream);
- entryContent = new DirectByteArrayOutputStream(16 * 1024);
- writeString(SarConstants.SARFILE_MARKER);
- dataOutputStream.writeInt(SarConstants.SARFILE_VERSION);
- finished = false;
- }
-
- /**
- * Ends the SAR archive and closes the underlying OutputStream.
- *
- * @see java.io.OutputStream#close()
- */
- // @Override
- public void close() throws IOException {
- finish();
- super.close();
- }
-
- /**
- * Finish this SAR archive but does not close the underlying output stream.
- *
- * @throws IOException
- */
- public void finish() throws IOException {
- if (finished)
- return;
-
- writeEOFRecord();
- finished = true;
- }
-
- /**
- * Put an entry on the output stream. This writes the entry's header record
- * and positions the output stream for writing the contents of the entry.
- * Once this method is called, the stream is ready for calls to write() to
- * write the entry's contents. Once the contents are written, closeEntry()
- * <B>MUST </B> be called to ensure that all buffered data is completely
- * written to the output stream.
- *
- * @param entry
- * the SarEntry to be written to the archive.
- * @throws IOException
- */
- public void putNextEntry(SarEntry entry) throws IOException {
- entry.writeTo(this);
- }
-
- /**
- * Close an entry. This method MUST be called for all file entries that
- * contain data. The reason is that we must buffer data written to the
- * stream in order to satisfy the buffer's record based writes. Thus, there
- * may be data fragments still being assembled that must be written to the
- * output stream before this entry is closed and the next entry written.
- *
- * @throws IOException
- */
- public void closeEntry() throws IOException {
- writeBytes(entryContent.getBuffer(), entryContent.getBufferLength());
- entryContent.reset();
- }
-
- /**
- * @param s
- * @throws IOException
- */
- void writeString(String s) throws IOException {
- byte[] bytes = null;
- if (s != null)
- bytes = s.getBytes(SarConstants.DEFAULT_ENCODING);
-
- writeBytes(bytes);
- }
-
- /**
- * @param bytes
- * @throws IOException
- */
- void writeBytes(byte[] bytes) throws IOException {
- writeBytes(bytes, bytes != null ? bytes.length : -1);
- }
-
- /**
- * @param bytes
- * @throws IOException
- */
- void writeBytes(byte[] bytes, int length) throws IOException {
- if (bytes != null) {
- dataOutputStream.writeInt(length);
- dataOutputStream.write(bytes, 0, length);
- } else {
- dataOutputStream.writeInt(-1);
- }
- }
-
- /**
- * @param v
- * @throws IOException
- */
- void writeInt(int v) throws IOException {
- dataOutputStream.writeInt(v);
- }
-
- /**
- * @param bool
- * @throws IOException
- */
- public void writeBool(boolean bool) throws IOException {
- dataOutputStream.writeBoolean(bool);
- }
-
- /**
- * @param v
- * @throws IOException
- */
- void writeLong(long v) throws IOException {
- dataOutputStream.writeLong(v);
- }
-
- /**
- * Writes a byte to the current org.eclipse.equinox.p2.sar archive entry.
- *
- * @param b
- * the byte written.
- * @throws IOException
- *
- * @see java.io.OutputStream#write(int)
- */
- public void write(int b) throws IOException {
- byte[] bytes = new byte[1];
- bytes[0] = (byte) b;
- entryContent.write(bytes);
- }
-
- /**
- * Writes bytes to the current org.eclipse.equinox.p2.sar archive entry.
- *
- * @param bytes
- * The buffer to write to the archive.
- * @throws IOException
- *
- * @see java.io.OutputStream#write(byte[])
- */
- public void write(byte[] bytes) throws IOException {
- entryContent.write(bytes, 0, bytes.length);
- }
-
- /**
- * Writes bytes to the current org.eclipse.equinox.p2.sar archive entry.
- *
- * @param bytes
- * The buffer to write to the archive.
- * @param offset
- * The offset in the buffer from which to get bytes.
- * @param numToWrite
- * The number of bytes to write.
- *
- * @throws IOException
- *
- * @see java.io.OutputStream#write(byte[], int, int)
- */
- public void write(byte[] bytes, int offset, int numToWrite) throws IOException {
- entryContent.write(bytes, offset, numToWrite);
- }
-
- /**
- * Write an EOF (end of archive) entry to the org.eclipse.equinox.p2.sar archive.
- *
- * @throws IOException
- */
- private void writeEOFRecord() throws IOException {
- SarEntry eofEntry = new SarEntry();
- eofEntry.writeTo(this);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarUtil.java b/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarUtil.java
deleted file mode 100644
index 9b23ba914..000000000
--- a/bundles/org.eclipse.equinox.p2.sar/src/org/eclipse/equinox/internal/p2/sar/SarUtil.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - bug fixes and enhancements
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.sar;
-
-import java.io.*;
-import java.util.zip.*;
-
-/**
- * Helper class for converting Zips/Jars to Sars and vice versa.
- */
-public class SarUtil {
-
- private static final int BUFFER_SIZE = 8 * 1024;
- private static final boolean DEBUG = SarConstants.DEBUG;
-
- /**
- *
- */
- private SarUtil() {
- // utility class
- }
-
- /**
- * Normalize the given zip/jar.
- *
- * @param zipSource
- * @param zipTarget
- * @throws IOException
- */
- public static void normalize(File zipSource, File zipTarget) throws IOException {
- File tempSar = File.createTempFile("temp", ".sar");
- try {
- zipToSar(zipSource, tempSar);
- sarToZip(tempSar, zipTarget);
- } finally {
- tempSar.delete();
- }
- }
-
- /**
- * Normalize the given zip/jar.
- *
- * @param zipSource
- * @param zipTarget
- * @throws IOException
- */
- public static void normalize(InputStream zipSource, OutputStream zipTarget) throws IOException {
- DirectByteArrayOutputStream tempSar = new DirectByteArrayOutputStream();
- zipToSar(zipSource, tempSar);
- sarToZip(tempSar.getInputStream(), zipTarget);
- }
-
- /**
- * @param zipFile
- * @throws IOException
- */
- public static void zipToSar(File zipFile, File sarFile) throws IOException {
- InputStream zipInputStream = new BufferedInputStream(new FileInputStream(zipFile));
- OutputStream sarOutputStream = new BufferedOutputStream(new FileOutputStream(sarFile));
- SarUtil.zipToSar(zipInputStream, sarOutputStream);
- }
-
- /**
- * @param zippedInputStream
- * @param saredOutputStream
- * @throws IOException
- */
- public static void zipToSar(InputStream zippedInputStream, OutputStream saredOutputStream) throws IOException {
- zipToSar(zippedInputStream, true, saredOutputStream, true);
- }
-
- /**
- * @param zippedInputStream
- * @param closeIn
- * @param saredOutputStream
- * @param closeOut
- * @throws IOException
- */
- public static void zipToSar(InputStream zippedInputStream, boolean closeIn, OutputStream saredOutputStream, boolean closeOut) throws IOException {
- zipToSarNoClose(zippedInputStream, saredOutputStream);
-
- if (closeIn)
- zippedInputStream.close();
- if (closeOut)
- saredOutputStream.close();
- }
-
- /**
- * @param sarFile
- * @param zipFile
- * @throws IOException
- */
- public static void sarToZip(File sarFile, File zipFile) throws IOException {
- InputStream saredInputStream = new BufferedInputStream(new FileInputStream(sarFile));
- OutputStream zippedOutputStream = new BufferedOutputStream(new FileOutputStream(zipFile));
-
- sarToZip(saredInputStream, zippedOutputStream);
- }
-
- /**
- * @param saredInputStream
- * @param zippedOutputStream
- * @throws IOException
- */
- public static void sarToZip(InputStream saredInputStream, OutputStream zippedOutputStream) throws IOException {
- sarToZip(saredInputStream, true, zippedOutputStream, true);
- }
-
- /**
- * @param saredInputStream
- * @param closeIn
- * @param zippedOutputStream
- * @param closeOut
- * @throws IOException
- */
- public static void sarToZip(InputStream saredInputStream, boolean closeIn, OutputStream zippedOutputStream, boolean closeOut) throws IOException {
- sarToZipNoClose(saredInputStream, zippedOutputStream);
-
- if (closeIn)
- saredInputStream.close();
- if (closeOut)
- zippedOutputStream.close();
- }
-
- /**
- * @param zippedInputStream
- * @param saredOutputStream
- * @throws IOException
- */
- private static void zipToSarNoClose(InputStream zippedInputStream, OutputStream saredOutputStream) throws IOException {
-
- ZipInputStream zipInputStream = new ZipInputStream(zippedInputStream);
- SarOutputStream sarOutputStream = new SarOutputStream(saredOutputStream);
-
- ZipEntry zipEntry;
- byte[] buf = new byte[BUFFER_SIZE];
- while ((zipEntry = zipInputStream.getNextEntry()) != null) {
- boolean isZip = isZip(zipEntry);
- SarEntry sarEntry = new SarEntry(zipEntry, isZip);
- sarOutputStream.putNextEntry(sarEntry);
- if (isZip) {
- zipToSarNoClose(zipInputStream, sarOutputStream);
- } else {
- int read;
- while ((read = zipInputStream.read(buf)) != -1) {
- if (DEBUG) {
- System.out.println("Content: " + new String(buf, 0, read));
- }
- sarOutputStream.write(buf, 0, read);
- }
- }
- zipInputStream.closeEntry();
- sarOutputStream.closeEntry();
- }
- sarOutputStream.finish();
- }
-
- /**
- * @param saredInputStream
- * @param zippedOutputStream
- * @throws IOException
- */
- private static void sarToZipNoClose(InputStream saredInputStream, OutputStream zippedOutputStream) throws IOException {
-
- SarInputStream sarInputStream = new SarInputStream(saredInputStream);
- ZipOutputStream zipOutputStream = new ZipOutputStream(zippedOutputStream);
-
- SarEntry sarEntry;
- byte[] buf = new byte[BUFFER_SIZE];
- while ((sarEntry = sarInputStream.getNextEntry()) != null) {
- ZipEntry zipEntry = new ZipEntry(sarEntry);
- zipOutputStream.putNextEntry(zipEntry);
- if (sarEntry.isZip()) {
- sarToZipNoClose(sarInputStream, zipOutputStream);
- } else {
- int read;
- while ((read = sarInputStream.read(buf)) != -1) {
- if (DEBUG) {
- System.out.println("Content: " + new String(buf, 0, read));
- }
- zipOutputStream.write(buf, 0, read);
- }
- }
- sarInputStream.closeEntry();
- zipOutputStream.closeEntry();
- }
-
- zipOutputStream.finish();
- }
-
- private static boolean isZip(ZipEntry zipEntry) {
- String name = zipEntry.getName().toLowerCase();
- return name.endsWith(".zip") || name.endsWith(".jar");
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.classpath b/bundles/org.eclipse.equinox.p2.tests.discovery/.classpath
deleted file mode 100644
index c5eb0e976..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="**/internal/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.cvsignore b/bundles/org.eclipse.equinox.p2.tests.discovery/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.gitignore b/bundles/org.eclipse.equinox.p2.tests.discovery/.gitignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.project b/bundles/org.eclipse.equinox.p2.tests.discovery/.project
deleted file mode 100644
index 319ac847b..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.tests.discovery</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c65423da1..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,349 +0,0 @@
-#Wed Feb 17 14:07:15 PST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-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=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.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=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 8f3db4a0a..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Wed Feb 17 14:07:15 PST 2010
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 25 03:02:37 GMT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.team.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
deleted file mode 100644
index 2fa52d061..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Feb 16 15:42:58 PST 2010
-commit.comment.template=${connector.task.prefix} ${task.key} - ${task.description}
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 5937a85ac..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,24 +0,0 @@
-#Tue May 20 17:39:22 PDT 2008
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=2
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-bundle-classpath-entries=1
-compilers.p.missing-packages=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=0
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF
deleted file mode 100644
index 2c0b33dc2..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.equinox.p2.tests.discovery;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %Bundle-Provider
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.p2.discovery.tests;x-internal:=true,
- org.eclipse.equinox.p2.discovery.tests.core;x-internal:=true,
- org.eclipse.equinox.p2.discovery.tests.core.mock;x-internal:=true,
- org.eclipse.equinox.p2.discovery.tests.core.util;x-internal:=true
-Require-Bundle: org.eclipse.equinox.p2.discovery;bundle-version="1.0.0",
- org.eclipse.equinox.p2.discovery.compatibility;bundle-version="1.0.0",
- org.eclipse.equinox.p2.ui.discovery;bundle-version="1.0.0",
- org.junit;bundle-version="3.8.0",
- org.eclipse.core.runtime;bundle-version="3.1.0",
- org.eclipse.ui;bundle-version="3.1.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/about.html b/bundles/org.eclipse.equinox.p2.tests.discovery/about.html
deleted file mode 100644
index bc6e2b493..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>July 3, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
-
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties b/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties
deleted file mode 100644
index cd06353bf..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.xml,\
- plugin.properties,\
- testdata/,\
- test.xml
-src.includes = about.html
-
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.properties b/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.properties
deleted file mode 100644
index 6d6397f85..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-Bundle-Vendor = Eclipse.org - Equinox
-Bundle-Name = Equinox Provisioning Discovery Tests
-connectorCategory.description = a category for testing purposes
-connectorCategory.name = Test Category
-certification.name = Test Certification
-certification.url = http://eclipse.org/mylyn
-certification.description = Description
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.xml
deleted file mode 100644
index 61fed3bf0..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/plugin.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?><!--
- Copyright (c) 2009 Tasktop Technologies 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:
- Tasktop Technologies - initial API and implementation
- -->
-
-<plugin>
- <extension
- point="org.eclipse.mylyn.discovery.core.connectorDiscovery">
- <connectorCategory
- description="%connectorCategory.description"
- id="org.eclipse.mylyn.discovery.tests.connectorCategory1"
- name="%connectorCategory.name">
- </connectorCategory>
- <connectorDescriptor
- categoryId="org.eclipse.mylyn.discovery.tests.connectorCategory1"
- description="a fictitious test connector that does nothing"
- id="org.eclipse.mylyn.discovery.tests.connectorDescriptor1"
- kind="task"
- license="UTL (Unit Test License)"
- name="Test Connector"
- provider="UnitTesting"
- siteUrl="http://foo.nodomain/site">
- </connectorDescriptor>
- <connectorDescriptor
- categoryId="org.eclipse.mylyn.discovery.tests.connectorCategory1"
- description="Connector with id org.eclipse.mylyn.discovery.test1"
- id="org.eclipse.mylyn.discovery.test1"
- kind="task"
- license="License"
- name="Installable Test Connector"
- provider="Eclipse Mylyn"
- siteUrl="http://localhost/discovery/">
- </connectorDescriptor>
- <connectorDescriptor
- categoryId="org.eclipse.mylyn.discovery.tests.connectorCategory1"
- description="Connector with id org.eclipse.mylyn.discovery.2tests"
- id="org.eclipse.mylyn.discovery.2tests"
- kind="task"
- license="License"
- name="2 Installable Test Connector"
- provider="Eclipse Mylyn"
- siteUrl="http://localhost/discovery/">
- <iu
- id="org.eclipse.mylyn.discovery.test1">
- </iu>
- <iu
- id="org.eclipse.mylyn.discovery.test2">
- </iu>
- </connectorDescriptor>
- <certification
- id="org.eclipse.mylyn.discovery.tests.certification1"
- name="%certification.name"
- url="%certification.url">
- <description>
- %certification.description
- </description>
- </certification>
- <connectorDescriptor
- categoryId="org.eclipse.mylyn.discovery.tests.connectorCategory1"
- description="Tagged as Custom"
- id="org.eclipse.mylyn.discovery.test.tagged"
- kind="Custom"
- license="License"
- name="Tagged Connector"
- provider="Eclipse Mylyn"
- siteUrl="http://localhost/discovery/">
- </connectorDescriptor>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:help?after=additions">
- <command
- commandId="org.eclipse.equinox.p2.ui.discovery.commands.ShowBundleCatalog"
- label="Show Bundle Catalog..."
- style="push">
- <parameter
- name="org.eclipse.equinox.p2.ui.discovery.commands.DirectoryParameter"
- value="http://www.eclipse.org/mylyn/discovery/directory-3.3.xml">
- </parameter>
- <parameter
- name="org.eclipse.equinox.p2.ui.discovery.commands.TagsParameter"
- value="document=Documents,task=Tasks,vcs=Version Control">
- </parameter>
- </command>
- <command
- commandId="org.eclipse.equinox.p2.ui.discovery.commands.ShowRepositoryCatalog"
- label="Show Repository Catalog..."
- style="push">
- <parameter
- name="org.eclipse.equinox.p2.ui.discovery.commands.RepositoryParameter"
- value="http://download.eclipse.org/tools/mylyn/update/e3.4">
- </parameter>
- </command>
- </menuContribution>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml
deleted file mode 100644
index e379caacc..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.tests.discovery</artifactId>
- <version>3.4.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/AllDiscoveryTests.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/AllDiscoveryTests.java
deleted file mode 100644
index a01039556..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/AllDiscoveryTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.discovery.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.equinox.p2.discovery.tests.core.*;
-
-/**
- * @author Steffen Pingel
- */
-public class AllDiscoveryTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Tests for org.eclipse.equinox.p2.discovery.tests"); //$NON-NLS-1$
- suite.addTestSuite(ConnectorDiscoveryTest.class);
- suite.addTestSuite(DirectoryParserTest.class);
- suite.addTestSuite(BundleDiscoveryStrategyTest.class);
- //suite.addTestSuite(RemoteBundleDiscoveryStrategyTest.class);
- //suite.addTestSuite(ConnectorDiscoveryRemoteTest.class);
- return suite;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/DiscoveryTestConstants.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/DiscoveryTestConstants.java
deleted file mode 100644
index 909b87d2e..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/DiscoveryTestConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.discovery.tests;
-
-/**
- * @author David Green
- */
-public abstract class DiscoveryTestConstants {
-
- /**
- * The URL of the mylyn discovery directory, may be overridden using the system property
- * <tt>mylyn.discovery.directory</tt>.
- */
- public static final String DISCOVERY_URL = System.getProperty("mylyn.discovery.directory", "http://www.eclipse.org/mylyn/discovery/directory-3.3.xml"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private DiscoveryTestConstants() {
- // don't allow clients to instantiate
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java
deleted file mode 100644
index 9465da547..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/BundleDiscoveryStrategyTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.discovery.tests.core;
-
-import java.util.*;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.discovery.Policy;
-import org.eclipse.equinox.internal.p2.discovery.model.*;
-import org.eclipse.equinox.p2.discovery.tests.core.mock.MockBundleDiscoveryStrategy;
-
-/**
- * @author David Green
- * @author Steffen Pingel
- */
-public class BundleDiscoveryStrategyTest extends TestCase {
-
- private MockBundleDiscoveryStrategy discoveryStrategy;
-
- private final List<CatalogCategory> categories = new ArrayList<CatalogCategory>();
-
- private final List<CatalogItem> connectors = new ArrayList<CatalogItem>();
-
- private final List<Certification> certifications = new ArrayList<Certification>();
-
- private final List<Tag> tags = new ArrayList<Tag>();
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- discoveryStrategy = new MockBundleDiscoveryStrategy();
- discoveryStrategy.setPolicy(new Policy(true));
- discoveryStrategy.setCategories(categories);
- discoveryStrategy.setItems(connectors);
- discoveryStrategy.setCertifications(certifications);
- discoveryStrategy.setTags(tags);
- }
-
- public void testDiscovery() throws CoreException {
- discoveryStrategy.performDiscovery(new NullProgressMonitor());
-
- assertFalse(categories.isEmpty());
- assertFalse(connectors.isEmpty());
- CatalogCategory category = findCategoryById("org.eclipse.mylyn.discovery.tests.connectorCategory1"); //$NON-NLS-1$
- assertNotNull(category);
- CatalogItem connector = findConnectorById("org.eclipse.mylyn.discovery.tests.connectorDescriptor1"); //$NON-NLS-1$
- assertNotNull(connector);
- Certification certification = findCertificationById("org.eclipse.mylyn.discovery.tests.certification1"); //$NON-NLS-1$
- assertNotNull(certification);
- }
-
- public void testCustomTag() throws CoreException {
- discoveryStrategy.performDiscovery(new NullProgressMonitor());
-
- CatalogItem connector = findConnectorById("org.eclipse.mylyn.discovery.test.tagged"); //$NON-NLS-1$
- assertEquals(new HashSet<Tag>(Arrays.asList(new Tag("Custom", "Custom"))), connector.getTags()); //$NON-NLS-1$ //$NON-NLS-2$
- assertEquals(Arrays.asList(new Tag("task", "Tasks"), new Tag("Custom", "Custom")), discoveryStrategy.getTags()); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
- }
-
- public void testDiscoveryNoCategoriesPolicy() throws CoreException {
- discoveryStrategy.setPolicy(new Policy(false));
- discoveryStrategy.performDiscovery(new NullProgressMonitor());
-
- assertTrue(categories.isEmpty());
- }
-
- private CatalogItem findConnectorById(String id) {
- for (CatalogItem descriptor : connectors) {
- if (id.equals(descriptor.getId())) {
- return descriptor;
- }
- }
- return null;
- }
-
- private CatalogCategory findCategoryById(String id) {
- for (CatalogCategory descriptor : categories) {
- if (id.equals(descriptor.getId())) {
- return descriptor;
- }
- }
- return null;
- }
-
- private Certification findCertificationById(String id) {
- for (Certification descriptor : certifications) {
- if (id.equals(descriptor.getId())) {
- return descriptor;
- }
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryRemoteTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryRemoteTest.java
deleted file mode 100644
index 4c6bbbe12..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryRemoteTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.discovery.tests.core;
-
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy;
-import org.eclipse.equinox.p2.discovery.tests.DiscoveryTestConstants;
-
-/**
- * A test that uses the real discovery directory and verifies that it works, and that all referenced update sites appear
- * to be available.
- *
- * @author David Green
- */
-public class ConnectorDiscoveryRemoteTest extends TestCase {
-
- private Catalog connectorDiscovery;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- connectorDiscovery = new Catalog();
- connectorDiscovery.setVerifyUpdateSiteAvailability(false);
-
- connectorDiscovery.getDiscoveryStrategies().clear();
- RemoteBundleDiscoveryStrategy remoteStrategy = new RemoteBundleDiscoveryStrategy();
- remoteStrategy.setDirectoryUrl(DiscoveryTestConstants.DISCOVERY_URL);
- connectorDiscovery.getDiscoveryStrategies().add(remoteStrategy);
- }
-
- public void testRemoteDirectory() {
- connectorDiscovery.performDiscovery(new NullProgressMonitor());
-
- assertFalse(connectorDiscovery.getCategories().isEmpty());
- assertFalse(connectorDiscovery.getItems().isEmpty());
- }
-
- // public void testVerifyAvailability() throws CoreException {
- // connectorDiscovery.performDiscovery(new NullProgressMonitor());
- // for (CatalogItem connector : connectorDiscovery.getConnectors()) {
- // assertNull(connector.getAvailable());
- // }
- // connectorDiscovery.verifySiteAvailability(new NullProgressMonitor());
- //
- // assertFalse(connectorDiscovery.getConnectors().isEmpty());
- //
- // int unavailableCount = 0;
- // for (CatalogItem connector : connectorDiscovery.getConnectors()) {
- // assertNotNull(connector.getAvailable());
- // if (!connector.getAvailable()) {
- // ++unavailableCount;
- // }
- // }
- // if (unavailableCount > 0) {
- // fail(String.format("%s unavailable: %s", unavailableCount, computeUnavailableConnetorDescriptorNames()));
- // }
- // }
-
- // private String computeUnavailableConnetorDescriptorNames() {
- // String message = "";
- // for (CatalogItem connector : connectorDiscovery.getItems()) {
- // if (!connector.getAvailable()) {
- // if (message.length() > 0) {
- // message += ", ";
- // }
- // message += connector.getName();
- // }
- // }
- // return message;
- // }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryTest.java
deleted file mode 100644
index a3d3f7abf..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/ConnectorDiscoveryTest.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.discovery.tests.core;
-
-import java.util.*;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-import org.eclipse.equinox.p2.discovery.tests.core.mock.CatalogItemMockFactory;
-import org.eclipse.equinox.p2.discovery.tests.core.mock.MockDiscoveryStrategy;
-import org.osgi.framework.Version;
-
-/**
- * @author David Green
- */
-public class ConnectorDiscoveryTest extends TestCase {
-
- private Catalog connectorDiscovery;
-
- private MockDiscoveryStrategy mockDiscoveryStrategy;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- connectorDiscovery = new Catalog();
- mockDiscoveryStrategy = new MockDiscoveryStrategy();
- connectorDiscovery.getDiscoveryStrategies().add(mockDiscoveryStrategy);
- }
-
- public void testPlatformFilter_None() {
- connectorDiscovery.performDiscovery(new NullProgressMonitor());
- assertEquals(mockDiscoveryStrategy.getConnectorCount(), connectorDiscovery.getItems().size());
- }
-
- public void testPlatformFilter_NegativeMatch() {
- mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
- @Override
- protected void populateMockData() {
- super.populateMockData();
- platformFilter("(& (osgi.os=macosx) (osgi.ws=carbon))"); //$NON-NLS-1$
- }
- });
- // test to ensure that all non-matching platform filters are not discovered
- Dictionary<Object, Object> environment = new Properties();
- environment.put("osgi.os", "win32"); //$NON-NLS-1$ //$NON-NLS-2$
- environment.put("osgi.ws", "windows"); //$NON-NLS-1$ //$NON-NLS-2$
- connectorDiscovery.setEnvironment(environment);
- connectorDiscovery.performDiscovery(new NullProgressMonitor());
-
- assertTrue(connectorDiscovery.getItems().isEmpty());
- }
-
- public void testPlatformFilter_PositiveMatch() {
- mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
- @Override
- protected void populateMockData() {
- super.populateMockData();
- platformFilter("(& (osgi.os=macosx) (osgi.ws=carbon))"); //$NON-NLS-1$
- }
- });
- Dictionary<Object, Object> environment = new Properties();
-
- // test to ensure that all matching platform filters are discovered
- environment.put("osgi.os", "macosx"); //$NON-NLS-1$//$NON-NLS-2$
- environment.put("osgi.ws", "carbon"); //$NON-NLS-1$ //$NON-NLS-2$
- connectorDiscovery.setEnvironment(environment);
- connectorDiscovery.performDiscovery(new NullProgressMonitor());
-
- assertFalse(connectorDiscovery.getItems().isEmpty());
- assertEquals(mockDiscoveryStrategy.getConnectorCount(), connectorDiscovery.getItems().size());
- }
-
- public void testFeatureFilter_PositiveMatch() {
- mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
- @Override
- protected void populateMockData() {
- super.populateMockData();
- featureFilter("com.foo.bar.feature", "[1.0,2.0)"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- });
- Map<String, Version> featureToVersion = new HashMap<String, Version>();
- featureToVersion.put("com.foo.bar.feature", new Version("1.1")); //$NON-NLS-1$ //$NON-NLS-2$
- connectorDiscovery.setFeatureToVersion(featureToVersion);
- connectorDiscovery.performDiscovery(new NullProgressMonitor());
-
- assertFalse(connectorDiscovery.getItems().isEmpty());
- assertEquals(mockDiscoveryStrategy.getConnectorCount(), connectorDiscovery.getItems().size());
- }
-
- public void testFeatureFilter_NegativeMatch_VersionMismatch() {
- mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
- @Override
- protected void populateMockData() {
- super.populateMockData();
- featureFilter("com.foo.bar.feature", "[1.2,2.0)"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- });
- Map<String, Version> featureToVersion = new HashMap<String, Version>();
- featureToVersion.put("com.foo.bar.feature", new Version("1.1")); //$NON-NLS-1$ //$NON-NLS-2$
- connectorDiscovery.setFeatureToVersion(featureToVersion);
- connectorDiscovery.performDiscovery(new NullProgressMonitor());
-
- assertTrue(connectorDiscovery.getItems().isEmpty());
- }
-
- public void testFeatureFilter_NegativeMatch_NotPresent() {
- mockDiscoveryStrategy.setConnectorMockFactory(new CatalogItemMockFactory() {
- @Override
- protected void populateMockData() {
- super.populateMockData();
- featureFilter("com.foo.bar.feature", "[1.2,2.0)"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- });
- Map<String, Version> featureToVersion = new HashMap<String, Version>();
- connectorDiscovery.setFeatureToVersion(featureToVersion);
- connectorDiscovery.performDiscovery(new NullProgressMonitor());
-
- assertTrue(connectorDiscovery.getItems().isEmpty());
- }
-
- public void testCategorization() {
- connectorDiscovery.performDiscovery(new NullProgressMonitor());
- assertTrue(!connectorDiscovery.getItems().isEmpty());
- assertTrue(!connectorDiscovery.getCategories().isEmpty());
-
- for (CatalogItem connector : connectorDiscovery.getItems()) {
- assertNotNull(connector.getCategory());
- assertEquals(connector.getCategoryId(), connector.getCategory().getId());
- assertTrue(connector.getCategory().getItems().contains(connector));
- }
- }
-
- public void testMultipleStrategies() {
- MockDiscoveryStrategy strategy = new MockDiscoveryStrategy();
- strategy.setConnectorMockFactory(mockDiscoveryStrategy.getConnectorMockFactory());
- strategy.setCategoryMockFactory(mockDiscoveryStrategy.getCategoryMockFactory());
- connectorDiscovery.getDiscoveryStrategies().add(strategy);
-
- connectorDiscovery.performDiscovery(new NullProgressMonitor());
-
- assertEquals(mockDiscoveryStrategy.getConnectorMockFactory().getCreatedCount(), connectorDiscovery.getItems().size());
- assertEquals(mockDiscoveryStrategy.getCategoryMockFactory().getCreatedCount(), connectorDiscovery.getCategories().size());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/DirectoryParserTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/DirectoryParserTest.java
deleted file mode 100644
index f9dfce53f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/DirectoryParserTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.discovery.tests.core;
-
-import java.io.IOException;
-import java.io.StringReader;
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.Directory;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.DirectoryParser;
-
-/**
- * @author David Green
- */
-public class DirectoryParserTest extends TestCase {
-
- private DirectoryParser parser;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- parser = new DirectoryParser();
- }
-
- public void testParse() throws IOException {
- Directory directory = parser.parse(new StringReader("<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\"/></directory>")); //$NON-NLS-1$
- assertNotNull(directory);
- assertEquals(1, directory.getEntries().size());
- assertEquals("http://foo.bar.nodomain/baz.jar", directory.getEntries().get(0).getLocation()); //$NON-NLS-1$
- }
-
- public void testParseBadFormat() {
- try {
- parser.parse(new StringReader("<directory2 xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\"/></directory2>")); //$NON-NLS-1$
- fail("Expected exception"); //$NON-NLS-1$
- } catch (IOException e) {
- // expected
- }
- }
-
- public void testParseMalformed() {
- try {
- parser.parse(new StringReader("<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\">")); //$NON-NLS-1$
- fail("Expected exception"); //$NON-NLS-1$
- } catch (IOException e) {
- // expected
- }
- }
-
- public void testParseUnexpectedElementsAndAttributes() throws IOException {
- Directory directory = parser.parse(new StringReader("<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" id=\"asdf\"><baz/></entry><foo/></directory>")); //$NON-NLS-1$
- assertNotNull(directory);
- assertEquals(1, directory.getEntries().size());
- assertEquals("http://foo.bar.nodomain/baz.jar", directory.getEntries().get(0).getLocation()); //$NON-NLS-1$
- }
-
- public void testParseNoNS() throws IOException {
- Directory directory = parser.parse(new StringReader("<directory><entry url=\"http://foo.bar.nodomain/baz.jar\"/></directory>")); //$NON-NLS-1$
- assertNotNull(directory);
- assertEquals(1, directory.getEntries().size());
- assertEquals("http://foo.bar.nodomain/baz.jar", directory.getEntries().get(0).getLocation()); //$NON-NLS-1$
- }
-
- public void testParsePermitCategoriesTrue() throws IOException {
- Directory directory = parser.parse(new StringReader("<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" permitCategories=\"true\"/></directory>")); //$NON-NLS-1$
- assertNotNull(directory);
- assertEquals(1, directory.getEntries().size());
- assertEquals(true, directory.getEntries().get(0).isPermitCategories());
- }
-
- public void testParsePermitCategoriesFalse() throws IOException {
- Directory directory = parser.parse(new StringReader("<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" permitCategories=\"false\"/></directory>")); //$NON-NLS-1$
- assertNotNull(directory);
- assertEquals(1, directory.getEntries().size());
- assertEquals(false, directory.getEntries().get(0).isPermitCategories());
- }
-
- public void testParsePermitCategoriesNotSpecified() throws IOException {
- Directory directory = parser.parse(new StringReader("<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\"/></directory>")); //$NON-NLS-1$
- assertNotNull(directory);
- assertEquals(1, directory.getEntries().size());
- assertEquals(false, directory.getEntries().get(0).isPermitCategories());
- }
-
- public void testParsePermitCategoriesSpecifiedBadly() throws IOException {
- Directory directory = parser.parse(new StringReader("<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" permitCategories=\"\"/></directory>")); //$NON-NLS-1$
- assertNotNull(directory);
- assertEquals(1, directory.getEntries().size());
- assertEquals(false, directory.getEntries().get(0).isPermitCategories());
- }
-
- public void testParsePermitCategoriesSpecifiedBadly2() throws IOException {
- Directory directory = parser.parse(new StringReader("<directory xmlns=\"http://www.eclipse.org/mylyn/discovery/directory/\"><entry url=\"http://foo.bar.nodomain/baz.jar\" permitCategories=\"asdf\"/></directory>")); //$NON-NLS-1$
- assertNotNull(directory);
- assertEquals(1, directory.getEntries().size());
- assertEquals(false, directory.getEntries().get(0).isPermitCategories());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/RemoteBundleDiscoveryStrategyTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/RemoteBundleDiscoveryStrategyTest.java
deleted file mode 100644
index 8082177c7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/RemoteBundleDiscoveryStrategyTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.discovery.tests.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy;
-import org.eclipse.equinox.internal.p2.discovery.model.*;
-import org.eclipse.equinox.p2.discovery.tests.DiscoveryTestConstants;
-
-/**
- * @author David Green
- */
-public class RemoteBundleDiscoveryStrategyTest extends TestCase {
-
- private RemoteBundleDiscoveryStrategy discoveryStrategy;
-
- @Override
- protected void setUp() throws Exception {
- discoveryStrategy = new RemoteBundleDiscoveryStrategy();
- discoveryStrategy.setDirectoryUrl(DiscoveryTestConstants.DISCOVERY_URL);
- discoveryStrategy.setCategories(new ArrayList<CatalogCategory>());
- discoveryStrategy.setItems(new ArrayList<CatalogItem>());
- discoveryStrategy.setCertifications(new ArrayList<Certification>());
- discoveryStrategy.setTags(new ArrayList<Tag>());
- }
-
- public void testPerformDiscovery() throws CoreException, IOException {
- discoveryStrategy.performDiscovery(new NullProgressMonitor());
- assertFalse(discoveryStrategy.getCategories().isEmpty());
- for (CatalogCategory category : discoveryStrategy.getCategories()) {
- // System.out.println(String.format("%s: %s: %s", category.getId(), category.getName(),
- // category.getDescription()));
- assertNotNull(category.getId());
- assertNotNull(category.getName());
- assertNotNull(category.getDescription());
- }
- assertFalse(discoveryStrategy.getItems().isEmpty());
- for (CatalogItem connector : discoveryStrategy.getItems()) {
- // System.out.println(String.format("%s: %s: %s", connector.getId(), connector.getName(),
- // connector.getDescription()));
- assertNotNull(connector.getId());
- assertNotNull(connector.getTags());
- assertNotNull(connector.getName());
- assertNotNull(connector.getDescription());
-
- // we _know_ that the bundle must have a plugin.xml... so verify that the source is working correctly
- assertNotNull(connector.getSource());
- URL pluginXmlUrl = connector.getSource().getResource("plugin.xml"); //$NON-NLS-1$
- // System.out.println("URL: " + pluginXmlUrl);
- InputStream in = pluginXmlUrl.openStream();
- assertNotNull(in);
- in.close();
- }
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/AbstractMockFactory.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/AbstractMockFactory.java
deleted file mode 100644
index dc398199f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/AbstractMockFactory.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.discovery.tests.core.mock;
-
-/**
- *
- * @author David Green
- */
-public abstract class AbstractMockFactory<MockType> {
-
- protected int seed = 0;
-
- private MockType mockObject;
-
- protected MockCatalogSource source = new MockCatalogSource();
-
- public final MockType get() {
- MockType object = getMockObject();
- mockObject = null;
- return object;
- }
-
- public final MockType getMockObject() {
- if (mockObject == null) {
- ++seed;
- mockObject = createMockObject();
- populateMockData();
- }
- return mockObject;
- }
-
- protected abstract void populateMockData();
-
- protected abstract MockType createMockObject();
-
- /**
- * get the number of objects created by this factory
- */
- public int getCreatedCount() {
- return seed;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogCategoryMockFactory.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogCategoryMockFactory.java
deleted file mode 100644
index 963bb087c..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogCategoryMockFactory.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.discovery.tests.core.mock;
-
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
-import org.eclipse.equinox.internal.p2.discovery.model.Icon;
-
-/**
- * @author David Green
- */
-public class CatalogCategoryMockFactory extends AbstractMockFactory<CatalogCategory> {
-
- CatalogCategory category;
-
- @Override
- protected CatalogCategory createMockObject() {
- return new CatalogCategory();
- }
-
- @Override
- protected void populateMockData() {
- // mock up some data
-
- getMockObject().setSource(source);
-
- name("Category " + seed).id(CatalogCategoryMockFactory.class.getPackage().getName() + ".connector" + seed).description("A category of things, " + seed); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- Icon icon = new Icon();
- icon.setImage128("images/ico128.png"); //$NON-NLS-1$
- icon.setImage16("images/ico16.png"); //$NON-NLS-1$
- icon.setImage32("images/ico32.png"); //$NON-NLS-1$
- icon.setImage64("images/ico64.png"); //$NON-NLS-1$
-
- getMockObject().setIcon(icon);
- }
-
- public CatalogCategoryMockFactory description(String description) {
- getMockObject().setDescription(description);
- return this;
- }
-
- public CatalogCategoryMockFactory icon(Icon icon) {
- getMockObject().setIcon(icon);
- return this;
- }
-
- public CatalogCategoryMockFactory id(String id) {
- getMockObject().setId(id);
- return this;
- }
-
- public CatalogCategoryMockFactory name(String name) {
- getMockObject().setName(name);
- return this;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogItemMockFactory.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogItemMockFactory.java
deleted file mode 100644
index 7d9e6b480..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/CatalogItemMockFactory.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.discovery.tests.core.mock;
-
-import org.eclipse.equinox.internal.p2.discovery.model.*;
-
-/**
- * @author David Green
- */
-public class CatalogItemMockFactory extends AbstractMockFactory<CatalogItem> {
-
- @Override
- protected void populateMockData() {
-
- // mock up some data
-
- getMockObject().setSource(source);
-
- name("Connector " + seed).id(CatalogItemMockFactory.class.getPackage().getName() + ".connector" + seed).siteUrl("http://example.nodomain/some/path/updateSite3.x/").tag(new Tag("", "")).license(seed % 2 == 0 ? "EPL 1.0" : "APL 2.0").description("a connector for the Example Task System versions 1.0 - 5.3").categoryId("example").provider("Testing 123 Inc."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
-
- Icon icon = new Icon();
- icon.setImage128("images/ico128.png"); //$NON-NLS-1$
- icon.setImage16("images/ico16.png"); //$NON-NLS-1$
- icon.setImage32("images/ico32.png"); //$NON-NLS-1$
- icon.setImage64("images/ico64.png"); //$NON-NLS-1$
-
- Overview overview = new Overview();
- overview.setScreenshot("images/screenshot-main.png"); //$NON-NLS-1$
- overview.setSummary("some long text that summarizes the connector"); //$NON-NLS-1$
- overview.setUrl("http://example.nodomain/some/path/updateSite3.x/overview.html"); //$NON-NLS-1$
-
- icon(icon).overview(overview);
- overview.setItem(getMockObject());
- }
-
- @Override
- protected CatalogItem createMockObject() {
- return new CatalogItem();
- }
-
- public CatalogItemMockFactory categoryId(String categoryId) {
- getMockObject().setCategoryId(categoryId);
- return this;
- }
-
- public CatalogItemMockFactory description(String description) {
- getMockObject().setDescription(description);
- return this;
- }
-
- public CatalogItemMockFactory icon(Icon icon) {
- getMockObject().setIcon(icon);
- return this;
- }
-
- public CatalogItemMockFactory id(String id) {
- getMockObject().setId(id);
- return this;
- }
-
- public CatalogItemMockFactory tag(Tag tag) {
- getMockObject().addTag(tag);
- return this;
- }
-
- public CatalogItemMockFactory license(String license) {
- getMockObject().setLicense(license);
- return this;
- }
-
- public CatalogItemMockFactory name(String name) {
- getMockObject().setName(name);
- return this;
- }
-
- public CatalogItemMockFactory overview(Overview overview) {
- getMockObject().setOverview(overview);
- return this;
- }
-
- public CatalogItemMockFactory platformFilter(String platformFilter) {
- getMockObject().setPlatformFilter(platformFilter);
- return this;
- }
-
- public CatalogItemMockFactory provider(String provider) {
- getMockObject().setProvider(provider);
- return this;
- }
-
- public CatalogItemMockFactory siteUrl(String siteUrl) {
- getMockObject().setSiteUrl(siteUrl);
- return this;
- }
-
- public CatalogItemMockFactory featureFilter(String featureId, String versionRange) {
- FeatureFilter featureFilter = new FeatureFilter();
- featureFilter.setItem(getMockObject());
- featureFilter.setFeatureId(featureId);
- featureFilter.setVersion(versionRange);
- getMockObject().getFeatureFilter().add(featureFilter);
- return this;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockBundleDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockBundleDiscoveryStrategy.java
deleted file mode 100644
index ac6069da1..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockBundleDiscoveryStrategy.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.discovery.tests.core.mock;
-
-import org.eclipse.core.runtime.IContributor;
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-import org.eclipse.equinox.internal.p2.discovery.Policy;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.BundleDiscoveryStrategy;
-
-/**
- * a discovery strategy for bundles where the policy can be arbitrarily set
- *
- * @author David Green
- */
-public class MockBundleDiscoveryStrategy extends BundleDiscoveryStrategy {
- private Policy policy = Policy.defaultPolicy();
-
- @Override
- protected AbstractCatalogSource computeDiscoverySource(IContributor contributor) {
- AbstractCatalogSource discoverySource = super.computeDiscoverySource(contributor);
- discoverySource.setPolicy(policy);
- return discoverySource;
- }
-
- public Policy getPolicy() {
- return policy;
- }
-
- public void setPolicy(Policy policy) {
- this.policy = policy;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java
deleted file mode 100644
index daa9a1f63..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockCatalogSource.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.discovery.tests.core.mock;
-
-import java.net.URL;
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-
-/**
- * @author David Green
- */
-public class MockCatalogSource extends AbstractCatalogSource {
-
- @Override
- public Object getId() {
- return "mock:mock"; //$NON-NLS-1$
- }
-
- @Override
- public URL getResource(String resourceName) {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java
deleted file mode 100644
index 8f867eb07..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/mock/MockDiscoveryStrategy.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.discovery.tests.core.mock;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.discovery.AbstractDiscoveryStrategy;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-
-/**
- * @author David Green
- */
-public class MockDiscoveryStrategy extends AbstractDiscoveryStrategy {
-
- private int connectorCount = 15;
-
- private int categoryCount = 5;
-
- protected CatalogItemMockFactory connectorMockFactory = new CatalogItemMockFactory();
-
- protected CatalogCategoryMockFactory categoryMockFactory = new CatalogCategoryMockFactory();
-
- @Override
- public void performDiscovery(IProgressMonitor monitor) {
- for (int x = 0; x < categoryCount; ++x) {
- CatalogCategory mockCategory = createDiscoveryCategory();
- getCategories().add(mockCategory);
- }
- for (int x = 0; x < connectorCount; ++x) {
- CatalogItem mockConnector = createDiscoveryConnector();
- // put the connector in a category
- if (!getCategories().isEmpty()) {
- int categoryIndex = x % getCategories().size();
- mockConnector.setCategoryId(getCategories().get(categoryIndex).getId());
- }
- getItems().add(mockConnector);
- }
- }
-
- protected CatalogCategory createDiscoveryCategory() {
- return categoryMockFactory.get();
- }
-
- protected CatalogItem createDiscoveryConnector() {
- return connectorMockFactory.get();
- }
-
- public CatalogCategoryMockFactory getCategoryMockFactory() {
- return categoryMockFactory;
- }
-
- public void setCategoryMockFactory(CatalogCategoryMockFactory categoryMockFactory) {
- this.categoryMockFactory = categoryMockFactory;
- }
-
- public CatalogItemMockFactory getConnectorMockFactory() {
- return connectorMockFactory;
- }
-
- public void setConnectorMockFactory(CatalogItemMockFactory connectorMockFactory) {
- this.connectorMockFactory = connectorMockFactory;
- }
-
- public int getConnectorCount() {
- return connectorCount;
- }
-
- public void setConnectorCount(int connectorCount) {
- this.connectorCount = connectorCount;
- }
-
- public int getCategoryCount() {
- return categoryCount;
- }
-
- public void setCategoryCount(int categoryCount) {
- this.categoryCount = categoryCount;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java
deleted file mode 100644
index 828bdf09c..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogCategoryComparatorTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.discovery.tests.core.util;
-
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
-import org.eclipse.equinox.internal.p2.discovery.util.CatalogCategoryComparator;
-
-public class CatalogCategoryComparatorTest extends TestCase {
-
- private CatalogCategoryComparator comparator;
-
- private CatalogCategory category1;
-
- private CatalogCategory category2;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- comparator = new CatalogCategoryComparator();
- category1 = new CatalogCategory();
- category2 = new CatalogCategory();
- }
-
- public void testSortByRelevanceInequal() {
- category1.setRelevance("100"); //$NON-NLS-1$
- category2.setRelevance("50"); //$NON-NLS-1$
- assertEquals(-1, comparator.compare(category1, category2));
- assertEquals(1, comparator.compare(category2, category1));
- }
-
- public void testSortByRelevanceOneNotSpecified() {
- category1.setRelevance("10"); //$NON-NLS-1$
- assertEquals(-1, comparator.compare(category1, category2));
- assertEquals(1, comparator.compare(category2, category1));
- }
-
- public void testSortByRelevanceSame() {
- category1.setRelevance("10"); //$NON-NLS-1$
- category1.setName("test"); //$NON-NLS-1$
- category1.setId("1"); //$NON-NLS-1$
- category2.setRelevance("10"); //$NON-NLS-1$
- category2.setName("test"); //$NON-NLS-1$
- category2.setId("1"); //$NON-NLS-1$
- assertEquals(0, comparator.compare(category1, category2));
- assertEquals(0, comparator.compare(category2, category1));
- }
-
- public void testSortByRelevanceSameIdsDiffer() {
- category1.setRelevance("10"); //$NON-NLS-1$
- category1.setName("test"); //$NON-NLS-1$
- category1.setId("a"); //$NON-NLS-1$
- category2.setRelevance("10"); //$NON-NLS-1$
- category2.setName("test"); //$NON-NLS-1$
- category2.setId("b"); //$NON-NLS-1$
- assertEquals(-1, comparator.compare(category1, category2));
- assertEquals(1, comparator.compare(category2, category1));
- }
-
- public void testSortByRelevanceSameNamesDiffer() {
- category1.setRelevance("10"); //$NON-NLS-1$
- category1.setName("a"); //$NON-NLS-1$
- category1.setId("a"); //$NON-NLS-1$
- category2.setRelevance("10"); //$NON-NLS-1$
- category2.setName("b"); //$NON-NLS-1$
- category2.setId("a"); //$NON-NLS-1$
- assertEquals(-1, comparator.compare(category1, category2));
- assertEquals(1, comparator.compare(category2, category1));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java b/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java
deleted file mode 100644
index 04d9b7b2a..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/src/org/eclipse/equinox/p2/discovery/tests/core/util/CatalogConnectorComparatorTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.discovery.tests.core.util;
-
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.discovery.model.*;
-import org.eclipse.equinox.internal.p2.discovery.util.CatalogItemComparator;
-
-public class CatalogConnectorComparatorTest extends TestCase {
-
- private CatalogCategory category;
-
- private CatalogItemComparator comparator;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- category = new CatalogCategory();
- comparator = new CatalogItemComparator();
- }
-
- private Group addGroup(String id) {
- Group group = new Group();
- group.setId(id);
- category.getGroup().add(group);
- return group;
- }
-
- private CatalogItem addConnectorDescriptor(String id, String name, String groupId) {
- CatalogItem connector = new CatalogItem();
- connector.setId(id);
- connector.setName(name);
- connector.setGroupId(groupId);
- connector.setCategory(category);
- category.getItems().add(connector);
- return connector;
- }
-
- public void testOrderByGroup() {
- addGroup("1"); //$NON-NLS-1$
- addGroup("2"); //$NON-NLS-1$
- CatalogItem t1 = addConnectorDescriptor("b", "btest", "2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- CatalogItem t2 = addConnectorDescriptor("a", "atest", "2"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- CatalogItem t3 = addConnectorDescriptor("c", "ctest", "1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- CatalogItem t4 = addConnectorDescriptor("d", "dtest", "1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- CatalogItem t5 = addConnectorDescriptor("0", "0test", null); //$NON-NLS-1$ //$NON-NLS-2$
-
- assertEquals(-1, comparator.compare(t2, t1));
- assertEquals(1, comparator.compare(t1, t2));
- assertEquals(-1, comparator.compare(t3, t4));
- assertEquals(1, comparator.compare(t4, t3));
-
- assertEquals(-1, comparator.compare(t1, t5));
- assertEquals(1, comparator.compare(t5, t1));
- assertEquals(-1, comparator.compare(t2, t5));
- assertEquals(1, comparator.compare(t5, t2));
- assertEquals(-1, comparator.compare(t3, t5));
- assertEquals(1, comparator.compare(t5, t3));
- assertEquals(-1, comparator.compare(t4, t5));
- assertEquals(1, comparator.compare(t5, t4));
-
- assertEquals(-1, comparator.compare(t3, t1));
- assertEquals(1, comparator.compare(t1, t3));
- assertEquals(-1, comparator.compare(t3, t2));
- assertEquals(1, comparator.compare(t2, t3));
-
- assertEquals(-1, comparator.compare(t4, t1));
- assertEquals(1, comparator.compare(t1, t4));
- assertEquals(-1, comparator.compare(t4, t2));
- assertEquals(1, comparator.compare(t2, t4));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/test.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/test.xml
deleted file mode 100644
index 9a7810fd7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/test.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<project name="p2 Automated Tests" default="run" basedir=".">
-
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="eclipse-home" value="${basedir}/../../" />
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml" />
- <property name="p2discovery_location" value="${eclipse-home}/p2_discovery_data_dir" />
- <property name="plugin-name" value="org.eclipse.equinox.p2.tests.discovery" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- <delete dir="${p2discovery_location}" quiet="true" />
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
-
- <!-- This target runs the performance test suites. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <!--
- <target name="performance" depends="init,performance-suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
- -->
-
- <target name="p2Tests" depends="init,cleanup">
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${p2discovery_location}" />
- <property name="plugin-name" value="org.eclipse.equinox.p2.tests.discovery" />
- <property name="classname" value="org.eclipse.equinox.p2.discovery.tests.AllDiscoveryTests" />
- </ant>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite" depends="p2Tests" />
-
- <!-- This target defines the performance tests that need to be run. -->
- <!--
- <target name="performance-suite" depends="p2PerformanceTests" />
- -->
-
- <target name="p2PerformanceTests">
- <!-- TODO -->
- </target>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/.project b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/.project
deleted file mode 100644
index 8d093325e..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.discovery.test1-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/build.properties b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/build.properties
deleted file mode 100644
index 64f93a9f0..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/feature.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/feature.xml
deleted file mode 100644
index e5b89e0a5..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test1-feature/feature.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.mylyn.discovery.test1"
- label="Discovery Test Feature 1"
- version="1.0.0.qualifier"
- provider-name="Eclipse Mylyn">
-
- <description url="http://www.example.com/description">
- [Enter Feature Description here.]
- </description>
-
- <copyright url="http://www.example.com/copyright">
- [Enter Copyright Description here.]
- </copyright>
-
- <license url="http://www.example.com/license">
- [Enter License Description here.]
- </license>
-
-</feature>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/.project b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/.project
deleted file mode 100644
index 647d36dee..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.discovery.test2-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/build.properties b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/build.properties
deleted file mode 100644
index 64f93a9f0..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/build.properties
+++ /dev/null
@@ -1 +0,0 @@
-bin.includes = feature.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/feature.xml b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/feature.xml
deleted file mode 100644
index f2f089a23..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/org.eclipse.mylyn.discovery.test2-feature/feature.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.mylyn.discovery.test2"
- label="Discovery Test Feature 2"
- version="1.0.0.qualifier"
- provider-name="Eclipse Mylyn">
-
- <description url="http://www.example.com/description">
- [Enter Feature Description here.]
- </description>
-
- <copyright url="http://www.example.com/copyright">
- [Enter Copyright Description here.]
- </copyright>
-
- <license url="http://www.example.com/license">
- [Enter License Description here.]
- </license>
-
- <includes
- id="org.eclipse.mylyn.discovery.test1"
- version="0.0.0"/>
-
-</feature>
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/artifacts.jar b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/artifacts.jar
deleted file mode 100644
index 7a37f6f91..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/artifacts.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/content.jar b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/content.jar
deleted file mode 100644
index 78e190ba1..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/content.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test1_1.0.0.201001200403.jar b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test1_1.0.0.201001200403.jar
deleted file mode 100644
index 4ede52590..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test1_1.0.0.201001200403.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test2_1.0.0.201001200403.jar b/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test2_1.0.0.201001200403.jar
deleted file mode 100644
index 52b43d8ab..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.discovery/testdata/update/features/org.eclipse.mylyn.discovery.test2_1.0.0.201001200403.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/.classpath b/bundles/org.eclipse.equinox.p2.tests.optimizers/.classpath
deleted file mode 100644
index 2fbb7a23e..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/.project b/bundles/org.eclipse.equinox.p2.tests.optimizers/.project
deleted file mode 100644
index 2bc9a3891..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.tests.optimizers</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e1f95f076..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,343 +0,0 @@
-#Tue May 27 11:30:06 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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.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.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 56bcc3e9b..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:58:07 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF
deleted file mode 100644
index bac5607b5..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,28 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: p2 Optimizers Test Plug-in
-Bundle-SymbolicName: org.eclipse.equinox.p2.tests.optimizers;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.tests.optimizers.TestActivator
-Export-Package: org.eclipse.equinox.p2.tests.artifact.optimizers;version="2.0.0",
- org.eclipse.equinox.p2.tests.artifact.processors;version="2.0.0",
- org.eclipse.equinox.p2.tests.sar;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.4.0",
- org.junit;bundle-version="3.8.2"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-Import-Package: ie.wombat.jbdiff,
- org.eclipse.equinox.internal.p2.artifact.optimizers,
- org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta,
- org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff,
- org.eclipse.equinox.internal.p2.artifact.optimizers.pack200,
- org.eclipse.equinox.internal.p2.artifact.processors.jardelta,
- org.eclipse.equinox.internal.p2.artifact.processors.jbdiff,
- org.eclipse.equinox.internal.p2.artifact.processors.pack200,
- org.eclipse.equinox.internal.p2.artifact.repository,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.sar,
- org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.osgi.framework;version="1.4.0"
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties b/bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties
deleted file mode 100644
index 826f51f8b..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- testData/
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml b/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml
deleted file mode 100644
index 9e0f200d9..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.tests.optimizers</artifactId>
- <version>1.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/AllTests.java
deleted file mode 100644
index 6c28f5203..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/AllTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import junit.framework.*;
-
-/**
- * Performs all automated director tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(JBDiffStepTest.class);
- suite.addTestSuite(JBDiffZipStepTest.class);
- suite.addTestSuite(Pack200OptimizerTest.class);
- suite.addTestSuite(JarDeltaOptimizerTest.class);
- suite.addTestSuite(Bug209233Test.class);
- return suite;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Bug209233Test.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Bug209233Test.java
deleted file mode 100644
index 4c3ac6ac8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Bug209233Test.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import ie.wombat.jbdiff.JBDiff;
-import java.io.*;
-import java.util.Arrays;
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * ... <code>Bug209233Test</code> ...
- */
-public class Bug209233Test extends TestCase {
-
- // public void testGenerateTestDataDiff() throws IOException {
- // File predecessor = TestData.getTempFile("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- // File current = TestData.getTempFile("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- // File diff = File.createTempFile("org.eclipse.jdt_3.2.0-3.3.0~", ".jbdiff");
- // JBDiff.bsdiff(predecessor, current, diff);
- // }
-
- public void testDiffJdt32SarToJdt33Sar() throws IOException {
-
- InputStream current = TestData.get("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- ByteArrayOutputStream currentBS = new ByteArrayOutputStream();
- FileUtils.copyStream(current, true, currentBS, true);
- byte[] currentBytes = currentBS.toByteArray();
-
- InputStream predecessor = TestData.get("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- ByteArrayOutputStream predecessorBS = new ByteArrayOutputStream();
- FileUtils.copyStream(predecessor, true, predecessorBS, true);
- byte[] predecessorBytes = predecessorBS.toByteArray();
-
- byte[] actualBytes = JBDiff.bsdiff(predecessorBytes, predecessorBytes.length, currentBytes, currentBytes.length);
-
- InputStream expected = TestData.get("optimizers", "org.eclipse.jdt_3.2.0-3.3.0.jbdiff");
- ByteArrayOutputStream expectedBS = new ByteArrayOutputStream();
- FileUtils.copyStream(expected, true, expectedBS, true);
- byte[] expectedBytes = expectedBS.toByteArray();
-
- assertEquals("Different lengths.", expectedBytes.length, actualBytes.length);
- assertTrue("Different bytes.", Arrays.equals(expectedBytes, actualBytes));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java
deleted file mode 100644
index ca98076fa..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffStepTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import java.io.*;
-import java.util.Arrays;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.JBDiffStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-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.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JBDiffStepTest</code> processing step.
- */
-public class JBDiffStepTest extends OptimizerTest {
-
- // public void testGenerateTestDataExe32To33() throws IOException {
- // File exe32 = TestData.getTempFile("optimizers", "eclipse-3.2.exe");
- // File exe33 = TestData.getTempFile("optimizers", "eclipse-3.3.exe");
- // File diff = File.createTempFile("eclipse-3.2-3.3~", ".jbdiff");
- // JBDiff.bsdiff(exe32, exe33, diff);
- // }
-
- /**
- * Test diffing the launcher.
- *
- * @throws IOException
- */
- public void testDiffEclipseExe32to33() throws IOException {
-
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/eclipse-3.2.exe");
- MockableJBDiffStep differ = new MockableJBDiffStep(repoMock);
- IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- differ.initialize(getAgent(), stepDescriptor, descriptor);
-
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- differ.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "eclipse-3.3.exe");
- FileUtils.copyStream(inputStream, true, differ, true);
-
- inputStream = TestData.get("optimizers", "eclipse-3.2-3.3.jbdiff");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
- assertTrue(Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJBDiffStep extends JBDiffStep {
- public MockableJBDiffStep(IArtifactRepository repository) {
- super(repository);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java
deleted file mode 100644
index 9a0a818e7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JBDiffZipStepTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import java.io.*;
-import java.util.Arrays;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.jbdiff.JBDiffZipStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-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.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JBDiffZipTest</code> processing step.
- */
-public class JBDiffZipStepTest extends OptimizerTest {
-
- /**
- * Test diffing the <b>normalized</b> jars. This is indicated by the extension ".njar".
- *
- * @throws IOException
- */
- public void testDiffJdt32to33() throws IOException {
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar");
- MockableJBDiffZipStep differ = new MockableJBDiffZipStep(repoMock);
- IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- differ.initialize(getAgent(), stepDescriptor, descriptor);
-
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- differ.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "org.eclipse.jdt_3.3.0.v20070607-1300.njar");
- FileUtils.copyStream(inputStream, true, differ, true);
-
- inputStream = TestData.get("optimizers", "org.eclipse.jdt_3.2.0-3.3.0.jbdiff");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- assertTrue("Different diff bytes.", Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJBDiffZipStep extends JBDiffZipStep {
- public MockableJBDiffZipStep(IArtifactRepository repository) {
- super(repository);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java
deleted file mode 100644
index ea17138c8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/JarDeltaOptimizerTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * IBM Corporation - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import java.io.*;
-import java.util.zip.ZipInputStream;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.jardelta.JarDeltaOptimizerStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-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.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.processors.ArtifactRepositoryMock;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JarDelta</code> processing step.
- */
-public class JarDeltaOptimizerTest extends OptimizerTest {
-
- // public void testPrepare() throws IOException {
- // IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/testdata_1.0.0.1.jar");
- // ProcessingStep step = new MockableJarDeltaOptimizerStep(repoMock);
- // ProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
- // IArtifactKey key = new ArtifactKey("ns", "cl", "id1", Version.create("1.0.0.2"));
- // ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- // step.initialize(stepDescriptor, descriptor);
- // ByteArrayOutputStream destination = new ByteArrayOutputStream();
- // step.link(destination, new NullProgressMonitor());
- //
- // InputStream inputStream = TestActivator.getContext().getBundle().getEntry("testData/optimizers/testdata_1.0.0.2.jar").openStream();
- // FileUtils.copyStream(inputStream, true, step, true);
- // destination.close();
- //
- // inputStream = new ByteArrayInputStream(destination.toByteArray());
- // FileOutputStream file = new FileOutputStream("d:/jardelta.jar");
- // FileUtils.copyStream(inputStream, true, file, true);
- // }
-
- public void testOptimization() throws IOException {
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/testdata_1.0.0.1.jar");
- ProcessingStep step = new MockableJarDeltaOptimizerStep(repoMock);
- IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.0.0.2"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- step.initialize(getAgent(), stepDescriptor, descriptor);
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- step.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "testdata_1.0.0.2.jar");
- FileUtils.copyStream(inputStream, true, step, true);
- destination.close();
-
- inputStream = TestData.get("optimizers", "testdata_1.0.0.1-2.jar");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- ZipInputStream expectedJar = new ZipInputStream(new ByteArrayInputStream(expected.toByteArray()));
- ZipInputStream testJar = new ZipInputStream(new ByteArrayInputStream(destination.toByteArray()));
- TestData.assertEquals(expectedJar, testJar);
- expectedJar.close();
- testJar.close();
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJarDeltaOptimizerStep extends JarDeltaOptimizerStep {
- public MockableJarDeltaOptimizerStep(IArtifactRepository repository) {
- super(repository);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/OptimizerTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/OptimizerTest.java
deleted file mode 100644
index 7e9bb3987..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/OptimizerTest.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.Activator;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-
-public abstract class OptimizerTest extends TestCase {
- public OptimizerTest(String name) {
- super(name);
- }
-
- public OptimizerTest() {
- super();
- }
-
- protected static IProvisioningAgent getAgent() {
- //get the global agent for the currently running system
- return (IProvisioningAgent) ServiceHelper.getService(Activator.getContext(), IProvisioningAgent.SERVICE_NAME);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java
deleted file mode 100644
index 2401e14c3..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/optimizers/Pack200OptimizerTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.optimizers;
-
-import java.io.*;
-import java.util.Arrays;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.optimizers.pack200.Pack200OptimizerStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.tests.optimizers.TestActivator;
-import org.osgi.framework.Bundle;
-
-public class Pack200OptimizerTest extends TestCase {
-
- public Pack200OptimizerTest(String name) {
- super(name);
- }
-
- public Pack200OptimizerTest() {
- super("");
- }
-
- // public void testPrepare() throws IOException {
- // // Setup the step
- // ProcessingStep step = new Pack200OptimizerStep();
- // FileOutputStream destination = new FileOutputStream("c:/packed.pack.gz");
- // step.link(destination, new NullProgressMonitor());
- //
- // // drive the source data through the step
- // Bundle bundle = TestActivator.getContext().getBundle();
- // InputStream inputStream = bundle.getEntry("testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar").openStream();
- // FileUtils.copyStream(inputStream, true, step, true);
- //
- // destination.close();
- // }
-
- public void testPack() throws IOException {
- // Setup the step
- ProcessingStep step = new Pack200OptimizerStep();
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- step.link(destination, new NullProgressMonitor());
-
- // drive the source data through the step
- Bundle bundle = TestActivator.getContext().getBundle();
- InputStream inputStream = bundle.getEntry("testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar").openStream();
- FileUtils.copyStream(inputStream, true, step, true);
-
- assertTrue("Failure: " + step.getStatus().getMessage(), step.getStatus().isOK());
-
- // Get the test data. The Sun 1.6.0_01 JRE produces a different packed file
- // then the IBM V5 JRE, so both versions of the test data are maintained.
- // TODO: investigate this? Is the difference spurious? Are there differences
- // in the pack200 results for other JREs? Do we need a more general
- // solution to the problem?
- String javaVersion = System.getProperty("java.version");
- boolean is1_6 = javaVersion.compareTo("1.6") > 0;
-
- inputStream = bundle.getEntry(is1_6 ? "testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz" : "testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz").openStream();
-
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- // Compare
- assertTrue(Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/AllTests.java
deleted file mode 100644
index 226e965c5..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/AllTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import junit.framework.*;
-
-/**
- * Performs all automated director tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(JBPatchStepTest.class);
- suite.addTestSuite(JBPatchZipStepTest.class);
- suite.addTestSuite(JarDeltaProcessorTest.class);
- return suite;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/ArtifactRepositoryMock.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/ArtifactRepositoryMock.java
deleted file mode 100644
index 49d63936f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/ArtifactRepositoryMock.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import java.io.*;
-import java.lang.reflect.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.tests.optimizers.TestActivator;
-
-/**
- * Mock the getArtifact() needed to locate the predecessor.
- */
-public class ArtifactRepositoryMock implements InvocationHandler {
-
- private String artifactResource;
-
- public static IArtifactRepository getMock(String artifactResource) {
- return (IArtifactRepository) Proxy.newProxyInstance(IArtifactRepository.class.getClassLoader(), new Class[] {IArtifactRepository.class}, new ArtifactRepositoryMock(artifactResource));
- }
-
- private ArtifactRepositoryMock(String artifactResource) {
- this.artifactResource = artifactResource;
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- if (!method.getName().equals("getArtifact"))
- throw new RuntimeException("Unexpected usage!");
-
- return getArtifact((IArtifactDescriptor) args[0], (OutputStream) args[1], (IProgressMonitor) args[2]);
- }
-
- private IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- InputStream inputStream;
- try {
- inputStream = TestActivator.getContext().getBundle().getEntry(artifactResource).openStream();
- FileUtils.copyStream(inputStream, true, destination, true);
- return Status.OK_STATUS;
- } catch (IOException e) {
- return new Status(IStatus.ERROR, TestActivator.PI, ":-(", e);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java
deleted file mode 100644
index 1405e12c2..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchStepTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import java.io.*;
-import java.util.Arrays;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.processors.jbdiff.JBPatchStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-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.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.optimizers.OptimizerTest;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JBPatchStep</code>
- *
- */
-public class JBPatchStepTest extends OptimizerTest {
-
- public void testPatchEclipseExe32to33() throws IOException {
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/eclipse-3.2.exe");
- ProcessingStep patcher = new MockableJBPatchStep(repoMock);
- IProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
- ArtifactDescriptor context = new ArtifactDescriptor(key);
- patcher.initialize(getAgent(), descriptor, context);
-
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- patcher.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "eclipse-3.2-3.3.jbdiff");
- FileUtils.copyStream(inputStream, true, patcher, true);
-
- inputStream = TestData.get("optimizers", "eclipse-3.3.exe");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
- assertTrue(Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJBPatchStep extends JBPatchStep {
- public MockableJBPatchStep(IArtifactRepository repository) {
- super.repository = repository;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java
deleted file mode 100644
index c5c921916..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JBPatchZipStepTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import java.io.*;
-import java.util.Arrays;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.processors.jbdiff.JBPatchZipStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-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.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.optimizers.OptimizerTest;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the <code>JBPatchZipStep</code> processing step.
- */
-public class JBPatchZipStepTest extends OptimizerTest {
-
- // /**
- // * This is a disabled "unit test" that was used to generate the data needed for real test.
- // * @throws IOException
- // */
- // public void testGenerateTestData() throws IOException {
- //
- // File sar32 = TestData.getTempFile("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- // File sar33 = TestData.getTempFile("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- //
- // File diff = File.createTempFile("org.eclipse.jdt_3.2.0-3.3.0", ".jbdiff");
- // JBDiff.bsdiff(sar32, sar33, diff);
- // }
-
- /**
- * Test patching the <b>normalized</b> jars. This is indicated by the extension ".njar".
- *
- * @throws IOException
- */
- public void testPatchOrgEclipseJdt32to33() throws IOException {
-
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar");
- ProcessingStep patcher = new MockableJBPatchZipStep(repoMock);
- IProcessingStepDescriptor descriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.1"));
- ArtifactDescriptor context = new ArtifactDescriptor(key);
- patcher.initialize(getAgent(), descriptor, context);
-
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- patcher.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "org.eclipse.jdt_3.2.0-3.3.0.jbdiff");
- FileUtils.copyStream(inputStream, true, patcher, true);
-
- inputStream = TestData.get("optimizers", "org.eclipse.jdt_3.3.0.v20070607-1300.njar");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- assertTrue("Different resulting njar.", Arrays.equals(expected.toByteArray(), destination.toByteArray()));
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJBPatchZipStep extends JBPatchZipStep {
- public MockableJBPatchZipStep(IArtifactRepository repository) {
- super.repository = repository;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java
deleted file mode 100644
index 7ec8dc3c7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/artifact/processors/JarDeltaProcessorTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * compeople AG (Stefan Liebig)
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.artifact.processors;
-
-import java.io.*;
-import java.util.zip.ZipInputStream;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.processors.jardelta.JarDeltaProcessorStep;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-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.repository.artifact.spi.ArtifactDescriptor;
-import org.eclipse.equinox.p2.repository.artifact.spi.ProcessingStepDescriptor;
-import org.eclipse.equinox.p2.tests.artifact.optimizers.OptimizerTest;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-public class JarDeltaProcessorTest extends OptimizerTest {
-
- public JarDeltaProcessorTest(String name) {
- super(name);
- }
-
- public JarDeltaProcessorTest() {
- super("");
- }
-
- public void testProcessing() throws IOException {
- IArtifactRepository repoMock = ArtifactRepositoryMock.getMock("testData/optimizers/testdata_1.0.0.1.jar");
- ProcessingStep step = new MockableJarDeltaProcessorStep(repoMock);
- IProcessingStepDescriptor stepDescriptor = new ProcessingStepDescriptor("id", "ns,cl,id1,1.0.0.1", true);
- IArtifactKey key = new ArtifactKey("cl", "id1", Version.create("1.0.0.2"));
- ArtifactDescriptor descriptor = new ArtifactDescriptor(key);
- step.initialize(getAgent(), stepDescriptor, descriptor);
- ByteArrayOutputStream destination = new ByteArrayOutputStream();
- step.link(destination, new NullProgressMonitor());
-
- InputStream inputStream = TestData.get("optimizers", "testdata_1.0.0.1-2.jar");
- FileUtils.copyStream(inputStream, true, step, true);
- destination.close();
-
- inputStream = TestData.get("optimizers", "testdata_1.0.0.2.jar");
- ByteArrayOutputStream expected = new ByteArrayOutputStream();
- FileUtils.copyStream(inputStream, true, expected, true);
-
- ZipInputStream expectedJar = new ZipInputStream(new ByteArrayInputStream(expected.toByteArray()));
- ZipInputStream testJar = new ZipInputStream(new ByteArrayInputStream(destination.toByteArray()));
- TestData.assertEquals(expectedJar, testJar);
- expectedJar.close();
- testJar.close();
- }
-
- /**
- * Need to inject a repository!
- */
- private static class MockableJarDeltaProcessorStep extends JarDeltaProcessorStep {
- public MockableJarDeltaProcessorStep(IArtifactRepository repository) {
- super();
- this.repository = repository;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/AutomatedTests.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/AutomatedTests.java
deleted file mode 100644
index 54771de98..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/AutomatedTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.optimizers;
-
-import junit.framework.*;
-
-/**
- * @since 1.0
- */
-public class AutomatedTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AutomatedTests.class.getName());
- suite.addTest(org.eclipse.equinox.p2.tests.artifact.optimizers.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.artifact.processors.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.sar.AllTests.suite());
- return suite;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestActivator.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestActivator.java
deleted file mode 100644
index cd6876056..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestActivator.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.optimizers;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * @since 1.0
- */
-public class TestActivator implements BundleActivator {
-
- public static final String PI = "org.eclipse.equinox.p2.tests.optimizers"; //$NON-NLS-1$
- private static BundleContext bundleContext;
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
- }
-
- /* (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-
- public static BundleContext getContext() {
- return bundleContext;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestData.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestData.java
deleted file mode 100644
index 21567a481..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/optimizers/TestData.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- * Red Hat, Inc. (Andrew Overholt) - add getFile method
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.optimizers;
-
-import java.io.*;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import junit.framework.Assert;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.equinox.internal.p2.core.helpers.FileUtils;
-
-/**
- * <code>TestData</code> helps with handling of test data.
- */
-public class TestData {
-
- private static final String TEST_DATA_ROOT_FOLDER = "testData";
- private static final String PREFIX_SEPERATOR = "~";
-
- /**
- * Get an input stream from the resource testDataName within the folder
- * testDataFolder of the testData folder of this project.
- * @param testDataFolder
- * @param testDataName
- * @return input stream for the test data
- * @throws IOException
- */
- public static InputStream get(String testDataFolder, String testDataName) throws IOException {
- return new BufferedInputStream(TestActivator.getContext().getBundle().getEntry(TEST_DATA_ROOT_FOLDER + "/" + testDataFolder + "/" + testDataName).openStream());
- }
-
- /**
- * Get a File from the resource testDataName within the folder
- * testDataFolder of the testData folder of this project.
- * @param testDataFolder
- * @return test data File
- * @throws IOException
- */
- public static File getFile(String testDataFolder, String testDataName) throws IOException {
- return new File(FileLocator.toFileURL(TestActivator.getContext().getBundle().getEntry(TEST_DATA_ROOT_FOLDER + "/" + testDataFolder + "/" + testDataName)).getPath());
- }
-
- /**
- * Create a temporary file for the test data. The temporary file will be deleted
- * when the jvm exists. If testDataName contains an extension this extension will
- * be used as suffix for the temporary file.
- * @param testDataFolder
- * @param testDataName
- * @return temporary file with test data
- * @throws IOException
- */
- public static File getTempFile(String testDataFolder, String testDataName) throws IOException {
- File temp = createTempFile(testDataName);
- OutputStream out = new FileOutputStream(temp);
- FileUtils.copyStream(get(testDataFolder, testDataName), true, out, true);
- return temp;
- }
-
- /**
- * Create a temporary file. This file will be deleted if the jvm exits.
- * If testDataName contains an extension this extension will be used as
- * suffix for the temporary file.
- * @param testDataName
- * @return temporary file
- * @throws IOException
- */
- public static File createTempFile(String testDataName) throws IOException {
- int i = testDataName.lastIndexOf('.');
- File temp = (i == -1) ? File.createTempFile(testDataName + PREFIX_SEPERATOR, ".tmp") : File.createTempFile(testDataName.substring(0, i) + PREFIX_SEPERATOR, testDataName.substring(i));
- temp.deleteOnExit();
- return temp;
- }
-
- /**
- * Assert equality of files.
- * @param expected
- * @param actual
- * @throws IOException
- */
- public static void assertEquals(File expected, File actual) throws IOException {
- Assert.assertEquals("Files have different lengths.", expected.length(), actual.length());
- TestData.assertEquals(new BufferedInputStream(new FileInputStream(expected)), new BufferedInputStream(new FileInputStream(actual)));
- }
-
- /**
- * Assert equality of input streams.
- * @param expected
- * @param actual
- * @throws IOException
- */
- public static void assertEquals(InputStream expected, InputStream actual) throws IOException {
- try {
- int readExpected = 0;
- int readActual = 0;
- int count = 0;
- while (readActual != -1 && readExpected != -1) {
- readActual = actual.read();
- readExpected = expected.read();
- Assert.assertEquals("Different bytes at " + count, readExpected, readActual);
- count++;
- }
- } finally {
- if (expected != null)
- expected.close();
- if (actual != null)
- actual.close();
- }
- }
-
- /**
- * Assert equality of zip input streams.
- * @param input1
- * @param input2
- * @throws IOException
- */
- public static void assertEquals(ZipInputStream input1, ZipInputStream input2) throws IOException {
- Map jar1 = getEntries(input1);
- Map jar2 = getEntries(input2);
- for (Iterator i = jar1.keySet().iterator(); i.hasNext();) {
- String name = (String) i.next();
- Object[] file1 = (Object[]) jar1.get(name);
- Object[] file2 = (Object[]) jar2.remove(name);
- Assert.assertNotNull(file2);
-
- ZipEntry entry1 = (ZipEntry) file1[0];
- ZipEntry entry2 = (ZipEntry) file2[0];
- // compare the entries
- Assert.assertTrue(entry1.getName().equals(entry2.getName()));
- Assert.assertTrue(entry1.getSize() == entry2.getSize());
- // TODO for now skip over the timestamp as they seem to be different
- // assertTrue(entry1.getTime() == entry2.getTime());
- Assert.assertTrue(entry1.isDirectory() == entry2.isDirectory());
- Assert.assertTrue(entry1.getCrc() == entry2.getCrc());
- Assert.assertTrue(entry1.getMethod() == entry2.getMethod());
-
- // check the content of the entries
- Assert.assertTrue(Arrays.equals((byte[]) file1[1], (byte[]) file2[1]));
- }
-
- // ensure that we have consumed all of the entries in the second JAR
- Assert.assertTrue(jar2.size() == 0);
- }
-
- private static Map getEntries(ZipInputStream input) throws IOException {
- Map result = new HashMap();
- while (true) {
- ZipEntry entry = input.getNextEntry();
- if (entry == null)
- return result;
-
- ByteArrayOutputStream content = new ByteArrayOutputStream();
- FileUtils.copyStream(input, false, content, true);
- input.closeEntry();
- result.put(entry.getName(), new Object[] {entry, content.toByteArray()});
- }
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/AllTests.java
deleted file mode 100644
index 172fd682f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/AllTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.sar;
-
-import junit.framework.*;
-
-/**
- * Performs all sar tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(DirectByteArrayOutputStreamTest.class);
- suite.addTestSuite(SarTest.class);
- suite.addTestSuite(SarEntryTest.class);
- return suite;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/DirectByteArrayOutputStreamTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/DirectByteArrayOutputStreamTest.java
deleted file mode 100644
index 576a8ec4d..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/DirectByteArrayOutputStreamTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.sar;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.Arrays;
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.sar.DirectByteArrayOutputStream;
-
-/**
- * Test the <code>DirectByteArrayOutputStream</code>
- */
-public class DirectByteArrayOutputStreamTest extends TestCase {
-
- private static final String JUST11BYTES = "just11bytes";
- private static final int ELEVEN = JUST11BYTES.getBytes().length;
-
- /**
- * Test the constraints of the DBAOS
- *
- * @throws IOException
- */
- public void testDBAOSConstraints() throws IOException {
- DirectByteArrayOutputStream out = new DirectByteArrayOutputStream(1024);
- out.write(JUST11BYTES.getBytes());
- assertEquals(ELEVEN, out.getBufferLength());
- assertEquals(ELEVEN, out.toByteArray().length);
- assertNotSame(out.toByteArray(), out.getBuffer());
- assertEquals(1024, out.getBuffer().length);
- assertEquals(JUST11BYTES, new String(out.getBuffer(), 0, out.getBufferLength()));
- ByteArrayInputStream in = out.getInputStream();
- assertEquals(ELEVEN, in.available());
- byte[] elevenBytes = new byte[ELEVEN];
- in.read(elevenBytes);
- assertTrue(Arrays.equals(JUST11BYTES.getBytes(), elevenBytes));
- assertEquals(-1, in.read());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarEntryTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarEntryTest.java
deleted file mode 100644
index 6ea0c2f8a..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarEntryTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.sar;
-
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.sar.SarEntry;
-
-public class SarEntryTest extends TestCase {
-
- public void testJavaToDosTimeAndBack() {
- final long minute = 1000l * 60l;
- long now = (System.currentTimeMillis() / minute) * minute;
- long dos = SarEntry.javaToDosTime(now);
- assertEquals(now, SarEntry.dosToJavaTime(dos));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarTest.java b/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarTest.java
deleted file mode 100644
index 8b8dcc383..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/src/org/eclipse/equinox/p2/tests/sar/SarTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG 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:
- * compeople AG (Stefan Liebig) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.sar;
-
-import java.io.*;
-import java.util.Arrays;
-import junit.framework.TestCase;
-import org.eclipse.equinox.internal.p2.sar.SarUtil;
-import org.eclipse.equinox.p2.tests.optimizers.TestData;
-
-/**
- * Test the sar stuff.
- */
-public class SarTest extends TestCase {
-
- // public void testGenerateTestDataNJarAndSarFromJar32() throws IOException {
- // InputStream jar32 = TestData.get("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.jar");
- // generateNJarAndSar("org.eclipse.jdt_3.2.0.v20060605-1400", jar32);
- // }
- //
- // public void testGenerateTestDataNJarAndSarFromJar33() throws IOException {
- // InputStream jar32 = TestData.get("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.jar");
- // generateNJarAndSar("org.eclipse.jdt_3.3.0.v20070607-1300", jar32);
- // }
- //
- // private void generateNJarAndSar(String name, InputStream jar) throws IOException {
- // File njar = File.createTempFile(name, ".njar");
- // OutputStream njarOut = new BufferedOutputStream(new FileOutputStream(njar));
- //
- // SarUtil.normalize(jar, njarOut);
- //
- // File sar = File.createTempFile(name, ".sar");
- // SarUtil.zipToSar(njar, sar);
- // }
-
- public void testJarToSarForJdt320() throws IOException {
- InputStream jdt320Jar = TestData.get("optimizers", "org.eclipse.jdt_3.2.0.v20060605-1400.njar");
- InputStream jdt320Sar = TestData.get("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- doJarToSar(jdt320Jar, jdt320Sar);
- }
-
- public void testSarToJarForJdt320() throws IOException {
- InputStream jdt320Sar = TestData.get("sar", "org.eclipse.jdt_3.2.0.v20060605-1400.sar");
- InputStream jdt320Jar = TestData.get("optimizers", "org.eclipse.jdt_3.2.0.v20060605-1400.njar");
- doSarToJar(jdt320Sar, jdt320Jar);
- }
-
- public void testJarToSarForJdt330() throws IOException {
- InputStream jdt330Jar = TestData.get("optimizers", "org.eclipse.jdt_3.3.0.v20070607-1300.njar");
- InputStream jdt330Sar = TestData.get("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- doJarToSar(jdt330Jar, jdt330Sar);
- }
-
- public void testSarToJarForJdt330() throws IOException {
- InputStream jdt330Sar = TestData.get("sar", "org.eclipse.jdt_3.3.0.v20070607-1300.sar");
- InputStream jdt330Jar = TestData.get("optimizers", "org.eclipse.jdt_3.3.0.v20070607-1300.njar");
- doSarToJar(jdt330Sar, jdt330Jar);
- }
-
- /**
- * @throws IOException
- */
- private void doJarToSar(InputStream jar, InputStream expectedSar) throws IOException {
- File sar = TestData.createTempFile("doJarToSar.sar");
- OutputStream sarOut = new BufferedOutputStream(new FileOutputStream(sar));
-
- SarUtil.zipToSar(jar, sarOut);
-
- InputStream sarIn = new BufferedInputStream(new FileInputStream(sar));
- TestData.assertEquals(sarIn, expectedSar);
- }
-
- /**
- * @throws IOException
- */
- private void doSarToJar(InputStream sar, InputStream expectedJar) throws IOException {
- File jar = TestData.createTempFile("doSarToJar.jar");
- OutputStream jarOut = new BufferedOutputStream(new FileOutputStream(jar));
-
- SarUtil.sarToZip(sar, jarOut);
-
- InputStream jarIn = new BufferedInputStream(new FileInputStream(jar));
- TestData.assertEquals(jarIn, expectedJar);
- }
-
- /**
- * @throws IOException
- */
- public void testZipToSarAndBack() throws IOException {
- File originalZipFile = TestData.getTempFile("sar", "test.zip");
- File sarFile = TestData.createTempFile("test.sar");
- File recreatedZipFile = TestData.createTempFile("test.zip");
-
- long before = System.currentTimeMillis();
- SarUtil.zipToSar(originalZipFile, sarFile);
- System.out.println("zipToSar took: " + (System.currentTimeMillis() - before));
-
- before = System.currentTimeMillis();
- SarUtil.sarToZip(sarFile, recreatedZipFile);
- System.out.println("sarToZip took: " + (System.currentTimeMillis() - before));
-
- TestData.assertEquals(originalZipFile, recreatedZipFile);
- }
-
- /**
- * @throws IOException
- */
- public void testNormalizeOnFiles() throws IOException {
- File alienZip = TestData.getTempFile("sar", "alien.zip");
-
- File normalizedAlienZip = TestData.createTempFile("normalizedalien.zip");
- SarUtil.normalize(alienZip, normalizedAlienZip);
-
- assertTrue(alienZip.length() != normalizedAlienZip.length());
-
- File renormalizedAlienZip = TestData.createTempFile("renormalizedalien.zip");
- SarUtil.normalize(normalizedAlienZip, renormalizedAlienZip);
-
- TestData.assertEquals(normalizedAlienZip, renormalizedAlienZip);
- }
-
- /**
- * @throws IOException
- */
- public void testNormalizeOnStreames() throws IOException {
- InputStream alienZip = TestData.get("sar", "alien.zip");
- ByteArrayOutputStream normalizedAlienZip = new ByteArrayOutputStream();
- ByteArrayOutputStream renormalizedAlienZip = new ByteArrayOutputStream();
- try {
- SarUtil.normalize(alienZip, normalizedAlienZip);
-
- SarUtil.normalize(new ByteArrayInputStream(normalizedAlienZip.toByteArray()), renormalizedAlienZip);
-
- assertTrue(Arrays.equals(normalizedAlienZip.toByteArray(), renormalizedAlienZip.toByteArray()));
- } finally {
- if (alienZip != null)
- alienZip.close();
- }
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/jarprocessor.jar.pack.gz b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/jarprocessor.jar.pack.gz
deleted file mode 100644
index f2df489b2..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/jarprocessor.jar.pack.gz
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz
deleted file mode 100644
index 9f52ad35f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/1_6/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2-3.3.jbdiff b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2-3.3.jbdiff
deleted file mode 100644
index deac744b8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2-3.3.jbdiff
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2.exe b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2.exe
deleted file mode 100644
index 7826d1ed8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.2.exe
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.3.exe b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.3.exe
deleted file mode 100644
index c5cd8f038..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/eclipse-3.3.exe
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar
deleted file mode 100644
index 0c809eeed..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz
deleted file mode 100644
index b586d3cc8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.equinox.app_1.0.100.v20071015.jar.pack.gz
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0-3.3.0.jbdiff b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0-3.3.0.jbdiff
deleted file mode 100644
index b920d53bb..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0-3.3.0.jbdiff
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar
deleted file mode 100644
index 41ee47bcc..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.2.0.v20060605-1400.njar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.3.0.v20070607-1300.njar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.3.0.v20070607-1300.njar
deleted file mode 100644
index 9deec2f0e..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/org.eclipse.jdt_3.3.0.v20070607-1300.njar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1-2.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1-2.jar
deleted file mode 100644
index 71a546b02..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1-2.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1.jar
deleted file mode 100644
index 49e7f90a2..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.1.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.2.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.2.jar
deleted file mode 100644
index 3515b0f46..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/optimizers/testdata_1.0.0.2.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/alien.zip b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/alien.zip
deleted file mode 100644
index 9872214cc..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/alien.zip
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.jar
deleted file mode 100644
index d674aef01..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.sar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.sar
deleted file mode 100644
index 0abfe3604..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.2.0.v20060605-1400.sar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.jar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.jar
deleted file mode 100644
index 9deec2f0e..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.sar b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.sar
deleted file mode 100644
index 842bb71f7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/org.eclipse.jdt_3.3.0.v20070607-1300.sar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/test.zip b/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/test.zip
deleted file mode 100644
index dde8b8440..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.optimizers/testData/sar/test.zip
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/.classpath b/bundles/org.eclipse.equinox.p2.tests.ui/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.tests.ui/.cvsignore b/bundles/org.eclipse.equinox.p2.tests.ui/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/.project b/bundles/org.eclipse.equinox.p2.tests.ui/.project
deleted file mode 100644
index c9255c38a..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.tests.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
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
deleted file mode 100644
index cffcd289d..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,354 +0,0 @@
-#Mon Mar 08 10:16:20 EST 2010
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=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.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=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=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
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index c72c9885b..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Tue Nov 13 12:02:11 EST 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/All p2 UI tests.launch b/bundles/org.eclipse.equinox.p2.tests.ui/All p2 UI tests.launch
deleted file mode 100644
index b8fa20175..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/All p2 UI tests.launch
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<booleanAttribute key="com.mountainminds.eclemma.core.INPLACE_INSTRUMENTATION" value="true"/>
-<listAttribute key="com.mountainminds.eclemma.core.INSTRUMENTATION_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.updatechecker/bin"/>
-<listEntry value="/org.eclipse.equinox.frameworkadmin.equinox/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.updatesite/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.core/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.extensionlocation/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.director.app/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.console/bin"/>
-<listEntry value="/org.eclipse.equinox.frameworkadmin/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.engine/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.exemplarysetup/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.metadata.repository/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.publisher/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.ui.sdk/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.directorywatcher/bin"/>
-<listEntry value="/org.eclipse.equinox.simpleconfigurator.manipulator/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.metadata/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.touchpoint.natives/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.artifact.repository/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.metadata.generator/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.jarprocessor/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.reconciler.dropins/bin"/>
-<listEntry value="/org.eclipse.equinox.simpleconfigurator/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.director/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.ui/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.garbagecollector/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.touchpoint.eclipse/bin"/>
-</listAttribute>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="false"/>
-<booleanAttribute key="generateProfile" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.equinox.p2.tests.ui.AutomatedTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.tests.ui"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.ui.browser@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.maven.ide.eclipse.editor.xml@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.pde.api.tools.ee.j2se14@default:false,aniefer.junit.headless@default:default,org.eclipse.ui.views@default:default,org.eclipse.team.core@default:default,org.maven.ide.eclipse.nexus_indexer@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.pde.ui@default:default,org.eclipse.pde.api.tools@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.eclipse.pde.ds.core@default:default,org.eclipse.core.databinding.beans@default:default,javax.servlet.jsp@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.search@default:default,org.eclipse.pde@default:default,com.mountainminds.eclemma.doc@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jdt.junit4.runtime@default:default,org.eclipse.ui.console@default:default,org.eclipse.jdt.ui@default:default,org.apache.jasper@default:default,org.eclipse.ui.editors@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.jdt.launching.ui.macosx@default:default,org.eclipse.jdt.apt.core@default:default,org.eclipse.jface.text@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.wst.common.emf@default:default,org.eclipse.core.resources@default:default,org.eclipse.ui.forms@default:default,org.mortbay.jetty.server@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.equinox.launcher.cocoa.macosx.x86_64@default:false,org.eclipse.pde.api.tools.ee.javase16@default:false,org.eclipse.pde.runtime@default:default,org.eclipse.swt.cocoa.macosx.x86_64@default:false,org.maven.ide.eclipse.maven_embedder@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.ant.launching@default:default,org.eclipse.team.svn.help@default:default,org.eclipse.equinox.simpleconfigurator@default:default,org.eclipse.pde.api.tools.ee.j2se15@default:false,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.wst.validation@default:default,org.eclipse.releng.tools@default:default,org.eclipse.help.base@default:default,org.apache.ant@default:default,org.eclipse.xsd@default:default,org.eclipse.update.configurator@3:true,org.eclipse.ui.externaltools@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.equinox.launcher@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.debug.ui@default:default,org.eclipse.jdt.launching.macosx@default:default,org.knoplerfish.httpconsole@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.core.filebuffers@default:default,org.maven.ide.eclipse.launching@default:default,org.eclipse.jface@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.team.svn@default:default,org.eclipse.jdt.apt.pluggable.core@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.maven.ide.eclipse@default:default,org.eclipse.ui@default:default,org.eclipse.help.ui@default:default,org.eclipse.swt@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.pde.api.tools.ee.osgiminimum10@default:false,org.eclipse.ui.ide@default:default,org.eclipse.team.ui@default:default,org.eclipse.help@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.ui.intro@default:default,javax.servlet@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.wst.xml.ui@default:default,org.eclipse.pde.ds.ui@default:default,org.eclipse.update.ui@default:default,org.eclipse.team.svn.core@default:default,org.eclipse.emf.common@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.core.commands@default:default,org.eclipse.pde.api.tools.ui@default:default,org.apache.xerces@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.osgi.services@default:default,org.eclipse.zest.core@default:default,org.apache.commons.codec@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.common@2:true,org.maven.ide.eclipse.refactoring@default:default,org.maven.ide.eclipse.maven_model_edit@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.pde.build@default:default,org.objectweb.asm@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.ant.ui@default:default,org.eclipse.help.appserver@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.runtime@default:true,com.mountainminds.eclemma.core@default:default,org.eclipse.jdt.debug.ui@default:default,com.mountainminds.eclemma.ui@default:default,org.eclipse.jgit@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.emf.common.ui@default:default,org.sat4j.pb@default:default,org.junit*3.8.2.v20090203-1005@default:default,org.eclipse.help.webapp@default:default,org.eclipse.jdt.junit.runtime@default:default,org.apache.commons.el@default:default,org.hamcrest.core@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.equinox.event@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.junit*4.8.1.v4_8_1_v20100114-1600@default:default,org.eclipse.ui.presentations.r21@default:default,org.eclipse.wst.xsd.core@default:default,org.eclipse.jdt.junit@default:default,org.eclipse.draw2d@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.cvs@default:default,org.eclipse.jdt.doc.isv@default:default,org.eclipse.jdt@default:default,org.eclipse.pde.ua.ui@default:default,com.ibm.icu@default:default,org.eclipse.platform@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ui.net@default:default,org.eclipse.platform.doc.user@default:default,org.eclipse.pde.api.tools.ee.j2se12@default:false,org.eclipse.compare.core@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.zest.layouts@default:default,org.eclipse.pde.api.tools.ee.osgiminimum11@default:false,org.eclipse.wst.xml.core@default:default,org.eclipse.core.expressions@default:default,org.eclipse.team.cvs.core@default:default,org.eclipse.pde.junit.runtime@default:default,org.eclipse.emf.edit@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.pde.api.tools.ee.j2se13@default:false,org.eclipse.core.boot@default:default,org.eclipse.sdk@default:default,org.eclipse.equinox.ds@1:true,org.eclipse.core.externaltools@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.debug.core@default:default,org.eclipse.osgi.util@default:default,Shape1@default:default,org.eclipse.jsch.core@default:default,org.eclipse.pde.ui.templates@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.pde.doc.user@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.compare@default:default,javax.xml@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.registry@default:default,org.sat4j.core@default:default,org.eclipse.pde.api.tools.ee.cdcfoundation11@default:false,org.eclipse.equinox.p2.ql@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.egit.ui@default:default,org.eclipse.wst.common.ui@default:default,com.jcraft.jsch@default:default,org.eclipse.egit.core@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.team.cvs.ssh2@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ui.workbench.compatibility@default:false,org.junit4@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.pde.core@default:default,org.eclipse.ant.core@default:default,org.maven.ide.eclipse.pr@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.http.registry@default:default,org.maven.ide.eclipse.editor@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.jdt.core@default:default,org.apache.lucene@default:default,org.eclipse.team.svn.ui@default:default,org.eclipse.wst.sse.ui@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.equinox.security.macosx@default:false,org.eclipse.text@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.maven.ide.eclipse.dependency_tree@default:default,org.eclipse.pde.api.tools.ee.cdcfoundation10@default:false,org.eclipse.rcp@default:default,org.polarion.eclipse.team.svn.connector.svnkit16@default:default,org.eclipse.update.core@default:default,org.eclipse.equinox.http.jetty@default:default,org.maven.ide.eclipse.archetype_common@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.jsch.ui@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.security.ui@default:default,org.apache.lucene.analysis@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.publisher@default:default,org.maven.ide.eclipse.jdt@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.pde.api.tools.ee.osgiminimum12@default:false,org.eclipse.egit@default:default,org.mortbay.jetty.util@default:default,org.eclipse.core.runtime.compatibility@default:default,org.apache.commons.logging@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.pde.api.tools.ee.jre11@default:false,org.eclipse.jdt.doc.user@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.preferences@default:default,org.apache.commons.httpclient@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.equinox.util@default:default,org.eclipse.core.filesystem@default:default,org.polarion.eclipse.team.svn.connector@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.update.scheduler@default:default,org.eclipse.pde.launching@default:default,org.eclipse.pde.ua.core@default:default,org.eclipse.osgi,org.eclipse.team.cvs.ui@default:default,org.apache.xml.serializer@default:default,org.eclipse.core.databinding@default:default,org.eclipse.jem.util@default:default,org.apache.xml.resolver@default:default,org.eclipse.jdt.apt.ui@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.equinox.p2.discovery@default:default,org.eclipse.equinox.p2.engine@default:default,ie.wombat.jbdiff.test@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.concurrent@default:default,org.eclipse.equinox.p2.console@default:default,org.eclipse.equinox.p2.testserver@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.sat4j.core@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.ui.ide@default:default,org.eclipse.equinox.p2.examples.rcp.prestartupdate@default:default,org.eclipse.equinox.p2.tests.ui@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.equinox.p2.artifact.processors@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.equinox.p2.afterthefact@default:default,org.easymock@default:default,org.eclipse.equinox.p2.tests.optimizers@default:default,org.eclipse.equinox.p2.sar@default:default,org.eclipse.equinox.p2.ui.admin@default:default,ie.wombat.jbdiff@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.pde.ui@default:default,org.eclipse.equinox.p2.tests.discovery@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.artifact.optimizers@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,com.sonatype.nexus.p2.installer.ui@default:default,org.eclipse.equinox.p2.reconciler.dropins@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.tests@default:default,org.eclipse.equinox.p2.discovery.compatibility@default:default,org.eclipse.pde@default:default,org.eclipse.test.performance@default:default,org.eclipse.wst.server.discovery@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.equinox.p2.tests.verifier@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.examples.rcp.cloud@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.p2.ui.discovery@default:default,org.apache.commons.codec@default:default,org.eclipse.platform.doc.isv@default:default,org.eclipse.core.tests.harness@default:default,org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.apache.commons.logging@default:default,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.pde.build.tests@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.frameworkadmin.test@default:default,org.eclipse.pde.build@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.p2.installer@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.metadata.generator@default:default,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.equinox.p2.diagnostic@default:default,org.eclipse.equinox.p2.ui.admin.rcp@default:default,org.eclipse.equinox.http@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.pde.ui.tests@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.ui.sdk@default:default,org.eclipse.equinox.p2.touchpoint.natives@default:default,org.apache.commons.httpclient@default:default,org.eclipse.pde.core@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
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
deleted file mode 100644
index af2a3c342..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.tests.ui
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.4.100",
- org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.100",
- org.eclipse.equinox.p2.ui;bundle-version="1.0.100",
- org.eclipse.core.tests.harness;bundle-version="3.4.0",
- org.eclipse.equinox.p2.core;bundle-version="1.0.100",
- org.eclipse.equinox.p2.engine;bundle-version="1.0.100",
- org.eclipse.equinox.p2.director;bundle-version="1.0.100",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.100",
- org.junit;bundle-version="3.8.0",
- org.eclipse.equinox.p2.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.tests;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.eclipse.equinox.internal.p2.ui.sdk,
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.p2.operations
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/about.html b/bundles/org.eclipse.equinox.p2.tests.ui/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/build.properties b/bundles/org.eclipse.equinox.p2.tests.ui/build.properties
deleted file mode 100644
index f2974a1b6..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# 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
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- test.xml
-src.includes = about.html
-javacWarnings..=-raw,-unchecked,-varargsCast
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/plugin.properties b/bundles/org.eclipse.equinox.p2.tests.ui/plugin.properties
deleted file mode 100644
index 08e7c4e65..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Tests (Incubation)
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/pom.xml b/bundles/org.eclipse.equinox.p2.tests.ui/pom.xml
deleted file mode 100644
index 9dcaf0c0d..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/pom.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version>
- <relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.tests.ui</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>org.eclipse.equinox.p2.tests.ui</testSuite>
- <testClass>org.eclipse.equinox.p2.tests.ui.AutomatedTests
- </testClass>
- <argLine>-Xmx512m -XstartOnFirstThread</argLine>
- <useUIHarness>true</useUIHarness>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
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
deleted file mode 100644
index 738d960ba..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AbstractProvisioningUITest.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui;
-
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-
-import java.io.File;
-import java.net.URI;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ColocatedRepositoryTracker;
-import org.eclipse.equinox.internal.p2.ui.model.ProfileElement;
-import org.eclipse.equinox.internal.p2.ui.sdk.SimpleLicenseManager;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.operations.*;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
-import org.eclipse.equinox.p2.tests.TestActivator;
-import org.eclipse.equinox.p2.ui.*;
-import org.osgi.framework.Constants;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * Abstract class to set up the colocated UI test repo
- */
-public abstract class AbstractProvisioningUITest extends AbstractProvisioningTest {
-
- protected static final String TEST_REPO_PATH = "testRepos/updateSite/";
- protected static final String TESTPROFILE = "TestProfile";
- protected static final String TOPLEVELIU = "TopLevelIU";
- protected static final String TOPLEVELIU2 = "TopLevelIU2";
- protected static final String NESTEDIU = "NestedIU";
- protected static final String LOCKEDIU = "LockedIU";
- protected static final String UNINSTALLEDIU = "UninstalledIU";
- protected static final String CATEGORYIU = "CategoryIU";
- protected IMetadataRepositoryManager metaManager;
- protected IArtifactRepositoryManager artifactManager;
- protected URI testRepoLocation;
- protected IProfile profile;
- protected ProfileElement profileElement;
- protected IInstallableUnit top1;
- protected IInstallableUnit top2;
- protected IInstallableUnit nested;
- protected IInstallableUnit locked;
- protected IInstallableUnit upgrade;
- protected IInstallableUnit uninstalled;
- protected IInstallableUnit category;
- private ProvisioningUI ui;
- private ServiceRegistration regLicenseManager, regTracker;
-
- protected void setUp() throws Exception {
- super.setUp();
- // create test profile
- profile = createProfile(TESTPROFILE);
-
- // copy of provisioning UI that uses a different profile
- ui = ProvisioningUI.getDefaultUI();
- ui = new ProvisioningUI(ui.getSession(), TESTPROFILE, ui.getPolicy());
- ui.getOperationRunner().suppressRestart(true);
- ui.getPolicy().setRepositoriesVisible(false);
-
- // register alternate services
- SimpleLicenseManager manager = new SimpleLicenseManager(TESTPROFILE);
- RepositoryTracker tracker = new ColocatedRepositoryTracker(ui);
- Dictionary<String, Object> properties = new Hashtable<String, Object>(5);
- properties.put(Constants.SERVICE_RANKING, new Integer(1));
- regLicenseManager = TestActivator.getContext().registerService(LicenseManager.class.getName(), manager, properties);
- regTracker = TestActivator.getContext().registerService(RepositoryTracker.class.getName(), tracker, properties);
-
- profileElement = new ProfileElement(null, TESTPROFILE);
- install((top1 = createIU(TOPLEVELIU, Version.create("1.0.0"))), true, false);
- install((top2 = createIU(TOPLEVELIU2)), true, false);
- install((nested = createIU(NESTEDIU)), false, false);
- install((locked = createIU(LOCKEDIU)), true, true);
- uninstalled = createIU(UNINSTALLEDIU);
- IUpdateDescriptor update = MetadataFactory.createUpdateDescriptor(TOPLEVELIU, new VersionRange("[1.0.0, 1.0.0]"), 0, "update description");
- upgrade = createIU(TOPLEVELIU, Version.createOSGi(2, 0, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
-
- category = createNamedIU(CATEGORYIU, CATEGORYIU, Version.create("1.0.0"), true);
- createTestMetdataRepository(new IInstallableUnit[] {top1, top2, uninstalled, upgrade});
-
- metaManager = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- artifactManager = (IArtifactRepositoryManager) getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
- File site = new File(TestActivator.getTestDataFolder().toString(), TEST_REPO_PATH);
- testRepoLocation = site.toURI();
- metaManager.addRepository(testRepoLocation);
- artifactManager.addRepository(testRepoLocation);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- metaManager.removeRepository(testRepoLocation);
- artifactManager.removeRepository(testRepoLocation);
- regLicenseManager.unregister();
- regTracker.unregister();
- }
-
- protected boolean managerContains(IRepositoryManager<?> manager, URI location) {
- URI[] locations = manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- for (int i = 0; i < locations.length; i++) {
- if (locations[i].equals(location))
- return true;
- }
- return false;
- }
-
- protected ProvisioningSession getSession() {
- return ui.getSession();
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ui;
- }
-
- protected Policy getPolicy() {
- return ui.getPolicy();
- }
-
- protected IStatus install(IInstallableUnit iu, boolean root, boolean lock) throws ProvisionException {
- ProfileChangeRequest req = new ProfileChangeRequest(profile);
- req.add(iu);
- if (root) {
- req.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
- }
- if (lock) {
- req.setInstallableUnitProfileProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU, new Integer(IProfile.LOCK_UNINSTALL | IProfile.LOCK_UPDATE).toString());
- }
- // Use an empty provisioning context to prevent repo access
- ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {});
- IProvisioningPlan plan = getPlanner(getSession().getProvisioningAgent()).getProvisioningPlan(req, context, getMonitor());
- if (plan.getStatus().getSeverity() == IStatus.ERROR || plan.getStatus().getSeverity() == IStatus.CANCEL)
- return plan.getStatus();
- return getSession().performProvisioningPlan(plan, PhaseSetFactory.createDefaultPhaseSet(), new ProvisioningContext(getAgent()), getMonitor());
- }
-
- protected IInstallableUnit createNamedIU(String id, String name, Version version, boolean isCategory) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setId(id);
- iu.setVersion(version);
- iu.setProperty(IInstallableUnit.PROP_NAME, name);
- if (isCategory)
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, Boolean.toString(true));
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- protected ProfileModificationJob getLongTestOperation() {
- return new ProfileModificationJob("Test Operation", getSession(), TESTPROFILE, null, null) {
- public IStatus runModal(IProgressMonitor monitor) {
- while (true) {
- // spin unless cancelled
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- }
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java
deleted file mode 100644
index 3bf03d037..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/AutomatedTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui;
-
-import junit.framework.*;
-
-/**
- * This is the master test suite for all automated provisioning UI tests. It runs every test
- * that is suitable for running in an automated fashion as part of a build.
- */
-public class AutomatedTests extends TestCase {
- public static Test suite() {
- TestSuite suite = new TestSuite(AutomatedTests.class.getName());
- suite.addTest(org.eclipse.equinox.p2.tests.ui.operations.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.ui.query.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.ui.actions.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.ui.dialogs.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.ui.misc.AllTests.suite());
- suite.addTest(org.eclipse.equinox.p2.tests.ui.repohandling.AllTests.suite());
- return suite;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ActionTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ActionTest.java
deleted file mode 100644
index e3ec79edd..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ActionTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.actions;
-
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-import org.eclipse.jface.viewers.*;
-
-/**
- * Abstract class for UI action tests
- */
-public abstract class ActionTest extends AbstractProvisioningUITest {
- protected ISelectionProvider getSelectionProvider(final Object[] selections) {
-
- return new ISelectionProvider() {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- // Ignore because the selection won't change
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- */
- public ISelection getSelection() {
- return new StructuredSelection(selections);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore because the selection is static
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
- */
- public void setSelection(ISelection sel) {
- throw new UnsupportedOperationException("This ISelectionProvider is static, and cannot be modified."); //$NON-NLS-1$
- }
- };
- }
-
- protected Object[] getEmptySelection() {
- return new Object[0];
- }
-
- protected Object[] getInvalidSelection() {
- return new Object[] {new Object(), new Object()};
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/AllTests.java
deleted file mode 100644
index ecb8f5727..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/AllTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.actions;
-
-import junit.framework.*;
-
-/**
- * Performs all UI action tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(UninstallActionTest.class);
- suite.addTestSuite(UpdateActionTest.class);
- suite.addTestSuite(RemoveColocatedRepositoryActionTest.class);
- suite.addTestSuite(ElementUtilsTest.class);
- return suite;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ColocatedRepositoryActionTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ColocatedRepositoryActionTest.java
deleted file mode 100644
index bd85d4a6e..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ColocatedRepositoryActionTest.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-
-/**
- * Abstract class to set up the colocated UI test repo
- */
-public abstract class ColocatedRepositoryActionTest extends ActionTest {
-
- protected Object[] getValidRepoSelection() {
- return new MetadataRepositoryElement[] {new MetadataRepositoryElement(null, testRepoLocation, 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
deleted file mode 100644
index b3022ff2d..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ElementUtilsTest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.tests.ui.actions;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @since 3.5
- *
- */
-public class ElementUtilsTest extends ProfileModificationActionTest {
-
- public void testEmpty() {
- assertEquals(getEmptySelection().length, ElementUtils.elementsToIUs(getEmptySelection()).size());
- }
-
- public void testInvalid() {
- assertTrue(ElementUtils.elementsToIUs(getInvalidSelection()).size() == 0);
- }
-
- public void testIUs() {
- assertEquals(getTopLevelIUs().length, ElementUtils.elementsToIUs(getTopLevelIUs()).size());
- }
-
- public void testElements() {
- assertEquals(getTopLevelIUElements().length, ElementUtils.elementsToIUs(getTopLevelIUElements()).size());
- }
-
- public void testMixedIUsAndNonIUs() {
- assertTrue(getMixedIUsAndNonIUs().length != ElementUtils.elementsToIUs(getMixedIUsAndNonIUs()).size());
- }
-
- public void testMixedIUsAndElements() {
- assertEquals(getMixedIUsAndElements().length, ElementUtils.elementsToIUs(getMixedIUsAndElements()).size());
- }
-
- public void testUpdateUsingElements() throws URISyntaxException {
- // Two visible repos, one is added, the other is not
- URI known1 = new URI("http://example.com/known1");
- URI known2 = new URI("http://example.com/known2");
- IMetadataRepositoryManager manager = getMetadataRepositoryManager();
- manager.addRepository(known1);
-
- // Add system repos that should not be known or affected by ElementUtils
- // One is an enabled system repo, one is disabled system repo
- URI uri = new URI("http://example.com/1");
- URI uri2 = new URI("http://example.com/2");
- manager.addRepository(uri);
- manager.setRepositoryProperty(uri, IRepository.PROP_SYSTEM, Boolean.toString(true));
- manager.addRepository(uri2);
- getArtifactRepositoryManager().addRepository(uri2);
- manager.setRepositoryProperty(uri2, IRepository.PROP_SYSTEM, Boolean.toString(true));
- manager.setEnabled(uri2, false);
- getArtifactRepositoryManager().setEnabled(uri2, false);
-
- List children = new ArrayList();
- children.add(new MetadataRepositoryElement(null, known1, true));
- // Add known2, this is as if a user added it in the pref page
- children.add(new MetadataRepositoryElement(null, known2, true));
- MetadataRepositoryElement[] elements = (MetadataRepositoryElement[]) children.toArray(new MetadataRepositoryElement[children.size()]);
-
- // Add a visible repo not known by the elements
- URI uri3 = new URI("http://example.com/3");
- manager.addRepository(uri3);
-
- // Now update the repo using the elements.
- // We expect known2 to get added because it was in the elements
- // We expect uri3 to get removed (as if it had been removed from a pref page)
- // System repos shouldn't be touched
-
- ElementUtils.updateRepositoryUsingElements(elements, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
-
- URI[] enabled = getMetadataRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- URI[] disabled = getMetadataRepositoryManager().getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED);
-
- boolean foundKnown1 = false;
- boolean foundKnown2 = false;
- boolean found1 = false;
- boolean found2 = false;
- boolean found3 = false;
-
- for (int i = 0; i < enabled.length; i++) {
- if (enabled[i].equals(known1))
- foundKnown1 = true;
- if (enabled[i].equals(known2))
- foundKnown2 = true;
- if (enabled[i].equals(uri))
- found1 = true;
- if (enabled[i].equals(uri2))
- found2 = true;
- if (enabled[i].equals(uri3))
- found3 = true;
- }
- for (int i = 0; i < disabled.length; i++) {
- if (disabled[i].equals(known1))
- foundKnown1 = true;
- if (disabled[i].equals(known2))
- foundKnown2 = true;
- if (disabled[i].equals(uri))
- found1 = true;
- if (disabled[i].equals(uri2))
- found2 = true;
- if (disabled[i].equals(uri3))
- found3 = true;
- }
- assertTrue("1.0", found1); // Enabled system repo still exists
- assertTrue("1.1", found2); // Disabled system repo still exists
- assertFalse("1.2", found3); // Enabled repo not known by elements was deleted
- assertTrue("1.3", foundKnown1); // Enabled visible repo still exists
- assertTrue("1.4", foundKnown2); // Enabled visible repo in elements was added
-
- // cleanup
- manager.removeRepository(known1);
- manager.removeRepository(known2);
- manager.removeRepository(uri);
- manager.removeRepository(uri2);
- getArtifactRepositoryManager().removeRepository(uri2);
- manager.removeRepository(uri3);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java
deleted file mode 100644
index 5600fb3cb..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * Abstract class to set up different IU selection combinations
- */
-public abstract class ProfileModificationActionTest extends ActionTest {
- protected IInstallableUnit[] getMixedIUs() {
- return new IInstallableUnit[] {top1, top2, nested};
- }
-
- protected Object[] getCategoryAndChildIUElements() {
- CategoryElement element = new CategoryElement(null, category);
- AvailableIUElement child = new AvailableIUElement(element, uninstalled, TESTPROFILE, true);
- return new Object[] {element, child};
- }
-
- protected Object[] getNestedCategoriesAndChildIUElements() {
- CategoryElement element = new CategoryElement(null, category);
- CategoryElement nested = new CategoryElement(element, category);
- AvailableIUElement child = new AvailableIUElement(nested, uninstalled, TESTPROFILE, true);
- return new Object[] {element, nested, child};
- }
-
- protected IInstallableUnit[] getTopLevelIUs() {
- return new IInstallableUnit[] {top1, top2};
- }
-
- protected IInstallableUnit[] getTopLevelIUsWithLockedIU() {
- return new IInstallableUnit[] {top1, top2, locked};
- }
-
- protected IIUElement[] getTopLevelIUElements() {
- return new IIUElement[] {element(top1), element(top2)};
- }
-
- protected Object[] getMixedIUElements() {
- return new IIUElement[] {element(top1), element(top2), element(nested)};
- }
-
- protected Object[] getTopLevelIUElementsWithLockedIU() {
- return new IIUElement[] {element(top1), element(top2), element(locked)};
- }
-
- protected Object[] getMixedIUsAndElements() {
- return new Object[] {top1, element(top2)};
- }
-
- protected Object[] getMixedIUsAndNonIUs() {
- return new Object[] {top1, top2, new Object()};
- }
-
- protected Object[] getNonIUSelection() {
- return getInvalidSelection();
- }
-
- protected IIUElement element(IInstallableUnit iu) {
- return new InstalledIUElement(profileElement, profile.getProfileId(), iu);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/RemoveColocatedRepositoryActionTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/RemoveColocatedRepositoryActionTest.java
deleted file mode 100644
index 687fe0952..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/RemoveColocatedRepositoryActionTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.actions.RemoveColocatedRepositoryAction;
-
-public class RemoveColocatedRepositoryActionTest extends ColocatedRepositoryActionTest {
- public void testEmptySelection() {
- RemoveColocatedRepositoryAction action = new RemoveColocatedRepositoryAction(getProvisioningUI(), getSelectionProvider(getEmptySelection()));
- assertFalse("Should not be enabled with empty selection", action.isEnabled());
- }
-
- public void testInvalidSelection() {
- RemoveColocatedRepositoryAction action = new RemoveColocatedRepositoryAction(getProvisioningUI(), getSelectionProvider(getInvalidSelection()));
- assertFalse("Should not be enabled with invalid selection", action.isEnabled());
- }
-
- public void testRemoveRepo() {
- assertTrue(managerContains(metaManager, testRepoLocation));
- assertTrue(managerContains(artifactManager, testRepoLocation));
-
- RemoveColocatedRepositoryAction action = new RemoveColocatedRepositoryAction(getProvisioningUI(), getSelectionProvider(getValidRepoSelection()));
- assertTrue("Should be enabled", action.isEnabled());
- action.run();
-
- // Action runs asynchronously so these tests don't apply.
- // Right now this test is only testing enablement and the ability to run
- // assertFalse(managerContains(metaManager, testRepoLocation));
- // assertFalse(managerContains(artifactManager, testRepoLocation));
- }
-}
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
deleted file mode 100644
index 9aaf340b2..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UninstallActionTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-
-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;
-
-/**
- * @since 3.5
- *
- */
-public class UninstallActionTest extends ProfileModificationActionTest {
- class TestUninstallAction extends UninstallAction {
- TestUninstallAction(Object[] sel) {
- super(UninstallActionTest.this.getProvisioningUI(), UninstallActionTest.this.getSelectionProvider(sel), profile.getProfileId());
- }
-
- public List<IInstallableUnit> getSelectedIUs() {
- return super.getSelectedIUs();
- }
- }
-
- public void testLockedElements() {
- TestUninstallAction action = new TestUninstallAction(getTopLevelIUElementsWithLockedIU());
- assertFalse("Should not be enabled with locked elements", action.isEnabled());
- 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().size());
- }
-
- public void testEmptySelection() {
- TestUninstallAction action = new TestUninstallAction(getEmptySelection());
- assertFalse("Should not be enabled with empty selection", action.isEnabled());
- assertEquals(0, action.getSelectedIUs().size());
- }
-
- public void testTopLevelIUs() {
- TestUninstallAction action = new TestUninstallAction(getTopLevelIUs());
- assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testTopLevelElements() {
- TestUninstallAction action = new TestUninstallAction(getTopLevelIUElements());
- assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testNestedIUs() {
- TestUninstallAction action = new TestUninstallAction(getMixedIUs());
- assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testNestedElements() {
- TestUninstallAction action = new TestUninstallAction(getMixedIUElements());
- assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testMixedIUsAndNonIUs() {
- TestUninstallAction action = new TestUninstallAction(getMixedIUsAndNonIUs());
- assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testMixedIUsAndElements() {
- TestUninstallAction action = new TestUninstallAction(getMixedIUsAndElements());
- assertTrue("Should be enabled", action.isEnabled());
- 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
deleted file mode 100644
index 66d36c331..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/UpdateActionTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-
-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;
-
-/**
- * @since 3.5
- *
- */
-public class UpdateActionTest extends ProfileModificationActionTest {
- class TestUpdateAction extends UpdateAction {
- TestUpdateAction(Object[] sel) {
- super(UpdateActionTest.this.getProvisioningUI(), UpdateActionTest.this.getSelectionProvider(sel), profile.getProfileId(), true);
- }
-
- public List<IInstallableUnit> getSelectedIUs() {
- return super.getSelectedIUs();
- }
- }
-
- public void testLockedElements() {
- TestUpdateAction action = new TestUpdateAction(getTopLevelIUElementsWithLockedIU());
- assertFalse("Should not be enabled with locked elements", action.isEnabled());
- 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().size());
- }
-
- public void testEmptySelection() {
- TestUpdateAction action = new TestUpdateAction(getEmptySelection());
- assertFalse("Should not be enabled with empty selection", action.isEnabled());
- assertEquals(0, action.getSelectedIUs().size());
- }
-
- public void testTopLevelIUs() {
- TestUpdateAction action = new TestUpdateAction(getTopLevelIUs());
- assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testTopLevelElements() {
- TestUpdateAction action = new TestUpdateAction(getTopLevelIUElements());
- assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testNestedIUs() {
- TestUpdateAction action = new TestUpdateAction(getMixedIUs());
- assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testNestedElements() {
- TestUpdateAction action = new TestUpdateAction(getMixedIUElements());
- assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testMixedIUsAndNonIUs() {
- TestUpdateAction action = new TestUpdateAction(getMixedIUsAndNonIUs());
- assertFalse("Should not enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-
- public void testMixedIUsAndElements() {
- TestUpdateAction action = new TestUpdateAction(getMixedIUsAndElements());
- assertTrue("Should be enabled", action.isEnabled());
- assertEquals(2, action.getSelectedIUs().size());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/AllTests.java
deleted file mode 100644
index 7b6fc4d15..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/AllTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.dialogs;
-
-import junit.framework.*;
-
-/**
- * Performs all UI wizard and dialog tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(InstallWizardTest.class);
- suite.addTestSuite(InstalledSoftwarePageTest.class);
- suite.addTestSuite(InstallationHistoryPageTest.class);
- suite.addTestSuite(UpdateWizardTest.class);
- suite.addTestSuite(UninstallWizardTest.class);
- suite.addTestSuite(RepositoryManipulationPageTest.class);
- suite.addTestSuite(IUPropertyPagesTest.class);
- suite.addTestSuite(PreferencePagesTest.class);
- return suite;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/IUPropertyPagesTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/IUPropertyPagesTest.java
deleted file mode 100644
index 7cb8113fa..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/IUPropertyPagesTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.dialogs;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.dialogs.PropertyDialog;
-
-/**
- * Tests for the install wizard
- */
-public class IUPropertyPagesTest extends AbstractProvisioningUITest {
-
- private static final String GENERAL = "org.eclipse.equinox.p2.ui.sdk.IUGeneralInfoPropertyPage";
- private static final String COPYRIGHT = "org.eclipse.equinox.p2.ui.sdk.IUCopyrightPropertyPage";
- private static final String LICENSE = "org.eclipse.equinox.p2.ui.sdk.IULicensePropertyPage";
-
- public void testGeneralPage() throws URISyntaxException {
- PropertyDialog dialog = PropertyDialog.createDialogOn(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), GENERAL, getIU());
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- // nothing yet
- } finally {
- dialog.close();
- }
- }
-
- public void testCopyrightPage() throws URISyntaxException {
- PropertyDialog dialog = PropertyDialog.createDialogOn(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), COPYRIGHT, getIU());
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- // nothing yet
- } finally {
- dialog.close();
- }
- }
-
- public void testLicensePage() throws URISyntaxException {
- PropertyDialog dialog = PropertyDialog.createDialogOn(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), LICENSE, getIU());
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- // nothing yet
- } finally {
- dialog.close();
- }
- }
-
- private IInstallableUnit getIU() throws URISyntaxException {
- InstallableUnitDescription iuDescription = new InstallableUnitDescription();
- iuDescription.setId("TestIU");
- iuDescription.setVersion(Version.createOSGi(1, 0, 0));
- iuDescription.setProperty(IInstallableUnit.PROP_PROVIDER, "Test Cases");
- iuDescription.setProperty(IInstallableUnit.PROP_DESCRIPTION, "A description");
- iuDescription.setProperty(IInstallableUnit.PROP_NAME, "The Biggest Baddest Test IU");
- iuDescription.setLicenses(new ILicense[] {MetadataFactory.createLicense(new URI("http://example.com"), "This is an example license")});
- iuDescription.setCopyright(MetadataFactory.createCopyright(new URI("http://example.com"), "This is an example copyright"));
- return MetadataFactory.createInstallableUnit(iuDescription);
- }
-}
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
deleted file mode 100644
index 180f619d7..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.dialogs;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-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.p2.metadata.*;
-import org.eclipse.equinox.p2.operations.InstallOperation;
-import org.eclipse.equinox.p2.operations.ProfileModificationJob;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Tests for the install wizard
- */
-public class InstallWizardTest extends WizardTest {
-
- private static final String SELECTION_PAGE = "IUSelectionPage";
- private static final String AVAILABLE_SOFTWARE_PAGE = "AvailableSoftwarePage";
- private static final String MAIN_IU = "MainIU";
-
- IInstallableUnit toInstall;
-
- protected void setUp() throws Exception {
- super.setUp();
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setId(MAIN_IU);
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_GROUP, "true");
- iu.setVersion(Version.createOSGi(1, 0, 0));
- iu.setSingleton(true);
- iu.setLicenses(new ILicense[] {new License(null, "There is a license to accept!", null)});
- iu.setCapabilities(new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, MAIN_IU, iu.getVersion())});
- toInstall = MetadataFactory.createInstallableUnit(iu);
- createTestMetdataRepository(new IInstallableUnit[] {toInstall});
- }
-
- public void testInstallWizardResolved() {
- ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- iusInvolved.add(toInstall);
- InstallOperation op = new InstallOperation(getSession(), iusInvolved);
- op.setProfileId(TESTPROFILE);
- PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null);
- ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- dialog.setBlockOnOpen(false);
- dialog.open();
- ProfileModificationJob longOp = null;
-
- try {
- SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- // should already have a plan
- assertTrue("1.0", page1.isPageComplete());
- // simulate the next button by getting next page and showing
- IWizardPage page = page1.getNextPage();
- dialog.showPage(page);
- // we should be ok
- assertTrue("1.1", page.isPageComplete());
-
- // if another operation is scheduled for this profile, we should not be allowed to proceed
- longOp = getLongTestOperation();
- getProvisioningUI().schedule(longOp, StatusManager.LOG);
- // causes recalculation of plan and status
- wizard.recomputePlan(dialog);
- // can't move to next page while op is running
- assertFalse("1.2", page.isPageComplete());
- longOp.cancel();
-
- // op is no longer running, recompute plan
- wizard.recomputePlan(dialog);
-
- // license needs approval
- assertFalse("1.4", wizard.canFinish());
- // finish button should be disabled
- dialog.updateButtons();
- Button finishButton = dialog.testGetButton(IDialogConstants.FINISH_ID);
- assertFalse("1.5", finishButton.isEnabled());
- } finally {
- dialog.getShell().close();
- if (longOp != null)
- longOp.cancel();
- }
- }
-
- /**
- * Tests the wizard
- */
- public void testInstallWizardUnresolved() {
- LoadMetadataRepositoryJob job = new LoadMetadataRepositoryJob(getProvisioningUI());
- getPolicy().setGroupByCategory(false);
- job.runModal(getMonitor());
- InstallWizard wizard = new InstallWizard(getProvisioningUI(), null, null, job);
- WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
-
- dialog.create();
- dialog.setBlockOnOpen(false);
- dialog.open();
-
- ProfileModificationJob longOp = null;
-
- try {
- AvailableIUsPage page1 = (AvailableIUsPage) wizard.getPage(AVAILABLE_SOFTWARE_PAGE);
-
- // test initial wizard state
- assertTrue("1.0", page1.getSelectedIUs().size() == 0);
- assertFalse("1.1", page1.isPageComplete());
-
- // Start reaching in...
- AvailableIUGroup group = page1.testGetAvailableIUGroup();
- group.setRepositoryFilter(AvailableIUGroup.AVAILABLE_ALL, null);
- // Now manipulate the tree itself. we are reaching way in.
- // We are trying to select everything in the repo apart from the IU we know is broken
- DeferredQueryContentProvider provider = (DeferredQueryContentProvider) group.getCheckboxTreeViewer().getContentProvider();
- provider.setSynchronous(true);
- group.getCheckboxTreeViewer().refresh();
- group.getCheckboxTreeViewer().expandAll();
- Tree tree = (Tree) group.getCheckboxTreeViewer().getControl();
- TreeItem[] items = tree.getItems();
- for (int i = 0; i < items.length; i++) {
- Object element = items[i].getData();
- if (element != null && element instanceof IIUElement) {
- IInstallableUnit iu = ((IIUElement) element).getIU();
- if (iu != null && iu.getId().equals(MAIN_IU)) {
- group.getCheckboxTreeViewer().setChecked(element, true);
- }
- }
- }
- // must be done this way to force notification of listeners
- group.setChecked(group.getCheckboxTreeViewer().getCheckedElements());
- assertTrue("2.0", group.getCheckedLeafIUs().length > 0);
- assertTrue("2.1", page1.isPageComplete());
-
- // simulate the user clicking next
- IWizardPage page = wizard.getNextPage(page1);
- dialog.showPage(page);
- assertTrue("3.0", page.isPageComplete());
-
- // if another operation is scheduled for this profile, we should not be allowed to proceed
- longOp = getLongTestOperation();
- getProvisioningUI().schedule(longOp, StatusManager.LOG);
- // causes recalculation of plan and status
- wizard.recomputePlan(dialog);
- // can't move to next page while op is running
- assertFalse("3.1", page.isPageComplete());
- longOp.cancel();
-
- // this doesn't test much, it's just calling group API to flesh out NPE's, etc.
- group.getCheckedLeafIUs();
- group.getDefaultFocusControl();
- group.getSelectedIUElements();
- group.getSelectedIUs();
-
- } finally {
- dialog.close();
- if (longOp != null)
- longOp.cancel();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallationHistoryPageTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallationHistoryPageTest.java
deleted file mode 100644
index d42834fba..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallationHistoryPageTest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.dialogs;
-
-import java.lang.reflect.Field;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePageWithCompare;
-import org.eclipse.equinox.internal.p2.ui.viewers.ProvElementContentProvider;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-import org.eclipse.equinox.p2.ui.RevertProfilePage;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.AbstractTableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Tests for the Installation History page.
- * If nothing else, this test ensures that installation history can be hosted
- * somewhere besides the about dialog
- */
-public class InstallationHistoryPageTest extends AbstractProvisioningUITest {
- volatile int jobs;
- volatile int done;
-
- class TestDialog extends Dialog {
- RevertProfilePage page;
-
- TestDialog() {
- super(ProvUI.getDefaultParentShell());
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- page = new RevertProfilePage();
- page.createControl(composite);
- return composite;
- }
- }
-
- class TestDialog2 extends Dialog {
- RevertProfilePageWithCompare page;
-
- TestDialog2() {
- super(ProvUI.getDefaultParentShell());
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- page = new RevertProfilePageWithCompare();
- page.createControl(composite);
- return composite;
- }
- }
-
- /**
- * Hammers the background fetch
- */
- public void disabledtestDialogBackgroundFetch() {
- TestDialog dialog = new TestDialog();
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- Field viewerField = RevertProfilePage.class.getDeclaredField("configsViewer");
- viewerField.setAccessible(true);
- AbstractTableViewer viewer = (AbstractTableViewer) viewerField.get(dialog.page);
- ProvElementContentProvider provider = (ProvElementContentProvider) viewer.getContentProvider();
- Object input = viewer.getInput();
- Field jobField = ProvElementContentProvider.class.getDeclaredField("fetchJob");
- jobField.setAccessible(true);
- Field jobFamily = ProvElementContentProvider.class.getDeclaredField("fetchFamily");
- jobFamily.setAccessible(true);
-
- jobs = 0;
- done = 0;
- final Object family = jobFamily.get(provider);
-
- Job.getJobManager().addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent e) {
- if (e.getJob().belongsTo(family)) {
- done++;
- int status = e.getResult().getSeverity();
- if (status != IStatus.CANCEL && status != IStatus.OK) {
- // something unexpected happened.
- fail("Fetch job failed unexpectedly " + e.getResult().getMessage());
- }
- }
- }
- });
-
- // hammer the elements repetitively to start multiple fast running fetch jobs
- for (int i = 0; i < 5; i++) {
- provider.getElements(input);
- Job job = (Job) jobField.get(provider);
- if (job != null) {
- jobs++;
- }
- }
- // We need to wait for all the fetch jobs to finish and then verify that they did
- Job.getJobManager().join(family, null);
- assertTrue("Something's wrong. No fetch occurred", jobs > 0);
- assertEquals("Not all jobs finished as expected", jobs, done);
- } catch (Exception e) {
- fail("Failure during reflection", e);
- } finally {
- dialog.close();
- }
- }
-
- /**
- * Tests the dialog - just launches it for now
- */
- public void testDialog() {
- TestDialog dialog = new TestDialog();
- dialog.setBlockOnOpen(false);
- dialog.open();
- dialog.close();
- }
-
- /**
- * Tests the dialog - just launches it for now
- */
- public void testDialogWithCompare() {
- TestDialog2 dialog = new TestDialog2();
- dialog.setBlockOnOpen(false);
- dialog.open();
-
- dialog.close();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstalledSoftwarePageTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstalledSoftwarePageTest.java
deleted file mode 100644
index cc4e0b7bf..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstalledSoftwarePageTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-import org.eclipse.equinox.p2.ui.InstalledSoftwarePage;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Tests for the Installation Dialog page.
- */
-public class InstalledSoftwarePageTest extends AbstractProvisioningUITest {
-
- class TestDialog extends Dialog {
- TestDialog() {
- super(ProvUI.getDefaultParentShell());
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- InstalledSoftwarePage page = new InstalledSoftwarePage();
- page.createControl(composite);
- return composite;
- }
- }
-
- /**
- * Tests the dialog
- */
- public void testDialog() {
- TestDialog dialog = new TestDialog();
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- // need to reach way in to shell data to find dialog
- } finally {
- dialog.close();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InvokeByHandlerTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InvokeByHandlerTests.java
deleted file mode 100644
index be79a20b0..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InvokeByHandlerTests.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.dialogs;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.handlers.IHandlerService;
-
-/**
- * Tests for invoking the p2 wizards by command id.
- * Other plug-ins do this, this test reminds us that if the handler
- * ids change, there are repercussions.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=263262
- */
-public class InvokeByHandlerTests extends AbstractProvisioningUITest {
-
- private static final String INSTALL = "org.eclipse.equinox.p2.ui.sdk.install";
- private static final String UPDATE = "org.eclipse.equinox.p2.ui.sdk.update";
-
- public void testInstallHandler() throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- Display.getDefault().getActiveShell().close();
- }
-
- });
- runCommand(INSTALL);
-
- }
-
- public void testUpdateHandler() throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- Display.getDefault().getActiveShell().close();
- }
-
- });
- runCommand(UPDATE);
- }
-
- private void runCommand(String commandId) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
- Command command = commandService.getCommand(commandId);
- if (!command.isDefined()) {
- return;
- }
- IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
- handlerService.executeCommand(commandId, null);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/PreferencePagesTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/PreferencePagesTest.java
deleted file mode 100644
index 5aeb3b8e3..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/PreferencePagesTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.dialogs;
-
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-/**
- * Tests for the install wizard
- */
-public class PreferencePagesTest extends AbstractProvisioningUITest {
-
- private static final String GENERAL = "org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage";
- private static final String SITES = "org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage";
- private static final String AUTOUPDATES = "org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatesPreferencePage";
-
- public void testGeneralPage() {
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null, GENERAL, null, null);
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- // nothing yet
- } finally {
- dialog.close();
- }
- }
-
- public void testCopyrightPage() {
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null, SITES, null, null);
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- // nothing yet
- } finally {
- dialog.close();
- }
- }
-
- public void testLicensePage() {
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(null, AUTOUPDATES, null, null);
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- // nothing yet
- } finally {
- dialog.close();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RepositoryManipulationPageTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RepositoryManipulationPageTest.java
deleted file mode 100644
index 6336fb8dc..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/RepositoryManipulationPageTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.dialogs;
-
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-import org.eclipse.equinox.p2.ui.RepositoryManipulationPage;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Tests for the Repository Manipulation page.
- * If nothing else, this test ensures that repository page can be hosted
- * somewhere besides preferences
- */
-public class RepositoryManipulationPageTest extends AbstractProvisioningUITest {
-
- class TestDialog extends TitleAreaDialog {
- public TestDialog() {
- super(null);
- }
-
- RepositoryManipulationPage page;
-
- protected Control createDialogArea(Composite parent) {
- page = new RepositoryManipulationPage();
- page.init(PlatformUI.getWorkbench());
- page.createControl(parent);
- this.setTitle("Software Sites");
- this.setMessage("The enabled sites will be searched for software. Disabled sites are ignored.");
- return page.getControl();
- }
-
- protected void okPressed() {
- if (page.performOk())
- super.okPressed();
- }
-
- protected void cancelPressed() {
- if (page.performCancel())
- super.cancelPressed();
- }
- }
-
- /**
- * Tests the dialog
- */
- public void testDialog() {
- TestDialog dialog = new TestDialog();
- dialog.setBlockOnOpen(false);
- dialog.open();
- try {
- // reach in
- } finally {
- dialog.close();
- }
- }
-}
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
deleted file mode 100644
index eb26d3d29..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UninstallWizardTest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-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;
-import org.eclipse.equinox.p2.operations.ProfileModificationJob;
-import org.eclipse.equinox.p2.operations.UninstallOperation;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Tests for the install wizard
- */
-public class UninstallWizardTest extends WizardTest {
-
- private static final String SELECTION_PAGE = "IUSelectionPage";
-
- /**
- * Tests the wizard when the uninstall is preresolved.
- * This is the normal SDK workflow.
- */
- public void testUninstallWizardResolved() {
- 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);
- WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- dialog.setBlockOnOpen(false);
- dialog.create();
- dialog.open();
- ProfileModificationJob longOp = null;
-
- try {
- SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- // We should have a good plan
- assertTrue(page1.isPageComplete());
- ResolutionResultsWizardPage page2 = (ResolutionResultsWizardPage) wizard.getNextPage(page1);
- dialog.showPage(page2);
- assertTrue(page2.isPageComplete());
-
- // if another operation is scheduled for this profile, we should not be allowed to proceed
- longOp = getLongTestOperation();
- getProvisioningUI().schedule(longOp, StatusManager.LOG);
- assertTrue(page1.isPageComplete());
- // causes recalculation of plan and status
- wizard.recomputePlan(dialog);
- // can't move to next page while op is running
- assertFalse(page1.isPageComplete());
- longOp.cancel();
- } finally {
- dialog.getShell().close();
- if (longOp != null)
- longOp.cancel();
- }
- }
-
- /**
- * Tests the wizard without the resolution having been done ahead
- * of time. This is not the SDK workflow, but should be supported.
- */
- public void testUninstallWizardUnresolved() {
- // This test is pretty useless right now but at least it opens the wizard
- 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();
- dialog.open();
-
- try {
- SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- assertTrue(page1.isPageComplete());
- // Should be able to resolve a plan
- wizard.recomputePlan(dialog);
- // Still ok
- assertTrue(page1.isPageComplete());
-
- } finally {
- dialog.getShell().close();
- }
- }
-}
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
deleted file mode 100644
index e6ea8a3e9..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/UpdateWizardTest.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-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.*;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.operations.ProfileModificationJob;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Tests for the install wizard
- */
-public class UpdateWizardTest extends WizardTest {
-
- private static final String SELECTION_PAGE = "IUSelectionPage";
- private static final String RESOLUTION_PAGE = "ResolutionPage";
- private static final String MAIN_IU = "MainIU";
- IInstallableUnit main, mainUpgrade1, mainUpgrade2, mainUpgradeWithLicense;
-
- protected void setUp() throws Exception {
- super.setUp();
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setId(MAIN_IU);
- iu.setVersion(Version.createOSGi(1, 0, 0));
- iu.setSingleton(true);
- iu.setCapabilities(new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, MAIN_IU, iu.getVersion())});
- main = MetadataFactory.createInstallableUnit(iu);
- install(main, true, false);
- IUpdateDescriptor update = MetadataFactory.createUpdateDescriptor(MAIN_IU, new VersionRange("[1.0.0, 1.0.0]"), 0, "update description");
- mainUpgrade1 = createIU(MAIN_IU, Version.createOSGi(2, 0, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, true, update, NO_REQUIRES);
- update = MetadataFactory.createUpdateDescriptor(MAIN_IU, new VersionRange("[1.0.0, 1.0.0]"), 0, "update description");
- mainUpgrade2 = createIU(MAIN_IU, Version.createOSGi(3, 0, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, true, update, NO_REQUIRES);
- iu = new MetadataFactory.InstallableUnitDescription();
- iu.setId(MAIN_IU);
- iu.setVersion(Version.createOSGi(4, 0, 0));
- iu.setSingleton(true);
- iu.setUpdateDescriptor(update);
- iu.setLicenses(new ILicense[] {new License(null, "Update Wizard Test License to Accept", null)});
- iu.setCapabilities(new IProvidedCapability[] {MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, MAIN_IU, iu.getVersion())});
- mainUpgradeWithLicense = MetadataFactory.createInstallableUnit(iu);
- createTestMetdataRepository(new IInstallableUnit[] {main, mainUpgrade1, mainUpgrade2, mainUpgradeWithLicense});
-
- }
-
- /**
- * Tests the wizard when a prior resolution has been done.
- * This is the SDK
- */
- public void testUpdateWizardResolved() {
- 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);
- dialog.setBlockOnOpen(false);
- dialog.open();
- ProfileModificationJob longOp = null;
-
- try {
- SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- // should already have a plan
- assertTrue(page1.isPageComplete());
- ResolutionResultsWizardPage page2 = (ResolutionResultsWizardPage) wizard.getNextPage(page1);
- dialog.showPage(page2);
- assertTrue(page2.isPageComplete());
-
- // if another operation is scheduled for this profile, we should not be allowed to proceed
- longOp = getLongTestOperation();
- getProvisioningUI().schedule(longOp, StatusManager.LOG);
- assertTrue(page2.isPageComplete());
- // causes recalculation of plan and status
- wizard.recomputePlan(dialog);
- // can't move to next page while op is running
- assertFalse(page2.isPageComplete());
- longOp.cancel();
- } finally {
- dialog.getShell().close();
- if (longOp != null)
- longOp.cancel();
- }
- }
-
- public void testUpdateWizardResolvedWithLicense() {
- 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);
- dialog.setBlockOnOpen(false);
- dialog.open();
-
- try {
- SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- // should already have a plan
- assertTrue("1.0", page1.isPageComplete());
- // simulate the next button by getting next page and showing
- IWizardPage page = page1.getNextPage();
- dialog.showPage(page);
- // license needs approval
- assertFalse("1.1", wizard.canFinish());
- // finish button should be disabled
- while (dialog.getShell().getDisplay().readAndDispatch()) {
- // run event loop
- }
- Button finishButton = dialog.testGetButton(IDialogConstants.FINISH_ID);
- assertFalse("1.2", finishButton.isEnabled());
- } finally {
- dialog.getShell().close();
- }
- }
-
- /**
- * Tests the wizard when a prior resolution has been done, but is in error.
- */
- public void testUpdateWizardResolvedError() {
- 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);
- ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- dialog.setBlockOnOpen(false);
- dialog.open();
-
- try {
- assertNotNull("1.0", wizard.getStartingPage());
- } finally {
- dialog.getShell().close();
- }
- }
-
- /**
- * Tests the wizard when we have a successful resolution and want to open
- * directly on the resolution page
- */
- public void testUpdateWizardResolvedSkipSelections() {
- 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);
- ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- dialog.setBlockOnOpen(false);
- dialog.open();
-
- try {
- assertNotNull("1.0", wizard.getStartingPage());
- assertEquals("1.1", wizard.getStartingPage(), wizard.getPage(RESOLUTION_PAGE));
- } finally {
- dialog.getShell().close();
- }
- }
-
- /**
- * Tests the wizard when multiple versions are available.
- */
- public void testBug277554MultipleVersions() {
- 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);
- dialog.setBlockOnOpen(false);
- dialog.open();
-
- try {
- SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE);
- // should already have a plan
- assertTrue("1.0", page1.isPageComplete());
- assertEquals("1.1", 1, page1.getCheckedIUElements().length);
- ResolutionResultsWizardPage page2 = (ResolutionResultsWizardPage) wizard.getNextPage(page1);
- dialog.showPage(page2);
- // should only have one root item in the resolution page
- assertEquals("1.2", 1, findTree(page2).getItemCount());
- } finally {
- dialog.getShell().close();
- }
- }
-
- protected Tree findTree(ResolutionResultsWizardPage page) {
- return findTree(page.getControl());
- }
-
- protected Tree findTree(Control control) {
- if (control instanceof Tree)
- return (Tree) control;
- if (control instanceof Composite) {
- Control[] children = ((Composite) control).getChildren();
- for (int i = 0; i < children.length; i++) {
- Tree tree = findTree(children[i]);
- if (tree != null)
- return tree;
- }
-
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java
deleted file mode 100644
index 630b6c789..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/WizardTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.dialogs;
-
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-
-/**
- * Generic wizard test methods
- */
-public abstract class WizardTest extends AbstractProvisioningUITest {
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/AllTests.java
deleted file mode 100644
index 717130781..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/AllTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.misc;
-
-import junit.framework.*;
-
-/**
- * Performs all UI action tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(LicenseManagerTest.class);
- return suite;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/LicenseManagerTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/LicenseManagerTest.java
deleted file mode 100644
index b7ccedde1..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/misc/LicenseManagerTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.misc;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.sdk.SimpleLicenseManager;
-import org.eclipse.equinox.p2.metadata.ILicense;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-import org.eclipse.equinox.p2.ui.LicenseManager;
-
-public class LicenseManagerTest extends AbstractProvisioningUITest {
-
- class SimpleLicense implements ILicense {
- String body;
- String id;
-
- SimpleLicense(String id, String body) {
- this.id = id;
- this.body = body;
- }
-
- public URI getLocation() {
- return null;
- }
-
- public String getBody() {
- return body;
- }
-
- public String getUUID() {
- return id;
- }
-
- }
-
- public void testLicenseAcceptAndReject() {
- LicenseManager manager = getProvisioningUI().getLicenseManager();
- SimpleLicense foo = new SimpleLicense("foo", "foo");
- SimpleLicense bar = new SimpleLicense("bar", "bar");
-
- manager.accept(foo);
- manager.accept(bar);
-
- assertTrue("1.0", manager.hasAcceptedLicenses());
- manager.reject(foo);
- manager.reject(bar);
- assertFalse("1.1", manager.hasAcceptedLicenses());
-
- manager.accept(foo);
- manager.accept(bar);
- assertTrue("1.2", manager.hasAcceptedLicenses());
- }
-
- public void testDifferentProfilesDifferentLicenses() {
- LicenseManager manager = getProvisioningUI().getLicenseManager();
- SimpleLicense foo = new SimpleLicense("foo", "foo");
- SimpleLicense bar = new SimpleLicense("bar", "bar");
-
- manager.accept(foo);
- manager.accept(bar);
-
- assertTrue("1.0", manager.hasAcceptedLicenses());
-
- // Ensure that a newly created license manager with the same profile has the
- // same licenses
- SimpleLicenseManager manager2 = new SimpleLicenseManager(TESTPROFILE);
- assertTrue("1.1", manager2.hasAcceptedLicenses());
-
- // A manager with a different profile would not have the same licenses
- profile = createProfile("ANOTHER");
- manager2 = new SimpleLicenseManager("ANOTHER");
- assertFalse("1.2", manager2.hasAcceptedLicenses());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java
deleted file mode 100644
index 2b7664727..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/AllTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.operations;
-
-import junit.framework.*;
-
-/**
- * Performs all UI operation tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(SizingTest.class);
- suite.addTestSuite(InstallOperationTests.class);
- suite.addTestSuite(UpdateOperationTests.class);
- suite.addTestSuite(UninstallOperationTests.class);
- return suite;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java
deleted file mode 100644
index fc0c29ee5..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/InstallOperationTests.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.operations;
-
-import java.net.URI;
-import java.util.Collections;
-import java.util.Set;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.InstallOperation;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.spi.RepositoryReference;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-
-/**
- * Tests various aspects of install operations
- */
-public class InstallOperationTests extends AbstractProvisioningUITest {
- public void testInstallerPlan() throws ProvisionException {
- URI uri = getTestData("InstallHandler", "testData/installPlan").toURI();
- Set<IInstallableUnit> ius = getMetadataRepositoryManager().loadRepository(uri, getMonitor()).query(QueryUtil.createIUQuery("A"), getMonitor()).toSet();
- assertTrue("One IU", ius.size() == 1);
- InstallOperation op = new InstallOperation(getSession(), ius);
- op.setProfileId(TESTPROFILE);
- ProvisioningContext pc = new ProvisioningContext(getAgent());
- pc.setArtifactRepositories(new URI[] {uri});
- pc.setMetadataRepositories(new URI[] {uri});
- op.setProvisioningContext(pc);
- assertTrue("Should resolve", op.resolveModal(getMonitor()).isOK());
- assertTrue("Should install", op.getProvisioningJob(null).runModal(getMonitor()).isOK());
- assertFalse("Action1 should have been installed", getProfile(TESTPROFILE).query(QueryUtil.createIUQuery("Action1"), getMonitor()).isEmpty());
- }
-
- public void testDetectMissingRequirement() throws ProvisionException, OperationCanceledException {
- URI uriA, uriB, uriC;
- IMetadataRepository repoA, repoB, repoC;
- String testDataFileLocation = "testData/provisioningContextTests/";
- uriA = getTestData("A", testDataFileLocation + "A").toURI();
- uriB = getTestData("B", testDataFileLocation + "B").toURI();
- uriC = getTestData("C", testDataFileLocation + "C").toURI();
-
- repoA = getMetadataRepositoryManager().loadRepository(uriA, getMonitor());
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=305565
- repoA.addReferences(Collections.singletonList(new RepositoryReference(uriA, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
-
- // now create a second set of repos and refer from the first
- repoB = getMetadataRepositoryManager().loadRepository(uriB, getMonitor());
- repoB.addReferences(Collections.singletonList(new RepositoryReference(uriB, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
- repoA.addReferences(Collections.singletonList(new RepositoryReference(repoB.getLocation(), null, IRepository.TYPE_METADATA, IRepository.ENABLED)));
-
- // this repo is referred by the previous one
- repoC = getMetadataRepositoryManager().loadRepository(uriC, getMonitor());
- repoC.addReferences(Collections.singletonList(new RepositoryReference(uriC, null, IRepository.TYPE_ARTIFACT, IRepository.ENABLED)));
- repoB.addReferences(Collections.singletonList(new RepositoryReference(repoC.getLocation(), null, IRepository.TYPE_METADATA, IRepository.ENABLED)));
-
- String id = "TestProfileIDForMissingRequirement";
- createProfile(id);
- ProvisioningContext context = new ProvisioningContext(getAgent());
- context.setMetadataRepositories(new URI[] {repoA.getLocation()});
- context.setArtifactRepositories(new URI[0]);
- IInstallableUnit[] units = repoA.query(QueryUtil.createIUQuery("A"), getMonitor()).toArray(IInstallableUnit.class);
- assertTrue("should find A in main repo", units.length > 0);
-
- // NOW WE CAN TEST!
- assertNull("ProvisioningContext does not follow by default", context.getProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES));
-
- InstallOperation op = new InstallOperation(getSession(), Collections.singleton(units[0]));
- op.setProvisioningContext(context);
- op.setProfileId(id);
- assertTrue("Should resolve", op.resolveModal(getMonitor()).isOK());
-
- assertNotNull("Context was reset to follow", context.getProperty(ProvisioningContext.FOLLOW_REPOSITORY_REFERENCES));
-
- getArtifactRepositoryManager().removeRepository(uriA);
- getArtifactRepositoryManager().removeRepository(uriB);
- getArtifactRepositoryManager().removeRepository(uriC);
- getMetadataRepositoryManager().removeRepository(uriA);
- getMetadataRepositoryManager().removeRepository(uriB);
- getMetadataRepositoryManager().removeRepository(uriC);
-
- }
-}
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
deleted file mode 100644
index b2393c9ed..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/SizingTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.operations;
-
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-
-/**
- *
- */
-public class SizingTest extends AbstractProvisioningUITest {
- public void testEmptySizing() {
- String profileId = "testEmptySizing";
- IProfile testProfile = createProfile(profileId);
- ProfileChangeRequest request = new ProfileChangeRequest(testProfile);
- IProvisioningPlan plan = null;
- plan = getPlanner(getSession().getProvisioningAgent()).getProvisioningPlan(request, new ProvisioningContext(getAgent()), getMonitor());
- long size = ProvUI.SIZE_NOTAPPLICABLE;
- size = ProvUI.getSize(getEngine(), plan, new ProvisioningContext(getAgent()), getMonitor());
- assertEquals("1.0", 0, size);
- }
-
- /**
- * Tests a simple sizing operation with an IU containing no artifacts
- */
- public void testSimpleSizing() {
- IInstallableUnit f1 = createIU("f1", DEFAULT_VERSION, true);
- String profileId = "testSimpleSizing";
- IProfile testProfile = createProfile(profileId);
- ProfileChangeRequest request = new ProfileChangeRequest(testProfile);
- request.add(f1);
- IProvisioningPlan plan = null;
- plan = getPlanner(getSession().getProvisioningAgent()).getProvisioningPlan(request, new ProvisioningContext(getAgent()), getMonitor());
- long size = ProvUI.SIZE_NOTAPPLICABLE;
- size = ProvUI.getSize(getEngine(), plan, new ProvisioningContext(getAgent()), getMonitor());
- assertEquals("1.0", 0, size);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java
deleted file mode 100644
index 76b3f403c..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UninstallOperationTests.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.operations;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashSet;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-import org.eclipse.equinox.p2.operations.UninstallOperation;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-
-/**
- * Tests for the ability to install an IU that has an installer plan by
- * using the operation API.
- */
-public class UninstallOperationTests extends AbstractProvisioningUITest {
- public void testUninstallContactsNoRepositories() throws ProvisionException, URISyntaxException {
-
- HashSet<IInstallableUnit> ius = new HashSet<IInstallableUnit>();
- ius.add(top1);
- UninstallOperation op = new UninstallOperation(getSession(), ius);
- // We set the provisioning context to the same one we use for install
- ProvisioningContext pc = new ProvisioningContext(getAgent());
- pc.setArtifactRepositories(new URI[] {testRepoLocation});
- pc.setMetadataRepositories(new URI[] {testRepoLocation});
- op.setProvisioningContext(pc);
- op.setProfileId(TESTPROFILE);
- assertTrue("Should resolve", op.resolveModal(getMonitor()).isOK());
-
- // The provisioning context actually used should have nothing (because the first pass is to try with no repos)
- pc = op.getProvisioningPlan().getContext();
- IQueryable<IInstallableUnit> queryable = pc.getMetadata(getMonitor());
- assertTrue("metadata queryable should be empty", queryable.query(QueryUtil.ALL_UNITS, getMonitor()).isEmpty());
- IQueryable<IArtifactRepository> artifactQueryable = pc.getArtifactRepositories(getMonitor());
- IQuery<IArtifactRepository> all = new ExpressionMatchQuery<IArtifactRepository>(IArtifactRepository.class, ExpressionUtil.TRUE_EXPRESSION);
- assertTrue("artifact queryable should be empty", artifactQueryable.query(all, getMonitor()).isEmpty());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java
deleted file mode 100644
index 53373f2e8..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/operations/UpdateOperationTests.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.operations;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import org.eclipse.equinox.internal.p2.operations.SearchForUpdatesResolutionJob;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.operations.*;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-
-public class UpdateOperationTests extends AbstractProvisioningUITest {
- IInstallableUnit a1, b1;
- IInstallableUnit b12;
- IInstallableUnit a120WithDifferentId;
- IInstallableUnit a130;
- IInstallableUnit a140WithDifferentId;
- IInstallableUnitPatch firstPatchForA1, secondPatchForA1, thirdPatchForA1, patchFora2;
-
- protected void setUp() throws Exception {
- super.setUp();
- a1 = createIU("A", Version.create("1.0.0"));
- IUpdateDescriptor update = MetadataFactory.createUpdateDescriptor("A", new VersionRange("[1.0.0, 1.0.0]"), 0, "update description");
- a120WithDifferentId = createIU("UpdateA", Version.createOSGi(1, 2, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
- a130 = createIU("A", Version.createOSGi(1, 3, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
- a140WithDifferentId = createIU("UpdateForA", Version.createOSGi(1, 4, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
- IRequirementChange change = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
- IRequirement lifeCycle = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", new VersionRange("[1.0.0, 1.0.0]"), null, false, false);
- firstPatchForA1 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, lifeCycle);
- secondPatchForA1 = createIUPatch("P", Version.create("2.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, lifeCycle);
- thirdPatchForA1 = createIUPatch("P2", Version.create("1.0.0"), true, new IRequirementChange[] {change}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, lifeCycle);
-
- IRequirementChange change2 = MetadataFactory.createRequirementChange(MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", VersionRange.emptyRange, null, false, false, false), MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "B", new VersionRange("[1.1.0, 1.3.0)"), null, false, false, true));
- IRequirement lifeCycle2 = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", new VersionRange("[2.0.0, 3.2.0]"), null, false, false);
- patchFora2 = createIUPatch("P", Version.create("1.0.0"), true, new IRequirementChange[] {change2}, new IRequirement[][] {{MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "A", VersionRange.emptyRange, null, false, false)}}, lifeCycle2);
-
- b1 = createIU("B", Version.create("1.0.0"));
- update = MetadataFactory.createUpdateDescriptor("B", new VersionRange("[1.0.0, 1.0.0]"), 0, "update description");
- b12 = createIU("B", Version.createOSGi(1, 2, 0), null, NO_REQUIRES, NO_PROVIDES, NO_PROPERTIES, null, NO_TP_DATA, false, update, NO_REQUIRES);
- // Ensure that all versions, not just the latest, are considered by the UI
- getPolicy().setShowLatestVersionsOnly(false);
- }
-
- public void testChooseUpdateOverPatch() throws ProvisionException {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
- install(a1, true, false);
- ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- iusInvolved.add(a1);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
- op.resolveModal(getMonitor());
- IProfileChangeRequest request = op.getProfileChangeRequest();
- 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);
- 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;
- for (int i = 0; i < updates.length; i++) {
- if (updates[i].replacement.equals(firstPatchForA1)) {
- firstPatch = updates[i];
- break;
- }
- }
- assertNotNull(".99", firstPatch);
- op.setSelectedUpdates(new Update[] {firstPatch});
- op.resolveModal(getMonitor());
- IProfileChangeRequest request = op.getProfileChangeRequest();
- 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);
- ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- iusInvolved.add(a1);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
- op.resolveModal(getMonitor());
- IProfileChangeRequest request = op.getProfileChangeRequest();
- // update was favored, that would happen even if patch was not installed
- 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);
- }
-
- public void testChooseNotTheNewest() throws ProvisionException {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a120WithDifferentId, a130, firstPatchForA1, patchFora2});
- install(a1, true, false);
- 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;
- for (int i = 0; i < updates.length; i++) {
- if (updates[i].replacement.equals(a120WithDifferentId)) {
- notNewest = updates[i];
- break;
- }
- }
- assertNotNull(".99", notNewest);
- op.setSelectedUpdates(new Update[] {notNewest});
- op.resolveModal(getMonitor());
- IProfileChangeRequest request = op.getProfileChangeRequest();
- // selected was favored
- 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);
- }
-
- public void testChooseLatestPatches() throws ProvisionException {
- createTestMetdataRepository(new IInstallableUnit[] {a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1});
- install(a1, true, false);
- ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- iusInvolved.add(a1);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
- op.resolveModal(getMonitor());
- IProfileChangeRequest request = op.getProfileChangeRequest();
- // the latest two patches were selected
- HashSet chosen = new HashSet();
- assertTrue("1.0", request.getAdditions().size() == 2);
- chosen.addAll(request.getAdditions());
- assertTrue("1.1", chosen.contains(secondPatchForA1));
- assertTrue("1.2", chosen.contains(thirdPatchForA1));
-
- assertEquals("1.2", 3, op.getPossibleUpdates().length);
- }
-
- public void testLatestHasDifferentId() throws ProvisionException {
- createTestMetdataRepository(new IInstallableUnit[] {a1, firstPatchForA1, secondPatchForA1, thirdPatchForA1, a120WithDifferentId, a130, a140WithDifferentId});
- install(a1, true, false);
- ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- iusInvolved.add(a1);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
- op.resolveModal(getMonitor());
- IProfileChangeRequest request = op.getProfileChangeRequest();
- // update 140 was recognized as the latest even though it had a different id
- 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);
- }
-
- // bug 300445
- public void testRemoveSelectionAfterResolve() throws ProvisionException {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a130, b1, b12});
- install(a1, true, false);
- 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);
- // choose just one
- op.setSelectedUpdates(new Update[] {updates[0]});
- op.resolveModal(getMonitor());
- assertEquals("1.1", 1, op.getSelectedUpdates().length);
- }
-
- // bug 290858
- public void testSearchForUpdatesInJob() throws ProvisionException {
- createTestMetdataRepository(new IInstallableUnit[] {a1, a130, b1, b12});
- install(a1, true, false);
- ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>();
- iusInvolved.add(a1);
- iusInvolved.add(b1);
- UpdateOperation op = getProvisioningUI().getUpdateOperation(iusInvolved, null);
- ProvisioningJob job = op.getResolveJob(getMonitor());
- assertTrue("1.0", job instanceof SearchForUpdatesResolutionJob);
- // getting the job should not compute the request.
- assertNull("1.1", ((SearchForUpdatesResolutionJob) job).getProfileChangeRequest());
- job.runModal(getMonitor());
- assertNotNull("1.2", ((SearchForUpdatesResolutionJob) job).getProfileChangeRequest());
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AbstractQueryTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AbstractQueryTest.java
deleted file mode 100644
index 0b8edfe2a..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AbstractQueryTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.MatchQuery;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Abstract class to set up the mock query provider
- */
-public abstract class AbstractQueryTest extends AbstractProvisioningTest {
- protected void setUp() throws Exception {
- super.setUp();
- // use test query provider
- // This is really not how the default policy should be used in practice,
- // but we need to reset it for the tests.
- ProvUI.setQueryProvider(new MockQueryProvider(getMockQuery(), ProvisioningUI.getDefaultUI()));
- // some of the test repos are set up as system repos so we need to
- // query all repos, not just non-system repos
- // TODO consider evolving these tests to distinguish between system
- // and non-system
- RepositoryTracker manipulator = ProvisioningUI.getDefaultUI().getRepositoryTracker();
- manipulator.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
- manipulator.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- RepositoryTracker manipulator = ProvisioningUI.getDefaultUI().getRepositoryTracker();
- manipulator.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- manipulator.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- ProvUI.setQueryProvider(null);
- }
-
- protected IQuery getMockQuery() {
- return new MatchQuery() {
- public boolean isMatch(Object candidate) {
- return true;
- }
- };
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AllTests.java
deleted file mode 100644
index 60b4705d1..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AllTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import junit.framework.*;
-
-/**
- * Performs all UI query tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(AnyRequiredCapabilityTest.class);
- suite.addTestSuite(AvailableIUWrapperTest.class);
- suite.addTestSuite(CategoryElementWrapperTest.class);
- suite.addTestSuite(TranslationSupportTests.class);
- suite.addTestSuite(LatestIUVersionElementWrapperTest.class);
- suite.addTestSuite(QueryDescriptorTest.class);
- suite.addTestSuite(QueryProviderTests.class);
- suite.addTestSuite(QueryableMetadataRepositoryManagerTest.class);
- // This must come after QueryableMetadataRepositoryManager or it causes side-effects in those tests.
- suite.addTestSuite(QueryableArtifactRepositoryManagerTest.class);
- return suite;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java
deleted file mode 100644
index 978ae1f8f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.tests.TestData;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-public class AnyRequiredCapabilityTest extends AbstractQueryTest {
- public void testMatchOtherObjects() {
- IRequirement requires = MetadataFactory.createRequirement("org.eclipse.equinox.p2.iu", "test.bundle", ANY_VERSION, null, false, false);
- IInstallableUnit match = createIU("test.bundle");
- IInstallableUnit noMatch = createIU("another.bundle");
- List items = new ArrayList();
- items.add(match);
- items.add(noMatch);
- IQueryResult result = QueryUtil.createMatchQuery(requires.getMatches()).perform(items.iterator());
- assertEquals("1.0", 1, queryResultSize(result));
- assertEquals("1.1", match, result.iterator().next());
- }
-
- public void testExistingRepository() {
- URI location;
- try {
- location = TestData.getFile("metadataRepo", "good").toURI();
- } catch (Exception e) {
- fail("0.99", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.addRepository(location);
- QueryableMetadataRepositoryManager manager = new QueryableMetadataRepositoryManager(ProvisioningUI.getDefaultUI(), false);
- IRequirement requires = MetadataFactory.createRequirement("org.eclipse.equinox.p2.iu", "test.bundle", ANY_VERSION, null, false, false);
- IQueryResult result = manager.query(QueryUtil.createMatchQuery(requires.getMatches()), getMonitor());
- assertEquals("1.0", 1, queryResultSize(result));
- IInstallableUnit iu = (IInstallableUnit) result.iterator().next();
- assertEquals("1.1", "test.bundle", iu.getId());
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUWrapperTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUWrapperTest.java
deleted file mode 100644
index 40b4dc55d..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUWrapperTest.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.p2.ui.query.AvailableIUWrapper;
-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.query.*;
-import org.eclipse.equinox.p2.tests.MockQueryable;
-
-/**
- * Tests for {@link AvailableIUWrapper}.
- */
-public class AvailableIUWrapperTest extends AbstractQueryTest {
- protected AvailableIUWrapper createWrapper() {
- return createWrapper(true);
- }
-
- protected AvailableIUWrapper createWrapper(boolean makeCategories) {
- return new AvailableIUWrapper(new MockQueryable(), null, makeCategories, true);
- }
-
- /**
- * Returns the IU corresponding to the collected element.
- */
- protected IInstallableUnit getIU(Object collected) {
- return ((IIUElement) collected).getIU();
- }
-
- /**
- * Tests collecting items AvailableIUCollector doesn't care about.
- */
- public void testCollectObject() {
- AvailableIUWrapper wrapper = createWrapper();
- Collector collector = new Collector();
- Object object = new Object();
- collector.accept(object);
- Collection results = wrapper.getElements(collector);
- assertEquals("1.0", 1, results.size());
- assertEquals("1.1", object, results.iterator().next());
- }
-
- /**
- * Tests collecting an IU.
- */
- public void testCollectIU() {
- AvailableIUWrapper wrapper = createWrapper();
- Collector collector = new Collector();
- IInstallableUnit unit = createIU("f1");
- collector.accept(unit);
- Collection results = wrapper.getElements(collector);
- assertEquals("1.0", 1, results.size());
- IInstallableUnit collectedIU = getIU(results.iterator().next());
- assertEquals("1.1", unit, collectedIU);
- }
-
- /**
- * Tests collecting a category when makeCategory=true.
- */
- public void testMakeCategory() {
- AvailableIUWrapper wrapper = createWrapper(true);
- Collector collector = new Collector();
- Map properties = new HashMap();
- properties.put(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true");
- IInstallableUnit category = createIU("category", Version.createOSGi(1, 0, 0), NO_REQUIRES, properties, false);
- IInstallableUnit unit = createIU("basicIU");
- collector.accept(category);
- collector.accept(unit);
-
- Collection results = wrapper.getElements(collector);
- assertEquals("1.0", 2, collector.size());
- boolean categoryFound = false;
- for (Iterator it = results.iterator(); it.hasNext();) {
- Object element = it.next();
- IInstallableUnit collected = getIU(element);
- if (collected.equals(category)) {
- categoryFound = true;
- assertTrue("1.1", element instanceof CategoryElement);
- } else {
- assertEquals("1.2", unit, collected);
- }
- }
- assertTrue("1.3", categoryFound);
- }
-
- /**
- * Tests collecting a category when makeCategory=false
- */
- public void testNoMakeCategory() {
- AvailableIUWrapper wrapper = createWrapper(false);
- Collector collector = new Collector();
- Map properties = new HashMap();
- properties.put(InstallableUnitDescription.PROP_TYPE_CATEGORY, "true");
- IInstallableUnit category = createIU("category", Version.createOSGi(1, 0, 0), NO_REQUIRES, properties, false);
- IInstallableUnit unit = createIU("basicIU");
- collector.accept(category);
- collector.accept(unit);
-
- Collection results = wrapper.getElements(collector);
- assertEquals("1.0", 2, results.size());
- boolean categoryFound = false;
- for (Iterator it = results.iterator(); it.hasNext();) {
- Object element = it.next();
- IInstallableUnit collected = getIU(element);
- if (collected.equals(category)) {
- categoryFound = true;
- assertFalse("1.1", element instanceof CategoryElement);
- } else {
- assertEquals("1.2", unit, collected);
- }
- }
- assertTrue("1.3", categoryFound);
- }
-
- /**
- * Tests hiding installed IUs.
- */
- public void testHideInstalled() {
- IProfile profile = createProfile("TestProfile");
- AvailableIUWrapper wrapper = createWrapper(true);
- Collector collector = new Collector();
- IInstallableUnit installed = createIU("installed");
- IInstallableUnit notInstalled = createIU("notInstalled");
- install(profile, new IInstallableUnit[] {installed}, true, createPlanner(), createEngine());
- wrapper.markInstalledIUs(profile, true);
-
- //now feed in the installed and non-installed units, and the installed unit should be ignored.
- collector.accept(installed);
- collector.accept(notInstalled);
-
- Collection results = wrapper.getElements(collector);
-
- assertEquals("1.1", 1, results.size());
- Object iuElement = results.iterator().next();
- assertEquals("1.2", notInstalled, getIU(iuElement));
- }
-
- protected IQuery getMockQuery() {
- return QueryUtil.createIUPropertyQuery("key", "value");
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/CategoryElementWrapperTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/CategoryElementWrapperTest.java
deleted file mode 100644
index 2ac8c1faa..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/CategoryElementWrapperTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import java.util.Collection;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
-import org.eclipse.equinox.internal.p2.ui.model.EmptyElementExplanation;
-import org.eclipse.equinox.internal.p2.ui.query.CategoryElementWrapper;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-import org.eclipse.equinox.p2.query.Collector;
-import org.eclipse.equinox.p2.tests.MockQueryable;
-
-/**
- * Tests for {@link CategoryElementWrapper}.
- */
-public class CategoryElementWrapperTest extends AbstractQueryTest {
- private CategoryElementWrapper createWrapper() {
- IInstallableUnit category = createIU("default category");
- return new CategoryElementWrapper(new MockQueryable(category), null);
- }
-
- private IInstallableUnit createNamedCategory(String id, String name, Version version) {
- InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
- iu.setId(id);
- iu.setVersion(version);
- iu.setProperty(IInstallableUnit.PROP_NAME, name);
- iu.setProperty(InstallableUnitDescription.PROP_TYPE_CATEGORY, Boolean.toString(true));
- return MetadataFactory.createInstallableUnit(iu);
- }
-
- public void testCollectObject() {
- CategoryElementWrapper wrapper = createWrapper();
- Collector collector = new Collector();
- collector.accept("AnObjectThatIsNotAnIU");
- Iterator results = wrapper.getElements(collector).iterator();
- // Collection should either be empty or explain its emptiness.
- while (results.hasNext())
- assertTrue("1.0", results.next() instanceof EmptyElementExplanation);
- }
-
- /**
- * Tests for the {@link Collector#isEmpty()} method.
- */
- public void testIsEmpty() {
- CategoryElementWrapper wrapper = createWrapper();
- Collector collector = new Collector();
- assertTrue("1.1", collector.isEmpty());
-
- IInstallableUnit category1 = createIU("category1");
- collector.accept(category1);
- Collection results = wrapper.getElements(collector);
- assertTrue("1.2", !results.isEmpty());
- }
-
- /**
- * Tests for the {@link Collector#size()} method.
- */
- public void testSize() {
- CategoryElementWrapper wrapper = createWrapper();
- Collector collector = new Collector();
- assertEquals("1.1", 0, collector.size());
-
- IInstallableUnit category1 = createIU("category1");
- collector.accept(category1);
- Collection results = wrapper.getElements(collector);
- assertEquals("1.2", 1, collector.size());
- assertEquals("1.3", category1, ((CategoryElement) results.iterator().next()).getIU());
-
- //adding the same category twice shouldn't affect size
- collector.accept(category1);
- results = wrapper.getElements(collector);
- assertEquals("1.6", 1, results.size());
-
- //adding a nested category shouldn't affected size
- IRequirement[] required = createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, "category1");
- IInstallableUnit nested = createIU("Nested", required);
- collector.accept(nested);
- results = wrapper.getElements(collector);
- assertEquals("1.7", 1, results.size());
- }
-
- public void testCategoryMerging() {
- CategoryElementWrapper wrapper = createWrapper();
- Collector collector = new Collector();
- assertEquals("1.1", 0, collector.size());
-
- IInstallableUnit category1 = createNamedCategory("qualifier1.foo", "Foo", DEFAULT_VERSION);
- collector.accept(category1);
- Collection results = wrapper.getElements(collector);
- assertEquals("1.2", 1, collector.size());
- assertEquals("1.3", category1, ((CategoryElement) results.iterator().next()).getIU());
-
- //add a second category with different id and different name
- IInstallableUnit category2 = createNamedCategory("qualifier2.foo", "Foo", DEFAULT_VERSION);
- collector.accept(category2);
- results = wrapper.getElements(collector);
- assertEquals("1.4", 1, results.size());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/LatestIUVersionElementWrapperTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/LatestIUVersionElementWrapperTest.java
deleted file mode 100644
index 87c788eef..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/LatestIUVersionElementWrapperTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * Tests for latest query. This has all the tests of the superclass,
- * plus some extras for testing the latest IU capabilities.
- */
-public class LatestIUVersionElementWrapperTest extends AvailableIUWrapperTest {
-
- /**
- * Returns the IU corresponding to the collected element.
- */
- protected IInstallableUnit getIU(Object collected) {
- if (collected instanceof IInstallableUnit)
- return (IInstallableUnit) collected;
- return ((IIUElement) collected).getIU();
- }
-
- /**
- * Tests that only the latest version is collected.
- */
- public void testCollectLatestIU() {
- IQuery latestIuVersionElementQuery = QueryUtil.createLatestIUQuery();
- IInstallableUnit unit1 = createIU("f1", Version.createOSGi(1, 0, 0));
- IInstallableUnit unit2 = createIU("f1", Version.createOSGi(1, 0, 1));
- List listOfIUs = new ArrayList();
- listOfIUs.add(unit1);
- listOfIUs.add(unit2);
- IQueryResult collector = latestIuVersionElementQuery.perform(listOfIUs.iterator());
- assertEquals("1.0", 1, queryResultSize(collector));
- IInstallableUnit collectedIU = getIU(collector.iterator().next());
- assertEquals("1.1", unit2, collectedIU);
- }
-
- public void testMultipleIUsAndVersions() {
- IQuery latestIuVersionElementQuery = QueryUtil.createLatestIUQuery();
- IInstallableUnit unit1 = createIU("A", Version.createOSGi(1, 0, 0));
- IInstallableUnit unit2 = createIU("A", Version.createOSGi(1, 0, 1));
- IInstallableUnit unit3 = createIU("B", Version.createOSGi(1, 0, 1));
- IInstallableUnit unit4 = createIU("B", Version.createOSGi(0, 1, 1));
- IInstallableUnit unit5 = createIU("C", Version.createOSGi(0, 1, 1));
-
- // We should get unit 2, unit 3 and unit 5
- List listOfIUs = new ArrayList();
- listOfIUs.add(unit1);
- listOfIUs.add(unit2);
- listOfIUs.add(unit3);
- listOfIUs.add(unit4);
- listOfIUs.add(unit5);
- IQueryResult collector = latestIuVersionElementQuery.perform(listOfIUs.iterator());
-
- // Should be 3 units
- assertEquals("1.0", 3, queryResultSize(collector));
- assertContains("1.2", collector, unit2);
- assertContains("1.3", collector, unit3);
- assertContains("1.4", collector, unit5);
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/MockQueryProvider.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/MockQueryProvider.java
deleted file mode 100644
index e00efe369..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/MockQueryProvider.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import org.eclipse.equinox.internal.p2.ui.ElementQueryDescriptor;
-import org.eclipse.equinox.internal.p2.ui.QueryProvider;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElement;
-import org.eclipse.equinox.p2.query.Collector;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.tests.MockQueryable;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * A fake query provider for unit testing.
- */
-public class MockQueryProvider extends QueryProvider {
- private IQuery query;
-
- public MockQueryProvider(IQuery query, ProvisioningUI ui) {
- super(ui);
- this.query = query;
- }
-
- public ElementQueryDescriptor getQueryDescriptor(QueriedElement element) {
- return new ElementQueryDescriptor(new MockQueryable(element), query, new Collector());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java
deleted file mode 100644
index 64f468334..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import java.util.*;
-import junit.framework.TestCase;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.ElementQueryDescriptor;
-import org.eclipse.equinox.internal.p2.ui.ElementWrapper;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * Tests the Query Descriptor
- */
-public class QueryDescriptorTest extends TestCase {
-
- class SimpleQueryable implements IQueryable {
- List elements = Arrays.asList(new String[] {"a", "b", "c", "d", "e"});
-
- public IQueryResult query(IQuery query, IProgressMonitor monitor) {
- return query.perform(elements.iterator());
- }
- }
-
- class WrappedString {
- String string;
-
- WrappedString(String string) {
- this.string = string;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof WrappedString))
- return false;
- WrappedString other = (WrappedString) obj;
- return this.string.equals(other.string);
- }
-
- public int hashCode() {
- return string.hashCode();
- }
- }
-
- class StringWrapper extends ElementWrapper {
- protected Object wrap(Object item) {
- return new WrappedString((String) item);
- }
- }
-
- class SimpleMatchQuery extends MatchQuery {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.query.MatchQuery#isMatch(java.lang.Object)
- */
- public boolean isMatch(Object candidate) {
- if (candidate == "a" || candidate == "b")
- return true;
- return false;
- }
- }
-
- class SimpleMatchQuery2 extends MatchQuery {
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.query.MatchQuery#isMatch(java.lang.Object)
- */
- public boolean isMatch(Object candidate) {
- if (candidate == "b" || candidate == "c")
- return true;
- return false;
- }
- }
-
- public void testSimpleDescriptorWithWrapper() {
- ElementQueryDescriptor eqDescriptor = new ElementQueryDescriptor(new SimpleQueryable(), new SimpleMatchQuery(), new Collector(), new StringWrapper());
- Collection collection = eqDescriptor.performQuery(null);
- assertEquals("1.0", 2, collection.size());
- assertTrue("1.1", collection.contains(new WrappedString("a")));
- assertTrue("1.1", collection.contains(new WrappedString("b")));
- }
-
- public void testSimpleDescriptorWithoutWrapper() {
- ElementQueryDescriptor eqDescriptor = new ElementQueryDescriptor(new SimpleQueryable(), new SimpleMatchQuery(), new Collector());
- Collection collection = eqDescriptor.performQuery(null);
- assertEquals("1.0", 2, collection.size());
- assertTrue("1.1", collection.contains("a"));
- assertTrue("1.1", collection.contains("b"));
- }
-
- public void testCompoundDescriptorAND() {
- IQuery query = QueryUtil.createCompoundQuery(new SimpleMatchQuery(), new SimpleMatchQuery2(), true);
- ElementQueryDescriptor eqDescriptor = new ElementQueryDescriptor(new SimpleQueryable(), query, new Collector(), new StringWrapper());
- Collection collection = eqDescriptor.performQuery(null);
- assertEquals("1.0", 1, collection.size());
- assertTrue("1.1", collection.contains(new WrappedString("b")));
- }
-
- public void testCompoundDescriptorOR() {
- IQuery query = QueryUtil.createCompoundQuery(new SimpleMatchQuery(), new SimpleMatchQuery2(), false);
- ElementQueryDescriptor eqDescriptor = new ElementQueryDescriptor(new SimpleQueryable(), query, new Collector(), new StringWrapper());
- Collection collection = eqDescriptor.performQuery(null);
- assertEquals("1.0", 3, collection.size());
- assertTrue("1.1", collection.contains(new WrappedString("a")));
- assertTrue("1.1", collection.contains(new WrappedString("b")));
- assertTrue("1.1", collection.contains(new WrappedString("c")));
- }
-}
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
deleted file mode 100644
index 3fe46b448..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryProviderTests.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-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;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.p2.operations.InstallOperation;
-import org.eclipse.equinox.p2.query.IQueryable;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-
-public class QueryProviderTests extends AbstractProvisioningUITest {
- IInstallableUnit category, nestedCategory;
- IInstallableUnit a, b, c;
- static final String CAT = "Category";
- static final String NESTED = "NestedCategory";
- static final String A = "A";
- static final String B = "B";
- static final String C = "C";
- IMetadataRepository testRepo;
-
- protected void setUp() throws Exception {
- super.setUp();
- HashMap categoryProperties = new HashMap();
- categoryProperties.put("org.eclipse.equinox.p2.type.category", "true");
- HashMap groupProperties = new HashMap();
- groupProperties.put("org.eclipse.equinox.p2.type.group", "true");
- category = createIU(CAT, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, NESTED), categoryProperties, true);
- nestedCategory = createIU(NESTED, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, A), categoryProperties, true);
- a = createIU(A, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, B), groupProperties, true);
- b = createIU(B, Version.create("1.0.0"), createRequiredCapabilities(IInstallableUnit.NAMESPACE_IU_ID, C), groupProperties, true);
- c = createIU(C, Version.create("1.0.0"), NO_REQUIRES, NO_PROPERTIES, true);
- testRepo = createTestMetdataRepository(new IInstallableUnit[] {category, nestedCategory, a, b, c});
- }
-
- public void testNestedCategories() throws ProvisionException {
- MetadataRepositoryElement element = new MetadataRepositoryElement(null, testRepo.getLocation(), true);
- Object[] children = element.getChildren(element);
- assertEquals("1.1", 1, children.length); // the nested category should get removed from the list
- assertTrue("1.2", children[0] instanceof CategoryElement);
- CategoryElement cat = (CategoryElement) children[0];
- children = cat.getChildren(cat);
- boolean foundNestedCategory = false;
- for (int i = 0; i < children.length; i++) {
- if (children[i] instanceof CategoryElement) {
- if (((CategoryElement) children[i]).getIU().equals(nestedCategory)) {
- foundNestedCategory = true;
- break;
- }
- }
- }
- assertTrue("1.3", foundNestedCategory);
- }
-
- public void testInstallDrilldown() throws ProvisionException {
- IUElementListRoot root = new IUElementListRoot();
- AvailableIUElement element = new AvailableIUElement(root, a, TESTPROFILE, getPolicy().getShowDrilldownRequirements());
- root.setChildren(new Object[] {element});
- 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();
- element.setQueryable(queryable);
- Object[] children = element.getChildren(element);
- assertTrue("1.1", children.length == 1);
- }
-
-}
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
deleted file mode 100644
index 4f2fd7e7e..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableArtifactRepositoryManagerTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.QueryableArtifactRepositoryManager;
-import org.eclipse.equinox.internal.p2.ui.RepositoryLocationQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-public class QueryableArtifactRepositoryManagerTest extends AbstractQueryTest {
- private static final String repositoryOne = "http://one.lan";
- private static final String repositoryTwo = "http://two.lan";
- private int repoCount = 0;
-
- public void setUp() throws Exception {
- super.setUp();
-
- IArtifactRepositoryManager repoManager = getArtifactRepositoryManager();
- repoManager.addRepository(URIUtil.fromString(repositoryOne));
- repoManager.addRepository(URIUtil.fromString(repositoryTwo));
- // In case other repositories already exist in the manager.
- repoCount = repoManager.getKnownRepositories(0).length;
- }
-
- public void tearDown() throws Exception {
- IArtifactRepositoryManager repoManager = getArtifactRepositoryManager();
- repoManager.removeRepository(URIUtil.fromString(repositoryOne));
- repoManager.removeRepository(URIUtil.fromString(repositoryTwo));
-
- super.tearDown();
- }
-
- public void testQuery() {
- QueryableArtifactRepositoryManager manager = getQueryableManager();
-
- IQueryResult result = manager.locationsQueriable().query(new RepositoryLocationQuery(), getMonitor());
- assertTrue(queryResultSize(result) == repoCount);
- }
-
- private QueryableArtifactRepositoryManager getQueryableManager() {
- return new QueryableArtifactRepositoryManager(ProvisioningUI.getDefaultUI(), false);
- }
-}
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
deleted file mode 100644
index 5b8c4d953..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryableMetadataRepositoryManagerTest.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import java.io.File;
-import java.net.URI;
-import java.util.Collection;
-import org.eclipse.core.tests.harness.CancelingProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.AvailableIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositories;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-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.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.tests.TestData;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Tests for {@link QueryableMetadataRepositoryManager}.
- */
-public class QueryableMetadataRepositoryManagerTest extends AbstractQueryTest {
- /**
- * Tests querying against a non-existent repository
- */
-
- ProvisioningUI ui;
- ProvisioningSession session;
-
- protected void setUp() throws Exception {
- ui = ProvisioningUI.getDefaultUI();
- session = ui.getSession();
- super.setUp();
- }
-
- public void testBrokenRepository() {
- URI brokenRepo;
- try {
- brokenRepo = TestData.getFile("metadataRepo", "bad").toURI();
- } catch (Exception e) {
- fail("0.99", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.addRepository(brokenRepo);
- QueryableMetadataRepositoryManager manager = getQueryableManager();
- assertTrue("1.0", !manager.areRepositoriesLoaded());
-
- ProvisioningJob loadJob = new LoadMetadataRepositoryJob(ui);
- loadJob.runModal(getMonitor());
-
- //false because the broken repository is not loaded
- assertTrue("1.1", !manager.areRepositoriesLoaded());
- }
-
- /**
- * Tests canceling a load
- */
- public void testCancelLoad() {
- URI location;
- try {
- location = TestData.getFile("metadataRepo", "good").toURI();
- } catch (Exception e) {
- fail("0.99", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.addRepository(location);
- QueryableMetadataRepositoryManager manager = getQueryableManager();
- assertTrue("1.0", !manager.areRepositoriesLoaded());
-
- ProvisioningJob loadJob = new LoadMetadataRepositoryJob(ui);
- loadJob.runModal(new CancelingProgressMonitor());
-
- //should not be loaded due to cancelation
- assertTrue("1.1", !manager.areRepositoriesLoaded());
- }
-
- public void testCancelQuery() {
- URI existing, nonExisting, broken;
- try {
- existing = TestData.getFile("metadataRepo", "good").toURI();
- nonExisting = new File("does/not/exist/testNotFoundRepository").toURI();
- broken = TestData.getFile("metadataRepo", "bad").toURI();
- } catch (Exception e) {
- fail("0.99", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.addRepository(existing);
- metadataRepositoryManager.addRepository(nonExisting);
- metadataRepositoryManager.addRepository(broken);
- QueryableMetadataRepositoryManager manager = getQueryableManager();
-
- IQueryResult result = manager.query(QueryUtil.createIUQuery("test.bundle", Version.createOSGi(1, 0, 0)), new CancelingProgressMonitor());
- assertTrue("1.0", result.isEmpty());
- }
-
- public void testExistingRepository() {
- URI location;
- try {
- location = TestData.getFile("metadataRepo", "good").toURI();
- } catch (Exception e) {
- fail("0.99", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.addRepository(location);
- QueryableMetadataRepositoryManager manager = getQueryableManager();
- assertTrue("1.0", !manager.areRepositoriesLoaded());
-
- ProvisioningJob loadJob = new LoadMetadataRepositoryJob(ui);
- loadJob.runModal(getMonitor());
-
- // the provisioning job retains references to the repos so they should
- // not get garbage collected.
- assertTrue("1.1", manager.areRepositoriesLoaded());
- }
-
- /**
- * Tests querying against a non-existent repository
- */
- public void testNotFoundRepository() {
- URI existing, nonExisting;
- try {
- existing = TestData.getFile("metadataRepo", "good").toURI();
- nonExisting = new File("does/not/exist/testNotFoundRepository").toURI();
- } catch (Exception e) {
- fail("0.99", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.addRepository(existing);
- metadataRepositoryManager.addRepository(nonExisting);
- QueryableMetadataRepositoryManager manager = getQueryableManager();
- // not loaded yet
- assertFalse("1.0", manager.areRepositoriesLoaded());
-
- ProvisioningJob loadJob = new LoadMetadataRepositoryJob(ui);
- loadJob.runModal(getMonitor());
-
- // the repositories have been loaded. Because the non-existent
- // repository has been noticed and recorded as missing, it
- // does not count "not loaded."
- assertTrue("1.1", manager.areRepositoriesLoaded());
- }
-
- public void testQuery() {
- URI existing, nonExisting, broken;
- try {
- existing = TestData.getFile("metadataRepo", "good").toURI();
- nonExisting = new File("does/not/exist/testNotFoundRepository").toURI();
- broken = TestData.getFile("metadataRepo", "bad").toURI();
- } catch (Exception e) {
- fail("0.99", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.addRepository(existing);
- metadataRepositoryManager.addRepository(nonExisting);
- metadataRepositoryManager.addRepository(broken);
- QueryableMetadataRepositoryManager manager = getQueryableManager();
-
- IQueryResult result = manager.query(QueryUtil.createIUQuery("test.bundle", Version.createOSGi(1, 0, 0)), getMonitor());
- assertEquals("1.0", 1, queryResultSize(result));
- IInstallableUnit iu = (IInstallableUnit) result.iterator().next();
- assertEquals("1.1", "test.bundle", iu.getId());
-
- // RepoLocationQuery must cause repository URI's to be collected and no repository
- // loading should occur.
- result = manager.locationsQueriable().query(new RepositoryLocationQuery(), getMonitor());
- assertEquals("2.0", 3, queryResultSize(result));
- assertContains("2.1", result, existing);
- assertContains("2.1", result, nonExisting);
- assertContains("2.1", result, broken);
-
- // null IUPropertyQuery collects all IUs
- result = manager.query(QueryUtil.createIUQuery((String) null), getMonitor());
- int iuCount = queryResultSize(result);
- result = manager.query(QueryUtil.createIUPropertyQuery(null, QueryUtil.ANY), getMonitor());
- assertEquals("2.2", iuCount, queryResultSize(result));
- }
-
- public void testNonLatestInMultipleRepositories() {
- URI multipleVersion1, multipleVersion2;
- try {
- multipleVersion1 = TestData.getFile("metadataRepo", "multipleversions1").toURI();
- multipleVersion2 = TestData.getFile("metadataRepo", "multipleversions2").toURI();
- } catch (Exception e) {
- fail("0.99", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.addRepository(multipleVersion1);
- metadataRepositoryManager.addRepository(multipleVersion2);
- QueryableMetadataRepositoryManager manager = getQueryableManager();
-
- IUViewQueryContext context = new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_FLAT);
- context.setShowLatestVersionsOnly(false);
-
- MetadataRepositories rootElement = new MetadataRepositories(context, ui, manager);
- QueryProvider queryProvider = new QueryProvider(ui);
- ElementQueryDescriptor queryDescriptor = queryProvider.getQueryDescriptor(rootElement);
- Collection collection = queryDescriptor.performQuery(null);
- assertEquals("1.0", 5, collection.size());
- }
-
- public void testLatestInMultipleRepositories() {
- URI multipleVersion1, multipleVersion2;
- try {
- multipleVersion1 = TestData.getFile("metadataRepo", "multipleversions1").toURI();
- multipleVersion2 = TestData.getFile("metadataRepo", "multipleversions2").toURI();
- } catch (Exception e) {
- fail("0.99", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.addRepository(multipleVersion1);
- metadataRepositoryManager.addRepository(multipleVersion2);
- QueryableMetadataRepositoryManager manager = getQueryableManager();
-
- IUViewQueryContext context = new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_FLAT);
- context.setShowLatestVersionsOnly(true);
-
- MetadataRepositories rootElement = new MetadataRepositories(context, ui, manager);
- QueryProvider queryProvider = new QueryProvider(ui);
- ElementQueryDescriptor queryDescriptor = queryProvider.getQueryDescriptor(rootElement);
- Collection collection = queryDescriptor.performQuery(null);
- assertEquals("1.0", 1, collection.size());
- AvailableIUElement next = (AvailableIUElement) collection.iterator().next();
- assertEquals("1.1", Version.createOSGi(3, 0, 0), next.getIU().getVersion());
- }
-
- /**
- * Tests that the repository nickname is set on load. See bug 274334 for details.
- */
- public void testNicknameOnLoad() {
- URI location;
- try {
- location = TestData.getFile("metadataRepo", "good").toURI();
- } catch (Exception e) {
- fail("0.98", e);
- return;
- }
- IMetadataRepositoryManager metadataRepositoryManager = getMetadataRepositoryManager();
- metadataRepositoryManager.removeRepository(location);
- metadataRepositoryManager.addRepository(location);
- try {
- ui.loadMetadataRepository(location, false, getMonitor());
- } catch (ProvisionException e) {
- fail("0.99", e);
- }
- assertEquals("1.0", "Good Test Repository", metadataRepositoryManager.getRepositoryProperty(location, IRepository.PROP_NICKNAME));
-
- }
-
- private QueryableMetadataRepositoryManager getQueryableManager() {
- return new QueryableMetadataRepositoryManager(ui, false);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/TranslationSupportTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/TranslationSupportTests.java
deleted file mode 100644
index d6db49999..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/TranslationSupportTests.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * EclipseSource - bug fixing
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.query;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Tests for {@link TranslationSupport}.
- */
-public class TranslationSupportTests extends AbstractQueryTest {
- Profile profile;
- IQueryable oldTranslationSource;
-
- protected void setUp() throws Exception {
- super.setUp();
- profile = (Profile) createProfile("testLocalizedLicense");
- oldTranslationSource = TranslationSupport.getInstance().setTranslationSource(profile);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- TranslationSupport.getInstance().setTranslationSource(oldTranslationSource);
- }
-
- public void testFeatureProperties() {
- IMetadataRepositoryManager repoMan = (IMetadataRepositoryManager) getAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- File site = getTestData("0.1", "/testData/metadataRepo/externalized");
- URI location = site.toURI();
- IMetadataRepository repository;
- try {
- repository = repoMan.loadRepository(location, getMonitor());
- } catch (ProvisionException e) {
- fail("1.99", e);
- return;
- }
- IQueryResult result = repository.query(QueryUtil.createIUQuery("test.feature.feature.group"), getMonitor());
- assertTrue("1.0", !result.isEmpty());
- IInstallableUnit unit = (IInstallableUnit) result.iterator().next();
-
- ICopyright copyright = unit.getCopyright(null);
- assertEquals("1.1", "Test Copyright", copyright.getBody());
- ILicense license = unit.getLicenses(null).iterator().next();
- assertEquals("1.2", "Test License", license.getBody());
- // assertEquals("1.3", "license.html", license.getURL().toExternalForm());
- String name = unit.getProperty(IInstallableUnit.PROP_NAME, null);
- assertEquals("1.4", "Test Feature Name", name);
- String description = unit.getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
- assertEquals("1.5", "Test Description", description);
- String provider = unit.getProperty(IInstallableUnit.PROP_PROVIDER, null);
- assertEquals("1.6", "Test Provider Name", provider);
- }
-
- public void testLocalizedLicense() throws URISyntaxException {
- String germanLicense = "German License";
- String canadianFRLicense = "Canadian French License";
-
- // Create a IU that has a license, but the license body is simply %license. This will be filled in by
- // a fragment
- org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription iuDescription = new org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription();
- iuDescription.setId("some IU");
- iuDescription.setVersion(Version.createOSGi(1, 0, 0));
- iuDescription.setLicenses(new ILicense[] {MetadataFactory.createLicense(new URI("http://example.com"), "%license")});
- iuDescription.addProvidedCapabilities(Collections.singleton(MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, "some IU", Version.createOSGi(1, 0, 0))));
- IInstallableUnit iu = MetadataFactory.createInstallableUnit(iuDescription);
-
- // Create a bunch of fragments which spec our IU as their host
- // These fragments don't contribute language information
- for (int i = 0; i < 10; i++) {
- org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription installableUnitFragmentDescription = new org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription();
- installableUnitFragmentDescription.setId("fragment number: " + i);
- installableUnitFragmentDescription.setVersion(Version.createOSGi(1, 0, 0));
- installableUnitFragmentDescription.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "some IU", ANY_VERSION, null, false, false)});
- installableUnitFragmentDescription.setProperty(org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription.PROP_TYPE_FRAGMENT, "true");
- IInstallableUnitFragment iuFragment = MetadataFactory.createInstallableUnitFragment(installableUnitFragmentDescription);
- profile.addInstallableUnit(iuFragment);
- }
-
- // Create fragment with a German license
- org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription installableUnitFragmentDescription = new org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription();
- IProvidedCapability providedCapability = MetadataFactory.createProvidedCapability("org.eclipse.equinox.p2.localization", "de", Version.createOSGi(1, 0, 0));
- ArrayList list = new ArrayList();
- list.add(providedCapability);
- installableUnitFragmentDescription.addProvidedCapabilities(list);
- installableUnitFragmentDescription.setId("german fragment");
- installableUnitFragmentDescription.setVersion(Version.createOSGi(1, 0, 0));
- installableUnitFragmentDescription.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "some IU", ANY_VERSION, null, false, false)});
- installableUnitFragmentDescription.setProperty(org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription.PROP_TYPE_FRAGMENT, "true");
- installableUnitFragmentDescription.setProperty("de.license", germanLicense);
- IInstallableUnitFragment iuFragment = MetadataFactory.createInstallableUnitFragment(installableUnitFragmentDescription);
- profile.addInstallableUnit(iuFragment);
-
- // Create a French fragment with an fr_CA license
- installableUnitFragmentDescription = new org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription();
- providedCapability = MetadataFactory.createProvidedCapability("org.eclipse.equinox.p2.localization", "fr", Version.createOSGi(1, 0, 0));
- list = new ArrayList();
- list.add(providedCapability);
- installableUnitFragmentDescription.addProvidedCapabilities(list);
- installableUnitFragmentDescription.setId("cnd french fragment");
- installableUnitFragmentDescription.setVersion(Version.createOSGi(1, 0, 0));
- installableUnitFragmentDescription.setHost(new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, "some IU", ANY_VERSION, null, false, false)});
- installableUnitFragmentDescription.setProperty(org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription.PROP_TYPE_FRAGMENT, "true");
- installableUnitFragmentDescription.setProperty("fr_CA.license", canadianFRLicense);
- iuFragment = MetadataFactory.createInstallableUnitFragment(installableUnitFragmentDescription);
-
- profile.addInstallableUnit(iuFragment);
- profile.addInstallableUnit(iu);
-
- ILicense license = iu.getLicenses(Locale.GERMAN.toString()).iterator().next();
- assertEquals("1.0", germanLicense, license.getBody());
- license = iu.getLicenses(Locale.CANADA_FRENCH.toString()).iterator().next();
- assertEquals("1.1", canadianFRLicense, license.getBody());
- }
-
- public void testBasicIU() {
- IInstallableUnit unit = createIU("f1");
-
- assertNull("1.1", unit.getCopyright(null));
- assertEquals("1.2", 0, unit.getLicenses(null).size());
- assertNull("1.3", unit.getProperty(IInstallableUnit.PROP_NAME, null));
- assertNull("1.4", unit.getProperty(IInstallableUnit.PROP_DESCRIPTION, null));
- assertNull("1.5", unit.getProperty(IInstallableUnit.PROP_PROVIDER, null));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/AllTests.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/AllTests.java
deleted file mode 100644
index cd87a077b..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/AllTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.repohandling;
-
-import junit.framework.*;
-
-/**
- * Performs all UI action tests.
- */
-public class AllTests extends TestCase {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(AllTests.class.getName());
- suite.addTestSuite(SiteImportExportTest.class);
- return suite;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/SiteImportExportTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/SiteImportExportTest.java
deleted file mode 100644
index 1948e5a87..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/repohandling/SiteImportExportTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.tests.ui.repohandling;
-
-import java.io.File;
-import org.eclipse.equinox.internal.p2.ui.UpdateManagerCompatibility;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.p2.tests.ui.AbstractProvisioningUITest;
-
-public class SiteImportExportTest extends AbstractProvisioningUITest {
- public void testUpdateManagerImport() {
- int siteCount;
- File bookmarks = getTestData("Getting site bookmarks", "/testData/siteBookmarks/siteexport33.xml/");
- MetadataRepositoryElement[] elements = UpdateManagerCompatibility.readBookmarkFile(bookmarks);
- siteCount = elements.length;
- assertNotNull("1.0", elements);
- assertTrue("1.1", siteCount > 0);
- MetadataRepositoryElement element = elements[0];
- element.setNickname("Foo");
-
- File folder = getTempFolder();
- File testExport = new File(folder, "testExport.xml");
- UpdateManagerCompatibility.writeBookmarkFile(testExport.getAbsolutePath(), elements);
-
- elements = UpdateManagerCompatibility.readBookmarkFile(testExport);
- assertEquals("1.2", siteCount, elements.length);
- assertEquals("1.3", elements[0].getName(), "Foo");
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/test.xml b/bundles/org.eclipse.equinox.p2.tests.ui/test.xml
deleted file mode 100644
index 968c0d815..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.ui/test.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-<project name="p2 Automated Tests" default="run" basedir=".">
-
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="eclipse-home" value="${basedir}/../../" />
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml" />
- <property name="p2ui_location" value="${eclipse-home}/p2_ui_data_dir" />
- <property name="plugin-name" value="org.eclipse.equinox.p2.tests.ui" />
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp />
- </target>
-
- <!-- This target holds code to cleanup the testing environment after the tests -->
- <!-- have been run. You can use this to delete temporary files that are created. -->
- <target name="cleanup">
- <delete dir="${p2ui_location}" quiet="true" />
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
-
- <!-- This target runs the performance test suites. Any actions that need to happen after all -->
- <!-- the tests have been run should go here. -->
- <target name="performance" depends="init,performance-suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org*.xml" />
- <property name="output-file" value="${plugin-name}.xml" />
- </ant>
- </target>
-
- <target name="p2Tests" depends="init,cleanup">
- <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${p2ui_location}" />
- <property name="plugin-name" value="org.eclipse.equinox.p2.tests.ui" />
- <property name="classname" value="org.eclipse.equinox.p2.tests.ui.AutomatedTests" />
- </ant>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite" depends="p2Tests" />
-
- <!-- This target defines the performance tests that need to be run. -->
- <target name="performance-suite" depends="p2PerformanceTests" />
-
- <target name="p2PerformanceTests">
- <!-- TODO -->
- </target>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/.classpath b/bundles/org.eclipse.equinox.p2.tests.verifier/.classpath
deleted file mode 100644
index 5e4c1fe99..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <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.5"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/.project b/bundles/org.eclipse.equinox.p2.tests.verifier/.project
deleted file mode 100644
index 26f02410c..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.tests.verifier</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 02769f056..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,351 +0,0 @@
-#Thu Oct 07 09:13:16 EDT 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-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=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.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=disabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-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=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
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index cb66dccdf..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,61 +0,0 @@
-#Thu Oct 30 11:24:56 EDT 2008
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF
deleted file mode 100644
index 5a0a01d2d..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Test Install Verifier
-Bundle-SymbolicName: org.eclipse.equinox.p2.tests.verifier;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.tests.verifier.Activator
-Export-Package: org.eclipse.equinox.internal.p2.tests.verifier;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.equinox.p2.core
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)"
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/build.properties b/bundles/org.eclipse.equinox.p2.tests.verifier/build.properties
deleted file mode 100644
index b4a80b58f..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
-javacWarnings..=-raw,-unchecked,-varargsCast \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/plugin.xml b/bundles/org.eclipse.equinox.p2.tests.verifier/plugin.xml
deleted file mode 100644
index 27d6c0c8a..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/plugin.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension id="application" point="org.eclipse.core.runtime.applications">
- <application cardinality="singleton-global" thread="main" visible="true">
- <run class="org.eclipse.equinox.internal.p2.tests.verifier.VerifierApplication"/>
- </application>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml b/bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml
deleted file mode 100644
index 85e7d1869..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.tests.verifier</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/Activator.java b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/Activator.java
deleted file mode 100644
index d2a6fd2f6..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/Activator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tests.verifier;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator implements BundleActivator {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.tests.verifier"; //$NON-NLS-1$
- private static BundleContext bundleContext;
-
- /**
- * The constructor
- */
- public Activator() {
- // nothing interesting to do
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- bundleContext = context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- bundleContext = null;
- }
-
- /*
- * Return the bundle context or <code>null</code>.
- */
- public static BundleContext getBundleContext() {
- return bundleContext;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java b/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
deleted file mode 100644
index fd9029c8d..000000000
--- a/bundles/org.eclipse.equinox.p2.tests.verifier/src/org/eclipse/equinox/internal/p2/tests/verifier/VerifierApplication.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.tests.verifier;
-
-import java.io.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorMsg;
-import org.eclipse.core.runtime.internal.adaptor.MessageHelper;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.osgi.framework.internal.core.Constants;
-import org.eclipse.osgi.service.resolver.*;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.Bundle;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * Application which verifies an install.
- *
- * @since 1.0
- */
-public class VerifierApplication implements IApplication {
-
- private static final File DEFAULT_PROPERTIES_FILE = new File("verifier.properties"); //$NON-NLS-1$
- private static final String ARG_PROPERTIES = "-verifier.properties"; //$NON-NLS-1$
- private IProvisioningAgent agent;
- private Properties properties = null;
- private List ignoreResolved = null;
-
- /*
- * Create and return an error status with the given message.
- */
- private static IStatus createError(String message) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, message);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) throws Exception {
- String[] args = (String[]) context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
- processArguments(args);
-
- agent = (IProvisioningAgent) ServiceHelper.getService(Activator.getBundleContext(), IProvisioningAgent.SERVICE_NAME);
-
- IStatus result = verify();
- if (!result.isOK()) {
- // PrintWriter out = new PrintWriter(new FileWriter(new File("c:/tmp/dropins-debug.txt")));
- PrintWriter out = new PrintWriter(new OutputStreamWriter(System.err));
- out.println("Error from dropin verifier application: " + result.getMessage()); //$NON-NLS-1$
- Throwable t = result.getException();
- if (t != null)
- t.printStackTrace(out);
- out.close();
- LogHelper.log(result);
- }
- return result.isOK() ? IApplication.EXIT_OK : new Integer(13);
- }
-
- /*
- * Go through the command-line args and pull out interesting ones
- * for later consumption.
- */
- private void processArguments(String[] args) {
- if (args == null)
- return;
-
- for (int i = 1; i < args.length; i++) {
- if (ARG_PROPERTIES.equals(args[i - 1])) {
- String filename = args[i];
- if (filename.startsWith("-")) //$NON-NLS-1$
- continue;
- try {
- properties = readProperties(new File(filename));
- } catch (IOException e) {
- // TODO
- e.printStackTrace();
- // fall through to load default
- }
- continue;
- }
- }
-
- // problems loading properties file or none specified so look for a default
- if (properties == null) {
- try {
- if (DEFAULT_PROPERTIES_FILE.exists())
- properties = readProperties(DEFAULT_PROPERTIES_FILE);
- } catch (IOException e) {
- // TODO
- e.printStackTrace();
- }
- }
- if (properties == null)
- properties = new Properties();
- }
-
- /*
- * Read and return a properties file at the given location.
- */
- private Properties readProperties(File file) throws IOException {
- Properties result = new Properties();
- InputStream input = null;
- try {
- input = new BufferedInputStream(new FileInputStream(file));
- result.load(input);
- return result;
- } finally {
- if (input != null)
- try {
- input.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- // nothing to do
- }
-
- /*
- * Return a boolean value indicating whether or not the bundle with the given symbolic name
- * should be considered when looking at bundles which are not resolved in the system.
- * TODO the call to this method was removed. we should add it back
- */
- protected boolean shouldCheckResolved(String bundle) {
- if (ignoreResolved == null) {
- ignoreResolved = new ArrayList();
- String list = properties.getProperty("ignore.unresolved");
- if (list == null)
- return true;
- for (StringTokenizer tokenizer = new StringTokenizer(list, ","); tokenizer.hasMoreTokens();)
- ignoreResolved.add(tokenizer.nextToken().trim());
- }
- for (Iterator iter = ignoreResolved.iterator(); iter.hasNext();) {
- if (bundle.equals(iter.next()))
- return false;
- }
- return true;
- }
-
- private List getAllBundles() {
- PlatformAdmin platformAdmin = (PlatformAdmin) ServiceHelper.getService(Activator.getBundleContext(), PlatformAdmin.class.getName());
- PackageAdmin packageAdmin = (PackageAdmin) ServiceHelper.getService(Activator.getBundleContext(), PackageAdmin.class.getName());
- State state = platformAdmin.getState(false);
- List result = new ArrayList();
-
- BundleDescription[] bundles = state.getBundles();
- for (int i = 0; i < bundles.length; i++) {
- BundleDescription bundle = bundles[i];
- Bundle[] versions = packageAdmin.getBundles(bundle.getSymbolicName(), bundle.getVersion().toString());
- for (int j = 0; j < versions.length; j++)
- result.add(versions[j]);
- }
- return result;
- }
-
- /*
- * Check to ensure all of the bundles in the system are resolved.
- *
- * Copied and modified from EclipseStarter#logUnresolvedBundles.
- * This method prints out all the reasons while asking the resolver directly
- * will only print out the first reason.
- */
- private IStatus checkResolved() {
- List allProblems = new ArrayList();
- PlatformAdmin platformAdmin = (PlatformAdmin) ServiceHelper.getService(Activator.getBundleContext(), PlatformAdmin.class.getName());
- State state = platformAdmin.getState(false);
- StateHelper stateHelper = platformAdmin.getStateHelper();
-
- // first lets look for missing leaf constraints (bug 114120)
- VersionConstraint[] leafConstraints = stateHelper.getUnsatisfiedLeaves(state.getBundles());
- // hash the missing leaf constraints by the declaring bundles
- Map missing = new HashMap();
- for (int i = 0; i < leafConstraints.length; i++) {
- // only include non-optional and non-dynamic constraint leafs
- if (leafConstraints[i] instanceof BundleSpecification && ((BundleSpecification) leafConstraints[i]).isOptional())
- continue;
- if (leafConstraints[i] instanceof ImportPackageSpecification) {
- if (ImportPackageSpecification.RESOLUTION_OPTIONAL.equals(((ImportPackageSpecification) leafConstraints[i]).getDirective(Constants.RESOLUTION_DIRECTIVE)))
- continue;
- if (ImportPackageSpecification.RESOLUTION_DYNAMIC.equals(((ImportPackageSpecification) leafConstraints[i]).getDirective(Constants.RESOLUTION_DIRECTIVE)))
- continue;
- }
- BundleDescription bundleDesc = leafConstraints[i].getBundle();
- ArrayList constraints = (ArrayList) missing.get(bundleDesc);
- if (constraints == null) {
- constraints = new ArrayList();
- missing.put(bundleDesc, constraints);
- }
- constraints.add(leafConstraints[i]);
- }
-
- // found some bundles with missing leaf constraints; log them first
- if (missing.size() > 0) {
- for (Iterator iter = missing.keySet().iterator(); iter.hasNext();) {
- BundleDescription description = (BundleDescription) iter.next();
- String generalMessage = NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_RESOLVED, description.getLocation());
- ArrayList constraints = (ArrayList) missing.get(description);
- for (Iterator inner = constraints.iterator(); inner.hasNext();) {
- String message = generalMessage + " Reason: " + MessageHelper.getResolutionFailureMessage((VersionConstraint) inner.next()); //$NON-NLS-1$
- allProblems.add(createError(message));
- }
- }
- }
-
- // There may be some bundles unresolved for other reasons, causing the system to be unresolved
- // log all unresolved constraints now
- List allBundles = getAllBundles();
- for (Iterator i = allBundles.iterator(); i.hasNext();) {
- Bundle bundle = (Bundle) i.next();
- if (bundle.getState() == Bundle.INSTALLED) {
- String generalMessage = NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_ERROR_BUNDLE_NOT_RESOLVED, bundle);
- BundleDescription description = state.getBundle(bundle.getBundleId());
- // for some reason, the state does not know about that bundle
- if (description == null)
- continue;
- VersionConstraint[] unsatisfied = stateHelper.getUnsatisfiedConstraints(description);
- if (unsatisfied.length > 0) {
- // the bundle wasn't resolved due to some of its constraints were unsatisfiable
- for (int j = 0; j < unsatisfied.length; j++)
- allProblems.add(createError(generalMessage + " Reason: " + MessageHelper.getResolutionFailureMessage(unsatisfied[j]))); //$NON-NLS-1$
- } else {
- ResolverError[] resolverErrors = state.getResolverErrors(description);
- for (int j = 0; j < resolverErrors.length; j++) {
- if (shouldAdd(resolverErrors[j])) {
- allProblems.add(createError(generalMessage + " Reason: " + resolverErrors[j].toString())); //$NON-NLS-1$
- }
- }
- }
- }
- }
- MultiStatus result = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, "Problems checking resolved bundles.", null); //$NON-NLS-1$
- for (Iterator iter = allProblems.iterator(); iter.hasNext();)
- result.add((IStatus) iter.next());
- return result;
- }
-
- /*
- * Return a boolean value indicating whether or not the given resolver error should be
- * added to our results.
- */
- private boolean shouldAdd(ResolverError error) {
- // ignore EE problems? default value is true
- String prop = properties.getProperty("ignore.ee"); //$NON-NLS-1$
- boolean ignoreEE = prop == null || Boolean.valueOf(prop).booleanValue();
- if (ResolverError.MISSING_EXECUTION_ENVIRONMENT == error.getType() && ignoreEE)
- return false;
- return true;
- }
-
- /*
- * Ensure we have a profile registry and can access the SELF profile.
- */
- private IStatus checkProfileRegistry() {
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (registry == null)
- return createError("Profile registry service not available."); //$NON-NLS-1$
- IProfile profile = registry.getProfile(IProfileRegistry.SELF);
- if (profile == null)
- return createError("SELF profile not available in profile registry."); //$NON-NLS-1$
- IQueryResult results = profile.query(QueryUtil.createIUQuery(Activator.PLUGIN_ID), null);
- if (results.isEmpty())
- return createError(NLS.bind("IU for {0} not found in SELF profile.", Activator.PLUGIN_ID)); //$NON-NLS-1$
- return Status.OK_STATUS;
- }
-
- /*
- * Perform all of the verification checks.
- */
- public IStatus verify() {
- String message = "Problems occurred during verification."; //$NON-NLS-1$
- MultiStatus result = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, message, null);
-
- // ensure all the bundles are resolved
- IStatus temp = checkResolved();
- if (!temp.isOK())
- result.merge(temp);
-
- // ensure we have a profile registry
- temp = checkProfileRegistry();
- if (!temp.isOK())
- result.merge(temp);
-
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/.classpath b/bundles/org.eclipse.equinox.p2.testserver/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.testserver/.cvsignore b/bundles/org.eclipse.equinox.p2.testserver/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.testserver/.project b/bundles/org.eclipse.equinox.p2.testserver/.project
deleted file mode 100644
index b31ab4533..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.testserver</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 6b947078c..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,353 +0,0 @@
-#Thu Apr 23 14:57:34 CEST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-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.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-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.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 9cdad0ea3..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,56 +0,0 @@
-#Thu Apr 23 14:20:17 CEST 2009
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=20
-org.eclipse.jdt.ui.staticondemandthreshold=20
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.testserver/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.testserver/META-INF/MANIFEST.MF
deleted file mode 100644
index 3e35f7599..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Testserver
-Bundle-SymbolicName: org.eclipse.equinox.p2.testserver;singleton:=true
-Bundle-Version: 1.0.0
-Bundle-Activator: org.eclipse.equinox.p2.testserver.Activator
-Bundle-Vendor: Eclipse
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4
-Import-Package: org.eclipse.equinox.http,
- org.osgi.framework;version="1.3.0"
-Bundle-ActivationPolicy: lazy
-Require-Bundle: javax.servlet;bundle-version="2.4.0",
- org.eclipse.equinox.http.registry,
- org.eclipse.equinox.http.servlet;bundle-version="1.0.200",
- org.eclipse.osgi.services;bundle-version="3.2.0",
- org.eclipse.osgi.util;bundle-version="3.2.0",
- org.eclipse.osgi;bundle-version="3.5.0"
diff --git a/bundles/org.eclipse.equinox.p2.testserver/build.properties b/bundles/org.eclipse.equinox.p2.testserver/build.properties
deleted file mode 100644
index e9863e281..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/bundles/org.eclipse.equinox.p2.testserver/p2 test server.launch b/bundles/org.eclipse.equinox.p2.testserver/p2 test server.launch
deleted file mode 100644
index 9038d3958..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/p2 test server.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.EquinoxLauncher">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="true"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/p2 test server"/>
-<booleanAttribute key="default_auto_start" value="true"/>
-<intAttribute key="default_start_level" value="4"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.platform.doc.user,org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.ui,org.eclipse.jface,org.eclipse.equinox.p2.examples.rcp.sdkui,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.text,org.eclipse.equinox.p2.tests.ui,org.eclipse.jface.text,org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.concurrent,org.eclipse.jdt.core,org.eclipse.equinox.p2.artifact.repository,org.sat4j.core*2.1.1.v20090825,org.eclipse.equinox.frameworkadmin.equinox,org.sat4j.pb*2.1.1.v20090825,org.eclipse.update.scheduler,org.eclipse.equinox.p2.updatesite,org.eclipse.core.databinding.beans,org.eclipse.core.filebuffers,org.eclipse.ui.examples.undo,org.eclipse.equinox.p2.metadata.repository,org.eclipse.ui,org.apache.xml.resolver,org.eclipse.search,org.eclipse.equinox.p2.sar,org.eclipse.equinox.p2.repository,org.eclipse.ui.tests,org.eclipse.ui.examples.fieldassist,org.eclipse.test.performance,org.eclipse.core.databinding,org.eclipse.core.tests.harness,org.eclipse.platform.doc.isv,org.eclipse.ui.examples.job,org.eclipse.equinox.frameworkadmin,org.eclipse.core.expressions,org.eclipse.equinox.p2.selfhosting,org.eclipse.equinox.p2.jarprocessor,org.eclipse.ui.forms,org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates,org.eclipse.equinox.p2.examples.rcp.cloud*1.0.0.qualifier,org.sat4j.pb*2.1.0.v20090520,org.eclipse.equinox.p2.tests,Snippets,org.easymock,org.eclipse.core.commands,org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.examples.rcp.prestartupdate,org.eclipse.equinox.p2.publisher,org.eclipse.jface.databinding,ie.wombat.jbdiff,test271339,org.eclipse.ui.console,org.eclipse.equinox.preferences,org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.ui.sdk,org.sat4j.core*2.1.0.v20090520,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.tests.optimizers,JobTest,org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.ui.tests.harness,org.eclipse.equinox.p2.tests.verifier,org.eclipse.equinox.p2.repository.tools,org.eclipse.ui.workbench,org.eclipse.equinox.p2.exemplarysetup,org.eclipse.equinox.p2.console,org.eclipse.core.databinding.observable,org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.p2.artifact.processors,RCPMail,org.eclipse.ui.ide,org.eclipse.equinox.p2.installer,org.eclipse.update.ui,org.eclipse.core.databinding.property,org.eclipse.equinox.p2.tools,org.eclipse.equinox.p2.examples.rcp.cloud*1.0.0.qualifier,org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility,org.eclipse.core.runtime,org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.equinox.frameworkadmin.test,org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.p2.updatechecker,org.eclipse.equinox.p2.ui.sdk.scheduler"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -console"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="javax.servlet@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.http.servlet@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.registry@default:default,javax.xml@default:default"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.eclipse.equinox.http@default:default,org.eclipse.osgi,org.eclipse.equinox.common@default:default,org.eclipse.equinox.p2.testserver@default:default"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/plugin.xml b/bundles/org.eclipse.equinox.p2.testserver/plugin.xml
deleted file mode 100644
index 2b35d936a..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/plugin.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.equinox.http.registry.servlets">
- <servlet
- alias="/helloworld"
- class="org.eclipse.equinox.p2.testserver.servlets.HelloWorld">
- </servlet>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/pom.xml b/bundles/org.eclipse.equinox.p2.testserver/pom.xml
deleted file mode 100644
index c512ff098..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.testserver</artifactId>
- <version>1.0.0</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
deleted file mode 100644
index 3a9860e89..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/Activator.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.net.URI;
-import javax.servlet.ServletException;
-import org.eclipse.equinox.p2.testserver.servlets.BasicResourceDelivery;
-import org.eclipse.equinox.p2.testserver.servlets.ChopAndDelay;
-import org.eclipse.equinox.p2.testserver.servlets.ContentLengthLier;
-import org.eclipse.equinox.p2.testserver.servlets.FileMolester;
-import org.eclipse.equinox.p2.testserver.servlets.LastModifiedLier;
-import org.eclipse.equinox.p2.testserver.servlets.Redirector;
-import org.eclipse.equinox.p2.testserver.servlets.StatusCodeResponse;
-import org.eclipse.equinox.p2.testserver.servlets.TimeOut;
-import org.eclipse.equinox.p2.testserver.servlets.Truncator;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.http.HttpService;
-import org.osgi.service.http.NamespaceException;
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.util.tracker.ServiceTrackerCustomizer;
-
-public class Activator implements BundleActivator, ServiceTrackerCustomizer {
- private static BundleContext context;
- private ServiceTracker httpTracker;
- private SecureContext secureHttpContext;
- private SecuredArtifactsContext artifactSecuredHttpContext;
- private static Activator instance;
- private HttpService httpService;
- private AlwaysFailContext alwaysFail;
- private FlipFlopFailContext flipFlop;
-
- private static final String SITE = "http://download.eclipse.org/eclipse/updates/3.4"; //$NON-NLS-1$
- private static final String SITE2 = "http://www.eclipse.org/equinox/p2/testing/updateSite"; //$NON-NLS-1$
- private static final String SITE3 = "http://download.eclipse.org/eclipse/updates/3.5-I-builds/"; //$NON-NLS-1$
-
- public void start(BundleContext aContext) throws Exception {
- context = aContext;
-
- httpTracker = new ServiceTracker(context, HttpService.class.getName(), this);
- httpTracker.open();
- instance = this;
- }
-
- public void stop(BundleContext aContext) throws Exception {
- httpTracker.close();
- context = null;
- }
-
- public Object addingService(ServiceReference reference) {
- httpService = (HttpService) context.getService(reference);
- secureHttpContext = new SecureContext(httpService.createDefaultHttpContext());
- artifactSecuredHttpContext = new SecuredArtifactsContext(httpService.createDefaultHttpContext());
- alwaysFail = new AlwaysFailContext(httpService.createDefaultHttpContext());
- flipFlop = new FlipFlopFailContext(httpService.createDefaultHttpContext());
-
- try {
- httpService.registerResources("/public", "/webfiles", null); //$NON-NLS-1$ //$NON-NLS-2$
- httpService.registerResources("/private", "/webfiles", secureHttpContext); //$NON-NLS-1$ //$NON-NLS-2$
- httpService.registerResources("/never", "/webfiles", alwaysFail); //$NON-NLS-1$ //$NON-NLS-2$
- httpService.registerResources("/flipflop", "/webfiles", flipFlop); //$NON-NLS-1$ //$NON-NLS-2$
-
- httpService.registerServlet("/status", new StatusCodeResponse(), null, null); //$NON-NLS-1$
- httpService.registerServlet("/timeout", new TimeOut(), null, null); //$NON-NLS-1$
- httpService.registerServlet("/redirect", new Redirector(), null, null); //$NON-NLS-1$
-
- httpService.registerServlet("/truncated", new Truncator("/truncated", URI.create("/webfiles"), 50), null, null); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- httpService.registerServlet("/molested", new FileMolester("/molested", URI.create("/webfiles"), 40), null, null); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- // 8 bytes at a time, delay from 0 to 100 ms, in steps of 5
- httpService.registerServlet("/decelerate", new ChopAndDelay("/decelerate", URI.create("/webfiles"), 3, 0, new LinearChange(0, 5, 100, 0)), null, null); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-
- addProxyServices(httpService, SITE, "/proxy/"); //$NON-NLS-1$
- addProxyServices(httpService, SITE2, "/proxy2/"); //$NON-NLS-1$
-
- httpService.registerServlet("/proxy3/aprivate", new BasicResourceDelivery("/proxy3/aprivate", URI.create(SITE2)), null, artifactSecuredHttpContext); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet("/proxy4/aprivate", new BasicResourceDelivery("/proxy4/aprivate", URI.create(SITE3)), null, artifactSecuredHttpContext); //$NON-NLS-1$//$NON-NLS-2$
-
- } catch (NamespaceException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (ServletException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return httpService;
- }
-
- /**
- * Adds services to a location
- * @param site
- * @param root the "mount dir" e.g. "/proxy/" "/proxy2/" etc.
- * @throws NamespaceException
- * @throws ServletException
- */
- private void addProxyServices(HttpService httpService, String site, String root) throws ServletException, NamespaceException {
- httpService.registerServlet(root + "truncated", new Truncator(root + "truncated", URI.create(site), 50), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "public", new BasicResourceDelivery(root + "public", URI.create(site)), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "private", new BasicResourceDelivery(root + "private", URI.create(site)), null, secureHttpContext); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "never", new BasicResourceDelivery(root + "private", URI.create(site)), null, alwaysFail); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "flipFlop", new BasicResourceDelivery(root + "private", URI.create(site)), null, flipFlop); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "molested", new FileMolester(root + "molested", URI.create(site), 40), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "decelerate", new ChopAndDelay(root + "decelerate", URI.create(site), 3, 0, new LinearChange(0, 5, 100, 0)), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "decelerate2", new ChopAndDelay(root + "decelerate2", URI.create(site), 3, 80, new LinearChange(100, 5, 105, 0)), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "readtimeout", new ChopAndDelay(root + "readtimeout", URI.create(site), 3, 10, new LinearChange(10 * 60 * 1000, 5, 5 + 10 * 60 * 1000, 0)), null, null); //$NON-NLS-1$//$NON-NLS-2$
-
- // lie about modified time
- httpService.registerServlet(root + "modified/zero", new LastModifiedLier(root + "modified/zero", URI.create(site), LastModifiedLier.TYPE_ZERO), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "modified/old", new LastModifiedLier(root + "modified/old", URI.create(site), LastModifiedLier.TYPE_OLD), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "modified/now", new LastModifiedLier(root + "modified/now", URI.create(site), LastModifiedLier.TYPE_NOW), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "modified/future", new LastModifiedLier(root + "modified/future", URI.create(site), LastModifiedLier.TYPE_FUTURE), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "modified/bad", new LastModifiedLier(root + "modified/bad", URI.create(site), LastModifiedLier.TYPE_BAD), null, null); //$NON-NLS-1$//$NON-NLS-2$
-
- // lie about length
- httpService.registerServlet(root + "length/zero", new ContentLengthLier(root + "length/zero", URI.create(site), 0), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "length/less", new ContentLengthLier(root + "length/less", URI.create(site), 90), null, null); //$NON-NLS-1$//$NON-NLS-2$
- httpService.registerServlet(root + "length/more", new ContentLengthLier(root + "length/more", URI.create(site), 200), null, null); //$NON-NLS-1$//$NON-NLS-2$
-
- }
-
- public static Activator getInstance() {
- return instance;
- }
-
- public HttpService getHttp() {
- return httpService;
- }
-
- public void modifiedService(ServiceReference reference, Object service) {
- // do nothing
- }
-
- public void removedService(ServiceReference reference, Object service) {
- httpService = (HttpService) service;
- httpService.unregister("/public"); //$NON-NLS-1$
- httpService.unregister("/private"); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/AlwaysFailContext.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/AlwaysFailContext.java
deleted file mode 100644
index 6d4711897..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/AlwaysFailContext.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.net.URL;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.osgi.service.http.HttpContext;
-
-/**
- * The AlwaysFailContext can be used to add basic authentication to a path.
- * This implementation will always fail (easier to test failure logic) this way.
- */
-public class AlwaysFailContext implements HttpContext {
- private HttpContext theDefaultContext;
-
- public AlwaysFailContext(HttpContext defaultContext) {
- theDefaultContext = defaultContext;
- }
-
- public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) {
- // always fail
- response.setHeader("WWW-Authenticate", "BASIC realm=\"p2 Http Testing Server (Aladdin, open sesame)\""); //$NON-NLS-1$//$NON-NLS-2$
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- return false;
-
- }
-
- public String getMimeType(String name) {
- return theDefaultContext.getMimeType(name);
- }
-
- public URL getResource(String name) {
- return theDefaultContext.getResource(name);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/FlipFlopFailContext.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/FlipFlopFailContext.java
deleted file mode 100644
index 2ac9e7d04..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/FlipFlopFailContext.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.net.URL;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.osgi.service.http.HttpContext;
-
-/**
- * The SecureContext can be used to add basic authentication to a path.
- * It will fail on every other request to enable flaky server, or authentication testing.
- * This implementation requires the user "Aladdin" to log in with the password "open sesame".
- */
-public class FlipFlopFailContext implements HttpContext {
- private HttpContext theDefaultContext;
- public static int flipFlop = 0;
-
- public FlipFlopFailContext(HttpContext defaultContext) {
- theDefaultContext = defaultContext;
- }
-
- public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) {
- String auth = request.getHeader("Authorization"); //$NON-NLS-1$
- // Response is Aladdin:open sesame in Base64 encoding (from RFC example)
- if (auth != null && "QWxhZGRpbjpvcGVuIHNlc2FtZQ==".equals(auth.substring(6))) //$NON-NLS-1$
- return (flipFlop ^= 1) == 1 ? true : false;
-
- // if not authorized or wrong user/password
- response.setHeader("WWW-Authenticate", "BASIC realm=\"p2 Http Testing Server (Aladdin, open sesame)\""); //$NON-NLS-1$//$NON-NLS-2$
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- return false;
-
- }
-
- public String getMimeType(String name) {
- return theDefaultContext.getMimeType(name);
- }
-
- public URL getResource(String name) {
- return theDefaultContext.getResource(name);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/HttpConstants.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/HttpConstants.java
deleted file mode 100644
index 810ab5e94..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/HttpConstants.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.testserver;
-
-public interface HttpConstants {
- public static final String LAST_MODIFIED = "Last-Modified"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/LinearChange.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/LinearChange.java
deleted file mode 100644
index a203a1d30..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/LinearChange.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.testserver;
-
-import java.util.NoSuchElementException;
-
-public class LinearChange {
- boolean started;
- long startValue;
- long current;
- long step;
- long max;
- long min;
- public static final LinearChange NoChange = new LinearChange(0, 0);
-
- public LinearChange() {
- started = false;
- startValue = 0;
- current = 0;
- step = 1;
- max = Long.MAX_VALUE;
- min = Long.MIN_VALUE;
- }
-
- public void reset() {
- started = false;
- current = startValue;
- }
-
- public LinearChange fork() {
- LinearChange forked = new LinearChange();
- forked.started = started;
- forked.startValue = startValue;
- forked.current = current;
- forked.step = step;
- forked.max = max;
- forked.min = min;
- return forked;
- }
-
- public LinearChange(long firstValue, long step) {
- this();
- current = startValue = firstValue;
- this.step = step;
- }
-
- public LinearChange(long firstValue, long step, long max, long min) {
- this(firstValue, step);
- this.max = max;
- this.min = min;
- }
-
- public long next() {
- if (!hasNext())
- throw new NoSuchElementException();
- if (started)
- current += step;
- started = true;
-
- return current;
- }
-
- public boolean hasNext() {
- if (step == 0)
- return false;
- if (step > 0 && current + step > max)
- return false;
- if (step < 0 && current + step < min)
- return false;
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/MimeLookup.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/MimeLookup.java
deleted file mode 100644
index 71c09f80d..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/MimeLookup.java
+++ /dev/null
@@ -1,738 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.testserver;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class MimeLookup {
-
- public static final String JAR_PACK_GZ = "jar.pack.gz"; //$NON-NLS-1$
-
- public static String getMimeType(String name) {
- if (extMap == null)
- initNameToMime();
-
- // treat names with multiple "." in a special way (currently only one)
- if (name.endsWith(JAR_PACK_GZ))
- return (String) extMap.get(JAR_PACK_GZ);
- int dot = name.lastIndexOf("."); //$NON-NLS-1$
- // get the suffix, use "a" for empty as this gives the default "application/octet-stream"
- String tmp = dot == -1 ? "a" : name.substring(dot + 1); //$NON-NLS-1$
- tmp = (String) extMap.get(tmp);
- return tmp == null ? "application/octet-stream" : tmp; //$NON-NLS-1$
- }
-
- private static Map extMap;
- private static Map mimeMap;
-
- public static void initNameToMime() {
- extMap = new HashMap(data.length);
- for (int i = 0; i < data.length; i += 2) {
- Object key = data[i];
- Object val = extMap.get(key);
- if (val == null)
- extMap.put(key, data[i]);
- }
-
- }
-
- public static void initMimeToExt() {
- mimeMap = new HashMap(data.length);
- for (int i = 0; i < data.length; i += 2) {
- Object key = data[i + 1];
- Object val = mimeMap.get(key);
- if (val == null)
- mimeMap.put(key, data[i]);
- }
-
- }
-
- public final static String[] data = { //
- //--- typical java related mime types - higher priority
- "bat", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "batfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "class", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "css", "text/css", //$NON-NLS-1$ //$NON-NLS-2$
- "cssfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "exe", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "gif", "image/gif", //$NON-NLS-1$ //$NON-NLS-2$
- "html", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "htmlfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "jad", "text/vnd.sun.j2me.app-descriptor", //$NON-NLS-1$ //$NON-NLS-2$
- "jar", "application/java-archive", //$NON-NLS-1$ //$NON-NLS-2$
- "jar.pack.gz", "application/x-java-pack200", //$NON-NLS-1$ //$NON-NLS-2$
- "jardiff", "application/x-java-archive-diff", //$NON-NLS-1$ //$NON-NLS-2$
- "java", "text/x-java-source", //$NON-NLS-1$ //$NON-NLS-2$
- "javafrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "jnlp", "application/x-java-jnlp-file", //$NON-NLS-1$ //$NON-NLS-2$
- "jpg", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "js", "application/x-javascript", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "audio/mp3", //$NON-NLS-1$ //$NON-NLS-2$
- "png", "image/png", //$NON-NLS-1$ //$NON-NLS-2$
- "rss", "application/rss+xml", //$NON-NLS-1$ //$NON-NLS-2$
- "ser", "application/x-java-serialized-object", //$NON-NLS-1$ //$NON-NLS-2$
- "sql", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "sqlfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "swf", "application/x-shockwave-flash", //$NON-NLS-1$ //$NON-NLS-2$
- "txt", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "wav", "audio/wav", //$NON-NLS-1$ //$NON-NLS-2$
- "xml", "application/xml", //$NON-NLS-1$ //$NON-NLS-2$
- "xmlfrag", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "application/zip", //$NON-NLS-1$ //$NON-NLS-2$
-
- //--- misc definitions
- "3dm", "x-world/x-3dmf", //$NON-NLS-1$ //$NON-NLS-2$
- "3dmf", "x-world/x-3dmf", //$NON-NLS-1$ //$NON-NLS-2$
-
- "a", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "aab", "application/x-authorware-bin", //$NON-NLS-1$ //$NON-NLS-2$
- "aam", "application/x-authorware-map", //$NON-NLS-1$ //$NON-NLS-2$
- "aas", "application/x-authorware-seg", //$NON-NLS-1$ //$NON-NLS-2$
- "abc", "text/vnd.abc", //$NON-NLS-1$ //$NON-NLS-2$
- "acgi", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "afl", "video/animaflex", //$NON-NLS-1$ //$NON-NLS-2$
- "ai", "application/postscript", //$NON-NLS-1$ //$NON-NLS-2$
- "aif", "audio/aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aif", "audio/x-aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aifc", "audio/aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aifc", "audio/x-aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aiff", "audio/aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aiff", "audio/x-aiff", //$NON-NLS-1$ //$NON-NLS-2$
- "aim", "application/x-aim", //$NON-NLS-1$ //$NON-NLS-2$
- "aip", "text/x-audiosoft-intra", //$NON-NLS-1$ //$NON-NLS-2$
- "ani", "application/x-navi-animation", //$NON-NLS-1$ //$NON-NLS-2$
- "aps", "application/mime", //$NON-NLS-1$ //$NON-NLS-2$
- "arc", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "arj", "application/arj", //$NON-NLS-1$ //$NON-NLS-2$
- "arj", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "art", "image/x-jg", //$NON-NLS-1$ //$NON-NLS-2$
- "asf", "video/x-ms-asf", //$NON-NLS-1$ //$NON-NLS-2$
- "asm", "text/x-asm", //$NON-NLS-1$ //$NON-NLS-2$
- "asp", "text/asp", //$NON-NLS-1$ //$NON-NLS-2$
- "asx", "application/x-mplayer2", //$NON-NLS-1$ //$NON-NLS-2$
- "asx", "video/x-ms-asf", //$NON-NLS-1$ //$NON-NLS-2$
- "asx", "video/x-ms-asf-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "au", "audio/basic", //$NON-NLS-1$ //$NON-NLS-2$
- "au", "audio/x-au", //$NON-NLS-1$ //$NON-NLS-2$
- "avi", "video/avi", //$NON-NLS-1$ //$NON-NLS-2$
- "avi", "application/x-troff-msvideo", //$NON-NLS-1$ //$NON-NLS-2$
- "avi", "video/msvideo", //$NON-NLS-1$ //$NON-NLS-2$
- "avi", "video/x-msvideo", //$NON-NLS-1$ //$NON-NLS-2$
- "avs", "video/avs-video", //$NON-NLS-1$ //$NON-NLS-2$
-
- "bcpio", "application/x-bcpio", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/mac-binary", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/macbinary", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/x-binary", //$NON-NLS-1$ //$NON-NLS-2$
- "bin", "application/x-macbinary", //$NON-NLS-1$ //$NON-NLS-2$
- "bm", "image/bmp", //$NON-NLS-1$ //$NON-NLS-2$
- "bmp", "image/bmp", //$NON-NLS-1$ //$NON-NLS-2$
- "bmp", "image/x-windows-bmp", //$NON-NLS-1$ //$NON-NLS-2$
- "boo", "application/book", //$NON-NLS-1$ //$NON-NLS-2$
- "book", "application/book", //$NON-NLS-1$ //$NON-NLS-2$
- "boz", "application/x-bzip2", //$NON-NLS-1$ //$NON-NLS-2$
- "bsh", "application/x-bsh", //$NON-NLS-1$ //$NON-NLS-2$
- "bz", "application/x-bzip", //$NON-NLS-1$ //$NON-NLS-2$
- "bz2", "application/x-bzip2", //$NON-NLS-1$ //$NON-NLS-2$
- "c", "text/x-c", //$NON-NLS-1$ //$NON-NLS-2$
- "c", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "c++", "text/x-c", //$NON-NLS-1$ //$NON-NLS-2$
- "c++", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "cat", "application/vnd.ms-pki.seccat", //$NON-NLS-1$ //$NON-NLS-2$
- "cc", "text/x-c", //$NON-NLS-1$ //$NON-NLS-2$
- "cc", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "ccad", "application/clariscad", //$NON-NLS-1$ //$NON-NLS-2$
- "cco", "application/x-cocoa", //$NON-NLS-1$ //$NON-NLS-2$
- "cdf", "application/cdf", //$NON-NLS-1$ //$NON-NLS-2$
- "cdf", "application/x-cdf", //$NON-NLS-1$ //$NON-NLS-2$
- "cdf", "application/x-netcdf", //$NON-NLS-1$ //$NON-NLS-2$
- "cer", "application/pkix-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "cer", "application/x-x509-ca-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "cha", "application/x-chat", //$NON-NLS-1$ //$NON-NLS-2$
- "chat", "application/x-chat", //$NON-NLS-1$ //$NON-NLS-2$
- "class", "application/java", //$NON-NLS-1$ //$NON-NLS-2$
- "class", "application/java-byte-code", //$NON-NLS-1$ //$NON-NLS-2$
- "class", "application/x-java-class", //$NON-NLS-1$ //$NON-NLS-2$
- "com", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "com", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "conf", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "cpio", "application/x-cpio", //$NON-NLS-1$ //$NON-NLS-2$
- "cpp", "text/x-c", //$NON-NLS-1$ //$NON-NLS-2$
- "cpt", "application/mac-compactpro", //$NON-NLS-1$ //$NON-NLS-2$
- "cpt", "application/x-compactpro", //$NON-NLS-1$ //$NON-NLS-2$
- "cpt", "application/x-cpt", //$NON-NLS-1$ //$NON-NLS-2$
- "crl", "application/pkcs-crl", //$NON-NLS-1$ //$NON-NLS-2$
- "crl", "application/pkix-crl", //$NON-NLS-1$ //$NON-NLS-2$
- "crt", "application/pkix-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "crt", "application/x-x509-ca-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "crt", "application/x-x509-user-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "csh", "application/x-csh", //$NON-NLS-1$ //$NON-NLS-2$
- "csh", "text/x-script.csh", //$NON-NLS-1$ //$NON-NLS-2$
- "css", "text/css", //$NON-NLS-1$ //$NON-NLS-2$
- "cxx", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "css", "application/x-pointplus", //$NON-NLS-1$ //$NON-NLS-2$
-
- "dcr", "application/x-director", //$NON-NLS-1$ //$NON-NLS-2$
- "deepv", "application/x-deepv", //$NON-NLS-1$ //$NON-NLS-2$
- "der", "application/x-x509-ca-cert", //$NON-NLS-1$ //$NON-NLS-2$
- "def", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "dif", "video/x-dv", //$NON-NLS-1$ //$NON-NLS-2$
- "dir", "application/x-director", //$NON-NLS-1$ //$NON-NLS-2$
- "dl", "video/dl", //$NON-NLS-1$ //$NON-NLS-2$
- "dl", "video/x-dl", //$NON-NLS-1$ //$NON-NLS-2$
- "doc", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "dot", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "dp", "application/commonground", //$NON-NLS-1$ //$NON-NLS-2$
- "drw", "application/drafting", //$NON-NLS-1$ //$NON-NLS-2$
- "dump", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "dv", "video/x-dv", //$NON-NLS-1$ //$NON-NLS-2$
- "dvi", "application/x-dvi", //$NON-NLS-1$ //$NON-NLS-2$
- "dwf", "model/vnd.dwf", //$NON-NLS-1$ //$NON-NLS-2$
- "dwg", "application/acad", //$NON-NLS-1$ //$NON-NLS-2$
- "dwg", "image/vnd.dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "dwg", "image/x-dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "dxf", "application/dxf", //$NON-NLS-1$ //$NON-NLS-2$
- "dxf", "image/vnd.dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "dxf", "image/x-dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "dxr", "application/x-director", //$NON-NLS-1$ //$NON-NLS-2$
-
- "elc", "application/x-elc", //$NON-NLS-1$ //$NON-NLS-2$
- "env", "application/x-envoy", //$NON-NLS-1$ //$NON-NLS-2$
- "eps", "application/postscript", //$NON-NLS-1$ //$NON-NLS-2$
- "es", "application/x-esrehber", //$NON-NLS-1$ //$NON-NLS-2$
- "etx", "text/x-setext", //$NON-NLS-1$ //$NON-NLS-2$
- "exe", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "f", "text/x-fortran", //$NON-NLS-1$ //$NON-NLS-2$
- "f", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "f77", "text/x-fortran", //$NON-NLS-1$ //$NON-NLS-2$
- "f90", "text/x-fortran", //$NON-NLS-1$ //$NON-NLS-2$
- "f90", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "fdf", "application/vnd.fdf", //$NON-NLS-1$ //$NON-NLS-2$
- "fli", "video/fli", //$NON-NLS-1$ //$NON-NLS-2$
- "fli", "video/x-fli", //$NON-NLS-1$ //$NON-NLS-2$
- "for", "text/x-fortran", //$NON-NLS-1$ //$NON-NLS-2$
- "for", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "fpx", "image/vnd.fpx", //$NON-NLS-1$ //$NON-NLS-2$
- "fpx", "image/vnd.net-fpx", //$NON-NLS-1$ //$NON-NLS-2$
- "frl", "application/freeloader", //$NON-NLS-1$ //$NON-NLS-2$
- "funk", "audio/make", //$NON-NLS-1$ //$NON-NLS-2$
-
- "g", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "g3", "image/g3fax", //$NON-NLS-1$ //$NON-NLS-2$
- "gif", "image/gif", //$NON-NLS-1$ //$NON-NLS-2$
- "gl", "video/gl", //$NON-NLS-1$ //$NON-NLS-2$
- "gl", "video/x-gl", //$NON-NLS-1$ //$NON-NLS-2$
- "gsd", "audio/x-gsm", //$NON-NLS-1$ //$NON-NLS-2$
- "gsm", "audio/x-gsm", //$NON-NLS-1$ //$NON-NLS-2$
- "gsp", "application/x-gsp", //$NON-NLS-1$ //$NON-NLS-2$
- "gss", "application/x-gss", //$NON-NLS-1$ //$NON-NLS-2$
- "gtar", "application/x-gtar", //$NON-NLS-1$ //$NON-NLS-2$
- "gz", "application/x-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "gz", "application/x-gzip", //$NON-NLS-1$ //$NON-NLS-2$
- "gzip", "application/x-gzip", //$NON-NLS-1$ //$NON-NLS-2$
- "gzip", "multipart/x-gzip", //$NON-NLS-1$ //$NON-NLS-2$
-
- "h", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "h", "text/x-h", //$NON-NLS-1$ //$NON-NLS-2$
- "hdf", "application/x-hdf", //$NON-NLS-1$ //$NON-NLS-2$
- "help", "application/x-helpfile", //$NON-NLS-1$ //$NON-NLS-2$
- "hgl", "application/vnd.hp-hpgl", //$NON-NLS-1$ //$NON-NLS-2$
- "hh", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "hh", "text/x-h", //$NON-NLS-1$ //$NON-NLS-2$
- "hlb", "text/x-script", //$NON-NLS-1$ //$NON-NLS-2$
- "hlp", "application/hlp", //$NON-NLS-1$ //$NON-NLS-2$
- "hlp", "application/x-helpfile", //$NON-NLS-1$ //$NON-NLS-2$
- "hlp", "application/x-winhelp", //$NON-NLS-1$ //$NON-NLS-2$
- "hpg", "application/vnd.hp-hpgl", //$NON-NLS-1$ //$NON-NLS-2$
- "hpgl", "application/vnd.hp-hpgl", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/binhex", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/binhex4", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/mac-binhex", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/mac-binhex40", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/x-binhex40", //$NON-NLS-1$ //$NON-NLS-2$
- "hqx", "application/x-mac-binhex40", //$NON-NLS-1$ //$NON-NLS-2$
- "hta", "application/hta", //$NON-NLS-1$ //$NON-NLS-2$
- "htc", "text/x-component", //$NON-NLS-1$ //$NON-NLS-2$
- "htm", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "html", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "htmls", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "htt", "text/webviewhtml", //$NON-NLS-1$ //$NON-NLS-2$
- "htx", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
-
- "ice", "x-conference/x-cooltalk", //$NON-NLS-1$ //$NON-NLS-2$
- "ico", "image/x-icon", //$NON-NLS-1$ //$NON-NLS-2$
- "idc", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "ief", "image/ief", //$NON-NLS-1$ //$NON-NLS-2$
- "iefs", "image/ief", //$NON-NLS-1$ //$NON-NLS-2$
- "iges", "application/iges", //$NON-NLS-1$ //$NON-NLS-2$
- "iges", "model/iges", //$NON-NLS-1$ //$NON-NLS-2$
- "igs", "application/iges", //$NON-NLS-1$ //$NON-NLS-2$
- "igs", "model/iges", //$NON-NLS-1$ //$NON-NLS-2$
- "ima", "application/x-ima", //$NON-NLS-1$ //$NON-NLS-2$
- "imap", "application/x-httpd-imap", //$NON-NLS-1$ //$NON-NLS-2$
- "inf", "application/inf", //$NON-NLS-1$ //$NON-NLS-2$
- "ins", "application/x-internett-signup", //$NON-NLS-1$ //$NON-NLS-2$
- "ip", "application/x-ip2", //$NON-NLS-1$ //$NON-NLS-2$
- "isu", "video/x-isvideo", //$NON-NLS-1$ //$NON-NLS-2$
- "it", "audio/it", //$NON-NLS-1$ //$NON-NLS-2$
- "iv", "application/x-inventor", //$NON-NLS-1$ //$NON-NLS-2$
- "ivr", "i-world/i-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "ivy", "application/x-livescreen", //$NON-NLS-1$ //$NON-NLS-2$
-
- "jam", "audio/x-jam", //$NON-NLS-1$ //$NON-NLS-2$
- "jav", "text/x-java-source", //$NON-NLS-1$ //$NON-NLS-2$
- "jav", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "java", "text/x-java-source", //$NON-NLS-1$ //$NON-NLS-2$
- "java", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "jcm", "application/x-java-commerce", //$NON-NLS-1$ //$NON-NLS-2$
- "jfif", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jfif", "image/pjpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jfif-tbnl", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpe", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpe", "image/pjpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpeg", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpeg", "image/pjpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpg", "image/jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jpg", "image/pjpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "jps", "image/x-jps", //$NON-NLS-1$ //$NON-NLS-2$
- "js", "application/x-javascript", //$NON-NLS-1$ //$NON-NLS-2$
- "jut", "image/jutvision", //$NON-NLS-1$ //$NON-NLS-2$
-
- "kar", "audio/midi", //$NON-NLS-1$ //$NON-NLS-2$
- "kar", "music/x-karaoke", //$NON-NLS-1$ //$NON-NLS-2$
- "ksh", "application/x-ksh", //$NON-NLS-1$ //$NON-NLS-2$
- "ksh", "text/x-script.ksh", //$NON-NLS-1$ //$NON-NLS-2$
-
- "la", "audio/nspaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "la", "audio/x-nspaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "lam", "audio/x-liveaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "latex", "application/x-latex", //$NON-NLS-1$ //$NON-NLS-2$
- "lha", "application/lha", //$NON-NLS-1$ //$NON-NLS-2$
- "lha", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "lha", "application/x-lha", //$NON-NLS-1$ //$NON-NLS-2$
- "lhx", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "list", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "lma", "audio/nspaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "lma", "audio/x-nspaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "log", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "lsp", "application/x-lisp", //$NON-NLS-1$ //$NON-NLS-2$
- "lsp", "text/x-script.lisp", //$NON-NLS-1$ //$NON-NLS-2$
- "lst", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "lsx", "text/x-la-asf", //$NON-NLS-1$ //$NON-NLS-2$
- "ltx", "application/x-latex", //$NON-NLS-1$ //$NON-NLS-2$
- "lzh", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "lzh", "application/x-lzh", //$NON-NLS-1$ //$NON-NLS-2$
- "lzx", "application/lzx", //$NON-NLS-1$ //$NON-NLS-2$
- "lzx", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "lzx", "application/x-lzx", //$NON-NLS-1$ //$NON-NLS-2$
-
- "m", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "m", "text/x-m", //$NON-NLS-1$ //$NON-NLS-2$
- "m1v", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "m2a", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "m2v", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "m3u", "audio/x-mpequrl", //$NON-NLS-1$ //$NON-NLS-2$
- "man", "application/x-troff-man", //$NON-NLS-1$ //$NON-NLS-2$
- "map", "application/x-navimap", //$NON-NLS-1$ //$NON-NLS-2$
- "mar", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "mbd", "application/mbedlet", //$NON-NLS-1$ //$NON-NLS-2$
- "mcd", "application/mcad", //$NON-NLS-1$ //$NON-NLS-2$
- "mcd", "application/x-mathcad", //$NON-NLS-1$ //$NON-NLS-2$
- "mcf", "image/vasa", //$NON-NLS-1$ //$NON-NLS-2$
- "mcf", "text/mcf", //$NON-NLS-1$ //$NON-NLS-2$
- "mcp", "application/netmc", //$NON-NLS-1$ //$NON-NLS-2$
- "me", "application/x-troff-me", //$NON-NLS-1$ //$NON-NLS-2$
- "mht", "message/rfc822", //$NON-NLS-1$ //$NON-NLS-2$
- "mhtml", "message/rfc822", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "audio/midi", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "application/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "audio/x-mid", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "audio/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "music/crescendo", //$NON-NLS-1$ //$NON-NLS-2$
- "mid", "x-music/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "audio/midi", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "application/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "audio/x-mid", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "audio/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "music/crescendo", //$NON-NLS-1$ //$NON-NLS-2$
- "midi", "x-music/x-midi", //$NON-NLS-1$ //$NON-NLS-2$
- "mif", "application/x-frame", //$NON-NLS-1$ //$NON-NLS-2$
- "mif", "application/x-mif", //$NON-NLS-1$ //$NON-NLS-2$
- "mime", "www/mime", //$NON-NLS-1$ //$NON-NLS-2$
- "mime", "message/rfc822", //$NON-NLS-1$ //$NON-NLS-2$
- "mjpg", "video/x-motion-jpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mm", "application/base64", //$NON-NLS-1$ //$NON-NLS-2$
- "mm", "application/x-meme", //$NON-NLS-1$ //$NON-NLS-2$
- "mme", "application/base64", //$NON-NLS-1$ //$NON-NLS-2$
- "mod", "audio/mod", //$NON-NLS-1$ //$NON-NLS-2$
- "mod", "audio/x-mod", //$NON-NLS-1$ //$NON-NLS-2$
- "moov", "video/quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "mov", "video/quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "movie", "video/x-sgi-movie", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "audio/x-mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "video/x-mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp2", "video/x-mpeq2a", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "audio/mpeg3", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "audio/x-mpeg-3", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mp3", "video/x-mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpa", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpa", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpc", "application/x-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mpe", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpeg", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpg", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpg", "video/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpga", "audio/mpeg", //$NON-NLS-1$ //$NON-NLS-2$
- "mpp", "application/vnd.ms-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mpt", "application/x-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mpv", "application/x-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mpx", "application/x-project", //$NON-NLS-1$ //$NON-NLS-2$
- "mrc", "application/marc", //$NON-NLS-1$ //$NON-NLS-2$
- "ms", "application/x-troff-ms", //$NON-NLS-1$ //$NON-NLS-2$
- "mv", "video/x-sgi-movie", //$NON-NLS-1$ //$NON-NLS-2$
- "my", "audio/make", //$NON-NLS-1$ //$NON-NLS-2$
- "mzz", "application/x-vnd.audioexplosion.mzz", //$NON-NLS-1$ //$NON-NLS-2$
-
- "nap", "image/naplps", //$NON-NLS-1$ //$NON-NLS-2$
- "naplps", "image/naplps", //$NON-NLS-1$ //$NON-NLS-2$
- "nc", "application/x-netcdf", //$NON-NLS-1$ //$NON-NLS-2$
- "ncm", "application/vnd.nokia.configuration-message", //$NON-NLS-1$ //$NON-NLS-2$
- "nif", "image/x-niff", //$NON-NLS-1$ //$NON-NLS-2$
- "niff", "image/x-niff", //$NON-NLS-1$ //$NON-NLS-2$
- "nix", "application/x-mix-transfer", //$NON-NLS-1$ //$NON-NLS-2$
- "nsc", "application/x-conference", //$NON-NLS-1$ //$NON-NLS-2$
- "nvd", "application/x-navidoc", //$NON-NLS-1$ //$NON-NLS-2$
- "o", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "oda", "application/oda", //$NON-NLS-1$ //$NON-NLS-2$
- "omc", "application/x-omc", //$NON-NLS-1$ //$NON-NLS-2$
- "omcd", "application/x-omcdatamaker", //$NON-NLS-1$ //$NON-NLS-2$
- "omcr", "application/x-omcregerator", //$NON-NLS-1$ //$NON-NLS-2$
-
- "p", "text/x-pascal", //$NON-NLS-1$ //$NON-NLS-2$
- "p10", "application/pkcs10", //$NON-NLS-1$ //$NON-NLS-2$
- "p10", "application/x-pkcs10", //$NON-NLS-1$ //$NON-NLS-2$
- "p12", "application/pkcs-12", //$NON-NLS-1$ //$NON-NLS-2$
- "p12", "application/x-pkcs12", //$NON-NLS-1$ //$NON-NLS-2$
- "p7a", "application/x-pkcs7-signature", //$NON-NLS-1$ //$NON-NLS-2$
- "p7c", "application/pkcs7-mime", //$NON-NLS-1$ //$NON-NLS-2$
- "p7c", "application/x-pkcs7-mime", //$NON-NLS-1$ //$NON-NLS-2$
- "p7m", "application/pkcs7-mime", //$NON-NLS-1$ //$NON-NLS-2$
- "p7m", "application/x-pkcs7-mime", //$NON-NLS-1$ //$NON-NLS-2$
- "p7r", "application/x-pkcs7-certreqresp", //$NON-NLS-1$ //$NON-NLS-2$
- "p7s", "application/pkcs7-signature", //$NON-NLS-1$ //$NON-NLS-2$
- "part", "application/pro_eng", //$NON-NLS-1$ //$NON-NLS-2$
- "pas", "text/pascal", //$NON-NLS-1$ //$NON-NLS-2$
- "pbm", "image/x-portable-bitmap", //$NON-NLS-1$ //$NON-NLS-2$
- "pcl", "application/vnd.hp-pcl", //$NON-NLS-1$ //$NON-NLS-2$
- "pcl", "application/x-pcl", //$NON-NLS-1$ //$NON-NLS-2$
- "pct", "image/x-pict", //$NON-NLS-1$ //$NON-NLS-2$
- "pcx", "image/x-pcx", //$NON-NLS-1$ //$NON-NLS-2$
- "pdb", "chemical/x-pdb", //$NON-NLS-1$ //$NON-NLS-2$
- "pdf", "application/pdf", //$NON-NLS-1$ //$NON-NLS-2$
- "pfunk", "audio/make", //$NON-NLS-1$ //$NON-NLS-2$
- "pfunk", "audio/make.my.funk", //$NON-NLS-1$ //$NON-NLS-2$
- "pgm", "image/x-portable-graymap", //$NON-NLS-1$ //$NON-NLS-2$
- "pgm", "image/x-portable-greymap", //$NON-NLS-1$ //$NON-NLS-2$
- "pic", "image/pict", //$NON-NLS-1$ //$NON-NLS-2$
- "pict", "image/pict", //$NON-NLS-1$ //$NON-NLS-2$
- "pkg", "application/x-newton-compatible-pkg", //$NON-NLS-1$ //$NON-NLS-2$
- "pko", "application/vnd.ms-pki.pko", //$NON-NLS-1$ //$NON-NLS-2$
- "pl", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "pl", "text/x-script.perl", //$NON-NLS-1$ //$NON-NLS-2$
- "plx", "application/x-pixclscript", //$NON-NLS-1$ //$NON-NLS-2$
- "pm", "image/x-xpixmap", //$NON-NLS-1$ //$NON-NLS-2$
- "pm", "text/x-script.perl-module", //$NON-NLS-1$ //$NON-NLS-2$
- "pm4", "application/x-pagemaker", //$NON-NLS-1$ //$NON-NLS-2$
- "pm5", "application/x-pagemaker", //$NON-NLS-1$ //$NON-NLS-2$
- "png", "image/png", //$NON-NLS-1$ //$NON-NLS-2$
- "pnm", "application/x-portable-anymap", //$NON-NLS-1$ //$NON-NLS-2$
- "pnm", "image/x-portable-anymap", //$NON-NLS-1$ //$NON-NLS-2$
- "pot", "application/mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "pot", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "pov", "model/x-pov", //$NON-NLS-1$ //$NON-NLS-2$
- "ppa", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppm", "image/x-portable-pixmap", //$NON-NLS-1$ //$NON-NLS-2$
- "pps", "application/mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "pps", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppt", "application/mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppt", "application/powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppt", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppt", "application/x-mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "ppz", "application/mspowerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "pre", "application/x-freelance", //$NON-NLS-1$ //$NON-NLS-2$
- "prt", "application/pro_eng", //$NON-NLS-1$ //$NON-NLS-2$
- "ps", "application/postscript", //$NON-NLS-1$ //$NON-NLS-2$
- "psd", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "pvu", "paleovu/x-pv", //$NON-NLS-1$ //$NON-NLS-2$
- "pwz", "application/vnd.ms-powerpoint", //$NON-NLS-1$ //$NON-NLS-2$
- "py", "text/x-script.phyton", //$NON-NLS-1$ //$NON-NLS-2$
- "pyc", "applicaiton/x-bytecode.python", //$NON-NLS-1$ //$NON-NLS-2$
- "qcp", "audio/vnd.qcelp", //$NON-NLS-1$ //$NON-NLS-2$
- "qd3", "x-world/x-3dmf", //$NON-NLS-1$ //$NON-NLS-2$
- "qd3d", "x-world/x-3dmf", //$NON-NLS-1$ //$NON-NLS-2$
- "qif", "image/x-quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "qt", "video/quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "qtc", "video/x-qtc", //$NON-NLS-1$ //$NON-NLS-2$
- "qti", "image/x-quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "qtif", "image/x-quicktime", //$NON-NLS-1$ //$NON-NLS-2$
- "ra", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "ra", "audio/x-pn-realaudio-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "ra", "audio/x-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "ram", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "ras", "application/x-cmu-raster", //$NON-NLS-1$ //$NON-NLS-2$
- "ras", "image/cmu-raster", //$NON-NLS-1$ //$NON-NLS-2$
- "ras", "image/x-cmu-raster", //$NON-NLS-1$ //$NON-NLS-2$
- "rast", "image/cmu-raster", //$NON-NLS-1$ //$NON-NLS-2$
- "rexx", "text/x-script.rexx", //$NON-NLS-1$ //$NON-NLS-2$
- "rf", "image/vnd.rn-realflash", //$NON-NLS-1$ //$NON-NLS-2$
- "rgb", "image/x-rgb", //$NON-NLS-1$ //$NON-NLS-2$
- "rm", "application/vnd.rn-realmedia", //$NON-NLS-1$ //$NON-NLS-2$
- "rm", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "rmi", "audio/mid", //$NON-NLS-1$ //$NON-NLS-2$
- "rmm", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "rmp", "audio/x-pn-realaudio", //$NON-NLS-1$ //$NON-NLS-2$
- "rmp", "audio/x-pn-realaudio-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "rng", "application/ringing-tones", //$NON-NLS-1$ //$NON-NLS-2$
- "rng", "application/vnd.nokia.ringing-tone", //$NON-NLS-1$ //$NON-NLS-2$
- "rnx", "application/vnd.rn-realplayer", //$NON-NLS-1$ //$NON-NLS-2$
- "roff", "application/x-troff", //$NON-NLS-1$ //$NON-NLS-2$
- "rp", "image/vnd.rn-realpix", //$NON-NLS-1$ //$NON-NLS-2$
- "rpm", "audio/x-pn-realaudio-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "rt", "text/richtext", //$NON-NLS-1$ //$NON-NLS-2$
- "rt", "text/vnd.rn-realtext", //$NON-NLS-1$ //$NON-NLS-2$
- "rtf", "application/rtf", //$NON-NLS-1$ //$NON-NLS-2$
- "rtf", "application/x-rtf", //$NON-NLS-1$ //$NON-NLS-2$
- "rtf", "text/richtext", //$NON-NLS-1$ //$NON-NLS-2$
- "rtx", "application/rtf", //$NON-NLS-1$ //$NON-NLS-2$
- "rtx", "text/richtext", //$NON-NLS-1$ //$NON-NLS-2$
- "rv", "video/vnd.rn-realvideo", //$NON-NLS-1$ //$NON-NLS-2$
-
- "s", "text/x-asm", //$NON-NLS-1$ //$NON-NLS-2$
- "s3m", "audio/s3m", //$NON-NLS-1$ //$NON-NLS-2$
- "saveme", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "sbk", "application/x-tbook", //$NON-NLS-1$ //$NON-NLS-2$
- "scm", "application/x-lotusscreencam", //$NON-NLS-1$ //$NON-NLS-2$
- "scm", "text/x-script.guile", //$NON-NLS-1$ //$NON-NLS-2$
- "scm", "text/x-script.scheme", //$NON-NLS-1$ //$NON-NLS-2$
- "scm", "video/x-scm", //$NON-NLS-1$ //$NON-NLS-2$
- "sdml", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "sdp", "application/sdp", //$NON-NLS-1$ //$NON-NLS-2$
- "sdp", "application/x-sdp", //$NON-NLS-1$ //$NON-NLS-2$
- "sdr", "application/sounder", //$NON-NLS-1$ //$NON-NLS-2$
- "sea", "application/sea", //$NON-NLS-1$ //$NON-NLS-2$
- "sea", "application/x-sea", //$NON-NLS-1$ //$NON-NLS-2$
- "set", "application/set", //$NON-NLS-1$ //$NON-NLS-2$
- "sgm", "text/sgml", //$NON-NLS-1$ //$NON-NLS-2$
- "sgm", "text/x-sgml", //$NON-NLS-1$ //$NON-NLS-2$
- "sgml", "text/sgml", //$NON-NLS-1$ //$NON-NLS-2$
- "sgml", "text/x-sgml", //$NON-NLS-1$ //$NON-NLS-2$
- "sh", "application/x-bsh", //$NON-NLS-1$ //$NON-NLS-2$
- "sh", "application/x-sh", //$NON-NLS-1$ //$NON-NLS-2$
- "sh", "application/x-shar", //$NON-NLS-1$ //$NON-NLS-2$
- "sh", "text/x-script.sh", //$NON-NLS-1$ //$NON-NLS-2$
- "shar", "application/x-bsh", //$NON-NLS-1$ //$NON-NLS-2$
- "shar", "application/x-shar", //$NON-NLS-1$ //$NON-NLS-2$
- "shtml", "text/html", //$NON-NLS-1$ //$NON-NLS-2$
- "shtml", "text/x-server-parsed-html", //$NON-NLS-1$ //$NON-NLS-2$
- "sid", "audio/x-psid", //$NON-NLS-1$ //$NON-NLS-2$
- "sit", "application/x-sit", //$NON-NLS-1$ //$NON-NLS-2$
- "sit", "application/x-stuffit", //$NON-NLS-1$ //$NON-NLS-2$
- "skd", "application/x-koan", //$NON-NLS-1$ //$NON-NLS-2$
- "skm", "application/x-koan", //$NON-NLS-1$ //$NON-NLS-2$
- "skp", "application/x-koan", //$NON-NLS-1$ //$NON-NLS-2$
- "skt", "application/x-koan", //$NON-NLS-1$ //$NON-NLS-2$
- "sl", "application/x-seelogo", //$NON-NLS-1$ //$NON-NLS-2$
- "smi", "application/smil", //$NON-NLS-1$ //$NON-NLS-2$
- "smil", "application/smil", //$NON-NLS-1$ //$NON-NLS-2$
- "snd", "audio/basic", //$NON-NLS-1$ //$NON-NLS-2$
- "snd", "audio/x-adpcm", //$NON-NLS-1$ //$NON-NLS-2$
- "sol", "application/solids", //$NON-NLS-1$ //$NON-NLS-2$
- "spc", "application/x-pkcs7-certificates", //$NON-NLS-1$ //$NON-NLS-2$
- "spc", "text/x-speech", //$NON-NLS-1$ //$NON-NLS-2$
- "spl", "application/futuresplash", //$NON-NLS-1$ //$NON-NLS-2$
- "spr", "application/x-sprite", //$NON-NLS-1$ //$NON-NLS-2$
- "sprite", "application/x-sprite", //$NON-NLS-1$ //$NON-NLS-2$
- "src", "application/x-wais-source", //$NON-NLS-1$ //$NON-NLS-2$
- "ssi", "text/x-server-parsed-html", //$NON-NLS-1$ //$NON-NLS-2$
- "ssm", "application/streamingmedia", //$NON-NLS-1$ //$NON-NLS-2$
- "sst", "application/vnd.ms-pki.certstore", //$NON-NLS-1$ //$NON-NLS-2$
- "step", "application/step", //$NON-NLS-1$ //$NON-NLS-2$
- "stl", "application/sla", //$NON-NLS-1$ //$NON-NLS-2$
- "stl", "application/vnd.ms-pki.stl", //$NON-NLS-1$ //$NON-NLS-2$
- "stl", "application/x-navistyle", //$NON-NLS-1$ //$NON-NLS-2$
- "stp", "application/step", //$NON-NLS-1$ //$NON-NLS-2$
- "sv4cpio", "application/x-sv4cpio", //$NON-NLS-1$ //$NON-NLS-2$
- "sv4crc", "application/x-sv4crc", //$NON-NLS-1$ //$NON-NLS-2$
- "svf", "image/vnd.dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "svf", "image/x-dwg", //$NON-NLS-1$ //$NON-NLS-2$
- "svr", "application/x-world", //$NON-NLS-1$ //$NON-NLS-2$
- "svr", "x-world/x-svr", //$NON-NLS-1$ //$NON-NLS-2$
- "swf", "application/x-shockwave-flash", //$NON-NLS-1$ //$NON-NLS-2$
-
- "t", "application/x-troff", //$NON-NLS-1$ //$NON-NLS-2$
- "talk", "text/x-speech", //$NON-NLS-1$ //$NON-NLS-2$
- "tar", "application/x-tar", //$NON-NLS-1$ //$NON-NLS-2$
- "tbk", "application/toolbook", //$NON-NLS-1$ //$NON-NLS-2$
- "tbk", "application/x-tbook", //$NON-NLS-1$ //$NON-NLS-2$
- "tcl", "application/x-tcl", //$NON-NLS-1$ //$NON-NLS-2$
- "tcl", "text/x-script.tcl", //$NON-NLS-1$ //$NON-NLS-2$
- "tcsh", "text/x-script.tcsh", //$NON-NLS-1$ //$NON-NLS-2$
- "tex", "application/x-tex", //$NON-NLS-1$ //$NON-NLS-2$
- "texi", "application/x-texinfo", //$NON-NLS-1$ //$NON-NLS-2$
- "texinfo", "application/x-texinfo", //$NON-NLS-1$ //$NON-NLS-2$
- "text", "application/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "text", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
- "tgz", "application/gnutar", //$NON-NLS-1$ //$NON-NLS-2$
- "tgz", "application/x-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "tif", "image/tiff", //$NON-NLS-1$ //$NON-NLS-2$
- "tif", "image/x-tiff", //$NON-NLS-1$ //$NON-NLS-2$
- "tiff", "image/tiff", //$NON-NLS-1$ //$NON-NLS-2$
- "tiff", "image/x-tiff", //$NON-NLS-1$ //$NON-NLS-2$
- "tr", "application/x-troff", //$NON-NLS-1$ //$NON-NLS-2$
- "tsi", "audio/tsp-audio", //$NON-NLS-1$ //$NON-NLS-2$
- "tsp", "application/dsptype", //$NON-NLS-1$ //$NON-NLS-2$
- "tsp", "audio/tsplayer", //$NON-NLS-1$ //$NON-NLS-2$
- "tsv", "text/tab-separated-values", //$NON-NLS-1$ //$NON-NLS-2$
- "turbot", "image/florian", //$NON-NLS-1$ //$NON-NLS-2$
- "txt", "text/plain", //$NON-NLS-1$ //$NON-NLS-2$
-
- "uil", "text/x-uil", //$NON-NLS-1$ //$NON-NLS-2$
- "uni", "text/uri-list", //$NON-NLS-1$ //$NON-NLS-2$
- "unis", "text/uri-list", //$NON-NLS-1$ //$NON-NLS-2$
- "unv", "application/i-deas", //$NON-NLS-1$ //$NON-NLS-2$
- "uri", "text/uri-list", //$NON-NLS-1$ //$NON-NLS-2$
- "uris", "text/uri-list", //$NON-NLS-1$ //$NON-NLS-2$
- "ustar", "application/x-ustar", //$NON-NLS-1$ //$NON-NLS-2$
- "ustar", "multipart/x-ustar", //$NON-NLS-1$ //$NON-NLS-2$
- "uu", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "uu", "text/x-uuencode", //$NON-NLS-1$ //$NON-NLS-2$
- "uue", "text/x-uuencode", //$NON-NLS-1$ //$NON-NLS-2$
-
- "vcd", "application/x-cdlink", //$NON-NLS-1$ //$NON-NLS-2$
- "vcs", "text/x-vcalendar", //$NON-NLS-1$ //$NON-NLS-2$
- "vda", "application/vda", //$NON-NLS-1$ //$NON-NLS-2$
- "vdo", "video/vdo", //$NON-NLS-1$ //$NON-NLS-2$
- "vew", "application/groupwise", //$NON-NLS-1$ //$NON-NLS-2$
- "viv", "video/vivo", //$NON-NLS-1$ //$NON-NLS-2$
- "viv", "video/vnd.vivo", //$NON-NLS-1$ //$NON-NLS-2$
- "vivo", "video/vivo", //$NON-NLS-1$ //$NON-NLS-2$
- "vivo", "video/vnd.vivo", //$NON-NLS-1$ //$NON-NLS-2$
- "vmd", "application/vocaltec-media-desc", //$NON-NLS-1$ //$NON-NLS-2$
- "vmf", "application/vocaltec-media-file", //$NON-NLS-1$ //$NON-NLS-2$
- "voc", "audio/voc", //$NON-NLS-1$ //$NON-NLS-2$
- "voc", "audio/x-voc", //$NON-NLS-1$ //$NON-NLS-2$
- "vos", "video/vosaic", //$NON-NLS-1$ //$NON-NLS-2$
- "vox", "audio/voxware", //$NON-NLS-1$ //$NON-NLS-2$
- "vqe", "audio/x-twinvq-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "vqf", "audio/x-twinvq", //$NON-NLS-1$ //$NON-NLS-2$
- "vql", "audio/x-twinvq-plugin", //$NON-NLS-1$ //$NON-NLS-2$
- "vrml", "application/x-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "vrml", "model/vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "vrml", "x-world/x-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "vrt", "x-world/x-vrt", //$NON-NLS-1$ //$NON-NLS-2$
- "vsd", "application/x-visio", //$NON-NLS-1$ //$NON-NLS-2$
- "vst", "application/x-visio", //$NON-NLS-1$ //$NON-NLS-2$
- "vsw", "application/x-visio", //$NON-NLS-1$ //$NON-NLS-2$
-
- "w60", "application/wordperfect6.0", //$NON-NLS-1$ //$NON-NLS-2$
- "w61", "application/wordperfect6.1", //$NON-NLS-1$ //$NON-NLS-2$
- "w6w", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "wav", "audio/wav", //$NON-NLS-1$ //$NON-NLS-2$
- "wav", "audio/x-wav", //$NON-NLS-1$ //$NON-NLS-2$
- "wb1", "application/x-qpro", //$NON-NLS-1$ //$NON-NLS-2$
- "wbmp", "image/vnd.wap.wbmp", //$NON-NLS-1$ //$NON-NLS-2$
- "web", "application/vnd.xara", //$NON-NLS-1$ //$NON-NLS-2$
- "wiz", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "wk1", "application/x-123", //$NON-NLS-1$ //$NON-NLS-2$
- "wmf", "windows/metafile", //$NON-NLS-1$ //$NON-NLS-2$
- "wml", "text/vnd.wap.wml", //$NON-NLS-1$ //$NON-NLS-2$
- "wmlc", "application/vnd.wap.wmlc", //$NON-NLS-1$ //$NON-NLS-2$
- "wmls", "text/vnd.wap.wmlscript", //$NON-NLS-1$ //$NON-NLS-2$
- "wmlsc", "application/vnd.wap.wmlscriptc", //$NON-NLS-1$ //$NON-NLS-2$
- "word", "application/msword", //$NON-NLS-1$ //$NON-NLS-2$
- "wpd", "application/x-wpwin", //$NON-NLS-1$ //$NON-NLS-2$
- "wq1", "application/x-lotus", //$NON-NLS-1$ //$NON-NLS-2$
- "wri", "application/mswrite", //$NON-NLS-1$ //$NON-NLS-2$
- "wri", "application/x-wri", //$NON-NLS-1$ //$NON-NLS-2$
- "wrl", "application/x-world", //$NON-NLS-1$ //$NON-NLS-2$
- "wrl", "model/vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "wrl", "x-world/x-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "wrz", "model/vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "wrz", "x-world/x-vrml", //$NON-NLS-1$ //$NON-NLS-2$
- "wsc", "text/scriplet", //$NON-NLS-1$ //$NON-NLS-2$
- "wsrc", "application/x-wais-source", //$NON-NLS-1$ //$NON-NLS-2$
- "wtk", "application/x-wintalk", //$NON-NLS-1$ //$NON-NLS-2$
- "xbm", "image/x-xbitmap", //$NON-NLS-1$ //$NON-NLS-2$
- "xbm", "image/x-xbm", //$NON-NLS-1$ //$NON-NLS-2$
- "xbm", "image/xbm", //$NON-NLS-1$ //$NON-NLS-2$
- "xdr", "video/x-amt-demorun", //$NON-NLS-1$ //$NON-NLS-2$
- "xgz", "xgl/drawing", //$NON-NLS-1$ //$NON-NLS-2$
- "xif", "image/vnd.xiff", //$NON-NLS-1$ //$NON-NLS-2$
- "xl", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xla", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xla", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xla", "application/x-msexcel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlb", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlb", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlb", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlc", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlc", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlc", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xld", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xld", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlk", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlk", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xll", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xll", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xll", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlm", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlm", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlm", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xls", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xls", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xls", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xls", "application/x-msexcel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlt", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlt", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlv", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlv", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlw", "application/excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlw", "application/vnd.ms-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlw", "application/x-excel", //$NON-NLS-1$ //$NON-NLS-2$
- "xlw", "application/x-msexcel", //$NON-NLS-1$ //$NON-NLS-2$
- "xm", "audio/xm", //$NON-NLS-1$ //$NON-NLS-2$
- "xml", "application/xml", //$NON-NLS-1$ //$NON-NLS-2$
- "xml", "text/xml", //$NON-NLS-1$ //$NON-NLS-2$
- "xmz", "xgl/movie", //$NON-NLS-1$ //$NON-NLS-2$
- "xpix", "application/x-vnd.ls-xpix", //$NON-NLS-1$ //$NON-NLS-2$
- "xpm", "image/x-xpixmap", //$NON-NLS-1$ //$NON-NLS-2$
- "xpm", "image/xpm", //$NON-NLS-1$ //$NON-NLS-2$
- "x-png", "image/png", //$NON-NLS-1$ //$NON-NLS-2$
- "xsr", "video/x-amt-showrun", //$NON-NLS-1$ //$NON-NLS-2$
- "xwd", "image/x-xwd", //$NON-NLS-1$ //$NON-NLS-2$
- "xwd", "image/x-xwindowdump", //$NON-NLS-1$ //$NON-NLS-2$
- "xyz", "chemical/x-pdb", //$NON-NLS-1$ //$NON-NLS-2$
-
- "z", "application/x-compress", //$NON-NLS-1$ //$NON-NLS-2$
- "z", "application/x-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "application/x-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "application/x-zip-compressed", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "application/zip", //$NON-NLS-1$ //$NON-NLS-2$
- "zip", "multipart/x-zip", //$NON-NLS-1$ //$NON-NLS-2$
- "zoo", "application/octet-stream", //$NON-NLS-1$ //$NON-NLS-2$
- "zsh", "text/x-script.zsh", //$NON-NLS-1$ //$NON-NLS-2$
- };
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java
deleted file mode 100755
index 93a536db0..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureAction.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import org.osgi.framework.Bundle;
-
-/**
- * Utility class to execute common privileged code.
- */
-public class SecureAction {
- // make sure we use the correct controlContext;
- private AccessControlContext controlContext;
-
- /**
- * Constructs a new SecureAction object. The constructed SecureAction object
- * uses the caller's AccessControlContext to perform security checks
- */
- public SecureAction() {
- // save the control context to be used.
- this.controlContext = AccessController.getContext();
- }
-
- /**
- * Gets a resource from a bundle.
- * @param bundle the bundle to get the resource from
- * @param name The name of the resource
- * @return The URL of the resource
- */
-
- public URL getBundleResource(final Bundle bundle, final String name) {
- if (System.getSecurityManager() == null)
- return bundle.getResource(name);
- return (URL) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return bundle.getResource(name);
- }
- }, controlContext);
- }
-
- public URLConnection openURL(final URL url) throws IOException {
- if (System.getSecurityManager() == null)
- return open(url);
- try {
- return (URLConnection) AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws IOException {
- return open(url);
- }
- }, controlContext);
- } catch(PrivilegedActionException ex) {
- throw (IOException) ex.getException();
- }
- }
-
- URLConnection open(final URL url)throws IOException
- {
- URLConnection connection = url.openConnection();
- connection.connect(); /* establish connection to check permissions */
- return connection;
- }
-
- /**
- * Returns a system property. Same as calling
- * System.getProperty(String,String).
- * @param property the property key.
- * @param def the default value if the property key does not exist.
- * @return the value of the property or the def value if the property
- * does not exist.
- */
- public String getProperty(final String property, final String def) {
- if (System.getSecurityManager() == null)
- return System.getProperty(property, def);
- return (String) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return System.getProperty(property, def);
- }
- }, controlContext);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureContext.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureContext.java
deleted file mode 100644
index a9fc4e5f4..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecureContext.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import java.net.URL;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.osgi.service.http.HttpContext;
-
-/**
- * The SecureContext can be used to add basic authentication to a path.
- * This implementation requires the user "Aladdin" to log in with the password "open sesame".
- */
-public class SecureContext implements HttpContext {
- private HttpContext theDefaultContext;
-
- public SecureContext(HttpContext defaultContext) {
- theDefaultContext = defaultContext;
- }
-
- public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) {
- String auth = request.getHeader("Authorization"); //$NON-NLS-1$
- // Response is Aladdin:open sesame in Base64 encoding (from RFC example)
- if (auth != null && "QWxhZGRpbjpvcGVuIHNlc2FtZQ==".equals(auth.substring(6))) //$NON-NLS-1$
- return true;
-
- // if not authorized or wrong user/password
- response.setHeader("WWW-Authenticate", "BASIC realm=\"p2 Http Testing Server (Aladdin, open sesame)\""); //$NON-NLS-1$//$NON-NLS-2$
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- return false;
-
- }
-
- public String getMimeType(String name) {
- return theDefaultContext.getMimeType(name);
- }
-
- public URL getResource(String name) {
- return theDefaultContext.getResource(name);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java
deleted file mode 100644
index 4b627f6eb..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.osgi.service.http.HttpContext;
-
-/**
- * The SecureContext can be used to add basic authentication to a path.
- * This implementation requires the user "Aladdin" to log in with the password "open sesame".
- */
-public class SecuredArtifactsContext extends SecureContext {
-
- public SecuredArtifactsContext(HttpContext defaultContext) {
- super(defaultContext);
- }
-
- public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) {
- String path = request.getRequestURI();
- if (path == null)
- return true;
-
- if (path.indexOf("features/") != -1 //$NON-NLS-1$
- || path.indexOf("plugins/") != -1 //$NON-NLS-1$
- || path.indexOf("binaries/") != -1) //$NON-NLS-1$
- return super.handleSecurity(request, response);
-
- return true;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java
deleted file mode 100644
index 13dc0cf99..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/BasicResourceDelivery.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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
- * Cloudsmith Inc. - this copy and adaption to abstract servlet
- *******************************************************************************/
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.TimeZone;
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.eclipse.equinox.p2.testserver.Activator;
-import org.eclipse.equinox.p2.testserver.HttpConstants;
-import org.eclipse.equinox.p2.testserver.MimeLookup;
-import org.eclipse.equinox.p2.testserver.SecureAction;
-import org.osgi.service.http.HttpService;
-
-public class BasicResourceDelivery extends HttpServlet {
- private static final long serialVersionUID = 1L;
- // private static final String CHARSET = "utf-8"; //$NON-NLS-1$
- private SecureAction secureAction;
- private String alias;
- private URI path;
- protected static final String defaultMimeType = "application/octet-stream"; //$NON-NLS-1$
-
- /**
- * Delivers resources from the bundle, or from an absolute URI
- */
- public BasicResourceDelivery(String theAlias, URI thePath) {
- secureAction = new SecureAction();
- alias = theAlias;
- path = thePath;
- }
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
- URI resource = null;
- try {
- resource = getFilename(request.getRequestURI());
- } catch (URISyntaxException e) {
- /* ignore - just leave resource == null */
- }
-
- URL url = null;
- if (resource != null) {
- if (!resource.isAbsolute())
- url = getServletContext().getResource(resource.getPath());
- else
- url = resource.toURL();
- }
-
- if (url == null) {
- fileNotFound(resource, request, response);
- return;
- }
-
- // process cache control
- URLConnection conn = secureAction.openURL(url);
-
- long modifiedSince = request.getDateHeader("If-Modified-Since"); //$NON-NLS-1$
- if (modifiedSince >= 0) {
- long modified = getLastModified(conn);
- if ((modified > 0) && (modifiedSince >= modified)) {
- response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
- return;
- }
- }
- InputStream in;
- try {
- in = conn.getInputStream();
- } catch (IOException ex) {
- fileNotFound(resource, request, response);
- return;
- }
- try {
- // always set the default charset
- // not in Servlet 2.1 // response.setCharacterEncoding(CHARSET);
- deliver(conn, in, resource.toString(), request, response); // TODO: modify to resource==URI ?
- } finally {
- in.close();
- }
- }
-
- protected void deliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- this.doDeliver(conn, in, filename, request, response);
- }
-
- /**
- * Default method delivering content from a file. Subclasses should override this method
- * to deliver "broken content" (e.g. truncated, mismatched content length etc.).
- * This default method performs the same delivery as the default "register resource" in the
- * http service.
- * @param conn - The URLConnection to the resource
- * @param in - InputStream to read from
- * @param filename - the filename being read
- * @param request - the servlet request
- * @param response - the servlet response
- * @throws IOException - on errors
- */
- protected void doDeliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- // set when the resource was modified
- addDateHeader(response, HttpConstants.LAST_MODIFIED, getLastModified(conn));
- int statusCode = HttpHeaderToStatus(conn.getHeaderField(0));
-
- response.setStatus(statusCode != -1 ? HttpServletResponse.SC_OK : statusCode);
-
- int contentlength = getContentLength(conn);
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
-
- // We want to use a writer if we are sending text
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- {
- PrintWriter writer = response.getWriter();
-
- writer.flush(); /* write the headers and unbuffer the output */
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- char buffer[] = new char[4096];
- int read;
- while ((read = reader.read(buffer, 0, buffer.length)) != -1) {
- writer.write(buffer, 0, read);
- }
- } else {
- ServletOutputStream out = response.getOutputStream();
-
- out.flush(); /* write the headers and unbuffer the output */
-
- byte buffer[] = new byte[4096];
- int read;
- while ((read = in.read(buffer, 0, buffer.length)) != -1) {
- out.write(buffer, 0, read);
- out.flush();
- }
- }
- }
- }
-
- protected void fileNotFound(URI file, HttpServletRequest request, HttpServletResponse response) throws IOException {
- response.sendError(HttpServletResponse.SC_NOT_FOUND, (file == null ? "<no file>" : file.toString()) + " not found"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- URI resource = null;
- try {
- resource = getFilename(request.getRequestURI());
- } catch (URISyntaxException e) {
- /* ignore - just leave resource == null */
- }
-
- URL url = null;
- if (resource != null) {
- if (!resource.isAbsolute())
- url = getServletContext().getResource(resource.getPath());
- else
- url = resource.toURL();
- }
-
- if (url == null) {
- fileNotFound(resource, request, response);
- return;
- }
- URLConnection conn = secureAction.openURL(url);
- // always set default charset
- // Not in Servlet 2.1 // response.setCharacterEncoding(CHARSET);
- doDeliverHead(resource.toString(), conn, request, response); // TODO: change API to use URI?
- }
-
- protected void deliverHead(String filename, URLConnection conn, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- this.doDeliverHead(filename, conn, request, response);
- }
-
- protected void doDeliverHead(String filename, URLConnection conn, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- int contentlength = getContentLength(conn);
- int statusCode = HttpHeaderToStatus(conn.getHeaderField(0));
- // set status = ok if there was no http header...
- response.setStatus(statusCode == -1 ? HttpServletResponse.SC_OK : statusCode);
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
- long modified = getLastModified(conn);
- addDateHeader(response, HttpConstants.LAST_MODIFIED, modified);
- } else {
- super.doHead(request, response);
- }
-
- }
-
- public int HttpHeaderToStatus(String httpHeader) {
- if (httpHeader == null)
- return -1;
- try {
- return Integer.valueOf((httpHeader.substring(9, 12))).intValue();
- } catch (IndexOutOfBoundsException e) {
- return -1;
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- /**
- * Override to lie about last modified
- * @param conn
- * @return time in ms
- */
- protected long getLastModified(URLConnection conn) {
- return conn.getLastModified();
- }
-
- /**
- * Override to lie about content length
- * @param conn
- * @return length in bytes
- */
- protected int getContentLength(URLConnection conn) {
- return conn.getContentLength();
- }
-
- protected URI getFilename(String filename) throws URISyntaxException {
- //If the requested URI is equal to the Registeration's alias, send the file
- //corresponding to the alias. Otherwise, we have request for a file in an
- //registered directory (the file was not directly registered itself).
- if (filename.equals(alias)) {
- filename = path.getPath();
- } else {
- // The file we re looking for is the registered resource (alias) + the rest of the
- // filename that is not part of the registered resource. For example, if we export
- // /a to /tmp and we have a request for /a/b/foo.txt, then /tmp is our directory
- // (file.toString()) and /b/foo.txt is the rest.
- // The result is that we open the file /tmp/b/foo.txt.
-
- int aliaslen = alias.length();
- int pathlen = path.getPath().length();
-
- if (pathlen == 1) /* path == "/" */
- {
- if (aliaslen > 1) /* alias != "/" */
- {
- filename = filename.substring(aliaslen);
- }
- } else /* path != "/" */
- {
- StringBuffer buf = new StringBuffer(aliaslen + pathlen);
- buf.append(path.getPath());
-
- if (aliaslen == 1) /* alias == "/" */
- {
- buf.append(filename);
- } else /* alias != "/" */
- {
- buf.append(filename.substring(aliaslen));
- }
-
- filename = buf.toString();
- }
- }
- return new URI(path.getScheme(), path.getUserInfo(), path.getHost(), path.getPort(), filename, path.getQuery(), path.getFragment());
- // return (filename);
- }
-
- /**
- * This method returns the correct MIME type of a given URI by first checking
- * the HttpContext::getMimeType and, if null, checking the httpservice's MIMETypes table.
- * return mimetype with charset=utf-8 for all text/... types
- */
- protected String computeMimeType(String name, URLConnection conn) {
- String mimeType = computeMimeType2(name, conn);
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- return mimeType + "; charset=utf-8"; //$NON-NLS-1$
- return mimeType;
- }
-
- protected String computeMimeType2(String name, URLConnection conn) {
- // use type set in connection if it is available
- String mimeType = conn.getContentType();
- if (mimeType != null) {
- return (mimeType);
- }
- // use type from context
- mimeType = getServletContext().getMimeType(name);
- if (mimeType != null) {
- return (mimeType);
- }
- // try the "extras"
- return MimeLookup.getMimeType(name);
- }
-
- public HttpService getHttpService() {
- return Activator.getInstance().getHttp();
- }
-
- public static final DateFormat PATTERN_RFC1123 = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US); //$NON-NLS-1$
-
- /**
- * Support setting date header - in servlet > 2.1 it is possible to call this method directly on the HttpResponse.
- * @param response
- * @param name
- * @param timestamp
- */
- public void addDateHeader(HttpServletResponse response, String name, long timestamp) {
- DateFormat df = PATTERN_RFC1123;
- // must always be GMT
- df.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
- response.setHeader(name, df.format(new Date(timestamp)));
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ChopAndDelay.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ChopAndDelay.java
deleted file mode 100644
index c8e823c8f..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ChopAndDelay.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URLConnection;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.eclipse.equinox.p2.testserver.LinearChange;
-
-/**
- * The ChopAndDelay deliver the content chopped up in smaller packets and adds delay
- * between packets.
- *
- */
-public class ChopAndDelay extends BasicResourceDelivery {
-
- int chopFactor;
- private LinearChange delayFunction;
- private long msDelay;
- private int fastPercent;
-
- /**
- * Create a file molester that turns content into gibberish.
- *
- * @param theAlias the path this servlet is registered under
- * @param thePath the path to use as root for the alias
- * @param chopFactor - a value between 1 and 12 where 1 is one byte, and 12 is 4k bytes at a time.
- * @param delayFunction - function returning a series of delay values
- */
- public ChopAndDelay(String theAlias, URI thePath, int chopFactor, int fastPercent, LinearChange delayFunction) {
- super(theAlias, thePath);
- if (chopFactor < 1 || chopFactor > 12)
- throw new IllegalArgumentException("chopFactor must be between 1 and 12 (inclusive) - was:" + Integer.valueOf(chopFactor)); //$NON-NLS-1$
- this.chopFactor = chopFactor;
- if (fastPercent < 0 || fastPercent > 100)
- throw new IllegalArgumentException("fastPercent must be 0-100 - was:" + Integer.valueOf(fastPercent)); //$NON-NLS-1$
- this.fastPercent = fastPercent;
- this.delayFunction = delayFunction;
- msDelay = 0L;
- this.delayFunction = delayFunction;
- if (this.delayFunction.hasNext())
- msDelay = delayFunction.next();
- }
-
- private static final long serialVersionUID = 1L;
-
- protected void deliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- // chop up all files
- doChop(conn, in, filename, request, response);
- }
-
- protected void doChop(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- LinearChange delayer = delayFunction.fork();
- int contentlength = conn.getContentLength();
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
-
- // We want to use a writer if we are sending text
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- {
- PrintWriter writer = response.getWriter();
-
- writer.flush(); /* write the headers and unbuffer the output */
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- int chunksize = 1 << chopFactor;
- char buffer[] = new char[4096];
- int read;
- int totalRead = 0;
- boolean delay = fastPercent == 0 ? true : false;
- while ((read = reader.read(buffer, 0, buffer.length)) != -1) {
- int nChunks = read / chunksize + (read % chunksize > 0 ? 1 : 0);
- for (int i = 0; i < nChunks; i++) {
- writer.write(buffer, i * chunksize, Math.min(chunksize, read - i * chunksize));
- writer.flush();
- if (delay && msDelay > 0)
- try {
- Thread.sleep(msDelay);
- } catch (InterruptedException e) {
- // ignore
- }
- if (delay && delayer.hasNext())
- msDelay = delayer.next();
- }
- totalRead += read;
- if (totalRead > contentlength * fastPercent / 100)
- delay = true;
- }
- } else {
- ServletOutputStream out = response.getOutputStream();
-
- out.flush(); /* write the headers and unbuffer the output */
-
- int chunksize = 1 << chopFactor;
- byte buffer[] = new byte[4096];
- int read;
- int totalRead = 0;
- boolean delay = fastPercent == 0 ? true : false;
- while ((read = in.read(buffer, 0, buffer.length)) != -1) {
- int nChunks = read / chunksize + (read % chunksize > 0 ? 1 : 0);
- for (int i = 0; i < nChunks; i++) {
- out.write(buffer, i * chunksize, Math.min(chunksize, read - i * chunksize));
- out.flush();
- if (delay && msDelay > 0)
- try {
- Thread.sleep(msDelay);
- } catch (InterruptedException e) {
- // ignore
- }
- if (delay && delayer.hasNext())
- msDelay = delayer.next();
- }
- totalRead += read;
- if (totalRead > contentlength * fastPercent / 100)
- delay = true;
- }
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ContentLengthLier.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ContentLengthLier.java
deleted file mode 100644
index 98a037736..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/ContentLengthLier.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.net.URI;
-import java.net.URLConnection;
-
-public class ContentLengthLier extends BasicResourceDelivery {
-
- double keepFactor;
-
- /**
- * The ContentLengthLier sets the content length to a percentage of the original length.
- * Values between 0 and 200 can be used (to lie about files being both smaller < 100, or larger > 100).
- *
- * @param theAlias
- * @param thePath
- * @param keepPercent - how much to lie between 0 and 200 (inclusive)
- */
- public ContentLengthLier(String theAlias, URI thePath, int keepPercent) {
- super(theAlias, thePath);
- if (keepPercent < 0 || keepPercent > 200)
- throw new IllegalArgumentException("keepPercent must be between 0 and 200 - was:" + Integer.valueOf(keepPercent)); //$NON-NLS-1$
- keepFactor = keepPercent / 100.0;
- }
-
- private static final long serialVersionUID = 1L;
-
- protected int getContentLength(URLConnection conn) {
- int contentLength = conn.getContentLength();
- return (contentLength >= 0) ? (int) (contentLength * keepFactor) : contentLength;
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/FileMolester.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/FileMolester.java
deleted file mode 100644
index 3a5485230..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/FileMolester.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URLConnection;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * The FileMolester will keep a certain amount of the file from the beginning, and return
- * garbage/gibberish for the rest of the file's content. The garbage is produced by shifting every
- * byte 1 bit to the left.
- *
- * The idea for keeping some percentage is to support keeping xml headers / doctype etc.
- */
-public class FileMolester extends BasicResourceDelivery {
-
- int keepLength;
-
- /**
- * Create a file molester that turns content into gibberish.
- *
- * @param theAlias the path this servlet is registered under
- * @param thePath the path to use as root for the alias
- * @param keepLength - how many bytes in the beginning that will be unmolested
- */
- public FileMolester(String theAlias, URI thePath, int keepLength) {
- super(theAlias, thePath);
- if (keepLength < 0)
- throw new IllegalArgumentException("keepLength must be >= 0 - was:" + Integer.valueOf(keepLength)); //$NON-NLS-1$
- this.keepLength = keepLength;
- }
-
- private static final long serialVersionUID = 1L;
-
- protected void deliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- // molest all files
- doMolest(conn, in, filename, request, response);
- }
-
- protected void doMolest(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- int contentlength = conn.getContentLength();
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
-
- // We want to use a writer if we are sending text
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- {
- PrintWriter writer = response.getWriter();
-
- writer.flush(); /* write the headers and unbuffer the output */
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- char buffer[] = new char[4096];
- int read;
- int written = 0;
- while ((read = reader.read(buffer, 0, buffer.length)) != -1) {
- if (written + read > keepLength)
- molest(buffer, written, read);
- writer.write(buffer, 0, read);
- written += read;
- }
- } else {
- ServletOutputStream out = response.getOutputStream();
-
- out.flush(); /* write the headers and unbuffer the output */
-
- byte buffer[] = new byte[4096];
- int read;
- int written = 0;
- while ((read = in.read(buffer, 0, buffer.length)) != -1) {
- if (written + read > keepLength)
- molest(buffer, written, read);
- out.write(buffer, 0, read);
- written += read;
- }
- }
- }
- }
-
- /** Molest a char buffer */
- private void molest(char[] buffer, int written, int read) {
- int start = keepLength - written;
- if (start > read)
- return;
- for (int i = start < 0 ? 0 : start; i < read; i++)
- buffer[i] = (char) (buffer[i] << 1);
- }
-
- /** Molest a byte buffer */
- private void molest(byte[] buffer, int written, int read) {
- int start = keepLength - written;
- if (start > read)
- return;
- for (int i = start < 0 ? 0 : start; i < read; i++)
- buffer[i] = (byte) (buffer[i] << 1);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/HelloWorld.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/HelloWorld.java
deleted file mode 100644
index 7bc682803..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/HelloWorld.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Simple "smoke test" servlet - for manual testing that the http server is running and is
- * capable of running servlets.
- */
-public class HelloWorld extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
- response.setContentType("text/html"); //$NON-NLS-1$
- PrintWriter writer = response.getWriter();
- writer.println("<html>"); //$NON-NLS-1$
- writer.println("<body>"); //$NON-NLS-1$
- writer.println("Hello, Equinox Embedded HTTP World"); //$NON-NLS-1$
- writer.println("<br/>"); //$NON-NLS-1$
- writer.println("</body>"); //$NON-NLS-1$
- writer.println("</html>"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/LastModifiedLier.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/LastModifiedLier.java
deleted file mode 100644
index 84d568ca1..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/LastModifiedLier.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.net.URI;
-import java.net.URLConnection;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Manipulates the last modified time of serviced files.
- * The manipulator will set all modified times to 0 if TYPE_ZERO is used, to 1 if TYPE_OLD is used,
- * to the current time if TYPE_NOW is used, and a value 24 hours into the future if TYPE_FUTURE is used.
- * (Future values are not allowed in HTTP - the server should guard against them and force the value
- * to be no bigger than the response date).
- * The TYPE_BAD will produce a HTTP header with wrong format for the date value (fails date parsing).
- *
- */
-public class LastModifiedLier extends BasicResourceDelivery {
-
- public static final int TYPE_ZERO = 1;
- public static final int TYPE_OLD = 2;
- public static final int TYPE_NOW = 3;
- public static final int TYPE_FUTURE = 4;
- public static final int TYPE_BAD = 5;
- private static final int TYPE_LAST = TYPE_BAD;
-
- private int type;
-
- /**
- * The LastModifiedLier returns a last modified time according to the parameter timeType.
- * It can be TYPE_ZERO, TYPE_OLD, TYPE_NOW, TYPE_FUTURE, or TYPE_BAD.
- *
- * @param theAlias
- * @param thePath
- * @param timeType - a TYPE_XXX constant defining what time to return
- */
- public LastModifiedLier(String theAlias, URI thePath, int timeType) {
- super(theAlias, thePath);
- if (timeType < TYPE_ZERO || timeType > TYPE_LAST)
- throw new IllegalArgumentException("unknown timeType, was:" + Integer.valueOf(timeType)); //$NON-NLS-1$
- type = timeType;
- }
-
- private static final long serialVersionUID = 1L;
-
- protected long getLastModified(URLConnection conn) {
- // ignore real value and lie based on constant
- return getLastModified();
- }
-
- private long getLastModified() {
- switch (type) {
- case TYPE_ZERO :
- return 0L;
- case TYPE_OLD :
- return 1000L;
- case TYPE_NOW :
- return System.currentTimeMillis();
- case TYPE_FUTURE :
- return System.currentTimeMillis() + 24 * 60 * 60 * 1000;
- }
- // should not happen
- return 0L;
- }
-
- public void addDateHeader(HttpServletResponse response, String name, long timestamp) {
- if (type != TYPE_BAD)
- super.addDateHeader(response, name, timestamp);
- else
- response.setHeader(name, "intentionally-bad-date"); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Redirector.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Redirector.java
deleted file mode 100644
index ab875afb0..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Redirector.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Redirects n times, before redirecting to final location (a path on same server).
- *
- */
-public class Redirector extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
- response.setContentType("text/html"); //$NON-NLS-1$
- PrintWriter writer = response.getWriter();
- doStatus(request, response, writer);
- }
-
- protected void doStatus(HttpServletRequest request, HttpServletResponse response, PrintWriter writer) {
- String requestPath = request.getRequestURI();
- String[] result = requestPath.split("/"); //$NON-NLS-1$
- if (result.length < 3 && !"redirect".equalsIgnoreCase(result[1])) //$NON-NLS-1$
- {
- getServletContext().log("Error Servlet requires being configured to get /redirect/count paths. Example /redirect/500, got" + requestPath); //$NON-NLS-1$
- return;
- }
- // get the error code
- int iterations = 0;
- try {
- iterations = Integer.parseInt(result[2]);
- } catch (NumberFormatException e) {
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- getServletContext().log("Number format exception in /redirect/count path.", e); //$NON-NLS-1$
- return;
- }
- String redirectPath;
- if (iterations == 0) {
- if (result.length > 3)
- redirectPath = requestPath.substring("/redirect/0".length()); //$NON-NLS-1$
- else
- redirectPath = null;
- } else {
- redirectPath = "/redirect/" + Integer.valueOf(iterations - 1); //$NON-NLS-1$
- for (int i = 3; i < result.length; i++)
- redirectPath += "/" + result[i]; //$NON-NLS-1$
- }
-
- if (redirectPath != null) {
- // perform a redirect
- URI location = null;
- try {
- location = new URI(request.getScheme(), null, request.getServerName(), request.getServerPort(), //
- redirectPath, null, null);
- } catch (URISyntaxException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- htmlPage(writer, "Internal error constructing redirect URL", false); //$NON-NLS-1$
- return;
- }
-
- response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
- response.setHeader("Location", location.toString()); //$NON-NLS-1$
- } else {
- // set the errorCode as the response and write a message
- if (writer != null)
- htmlPage(writer, "Redirected Successfully", false); //$NON-NLS-1$
- }
- }
-
- public void doHead(HttpServletRequest request, HttpServletResponse response) {
- // produce same response as for GET, but no content (writer == null)
- doStatus(request, response, null);
- }
-
- private void htmlPage(PrintWriter writer, String body, boolean consoleOutput) {
- if (consoleOutput)
- System.err.println(body);
-
- writer.println("<html>"); //$NON-NLS-1$
- writer.println("<body>"); //$NON-NLS-1$
- writer.println(body);
- writer.println("<br/>"); //$NON-NLS-1$
- writer.println("</body>"); //$NON-NLS-1$
- writer.println("</html>"); //$NON-NLS-1$
- writer.flush();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/StatusCodeResponse.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/StatusCodeResponse.java
deleted file mode 100644
index d162dcd75..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/StatusCodeResponse.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Produces a response with a status code specified in the request URI.
- * Requires to be registered for "/status" path. The request is made on the format
- * "/status/code/" where code is the HTTP integer status code. The path after /code/ can be
- * anything - it is always ignored.
- * The response to GET produces HTML text "Requested status: code".
- * The response to HEAD just produces the status header response.
- *
- */
-public class StatusCodeResponse extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
- response.setContentType("text/html"); //$NON-NLS-1$
- PrintWriter writer = response.getWriter();
- doStatus(request, response, writer);
- }
-
- protected void doStatus(HttpServletRequest request, HttpServletResponse response, PrintWriter writer) {
- String requestPath = request.getRequestURI();
- String[] result = requestPath.split("/"); //$NON-NLS-1$
- if (result.length < 3 && !"status".equalsIgnoreCase(result[1])) //$NON-NLS-1$
- {
- getServletContext().log("Error Servlet requires being configured to get /status/statuscode paths. Example /status/500, got" + requestPath); //$NON-NLS-1$
- return;
- }
- // get the error code
- int errorCode = 0;
- try {
- errorCode = Integer.parseInt(result[2]);
- } catch (NumberFormatException e) {
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- getServletContext().log("Number format exception in /status/statuscode path.", e); //$NON-NLS-1$
- return;
- }
-
- // set the errorCode as the response and write a message
- response.setStatus(errorCode);
- if (writer != null)
- htmlPage(writer, "Requested Status: " + Integer.valueOf(errorCode), false); //$NON-NLS-1$
- }
-
- public void doHead(HttpServletRequest request, HttpServletResponse response) {
- // produce same reponse as for GET, but no content (writer == null)
- doStatus(request, response, null);
- }
-
- private void htmlPage(PrintWriter writer, String body, boolean consoleOutput) {
- if (consoleOutput)
- System.err.println(body);
-
- writer.println("<html>"); //$NON-NLS-1$
- writer.println("<body>"); //$NON-NLS-1$
- writer.println(body);
- writer.println("<br/>"); //$NON-NLS-1$
- writer.println("</body>"); //$NON-NLS-1$
- writer.println("</html>"); //$NON-NLS-1$
- writer.flush();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/TimeOut.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/TimeOut.java
deleted file mode 100644
index e5544cd91..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/TimeOut.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * This servlet is a "black hole" - it just sleeps for an hour on any request.
- *
- */
-public class TimeOut extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
- private static long MINUTES_MS = 1000 * 60; // minutes in ms
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) {
- doDelay();
- }
-
- private void doDelay() {
- // Do nothing...
- try {
- Thread.sleep(10 * MINUTES_MS); // sleep 10 minutes
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- protected void doHead(HttpServletRequest request, HttpServletResponse response) {
- doDelay();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Truncator.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Truncator.java
deleted file mode 100644
index 17c4bf636..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/servlets/Truncator.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, Cloudsmith Inc 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.testserver.servlets;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.net.URI;
-import java.net.URLConnection;
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class Truncator extends BasicResourceDelivery {
-
- double keepFactor;
-
- public Truncator(String theAlias, URI thePath, int keepPercent) {
- super(theAlias, thePath);
- if (keepPercent < 0 || keepPercent > 100)
- throw new IllegalArgumentException("keepPercent must be between 0 and 100 - was:" + Integer.valueOf(keepPercent)); //$NON-NLS-1$
- keepFactor = keepPercent / 100.0;
- }
-
- private static final long serialVersionUID = 1L;
-
- protected void deliver(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- // truncate all files
- doTruncate(conn, in, filename, request, response);
- }
-
- protected void doTruncate(URLConnection conn, InputStream in, String filename, HttpServletRequest request, HttpServletResponse response) throws IOException {
- int contentlength = conn.getContentLength();
- if (contentlength >= 0) {
- response.setContentLength(contentlength);
-
- String mimeType = computeMimeType(filename, conn);
- response.setContentType(mimeType);
-
- // We want to use a writer if we are sending text
- if (mimeType.startsWith("text/")) //$NON-NLS-1$
- {
- PrintWriter writer = response.getWriter();
-
- writer.flush(); /* write the headers and unbuffer the output */
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
- char buffer[] = new char[4096];
- int read;
- int written = 0;
- while ((read = reader.read(buffer, 0, buffer.length)) != -1) {
- read = cap(contentlength, written, read);
- writer.write(buffer, 0, read);
- written += read;
- }
- } else {
- ServletOutputStream out = response.getOutputStream();
-
- out.flush(); /* write the headers and unbuffer the output */
-
- byte buffer[] = new byte[4096];
- int read;
- int written = 0;
- while ((read = in.read(buffer, 0, buffer.length)) != -1) {
- read = cap(contentlength, written, read);
- out.write(buffer, 0, read);
- written += read;
- }
- }
- }
- }
-
- /**
- * Returns read if entire amount should be read. Returns a lower number if
- * written + read > keepPercent of total
- * @param total
- * @param written
- * @param read
- * @return read, or a lower number if cap is reached
- */
- private int cap(int total, int written, int read) {
- int cap = (int) (keepFactor * total);
- return (read + written) > cap ? cap - written : read;
- }
-
- protected void deliverHead(String filename, URLConnection conn, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // deliver normal head response
- super.doDeliverHead(filename, conn, request, response);
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/artifacts.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/artifacts.xml
deleted file mode 100644
index 19e55d746..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/artifacts.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?artifactRepository class='org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository' version='1.0.0'?>
-<repository name='Good Test Repository' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1' description='Good test repository description'>
- <properties size='3'>
- <property name='p2.compressed' value='false'/>
- <property name='p2.timestamp' value='1218734853468'/>
- <property name='p2.system' value='false'/>
- </properties>
- <mappings size='3'>
- <rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
- <rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
- <rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
- </mappings>
- <artifacts size='2'>
- <artifact classifier='osgi.bundle' id='aaPlugin' version='1.0.0'>
- <properties size='3'>
- <property name='artifact.size' value='469'/>
- <property name='download.size' value='469'/>
- <property name='download.contentType' value='application/zip'/>
- </properties>
- </artifact>
- <artifact classifier='org.eclipse.update.feature' id='aaFeature' version='1.0.0'>
- <properties size='2'>
- <property name='artifact.size' value='670'/>
- <property name='download.size' value='670'/>
- </properties>
- </artifact>
- </artifacts>
-</repository>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/features/aaFeature_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/features/aaFeature_1.0.0.jar
deleted file mode 100644
index f800a9ad2..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/features/aaFeature_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/plugins/aaPlugin_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/plugins/aaPlugin_1.0.0.jar
deleted file mode 100644
index 65ff62b79..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/plugins/aaPlugin_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/readme.txt b/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/readme.txt
deleted file mode 100644
index 6fcc19b18..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/ar/simple/readme.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-This is a very simple artifact repository containing a single group IU (a feature), and
-a single bundle IU. This repository is used by ArtifactRepositoryManagerTest \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.html b/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.html
deleted file mode 100644
index c07f8d265..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<html>
-<body>
-<h1>Welcome to the p2 test server</h1>
-<p>You can access all files under the "webfiles" folder in this bundle via either a "public" or "private"
-pseudoroot. Try the public link <a href="http://localhost:8080/public/index.html">here</a></p>
-<p>To access using a login, password, you simply use the pseudoroot "/private", and you will be asked to
-log in. The credentials are: user: <b>Aladdin</b>, password: <b>open sesame</b>. Try it
-<a href="http://localhost:8080/private/index.html">here</a></p>
-<p>The following real content is registered:</p>
-<ul>
-<li>/proxy/private/ - goes to http://http://download.eclipse.org/eclipse/updates/3.4, but requires authentication.</li>
-<li>/proxy/public/ - goes to http://http://download.eclipse.org/eclipse/updates/3.4, (useful in redirects).</li>
-<li>/proxy/never/ - goes to http://http://download.eclipse.org/eclipse/updates/3.4, but always fail authentication.</li>
-<li>/proxy/flipFlop/ - goes to http://http://download.eclipse.org/eclipse/updates/3.4, but fails authentication every second attempt.</li>
-<li>/proxy/truncated - goes to updates/3.4, but truncates all files</li>
-<li>/proxy/molested - goes to updates/3.4, but generates gibberish for all files</li>
-<li>/proxy/decelerate - goes to updates/3.4, but delivers files in very small delayed packets - delay increases.</li>
-<li>/proxy/decelerate2 - like /proxy/decelerate, but does not start delay until 80% of file has been processed. Good for progress bar testing.</li>
-<li>/proxy/readtimeout - When 10% of file has been processed, it delays deliver 10 minutes. Good for progress bar/cancel testing.</li>
-<li>/proxy/modified/... - goes to updates/3.4, but delivers various errors in "last modified" (see below)
- <ul><li>.../zero - all times are returned as 0</li>
- <li>.../old - all times are very old</li>
- <li>.../now - all times are the same as the request time</li>
- <li>.../future - all times are in the future (which is illegal in HTTP)</li>
- <li>.../bad - the time is not a date at all - the client should throw an error</li>
- </ul>
-</li>
-<li>/proxy/length/... - goes to updates/3.4, but delivers various content length errors (see below)
- <ul><li>.../zero - length is reported as 0 (but all content written to stream)</li>
- <li>.../less - less than the correct size is reported (all content written)</li>
- <li>.../more - double the correct size is reported (but only available content is written)</li>
- </ul>
-</li>
-</li>/proxy2/... - goes to http://www.eclipse.org/equinox/p2/testing/updateSite - the same
-paths as for /proxy/... are available.
-</li>
-</li>/proxy3/aprivate/... - goes to http://www.eclipse.org/equinox/p2/testing/updateSite. This proxy makes
-the subpaths .../plugins, and .../features, private.
-</li>
-</ul>
-<p>The content listed below is also available and can be accessed under:
-<ul><li>/public</li>
-<li>/private</li>
-<li>/never</li>
-<li>/flipFlop</li>
-<li>/truncated</li>
-<li>/molested</li>
-</ul>
-<p>Content</p>
-<ul>
-<li>.../ar/simple - a simple artifact repo with a feature and a plugin, uses artifact.xml</li>
-<li>.../mdr/composite - a composite meta data repository - consisting of two mdrs</li>
-<li>.../mdr/composite/one - a regular meta data repostory, uses content.xml</li>
-<li>.../updatesite - a classic update site with site.xml, features and plugins subdirectory</li>
-</ul>
-<p>The following two URL's are also available</p>
-<ul>
-<li>/timeout/ - a black hole - sleeps 10 minutes and produces no response.</li>
-<li>/status/nnn/xxxxx - returns the status-code "nnn", and text/html
-content, The xxxxx part is ignored. e.g. http://localhost:8080/status/500/ignored/part</li>
-<li>/redirect/nnn[/location] - redirects nnn times before redirecting to "location" - if no
-location is stated, a final page with message 'Redirected Successfully' is displayed.
-</ul>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.xml
deleted file mode 100644
index 9e25031b4..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/index.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<body>
-<h1>Welcome to the p2 test server</h1>
-<p>You can access all files under the "webfiles" folder in this bundle via either a "public" or "private"
-pseudoroot. Try the public link <a href="http://localhost:8080/public/index.html">here</a></p>
-<p>To access using a login, password, you simply use the pseudoroot "/private", and you will be asked to
-log in. The credentials are: user: <b>Aladdin</b>, password: <b>open sesame</b>. Try it
-<a href="http://localhost:8080/private/index.html">here</a></p>
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/compositeContent.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/compositeContent.xml
deleted file mode 100644
index af4be35bc..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/compositeContent.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?compositeMetadataRepository version='1.0.0'?>
-<repository name='metadata name' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
- <properties size='2'>
- <property name='p2.compressed' value='false'/>
- <property name='p2.timestamp' value='1234'/>
- </properties>
- <children size='2'>
- <child location='one'/>
- <child location='two'/>
- </children>
-</repository>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/one/content.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/one/content.xml
deleted file mode 100644
index 41f172f48..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/one/content.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
-<repository name='Good Test Repository' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1' description='Good test repository description'>
- <properties size='3'>
- <property name='p2.system' value='true'/>
- <property name='p2.timestamp' value='1221680367875'/>
- <property name='site.checksum' value='2404093275'/>
- </properties>
- <units size='5'>
- <unit id='test.feature.feature.jar' version='1.0.0'>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.jar' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
- <provided namespace='org.eclipse.update.feature' name='test.feature' version='1.0.0'/>
- </provides>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
- <artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='test.feature' version='1.0.0'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='zipped'>
- true
- </instruction>
- </instructions>
- </touchpointData>
- <licenses size='1'>
- <license url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
- </unit>
- <unit id='test.bundle' version='1.0.0' singleton='false'>
- <update id='test.bundle' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.partial.iu' value='true'/>
- </properties>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle' version='1.0.0'/>
- <provided namespace='osgi.bundle' name='test.bundle' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
- </provides>
- <artifacts size='1'>
- <artifact classifier='osgi.bundle' id='test.bundle' version='1.0.0'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='manifest'>
- </instruction>
- </instructions>
- </touchpointData>
- </unit>
- <unit id='test.fragment' version='1.0.0' singleton='false'>
- <update id='test.fragment' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.partial.iu' value='true'/>
- </properties>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.fragment' version='1.0.0'/>
- <provided namespace='osgi.bundle' name='test.fragment' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
- </provides>
- <artifacts size='1'>
- <artifact classifier='osgi.bundle' id='test.fragment' version='1.0.0'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='manifest'>
- </instruction>
- </instructions>
- </touchpointData>
- </unit>
- <unit id='test.feature.feature.group' version='1.0.0' singleton='false'>
- <update id='test.feature.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='5'>
- <property name='org.eclipse.equinox.p2.name' value='%featurename'/>
- <property name='org.eclipse.equinox.p2.description' value='[Enter Feature Description here.]'/>
- <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
- <property name='org.eclipse.equinox.p2.type.group' value='true'/>
- <property name='df_LT.featurename' value='j the feature'/>
- </properties>
- <provides size='2'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.group' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
- </provides>
- <requires size='3'>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.fragment' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.jar' range='[1.0.0,1.0.0]'>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
- </required>
- </requires>
- <touchpoint id='null' version='0.0.0'/>
- <licenses size='1'>
- <license url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
- </unit>
- <unit id='Default' version='0.0.0'>
- <properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Uncategorized'/>
- <property name='org.eclipse.equinox.p2.description' value='Default category for otherwise uncategorized features'/>
- <property name='org.eclipse.equinox.p2.type.category' value='true'/>
- </properties>
- <provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Default' version='0.0.0'/>
- </provides>
- <requires size='1'>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.group' range='[1.0.0,1.0.0]'/>
- </requires>
- <touchpoint id='null' version='0.0.0'/>
- </unit>
- </units>
-</repository>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/two/content.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/two/content.xml
deleted file mode 100644
index fd315dbb3..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/mdr/composite/two/content.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
-<repository name='update site: file:/C:/1target/provmiddle/org.eclipse.equinox.p2.tests/testData/updatesite/site' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
- <properties size='3'>
- <property name='p2.system' value='true'/>
- <property name='p2.timestamp' value='1221680367875'/>
- <property name='site.checksum' value='2404093275'/>
- </properties>
- <units size='5'>
- <unit id='test.feature.feature.jar' version='1.0.0'>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.jar' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
- <provided namespace='org.eclipse.update.feature' name='test.feature' version='1.0.0'/>
- </provides>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
- <artifacts size='1'>
- <artifact classifier='org.eclipse.update.feature' id='test.feature' version='1.0.0'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='zipped'>
- true
- </instruction>
- </instructions>
- </touchpointData>
- <licenses size='1'>
- <license url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
- </unit>
- <unit id='test.bundle' version='1.0.0' singleton='false'>
- <update id='test.bundle' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.partial.iu' value='true'/>
- </properties>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.bundle' version='1.0.0'/>
- <provided namespace='osgi.bundle' name='test.bundle' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
- </provides>
- <artifacts size='1'>
- <artifact classifier='osgi.bundle' id='test.bundle' version='1.0.0'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='manifest'>
- </instruction>
- </instructions>
- </touchpointData>
- </unit>
- <unit id='test.fragment' version='1.0.0' singleton='false'>
- <update id='test.fragment' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='1'>
- <property name='org.eclipse.equinox.p2.partial.iu' value='true'/>
- </properties>
- <provides size='3'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.fragment' version='1.0.0'/>
- <provided namespace='osgi.bundle' name='test.fragment' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
- </provides>
- <artifacts size='1'>
- <artifact classifier='osgi.bundle' id='test.fragment' version='1.0.0'/>
- </artifacts>
- <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
- <touchpointData size='1'>
- <instructions size='1'>
- <instruction key='manifest'>
- </instruction>
- </instructions>
- </touchpointData>
- </unit>
- <unit id='test.feature.feature.group' version='1.0.0' singleton='false'>
- <update id='test.feature.feature.group' range='[0.0.0,1.0.0)' severity='0'/>
- <properties size='5'>
- <property name='org.eclipse.equinox.p2.name' value='%featurename'/>
- <property name='org.eclipse.equinox.p2.description' value='[Enter Feature Description here.]'/>
- <property name='org.eclipse.equinox.p2.description.url' value='http://www.example.com/description'/>
- <property name='org.eclipse.equinox.p2.type.group' value='true'/>
- <property name='df_LT.featurename' value='j the feature'/>
- </properties>
- <provides size='2'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.group' version='1.0.0'/>
- <provided namespace='org.eclipse.equinox.p2.localization' name='df_LT' version='1.0.0'/>
- </provides>
- <requires size='3'>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.bundle' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.fragment' range='[1.0.0,1.0.0]'/>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.jar' range='[1.0.0,1.0.0]'>
- <filter>
- (org.eclipse.update.install.features=true)
- </filter>
- </required>
- </requires>
- <touchpoint id='null' version='0.0.0'/>
- <licenses size='1'>
- <license url='http://www.example.com/license'>
- [Enter License Description here.]
- </license>
- </licenses>
- <copyright url='http://www.example.com/copyright'>
- [Enter Copyright Description here.]
- </copyright>
- </unit>
- <unit id='Default' version='0.0.0'>
- <properties size='3'>
- <property name='org.eclipse.equinox.p2.name' value='Uncategorized'/>
- <property name='org.eclipse.equinox.p2.description' value='Default category for otherwise uncategorized features'/>
- <property name='org.eclipse.equinox.p2.type.category' value='true'/>
- </properties>
- <provides size='1'>
- <provided namespace='org.eclipse.equinox.p2.iu' name='Default' version='0.0.0'/>
- </provides>
- <requires size='1'>
- <required namespace='org.eclipse.equinox.p2.iu' name='test.feature.feature.group' range='[1.0.0,1.0.0]'/>
- </requires>
- <touchpoint id='null' version='0.0.0'/>
- </unit>
- </units>
-</repository>
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/features/test.feature_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/features/test.feature_1.0.0.jar
deleted file mode 100644
index 80bbc69fd..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/features/test.feature_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.bundle_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.bundle_1.0.0.jar
deleted file mode 100644
index 00dd829d8..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.bundle_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.fragment_1.0.0.jar b/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.fragment_1.0.0.jar
deleted file mode 100644
index d033e2eda..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/plugins/test.fragment_1.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/site.xml b/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/site.xml
deleted file mode 100644
index 4e619773e..000000000
--- a/bundles/org.eclipse.equinox.p2.testserver/webfiles/updatesite/site.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <feature url="features/test.feature_1.0.0.jar" id="test.feature" version="1.0.0"/>
-</site>
diff --git a/bundles/org.eclipse.equinox.p2.tools/.project b/bundles/org.eclipse.equinox.p2.tools/.project
deleted file mode 100644
index a0af60111..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.tools</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.tools/README.txt b/bundles/org.eclipse.equinox.p2.tools/README.txt
deleted file mode 100644
index 295eb9a2f..000000000
--- a/bundles/org.eclipse.equinox.p2.tools/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-This project is now defunct and replaced by the org.eclipse.equinox.p2.repository.tools. \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.touchpoint.eclipse/.cvsignore b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.project b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.project
deleted file mode 100644
index 18fa42e35..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.touchpoint.eclipse</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1c4f1002d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,330 +0,0 @@
-#Tue Dec 22 18:23:28 CET 2009
-eclipse.preferences.version=1
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 8bc0190ce..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:03 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
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
deleted file mode 100644
index de43a8c3e..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,49 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.eclipse;singleton:=true
-Bundle-Version: 2.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.touchpoint.eclipse;version="2.0.0";x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation",
- org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;version="2.0.0";x-internal:=true,
- org.eclipse.equinox.internal.p2.update;version="2.0.0";x-friends:="org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.directorywatcher",
- org.eclipse.equinox.p2.touchpoint.eclipse.query;version="2.0.0"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.5.0,4.0.0)"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.p2.garbagecollector,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.simpleconfigurator.manipulator,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.publisher;resolution:=optional,
- org.eclipse.equinox.p2.publisher.eclipse;resolution:=optional,
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.simpleconfigurator.manipulator;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.datalocation;version="1.0.0",
- org.eclipse.osgi.service.environment;version="1.0.0",
- org.eclipse.osgi.service.resolver;version="1.2.0";resolution:=optional,
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0",
- org.osgi.service.prefs;version="1.1.1",
- org.osgi.util.tracker;version="1.4.0",
- org.w3c.dom,
- org.xml.sax
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties
deleted file mode 100644
index 0328daa18..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties
deleted file mode 100644
index 079bdd86f..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Eclipse Touchpoint
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
deleted file mode 100644
index ab256c131..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/plugin.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.5"?>
-<plugin>
- <extension point="org.eclipse.equinox.p2.engine.touchpoints" id="eclipse" name="Eclipse Touchpoint">
- <touchpoint
- type="org.eclipse.equinox.p2.osgi"
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint"
- version="1.0.0"/>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddJVMArgumentAction"
- name="addJvmArg"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddProgramArgumentAction"
- name="addProgramArg"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddRepositoryAction"
- name="addRepository"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddSourceBundleAction"
- name="addSourceBundle"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.CheckTrustAction"
- name="checkTrust"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.ChmodAction"
- name="chmod"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.LinkAction"
- name="ln"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.CollectAction"
- name="collect"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction"
- name="installBundle"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallFeatureAction"
- name="installFeature"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.MarkStartedAction"
- name="markStarted"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveJVMArgumentAction"
- name="removeJvmArg"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveProgramArgumentAction"
- name="removeProgramArg"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveRepositoryAction"
- name="removeRepository"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.RemoveSourceBundleAction"
- name="removeSourceBundle"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction"
- name="setFrameworkDependentProperty"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction"
- name="setFrameworkIndependentProperty"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetLauncherNameAction"
- name="setLauncherName"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction"
- name="setProgramProperty"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetStartLevelAction"
- name="setStartLevel"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction"
- name="uninstallBundle"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallFeatureAction"
- name="uninstallFeature"
- touchpointType="org.eclipse.equinox.p2.osgi"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.garbagecollector.marksetproviders"
- id="EclipseTouchpoint">
- <run
- class="org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseMarkSetProvider"/>
- </extension>
- </plugin>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
deleted file mode 100644
index 1196437a4..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.touchpoint.eclipse</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Activator.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Activator.java
deleted file mode 100644
index 77f55296c..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Activator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.touchpoint.eclipse"; //$NON-NLS-1$
- private static BundleContext context = null;
-
- public void start(BundleContext ctx) throws Exception {
- Activator.context = ctx;
- }
-
- public void stop(BundleContext ctx) throws Exception {
- Activator.context = null;
- }
-
- public static BundleContext getContext() {
- return Activator.context;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java
deleted file mode 100644
index b268d65ba..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/AggregatedBundleRepository.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import java.io.OutputStream;
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.equinox.p2.repository.artifact.spi.AbstractArtifactRepository;
-
-public class AggregatedBundleRepository extends AbstractArtifactRepository implements IFileArtifactRepository {
-
- private static final String REPOSITORY_TYPE = AggregatedBundleRepository.class.getName();
- private final Collection<IFileArtifactRepository> bundleRepositories;
-
- public AggregatedBundleRepository(IProvisioningAgent agent, Collection<IFileArtifactRepository> bundleRepositories) {
- super(agent, REPOSITORY_TYPE, REPOSITORY_TYPE, "1.0", null, null, null, null); //$NON-NLS-1$
- this.bundleRepositories = bundleRepositories;
- }
-
- public File getArtifactFile(IArtifactKey key) {
- for (IFileArtifactRepository repository : bundleRepositories) {
- File artifactFile = repository.getArtifactFile(key);
- if (artifactFile != null)
- return artifactFile;
- }
- return null;
- }
-
- public File getArtifactFile(IArtifactDescriptor descriptor) {
- for (IFileArtifactRepository repository : bundleRepositories) {
- File artifactFile = repository.getArtifactFile(descriptor);
- if (artifactFile != null)
- return artifactFile;
- }
- return null;
- }
-
- public boolean contains(IArtifactDescriptor descriptor) {
- for (IFileArtifactRepository repository : bundleRepositories) {
- if (repository.contains(descriptor))
- return true;
- }
- return false;
- }
-
- public boolean contains(IArtifactKey key) {
- for (IFileArtifactRepository repository : bundleRepositories) {
- if (repository.contains(key))
- return true;
- }
- return false;
- }
-
- public IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
- Set<IArtifactDescriptor> artifactDescriptors = new HashSet<IArtifactDescriptor>();
- for (IFileArtifactRepository repository : bundleRepositories) {
- IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
- if (descriptors != null)
- artifactDescriptors.addAll(Arrays.asList(descriptors));
- }
- return artifactDescriptors.toArray(new IArtifactDescriptor[artifactDescriptors.size()]);
- }
-
- public IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- throw new UnsupportedOperationException(Messages.artifact_retrieval_unsupported);
- }
-
- public IStatus getRawArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
- throw new UnsupportedOperationException(Messages.artifact_retrieval_unsupported);
- }
-
- public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
- throw new UnsupportedOperationException(Messages.artifact_retrieval_unsupported);
- }
-
- public OutputStream getOutputStream(IArtifactDescriptor descriptor) {
- throw new UnsupportedOperationException(Messages.artifact_write_unsupported);
- }
-
- /**
- * Exposed for testing and debugging purposes.
- * @noreference This method is not intended to be referenced by clients.
- */
- public Collection<IFileArtifactRepository> testGetBundleRepositories() {
- return bundleRepositories;
- }
-
- public IQueryResult<IArtifactKey> query(IQuery<IArtifactKey> query, IProgressMonitor monitor) {
- // Query all the all the repositories
- IQueryable<IArtifactKey> queryable = QueryUtil.compoundQueryable(bundleRepositories);
- return queryable.query(query, monitor);
- }
-
- public IQueryable<IArtifactDescriptor> descriptorQueryable() {
- List<IQueryable<IArtifactDescriptor>> descQueryables = new ArrayList<IQueryable<IArtifactDescriptor>>(bundleRepositories.size());
- for (IFileArtifactRepository repository : bundleRepositories)
- descQueryables.add(repository.descriptorQueryable());
-
- return QueryUtil.compoundQueryable(descQueryables);
- }
-}
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
deleted file mode 100644
index 683d1a64d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/DirectorUtil.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-
-public class DirectorUtil {
-
- public static IStatus validateProfile(IProfile profile) {
- IPlanner planner = (IPlanner) profile.getProvisioningAgent().getService(IPlanner.SERVICE_NAME);
- IProfileChangeRequest pcr = planner.createChangeRequest(profile);
- ProvisioningContext ctx = new ProvisioningContext(profile.getProvisioningAgent());
- ctx.setMetadataRepositories(new URI[0]);
- return planner.getProvisioningPlan(pcr, ctx, null).getStatus();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
deleted file mode 100644
index faf6c666f..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseMarkSetProvider.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.garbagecollector.MarkSet;
-import org.eclipse.equinox.internal.p2.garbagecollector.MarkSetProvider;
-import org.eclipse.equinox.internal.p2.update.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-
-/**
- * MarkSetProvider implementation for the Eclipse touchpoint.
- */
-public class EclipseMarkSetProvider extends MarkSetProvider {
- private static final String ARTIFACT_CLASSIFIER_OSGI_BUNDLE = "osgi.bundle"; //$NON-NLS-1$
- private static final String ARTIFACT_CLASSIFIER_FEATURE = "org.eclipse.update.feature"; //$NON-NLS-1$
-
- private Collection<IArtifactKey> artifactKeyList = null;
-
- public MarkSet[] getMarkSets(IProvisioningAgent agent, IProfile inProfile) {
- artifactKeyList = new HashSet<IArtifactKey>();
- IArtifactRepository repositoryToGC = Util.getBundlePoolRepository(agent, inProfile);
- if (repositoryToGC == null)
- return new MarkSet[0];
- addArtifactKeys(inProfile);
- IProfile currentProfile = getCurrentProfile(agent);
- if (currentProfile != null && inProfile.getProfileId().equals(currentProfile.getProfileId())) {
- addRunningBundles(repositoryToGC);
- addRunningFeatures(inProfile, repositoryToGC);
- }
- return new MarkSet[] {new MarkSet(artifactKeyList.toArray(new IArtifactKey[artifactKeyList.size()]), repositoryToGC)};
- }
-
- private void addRunningFeatures(IProfile profile, IArtifactRepository repositoryToGC) {
- try {
- List<Feature> allFeatures = getAllFeatures(Configuration.load(new File(Util.getConfigurationFolder(profile), "org.eclipse.update/platform.xml"), null)); //$NON-NLS-1$
- for (Feature f : allFeatures) {
- IArtifactKey match = searchArtifact(f.getId(), Version.create(f.getVersion()), ARTIFACT_CLASSIFIER_FEATURE, repositoryToGC);
- if (match != null)
- artifactKeyList.add(match);
- }
- } catch (ProvisionException e) {
- //Ignore the exception
- }
- }
-
- private List<Feature> getAllFeatures(Configuration cfg) {
- if (cfg == null)
- return CollectionUtils.emptyList();
- List<Site> sites = cfg.getSites();
- ArrayList<Feature> result = new ArrayList<Feature>();
- for (Site object : sites) {
- Feature[] features = object.getFeatures();
- for (int i = 0; i < features.length; i++) {
- result.add(features[i]);
- }
- }
- return result;
- }
-
- private IProfile getCurrentProfile(IProvisioningAgent agent) {
- IProfileRegistry pr = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (pr == null)
- return null;
- return pr.getProfile(IProfileRegistry.SELF);
- }
-
- private void addArtifactKeys(IProfile aProfile) {
- Iterator<IInstallableUnit> installableUnits = aProfile.query(QueryUtil.createIUAnyQuery(), null).iterator();
- while (installableUnits.hasNext()) {
- Collection<IArtifactKey> keys = installableUnits.next().getArtifacts();
- if (keys == null)
- continue;
- artifactKeyList.addAll(keys);
- }
- }
-
- public IArtifactRepository getRepository(IProvisioningAgent agent, IProfile aProfile) {
- return Util.getBundlePoolRepository(agent, aProfile);
- }
-
- private void addRunningBundles(IArtifactRepository repo) {
- artifactKeyList.addAll(findCorrespondinArtifacts(new WhatIsRunning().getBundlesBeingRun(), repo));
- }
-
- private IArtifactKey searchArtifact(String searchedId, Version searchedVersion, String classifier, IArtifactRepository repo) {
- //This is somewhat cheating since normally we should get the artifact key from the IUs that were representing the running system (e.g. we could get that info from the rollback repo)
- VersionRange range = searchedVersion != null ? new VersionRange(searchedVersion, true, searchedVersion, true) : null;
- ArtifactKeyQuery query = new ArtifactKeyQuery(classifier, searchedId, range);
- //TODO short-circuit the query when we find one?
- IQueryResult<IArtifactKey> keys = repo.query(query, null);
- if (!keys.isEmpty())
- return keys.iterator().next();
- return null;
- }
-
- //Find for each bundle info a corresponding artifact in repo
- private List<IArtifactKey> findCorrespondinArtifacts(BundleInfo[] bis, IArtifactRepository repo) {
- ArrayList<IArtifactKey> toRetain = new ArrayList<IArtifactKey>();
- for (int i = 0; i < bis.length; i++) {
- // if version is "0.0.0", we will use null to find all versions, see bug 305710
- Version version = BundleInfo.EMPTY_VERSION.equals(bis[i].getVersion()) ? null : Version.create(bis[i].getVersion());
- IArtifactKey match = searchArtifact(bis[i].getSymbolicName(), version, ARTIFACT_CLASSIFIER_OSGI_BUNDLE, repo);
- if (match != null)
- toRetain.add(match);
- }
- return toRetain;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
deleted file mode 100644
index cfa60c064..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/EclipseTouchpoint.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Code 9 - ongoing development
- * Eclipse Source - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class EclipseTouchpoint extends Touchpoint {
- public static final String PROFILE_PROP_LAUNCHER_NAME = "eclipse.touchpoint.launcherName"; //$NON-NLS-1$
- public static final String PARM_MANIPULATOR = "manipulator"; //$NON-NLS-1$
- public static final String PARM_PLATFORM_CONFIGURATION = "platformConfiguration"; //$NON-NLS-1$
- public static final String PARM_SOURCE_BUNDLES = "sourceBundles"; //$NON-NLS-1$
- public static final String PARM_IU = "iu"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT_LOCATION = "artifact.location"; //$NON-NLS-1$
- private static final Object PARM_AGENT = "agent"; //$NON-NLS-1$
-
- private static final String NATIVE_TOUCHPOINT_ID = "org.eclipse.equinox.p2.touchpoint.natives"; //$NON-NLS-1$
- private static List<String> NATIVE_ACTIONS = Arrays.asList(new String[] {"mkdir", "rmdir"}); //$NON-NLS-1$//$NON-NLS-2$
- private static final String VALIDATE_PROFILE = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.validateProfile"; //$NON-NLS-1$
-
- private static Map<IProfile, LazyManipulator> manipulators = new WeakHashMap<IProfile, LazyManipulator>();
- private static Map<IProfile, PlatformConfigurationWrapper> wrappers = new WeakHashMap<IProfile, PlatformConfigurationWrapper>();
- private static Map<IProfile, SourceManipulator> sourceManipulators = new WeakHashMap<IProfile, SourceManipulator>();
- private static Map<IProfile, Map<IInstallableUnit, IInstallableUnit>> preparedIUs = new WeakHashMap<IProfile, Map<IInstallableUnit, IInstallableUnit>>();
-
- private static synchronized LazyManipulator getManipulator(IProvisioningAgent agent, IProfile profile) {
- LazyManipulator manipulator = manipulators.get(profile);
- if (manipulator == null) {
- manipulator = new LazyManipulator(agent, profile);
- manipulators.put(profile, manipulator);
- }
- return manipulator;
- }
-
- private static synchronized void saveManipulator(IProfile profile) throws FrameworkAdminRuntimeException, IOException {
- LazyManipulator manipulator = manipulators.remove(profile);
- if (manipulator != null)
- manipulator.save(false);
- }
-
- private static synchronized PlatformConfigurationWrapper getPlatformConfigurationWrapper(IProvisioningAgent agent, IProfile profile, LazyManipulator manipulator) {
- PlatformConfigurationWrapper wrapper = wrappers.get(profile);
- if (wrapper == null) {
- File configLocation = Util.getConfigurationFolder(profile);
- URI poolURI = Util.getBundlePoolLocation(agent, profile);
- wrapper = new PlatformConfigurationWrapper(configLocation, poolURI, manipulator);
- wrappers.put(profile, wrapper);
- }
- return wrapper;
- }
-
- private static synchronized void savePlatformConfigurationWrapper(IProfile profile) throws ProvisionException {
- PlatformConfigurationWrapper wrapper = wrappers.remove(profile);
- if (wrapper != null)
- wrapper.save();
- }
-
- private static synchronized SourceManipulator getSourceManipulator(IProfile profile) {
- SourceManipulator sourceManipulator = sourceManipulators.get(profile);
- if (sourceManipulator == null) {
- sourceManipulator = new SourceManipulator(profile);
- sourceManipulators.put(profile, sourceManipulator);
- }
- return sourceManipulator;
- }
-
- private static synchronized void saveSourceManipulator(IProfile profile) throws IOException {
- SourceManipulator sourceManipulator = sourceManipulators.remove(profile);
- if (sourceManipulator != null)
- sourceManipulator.save();
- }
-
- private static synchronized IInstallableUnit getPreparedIU(IProfile profile, IInstallableUnit iu) {
- Map<IInstallableUnit, IInstallableUnit> preparedProfileIUs = preparedIUs.get(profile);
- if (preparedProfileIUs == null)
- return null;
-
- return preparedProfileIUs.get(iu);
- }
-
- private static synchronized void savePreparedIU(IProfile profile, IInstallableUnit iu) {
- Map<IInstallableUnit, IInstallableUnit> preparedProfileIUs = preparedIUs.get(profile);
- if (preparedProfileIUs == null) {
- preparedProfileIUs = new HashMap<IInstallableUnit, IInstallableUnit>();
- preparedIUs.put(profile, preparedProfileIUs);
- }
- preparedProfileIUs.put(iu, iu);
- }
-
- private static synchronized boolean hasPreparedIUs(IProfile profile) {
- return preparedIUs.get(profile) != null;
- }
-
- private static synchronized void clearProfileState(IProfile profile) {
- manipulators.remove(profile);
- wrappers.remove(profile);
- sourceManipulators.remove(profile);
- preparedIUs.remove(profile);
- }
-
- public IStatus prepare(IProfile profile) {
- try {
- if (hasPreparedIUs(profile))
- return validateProfile(profile);
- } catch (RuntimeException e) {
- return Util.createError(NLS.bind(Messages.error_validating_profile, profile.getProfileId()), e);
- }
- return Status.OK_STATUS;
- }
-
- public IStatus commit(IProfile profile) {
- MultiStatus status = new MultiStatus(Activator.ID, IStatus.OK, null, null);
- try {
- saveManipulator(profile);
- } catch (RuntimeException e) {
- status.add(Util.createError(Messages.error_saving_manipulator, e));
- } catch (IOException e) {
- status.add(Util.createError(Messages.error_saving_manipulator, e));
- }
- try {
- savePlatformConfigurationWrapper(profile);
- } catch (RuntimeException e) {
- status.add(Util.createError(Messages.error_saving_platform_configuration, e));
- } catch (ProvisionException pe) {
- status.add(Util.createError(Messages.error_saving_platform_configuration, pe));
- }
-
- try {
- saveSourceManipulator(profile);
- } catch (RuntimeException e) {
- status.add(Util.createError(Messages.error_saving_source_bundles_list, e));
- } catch (IOException e) {
- status.add(Util.createError(Messages.error_saving_source_bundles_list, e));
- }
- return status;
- }
-
- public IStatus rollback(IProfile profile) {
- clearProfileState(profile);
- return Status.OK_STATUS;
- }
-
- public String qualifyAction(String actionId) {
- String touchpointQualifier = NATIVE_ACTIONS.contains(actionId) ? NATIVE_TOUCHPOINT_ID : Activator.ID;
- return touchpointQualifier + "." + actionId; //$NON-NLS-1$
- }
-
- public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> touchpointParameters) {
- IProvisioningAgent agent = (IProvisioningAgent) touchpointParameters.get(PARM_AGENT);
- LazyManipulator manipulator = getManipulator(agent, profile);
- touchpointParameters.put(PARM_MANIPULATOR, manipulator);
- touchpointParameters.put(PARM_SOURCE_BUNDLES, getSourceManipulator(profile));
- touchpointParameters.put(PARM_PLATFORM_CONFIGURATION, getPlatformConfigurationWrapper(agent, profile, manipulator));
- return null;
- }
-
- public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(PARM_IU);
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(PARM_ARTIFACT);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(PARM_AGENT);
- if (iu != null && Boolean.valueOf(iu.getProperty(IInstallableUnit.PROP_PARTIAL_IU)).booleanValue()) {
- IInstallableUnit preparedIU = prepareIU(agent, profile, iu, artifactKey);
- if (preparedIU == null)
- return Util.createError(NLS.bind(Messages.failed_prepareIU, iu));
-
- parameters.put(PARM_IU, preparedIU);
- }
-
- if (!parameters.containsKey(PARM_ARTIFACT_LOCATION) && artifactKey != null) {
- File fileLocation = Util.getArtifactFile(agent, artifactKey, profile);
- if (fileLocation != null && fileLocation.exists())
- parameters.put(PARM_ARTIFACT_LOCATION, fileLocation.getAbsolutePath());
- }
- return Status.OK_STATUS;
- }
-
- public IInstallableUnit prepareIU(IProvisioningAgent agent, IProfile profile, IInstallableUnit iu, IArtifactKey artifactKey) {
- IInstallableUnit preparedIU = getPreparedIU(profile, iu);
- if (preparedIU != null)
- return preparedIU;
-
- Class<?> c = null;
- try {
- c = Class.forName("org.eclipse.equinox.p2.publisher.eclipse.BundlesAction"); //$NON-NLS-1$
- if (c != null)
- c = Class.forName("org.eclipse.osgi.service.resolver.PlatformAdmin"); //$NON-NLS-1$
- } catch (ClassNotFoundException e) {
- LogHelper.log(Util.createError(NLS.bind(Messages.publisher_not_available, e.getMessage())));
- return null;
- }
-
- if (c != null) {
- if (artifactKey == null)
- return iu;
-
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
- if (bundleFile == null) {
- LogHelper.log(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey.toString())));
- return null;
- }
- preparedIU = PublisherUtil.createBundleIU(artifactKey, bundleFile);
- if (preparedIU == null) {
- LogHelper.log(Util.createError("The bundle manifest could not be read: " + bundleFile.toString())); //$NON-NLS-1$
- return null;
- }
- savePreparedIU(profile, preparedIU);
- return preparedIU;
- }
-
- // should not occur
- throw new IllegalStateException(Messages.unexpected_prepareiu_error);
- }
-
- private IStatus validateProfile(IProfile profile) {
- // by default we validate
- if (Boolean.FALSE.toString().equals(profile.getProperty(VALIDATE_PROFILE)))
- return Status.OK_STATUS;
-
- Class<?> c = null;
- try {
- c = Class.forName("org.eclipse.equinox.p2.planner.IPlanner"); //$NON-NLS-1$
- } catch (ClassNotFoundException e) {
- //ignore and proceed without validation
- return null;
- }
-
- if (c != null) {
- return DirectorUtil.validateProfile(profile);
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java
deleted file mode 100644
index cafd922c4..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/LazyManipulator.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.IOException;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class LazyManipulator implements Manipulator {
-
- private final static String FILTER_OBJECTCLASS = "(" + Constants.OBJECTCLASS + '=' + FrameworkAdmin.class.getName() + ')'; //$NON-NLS-1$
- private final static String filterFwName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_FW_NAME + "=Equinox)"; //$NON-NLS-1$ //$NON-NLS-2$
- private final static String filterLauncherName = "(" + FrameworkAdmin.SERVICE_PROP_KEY_LAUNCHER_NAME + "=Eclipse.exe)"; //$NON-NLS-1$ //$NON-NLS-2$
- private final static String filterFwAdmin = "(&" + FILTER_OBJECTCLASS + filterFwName + filterLauncherName + ')'; //$NON-NLS-1$;
-
- private Manipulator manipulator;
- private final IProfile profile;
- private final IProvisioningAgent agent;
-
- public LazyManipulator(IProvisioningAgent agent, IProfile profile) {
- this.profile = profile;
- this.agent = agent;
- }
-
- private void loadDelegate() {
- if (manipulator != null)
- return;
-
- manipulator = getFrameworkManipulator();
- if (manipulator == null)
- throw new IllegalStateException(Messages.failed_acquire_framework_manipulator);
-
- LauncherData launcherData = manipulator.getLauncherData();
- launcherData.setFwConfigLocation(Util.getConfigurationFolder(profile));
- launcherData.setLauncher(Util.getLauncherPath(profile));
- launcherData.setLauncherConfigLocation(Util.getLauncherConfigLocation(profile));
- launcherData.setOS(Util.getOSFromProfile(profile));
- launcherData.setHome(Util.getInstallFolder(profile));
-
- try {
- manipulator.load();
- } catch (IllegalStateException e) {
- //if fwJar is not included, this exception will be thrown. But ignore it.
- LogHelper.log(Util.createError(Messages.error_loading_manipulator, e));
- throw new IllegalStateException(Messages.error_loading_manipulator);
- } catch (FrameworkAdminRuntimeException e) {
- LogHelper.log(Util.createError(Messages.error_loading_manipulator, e));
- } catch (IOException e) {
- LogHelper.log(Util.createError(Messages.error_loading_manipulator, e));
- throw new IllegalStateException(Messages.error_loading_manipulator);
- }
- //TODO These values should be inserted by a configuration unit (bug 204124)
- manipulator.getConfigData().setProperty("eclipse.p2.profile", profile.getProfileId()); //$NON-NLS-1$
- manipulator.getConfigData().setProperty("eclipse.p2.data.area", Util.getAgentLocation(agent).getRootLocation().toString()); //$NON-NLS-1$
- }
-
- public static FrameworkAdmin getFrameworkAdmin() {
- ServiceTracker<FrameworkAdmin, FrameworkAdmin> fwAdminTracker = null;
- try {
- Filter filter = Activator.getContext().createFilter(filterFwAdmin);
- fwAdminTracker = new ServiceTracker<FrameworkAdmin, FrameworkAdmin>(Activator.getContext(), filter, null);
- fwAdminTracker.open();
- FrameworkAdmin fwAdmin = fwAdminTracker.getService();
- return fwAdmin;
- } catch (InvalidSyntaxException e) {
- //Can't happen we are writing the filter ourselves
- return null;
- } finally {
- if (fwAdminTracker != null)
- fwAdminTracker.close();
- }
- }
-
- private Manipulator getFrameworkManipulator() {
- FrameworkAdmin fwAdmin = getFrameworkAdmin();
- if (fwAdmin != null)
- return fwAdmin.getManipulator();
- return null;
- }
-
- public void save(boolean backup) throws IOException, FrameworkAdminRuntimeException {
- if (manipulator != null)
- manipulator.save(backup);
- }
-
- // DELEGATE METHODS
-
- public BundlesState getBundlesState() throws FrameworkAdminRuntimeException {
- loadDelegate();
- return manipulator.getBundlesState();
- }
-
- public ConfigData getConfigData() throws FrameworkAdminRuntimeException {
- loadDelegate();
- return manipulator.getConfigData();
- }
-
- public BundleInfo[] getExpectedState() throws IllegalStateException, IOException, FrameworkAdminRuntimeException {
- loadDelegate();
- return manipulator.getExpectedState();
- }
-
- public LauncherData getLauncherData() throws FrameworkAdminRuntimeException {
- loadDelegate();
- return manipulator.getLauncherData();
- }
-
- public long getTimeStamp() {
- loadDelegate();
- return manipulator.getTimeStamp();
- }
-
- public void initialize() {
- loadDelegate();
- manipulator.initialize();
- }
-
- public void load() throws IllegalStateException, FrameworkAdminRuntimeException {
- loadDelegate();
- }
-
- public void setConfigData(ConfigData configData) {
- loadDelegate();
- manipulator.setConfigData(configData);
- }
-
- public void setLauncherData(LauncherData launcherData) {
- loadDelegate();
- manipulator.setLauncherData(launcherData);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java
deleted file mode 100644
index 22f91b576..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Messages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.messages"; //$NON-NLS-1$
- public static String error_loading_manipulator;
- public static String BundlePool;
- public static String failed_acquire_framework_manipulator;
- public static String failed_prepareIU;
- public static String error_saving_manipulator;
- public static String error_saving_platform_configuration;
- public static String error_saving_source_bundles_list;
- public static String error_parsing_configuration;
- public static String publisher_not_available;
- public static String artifact_write_unsupported;
- public static String iu_contains_no_arifacts;
- public static String artifact_file_not_found;
- public static String artifact_retrieval_unsupported;
- public static String bundle_pool_not_writeable;
- public static String cannot_calculate_extension_location;
- public static String parent_dir_features;
- public static String platform_config_unavailable;
- public static String unexpected_prepareiu_error;
- public static String error_validating_profile;
-
- static {
- // load message values from bundle file and assign to fields below
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java
deleted file mode 100644
index bb0a87c5e..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PlatformConfigurationWrapper.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import java.net.*;
-import java.util.List;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.update.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * This class provides a wrapper for reading and writing platform.xml.
- *
- * Only a minimal set of operations is exposed.
- */
-public class PlatformConfigurationWrapper {
-
- private Configuration configuration = null;
- private Site poolSite = null;
- private File configFile;
- private URI poolURI;
- private Manipulator manipulator;
-
- private static String FEATURES = "features/"; //$NON-NLS-1$
-
- private static URL getOSGiInstallArea(Manipulator manipulator) {
- final String OSGI = "org.eclipse.osgi"; //$NON-NLS-1$
- BundleInfo[] bis = manipulator.getConfigData().getBundles();
- String searchFor = "org.eclipse.equinox.launcher"; //$NON-NLS-1$
- for (int i = 0; i < bis.length; i++) {
- if (bis[i].getSymbolicName().equals(searchFor)) {
- if (bis[i].getLocation() != null) {
- try {
- if (bis[i].getLocation().getScheme().equals("file")) //$NON-NLS-1$
- return fromOSGiJarToOSGiInstallArea(bis[i].getLocation().getPath()).toURL();
- } catch (MalformedURLException e) {
- //do nothing
- }
- }
- if (searchFor.equals(OSGI))
- return null;
- searchFor = OSGI;
- i = -1;
- }
- }
- return null;
- }
-
- private static File fromOSGiJarToOSGiInstallArea(String path) {
- IPath parentFolder = new Path(path).removeLastSegments(1);
- if (parentFolder.lastSegment().equals("plugins")) //$NON-NLS-1$
- return parentFolder.removeLastSegments(1).toFile();
- return parentFolder.toFile();
- }
-
- public PlatformConfigurationWrapper(File configDir, URI featurePool, Manipulator manipulator) {
- this.configuration = null;
- this.configFile = new File(configDir, "/org.eclipse.update/platform.xml"); //$NON-NLS-1$
- this.poolURI = featurePool;
- this.manipulator = manipulator;
- }
-
- private void loadDelegate() {
- if (configuration != null)
- return;
-
- try {
- if (configFile.exists()) {
- configuration = Configuration.load(configFile, getOSGiInstallArea(manipulator));
- } else {
- configuration = new Configuration();
- }
- } catch (ProvisionException pe) {
- // TODO: Make this a real message
- throw new IllegalStateException(Messages.error_parsing_configuration);
- }
- if (poolURI == null)
- throw new IllegalStateException("Error creating platform configuration. No bundle pool defined."); //$NON-NLS-1$
-
- poolSite = getSite(poolURI);
- if (poolSite == null) {
- poolSite = createSite(poolURI, getDefaultPolicy());
- configuration.add(poolSite);
- }
- }
-
- /*
- * Return the default policy to use when creating a new site. If there are
- * any sites with the MANAGED-ONLY policy, then that is the default.
- * Otherwise the default is USER-EXCLUDE.
- */
- private String getDefaultPolicy() {
- for (Site site : configuration.getSites()) {
- if (Site.POLICY_MANAGED_ONLY.equals(site.getPolicy()))
- return Site.POLICY_MANAGED_ONLY;
- }
- return Site.POLICY_USER_EXCLUDE;
- }
-
- /*
- * Create and return a site object based on the given location.
- */
- private Site createSite(URI location, String policy) {
- Site result = new Site();
- result.setUrl(location.toString());
- result.setPolicy(policy);
- result.setEnabled(true);
- return result;
- }
-
- /*
- * Look in the configuration and return the site object whose location matches
- * the given URL. Return null if there is no match.
- */
- private Site getSite(URI url) {
- List<Site> sites = configuration.getSites();
- File file = URIUtil.toFile(url);
- for (Site nextSite : sites) {
- try {
- File nextFile = URIUtil.toFile(new URI(nextSite.getUrl()));
- if (nextFile == null)
- continue;
- if (nextFile.equals(file))
- return nextSite;
- } catch (URISyntaxException e) {
- //ignore incorrectly formed site
- }
- }
- return null;
- }
-
- /*
- * Look in the configuration and return the site which contains the feature
- * with the given identifier and version. Return null if there is none.
- */
- private Site getSite(String id, String version) {
- List<Site> sites = configuration.getSites();
- for (Site site : sites) {
- Feature[] features = site.getFeatures();
- for (int i = 0; i < features.length; i++) {
- if (id.equals(features[i].getId()) && version.equals(features[i].getVersion()))
- return site;
- }
- }
- return null;
- }
-
- /*
- * @see org.eclipse.update.configurator.IPlatformConfiguration#createFeatureEntry(java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.String, java.net.URL[])
- */
- public IStatus addFeatureEntry(File file, String id, String version, String pluginIdentifier, String pluginVersion, boolean primary, String application, URL[] root, String linkFile) {
- loadDelegate();
- if (configuration == null)
- return new Status(IStatus.WARNING, Activator.ID, Messages.platform_config_unavailable, null);
-
- URI fileURL = null;
- File featureDir = file.getParentFile();
- if (featureDir == null || !featureDir.getName().equals("features")) //$NON-NLS-1$
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.parent_dir_features, file.getAbsolutePath()), null);
- File locationDir = featureDir.getParentFile();
- if (locationDir == null)
- return new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.cannot_calculate_extension_location, file.getAbsolutePath()), null);
-
- fileURL = locationDir.toURI();
- Site site = getSite(fileURL);
- if (site == null) {
- site = createSite(fileURL, getDefaultPolicy());
- if (linkFile != null)
- site.setLinkFile(linkFile);
- configuration.add(site);
- } else {
- // check to see if the feature already exists in this site
- if (site.getFeature(id, version) != null)
- return Status.OK_STATUS;
- }
- Feature addedFeature = new Feature(site);
- addedFeature.setId(id);
- addedFeature.setVersion(version);
- addedFeature.setUrl(makeFeatureURL(id, version));
- addedFeature.setApplication(application);
- addedFeature.setPluginIdentifier(pluginIdentifier);
- addedFeature.setPluginVersion(pluginVersion);
- addedFeature.setRoots(root);
- addedFeature.setPrimary(primary);
- site.addFeature(addedFeature);
- return Status.OK_STATUS;
- }
-
- /*
- * @see org.eclipse.update.configurator.IPlatformConfiguration#findConfiguredFeatureEntry(java.lang.String)
- */
- public IStatus removeFeatureEntry(String id, String version) {
- loadDelegate();
- if (configuration == null)
- return new Status(IStatus.WARNING, Activator.ID, Messages.platform_config_unavailable, null);
-
- Site site = getSite(id, version);
- if (site == null)
- site = poolSite;
- site.removeFeature(makeFeatureURL(id, version));
- // if we weren't able to remove the feature from the site because it
- // didn't exist, then someone already did our job for us and it is ok.
- return Status.OK_STATUS;
- }
-
- public boolean containsFeature(URI siteURI, String featureId, String featureVersion) {
- loadDelegate();
- if (configuration == null)
- return false;
-
- Site site = getSite(siteURI);
- if (site == null)
- return false;
-
- return site.getFeature(featureId, featureVersion) != null;
- }
-
- /*
- * @see org.eclipse.update.configurator.IPlatformConfiguration#save()
- */
- public void save() throws ProvisionException {
- if (configuration != null) {
- configFile.getParentFile().mkdirs();
- configuration.save(configFile, getOSGiInstallArea(manipulator));
- }
- }
-
- private static String makeFeatureURL(String id, String version) {
- return FEATURES + id + "_" + version + "/"; //$NON-NLS-1$ //$NON-NLS-2$;
- }
-
- // }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java
deleted file mode 100644
index 1f6151b6d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/PublisherUtil.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.publisher.PublisherInfo;
-import org.eclipse.equinox.p2.publisher.eclipse.*;
-import org.eclipse.osgi.service.resolver.BundleDescription;
-
-public class PublisherUtil {
-
- /**
- * Returns an IU corresponding to the given artifact key and bundle, or <code>null</code>
- * if an IU could not be created.
- */
- public static IInstallableUnit createBundleIU(IArtifactKey artifactKey, File bundleFile) {
- BundleDescription bundleDescription = BundlesAction.createBundleDescription(bundleFile);
- if (bundleDescription == null)
- return null;
- PublisherInfo info = new PublisherInfo();
- Version version = Version.create(bundleDescription.getVersion().toString());
- AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), version, new Path(bundleFile.getAbsolutePath()), AdviceFileAdvice.BUNDLE_ADVICE_FILE);
- if (advice.containsAdvice())
- info.addAdvice(advice);
- String shape = bundleFile.isDirectory() ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR;
- info.addAdvice(new BundleShapeAdvice(bundleDescription.getSymbolicName(), version, shape));
- return BundlesAction.createBundleIU(bundleDescription, artifactKey, info);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java
deleted file mode 100644
index 54fe1fce8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/SourceManipulator.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.util.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.Version;
-import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-
-//This class deals with source bundles and how their addition to the source.info
-public class SourceManipulator {
- private List<BundleInfo> sourceBundles;
- private IProfile profile;
- boolean changed = false;
- private SimpleConfiguratorManipulatorImpl manipulator;
-
- public SourceManipulator(IProfile profile) {
- this.profile = profile;
- this.manipulator = new SimpleConfiguratorManipulatorImpl();
- }
-
- public BundleInfo[] getBundles() throws IOException {
- if (sourceBundles == null)
- load();
- return sourceBundles.toArray(new BundleInfo[sourceBundles.size()]);
- }
-
- public void addBundle(File bundleFile, String bundleId, Version bundleVersion) throws IOException {
- if (sourceBundles == null)
- load();
- BundleInfo sourceInfo = new BundleInfo(bundleFile.toURI());
- sourceInfo.setSymbolicName(bundleId);
- sourceInfo.setVersion(bundleVersion.toString());
- sourceBundles.add(sourceInfo);
- }
-
- public void removeBundle(File bundleFile, String bundleId, Version bundleVersion) throws MalformedURLException, IOException {
- if (sourceBundles == null)
- load();
-
- BundleInfo sourceInfo = new BundleInfo();
- if (bundleFile != null)
- sourceInfo.setLocation(bundleFile.toURI());
- sourceInfo.setSymbolicName(bundleId);
- sourceInfo.setVersion(bundleVersion.toString());
- sourceBundles.remove(sourceInfo);
- }
-
- public void save() throws IOException {
- if (sourceBundles != null)
- manipulator.saveConfiguration(sourceBundles.toArray(new BundleInfo[sourceBundles.size()]), getFileLocation(), getLauncherLocation().toURI());
- }
-
- private void load() throws MalformedURLException, IOException {
- if (getFileLocation().exists())
- //input stream is bufferd and closed for us
- sourceBundles = new ArrayList<BundleInfo>(Arrays.asList(manipulator.loadConfiguration(new FileInputStream(getFileLocation()), getLauncherLocation().toURI())));
- else
- sourceBundles = new ArrayList<BundleInfo>();
- }
-
- private File getFileLocation() {
- return new File(Util.getConfigurationFolder(profile), SimpleConfiguratorManipulator.SOURCE_INFO_PATH);
- }
-
- private File getLauncherLocation() {
- return Util.getInstallFolder(profile);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
deleted file mode 100644
index 982e90f21..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*******************************************************************************
- * 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
- * Red Hat Incorporated - fix for bug 225145
- * Code 9 - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.eclipse.osgi.util.NLS;
-
-public class Util {
-
- /**
- * TODO "cache" is probably not the right term for this location
- */
- private static final String REPOSITORY_TYPE = IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY;
- private static final String CACHE_EXTENSIONS = "org.eclipse.equinox.p2.cache.extensions"; //$NON-NLS-1$
- private static final String PIPE = "|"; //$NON-NLS-1$
-
- /**
- * Bit-mask value representing this profile's bundle pool
- */
- public static final int AGGREGATE_CACHE = 0x01;
- /**
- * Bit-mask value representing the shared profile's bundle pool in a shared install
- */
- public static final int AGGREGATE_SHARED_CACHE = 0x02;
- /**
- * Bit-mask value representing the extension locations, such as the dropins folder.
- */
- public static final int AGGREGATE_CACHE_EXTENSIONS = 0x04;
-
- public static IAgentLocation getAgentLocation(IProvisioningAgent agent) {
- return (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager(IProvisioningAgent agent) {
- return (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- public static URI getBundlePoolLocation(IProvisioningAgent agent, IProfile profile) {
- String path = profile.getProperty(IProfile.PROP_CACHE);
- if (path != null)
- return new File(path).toURI();
- IAgentLocation location = getAgentLocation(agent);
- if (location == null)
- return null;
- return location.getDataArea(Activator.ID);
- }
-
- public static synchronized IFileArtifactRepository getBundlePoolRepository(IProvisioningAgent agent, IProfile profile) {
- URI location = getBundlePoolLocation(agent, profile);
- if (location == null)
- return null;
- IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
- try {
- return (IFileArtifactRepository) manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- //the repository doesn't exist, so fall through and create a new one
- }
- try {
- String repositoryName = Messages.BundlePool;
- Map<String, String> properties = new HashMap<String, String>(1);
- properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
- return (IFileArtifactRepository) manager.createRepository(location, repositoryName, REPOSITORY_TYPE, properties);
- } catch (ProvisionException e) {
- LogHelper.log(e);
- throw new IllegalArgumentException(NLS.bind(Messages.bundle_pool_not_writeable, location));
- }
- }
-
- public static IFileArtifactRepository getAggregatedBundleRepository(IProvisioningAgent agent, IProfile profile) {
- return getAggregatedBundleRepository(agent, profile, AGGREGATE_CACHE | AGGREGATE_SHARED_CACHE | AGGREGATE_CACHE_EXTENSIONS);
- }
-
- public static IFileArtifactRepository getAggregatedBundleRepository(IProvisioningAgent agent, IProfile profile, int repoFilter) {
- List<IFileArtifactRepository> bundleRepositories = new ArrayList<IFileArtifactRepository>();
-
- // we check for a shared bundle pool first as it should be preferred over the user bundle pool in a shared install
- IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
- if ((repoFilter & AGGREGATE_SHARED_CACHE) != 0) {
- String sharedCache = profile.getProperty(IProfile.PROP_SHARED_CACHE);
- if (sharedCache != null) {
- try {
- URI repoLocation = new File(sharedCache).toURI();
- IArtifactRepository repository = manager.loadRepository(repoLocation, null);
- if (repository != null && repository instanceof IFileArtifactRepository && !bundleRepositories.contains(repository))
- bundleRepositories.add((IFileArtifactRepository) repository);
- } catch (ProvisionException e) {
- //skip repository if it could not be read
- }
- }
- }
-
- if ((repoFilter & AGGREGATE_CACHE) != 0) {
- IFileArtifactRepository bundlePool = Util.getBundlePoolRepository(agent, profile);
- if (bundlePool != null)
- bundleRepositories.add(bundlePool);
- }
-
- if ((repoFilter & AGGREGATE_CACHE_EXTENSIONS) != 0) {
- List<String> repos = getListProfileProperty(profile, CACHE_EXTENSIONS);
- for (String repo : repos) {
- try {
- URI repoLocation;
- try {
- repoLocation = new URI(repo);
- } catch (URISyntaxException e) {
- //in 1.0 we wrote unencoded URL strings, so try as an unencoded string
- repoLocation = URIUtil.fromString(repo);
- }
- IArtifactRepository repository = manager.loadRepository(repoLocation, null);
- if (repository != null && repository instanceof IFileArtifactRepository && !bundleRepositories.contains(repository))
- bundleRepositories.add((IFileArtifactRepository) repository);
- } catch (ProvisionException e) {
- //skip repositories that could not be read
- } catch (URISyntaxException e) {
- // unexpected, URLs should be pre-checked
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
- }
- }
- }
- return new AggregatedBundleRepository(agent, bundleRepositories);
- }
-
- private static List<String> getListProfileProperty(IProfile profile, String key) {
- List<String> listProperty = new ArrayList<String>();
- String dropinRepositories = profile.getProperty(key);
- if (dropinRepositories != null) {
- StringTokenizer tokenizer = new StringTokenizer(dropinRepositories, PIPE);
- while (tokenizer.hasMoreTokens()) {
- listProperty.add(tokenizer.nextToken());
- }
- }
- return listProperty;
- }
-
- public static BundleInfo createBundleInfo(File bundleFile, IInstallableUnit unit) {
- BundleInfo bundleInfo = new BundleInfo();
- if (bundleFile != null)
- bundleInfo.setLocation(bundleFile.toURI());
-
- Collection<IProvidedCapability> capabilities = unit.getProvidedCapabilities();
- for (IProvidedCapability capability : capabilities) {
- String nameSpace = capability.getNamespace();
- if (nameSpace.equals("osgi.bundle")) { //$NON-NLS-1$
- bundleInfo.setSymbolicName(capability.getName());
- bundleInfo.setVersion(capability.getVersion().toString());
- } else if (nameSpace.equals("osgi.fragment")) { //$NON-NLS-1$
- String fragmentName = capability.getName();
- String fragmentHost = getFragmentHost(unit, fragmentName);
- // shouldn't happen as long as the metadata is well-formed
- if (fragmentHost == null)
- LogHelper.log(createError("Unable to find fragment host for IU: " + unit)); //$NON-NLS-1$
- else
- bundleInfo.setFragmentHost(fragmentHost);
- bundleInfo.setVersion(capability.getVersion().toString());
- }
- }
- return bundleInfo;
- }
-
- private static String getFragmentHost(IInstallableUnit unit, String fragmentName) {
- Collection<IRequirement> requires = unit.getRequirements();
- for (IRequirement iRequirement : requires) {
- if (iRequirement instanceof IRequiredCapability) {
- IRequiredCapability requiredCapability = (IRequiredCapability) iRequirement;
- if (fragmentName.equals(requiredCapability.getName())) {
- String fragmentHost = requiredCapability.getName();
- if (!requiredCapability.getRange().toString().equals("0.0.0")) { //$NON-NLS-1$
- fragmentHost += ";bundle-version=\"" + requiredCapability.getRange() + '"'; //$NON-NLS-1$
- }
- return fragmentHost;
- }
- }
- }
- return null;
- }
-
- public static File getArtifactFile(IProvisioningAgent agent, IArtifactKey artifactKey, IProfile profile) {
- IFileArtifactRepository aggregatedView = getAggregatedBundleRepository(agent, profile);
- File bundleJar = aggregatedView.getArtifactFile(artifactKey);
- return bundleJar;
- }
-
- public static File getConfigurationFolder(IProfile profile) {
- String config = profile.getProperty(IProfile.PROP_CONFIGURATION_FOLDER);
- if (config != null)
- return new File(config);
- return new File(getInstallFolder(profile), "configuration"); //$NON-NLS-1$
- }
-
- /*
- * Do a look-up and return the OSGi install area if it is set.
- */
- public static URL getOSGiInstallArea() {
- Location location = (Location) ServiceHelper.getService(Activator.getContext(), Location.class.getName(), Location.INSTALL_FILTER);
- if (location == null)
- return null;
- if (!location.isSet())
- return null;
- return location.getURL();
- }
-
- /*
- * Helper method to return the eclipse.home location. Return
- * null if it is unavailable.
- */
- public static File getEclipseHome() {
- Location eclipseHome = (Location) ServiceHelper.getService(Activator.getContext(), Location.class.getName(), Location.ECLIPSE_HOME_FILTER);
- if (eclipseHome == null || !eclipseHome.isSet())
- return null;
- URL url = eclipseHome.getURL();
- if (url == null)
- return null;
- return URLUtil.toFile(url);
- }
-
- /**
- * Returns the install folder for the profile, or <code>null</code>
- * if no install folder is defined.
- */
- public static File getInstallFolder(IProfile profile) {
- String folder = profile.getProperty(IProfile.PROP_INSTALL_FOLDER);
- return folder == null ? null : new File(folder);
- }
-
- public static File getLauncherPath(IProfile profile) {
- String name = profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME);
- if (name == null || name.length() == 0)
- name = "eclipse"; //$NON-NLS-1$
- String launcherName = getLauncherName(name, getOSFromProfile(profile), getInstallFolder(profile));
- return launcherName == null ? null : new File(getInstallFolder(profile), launcherName);
- }
-
- /**
- * Returns the name of the Eclipse application launcher.
- */
- private static String getLauncherName(String name, String os, File installFolder) {
- if (os == null) {
- EnvironmentInfo info = (EnvironmentInfo) ServiceHelper.getService(Activator.getContext(), EnvironmentInfo.class.getName());
- if (info == null)
- return null;
- os = info.getOS();
- }
-
- if (os.equals(org.eclipse.osgi.service.environment.Constants.OS_WIN32)) {
- IPath path = new Path(name);
- if ("exe".equals(path.getFileExtension())) //$NON-NLS-1$
- return name;
- return name + ".exe"; //$NON-NLS-1$
- }
- if (os.equals(org.eclipse.osgi.service.environment.Constants.OS_MACOSX)) {
- IPath path = new Path(name);
- if (path.segment(0).endsWith(".app")) //$NON-NLS-1$
- return name;
-
- String appName = null;
- if (installFolder != null) {
- File appFolder = new File(installFolder, name + ".app"); //$NON-NLS-1$
- if (appFolder.exists()) {
- try {
- appName = appFolder.getCanonicalFile().getName();
- } catch (IOException e) {
- appName = appFolder.getName();
- }
- }
- }
-
- StringBuffer buffer = new StringBuffer();
- if (appName != null) {
- buffer.append(appName);
- } else {
- buffer.append(name.substring(0, 1).toUpperCase());
- buffer.append(name.substring(1));
- buffer.append(".app"); //$NON-NLS-1$
- }
- buffer.append("/Contents/MacOS/"); //$NON-NLS-1$
- buffer.append(name);
- return buffer.toString();
- }
- return name;
- }
-
- public static String getOSFromProfile(IProfile profile) {
- String environments = profile.getProperty(IProfile.PROP_ENVIRONMENTS);
- if (environments == null)
- return null;
- for (StringTokenizer tokenizer = new StringTokenizer(environments, ","); tokenizer.hasMoreElements();) { //$NON-NLS-1$
- String entry = tokenizer.nextToken();
- int i = entry.indexOf('=');
- String key = entry.substring(0, i).trim();
- if (!key.equals("osgi.os")) //$NON-NLS-1$
- continue;
- return entry.substring(i + 1).trim();
- }
- return null;
- }
-
- public static IStatus createError(String message) {
- return createError(message, null);
- }
-
- public static IStatus createError(String message, Exception e) {
- return new Status(IStatus.ERROR, Activator.ID, message, e);
- }
-
- public static File getLauncherConfigLocation(IProfile profile) {
- String launcherConfig = profile.getProperty(IProfile.PROP_LAUNCHER_CONFIGURATION);
- return launcherConfig == null ? null : new File(launcherConfig);
- }
-
- public static String resolveArtifactParam(Map<String, Object> parameters) throws CoreException {
- String artifactLocation = (String) parameters.get(EclipseTouchpoint.PARM_ARTIFACT_LOCATION);
- if (artifactLocation != null)
- return artifactLocation;
-
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(EclipseTouchpoint.PARM_ARTIFACT);
- if (artifactKey == null) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- throw new CoreException(Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu)));
- }
-
- throw new CoreException(Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey)));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java
deleted file mode 100644
index 28ea86371..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/WhatIsRunning.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse;
-
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdmin;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-
-public class WhatIsRunning {
- public BundleInfo[] getBundlesBeingRun() {
- return getFrameworkManipulator().getConfigData().getBundles();
- }
-
- private Manipulator getFrameworkManipulator() {
- FrameworkAdmin fwAdmin = LazyManipulator.getFrameworkAdmin();
- if (fwAdmin != null)
- return fwAdmin.getRunningManipulator();
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
deleted file mode 100644
index f0201a787..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ActionConstants.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2009 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-public class ActionConstants {
-
- public static final String PARM_AGENT = "agent"; //$NON-NLS-1$
- public static final String PARM_AT_ARTIFACT = "@artifact"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT_FILES = "artifactFiles"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
- public static final String PARM_BUNDLE = "bundle"; //$NON-NLS-1$
- public static final String PARM_FEATURE = "feature"; //$NON-NLS-1$
- public static final String PARM_FEATURE_ID = "featureId"; //$NON-NLS-1$
- public static final String PARM_FEATURE_VERSION = "featureVersion"; //$NON-NLS-1$
- public static final String PARM_IGNORE = "@ignore"; //$NON-NLS-1$
- public static final String PARM_IU = "iu"; //$NON-NLS-1$
- public static final String PARM_JVM_ARG = "jvmArg"; //$NON-NLS-1$
- public static final String PARM_PREVIOUS_START_LEVEL = "previousStartLevel"; //$NON-NLS-1$
- public static final String PARM_PREVIOUS_STARTED = "previousStarted"; //$NON-NLS-1$
- public static final String PARM_PREVIOUS_VALUE = "previousValue"; //$NON-NLS-1$
- public static final String PARM_PROFILE = "profile"; //$NON-NLS-1$
- public static final String PARM_PROGRAM_ARG = "programArg"; //$NON-NLS-1$
- public static final String PARM_PROGRAM_ARG_VALUE = "programArgValue"; //$NON-NLS-1$
- public static final String PARM_PROP_NAME = "propName"; //$NON-NLS-1$
- public static final String PARM_PROP_VALUE = "propValue"; //$NON-NLS-1$
- public static final String PARM_START_LEVEL = "startLevel"; //$NON-NLS-1$
- public static final String PARM_STARTED = "started"; //$NON-NLS-1$
- public static final String PARM_DEFAULT_VALUE = "default"; //$NON-NLS-1$
- public static final String PARM_LAUNCHERNAME = "name"; //$NON-NLS-1$
- public static final String PARM_PATH = "path"; //$NON-NLS-1$
- public static final String PARM_TARGET_DIR = "targetDir"; //$NON-NLS-1$
- public static final String PARM_LINK_NAME = "linkName"; //$NON-NLS-1$
- public static final String PARM_LINK_FORCE = "force"; //$NON-NLS-1$
- public static final String PARM_LINK_TARGET = "linkTarget"; //$NON-NLS-1$
- public static final String PARM_TARGET_FILE = "targetFile"; //$NON-NLS-1$
- public static final String PARM_PERMISSIONS = "permissions"; //$NON-NLS-1$
- public static final String PARM_PROFILE_DATA_DIRECTORY = "profileDataDirectory"; //$NON-NLS-1$
-
- public static final String PARM_REPOSITORY_LOCATION = "location"; //$NON-NLS-1$
- public static final String PARM_REPOSITORY_TYPE = "type"; //$NON-NLS-1$
- public static final String PARM_REPOSITORY_ENABLEMENT = "enabled"; //$NON-NLS-1$
- public static final String PARM_REPOSITORY_NICKNAME = "name"; //$NON-NLS-1$
- public static final Object PARM_OPTIONS = "options"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
deleted file mode 100644
index 9268549a8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddJVMArgumentAction.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2009 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.*;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class AddJVMArgumentAction extends ProvisioningAction {
- public static final String ID = "addJvmArg"; //$NON-NLS-1$
- protected static final String STORAGE = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions" + File.separator + "jvmargs"; //$NON-NLS-1$//$NON-NLS-2$
-
- protected static final String XMX = "-Xmx"; //$NON-NLS-1$
- protected static final String XMS = "-Xms"; //$NON-NLS-1$
- protected static final String XX_MAX_PERM_SIZE = "-XX:MaxPermSize="; //$NON-NLS-1$
- protected static final String PREFIX_USER_VALUE = "eclipse.userDefined:"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
- if (jvmArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
- return addArg(jvmArg, parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
- if (jvmArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
- return RemoveJVMArgumentAction.removeArg(jvmArg, parameters);
- }
-
- protected static String getUserArg(Properties storedValues, String flag) {
- return storedValues.getProperty(PREFIX_USER_VALUE + flag);
- }
-
- protected static IStatus addArg(String arg, Map<String, Object> parameters) {
- LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData();
- File storageArea = (File) parameters.get(ActionConstants.PARM_PROFILE_DATA_DIRECTORY);
- try {
- if (arg.startsWith(XMS))
- addByteArg(arg, XMS, launcherData, storageArea);
- else if (arg.startsWith(XMX))
- addByteArg(arg, XMX, launcherData, storageArea);
- else if (arg.startsWith(XX_MAX_PERM_SIZE))
- addByteArg(arg, XX_MAX_PERM_SIZE, launcherData, storageArea);
- else
- // Argument with a non-byte value, no special handling
- launcherData.addJvmArg(arg);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.error_processing_vmargs, e);
- } catch (IllegalArgumentException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.error_processing_vmargs, e);
- }
- return Status.OK_STATUS;
- }
-
- protected static void addByteArg(String arg, String flag, LauncherData launcherData, File storageArea) throws IOException {
- Properties storedValues = load(storageArea);
- String currentArg = getCurrentArg(flag, launcherData.getJvmArgs());
-
- // Check for user changes
- detectUserValue(currentArg, flag, storedValues);
- validateValue(arg.substring(flag.length()));
-
- rememberArg(storedValues, arg.substring(flag.length()), flag);
- launcherData.removeJvmArg(currentArg);
-
- // Set the argument to use & save stored values
- setToMax(flag, storedValues, launcherData);
- save(storedValues, storageArea);
- }
-
- // Throws exception if the argument is not a valid byte argument
- protected static void validateValue(String arg) {
- getByteValue(arg, getBytePower(arg));
- }
-
- // Determine if the user has changed config, if so save their value
- protected static void detectUserValue(String currentValue, String flag, Properties storedValues) {
- String maxValue = getMaxValue(getArgs(storedValues, flag));
-
- if (currentValue == null)
- // User has removed value from file
- setUserArg(storedValues, flag, null);
- else if (maxValue == null || !maxValue.equals(currentValue.substring(flag.length())))
- // User has set an initial value, or modified the file
- setUserArg(storedValues, flag, currentValue.substring(flag.length()));
- }
-
- protected static String getMaxValue(String[] values) {
- if (values == null || values.length == 0)
- return null;
-
- int max = 0;
- for (int i = 1; i < values.length; i++)
- if (compareSize(values[max], values[i]) < 0)
- max = i;
- return values[max];
- }
-
- protected static void setToMax(String flag, Properties storedValues, LauncherData launcherData) {
- String maxStored = getMaxValue(getArgs(storedValues, flag));
- String userDefined = AddJVMArgumentAction.getUserArg(storedValues, flag);
-
- if (maxStored != null || userDefined != null) {
- // Replacement is available either stored, or user defined
- if (maxStored == null)
- launcherData.addJvmArg(flag + userDefined);
- else if (userDefined == null)
- launcherData.addJvmArg(flag + maxStored);
- else if (AddJVMArgumentAction.compareSize(maxStored, userDefined) > 0)
- launcherData.addJvmArg(flag + maxStored);
- else
- launcherData.addJvmArg(flag + userDefined);
- }
- }
-
- // Returns: 1 when a>b, 0 when a=b, -1 when a<b
- protected static int compareSize(String a, String b) {
- double aVal, bVal;
- int aPower = getBytePower(a);
- int bPower = getBytePower(b);
-
- aVal = getByteValue(a, aPower);
- bVal = getByteValue(b, bPower);
- // Ensure a value is expressed with the highest power (e.g. 2G not 2048M)
- while (aVal > 1024) {
- aVal /= 1024;
- aPower += 10;
- }
- while (bVal > 1024) {
- bVal /= 1024;
- bPower += 10;
- }
-
- if (aPower > bPower && aVal != 0)
- return 1;
- else if (aPower < bPower && bVal != 0)
- return -1;
- // Both have same power, so direct comparison
- else if (aVal > bVal)
- return 1;
- else if (aVal < bVal)
- return -1;
- else
- return 0;
- }
-
- // Parse the numeric portion of an argument
- private static double getByteValue(String arg, int power) {
- try {
- if (power == 0)
- return Integer.parseInt(arg);
- return Integer.parseInt(arg.substring(0, arg.length() - 1));
- } catch (NumberFormatException e) {
- throw new IllegalArgumentException(NLS.bind(Messages.invalid_byte_format, arg));
- }
- }
-
- private static int getBytePower(String arg) {
- // If last digit determines if the value is in bytes,
- // kilobytes, megabytes, or gigabytes
- switch (arg.charAt(arg.length() - 1)) {
- case 'k' :
- case 'K' :
- return 10;
- case 'm' :
- case 'M' :
- return 20;
- case 'g' :
- case 'G' :
- return 30;
- default :
- return 0;
- }
- }
-
- // Get the current used argument if there is one
- protected static String getCurrentArg(String flag, String[] jvmArgs) {
- for (int i = 0; i < jvmArgs.length; i++)
- if (jvmArgs[i] != null && jvmArgs[i].startsWith(flag))
- return jvmArgs[i];
- return null;
- }
-
- // Add one new value to those stored
- protected static void rememberArg(Properties storedValues, String value, String flag) {
- String argString = storedValues.getProperty(flag);
-
- if (argString == null)
- argString = ""; //$NON-NLS-1$
- else if (argString.length() > 0)
- argString += ',';
-
- argString += value;
-
- if (argString.length() != 0)
- storedValues.put(flag, argString);
- }
-
- protected static String[] getArgs(Properties storage, String flag) {
- String argString = storage.getProperty(flag);
- if (argString == null || argString.length() == 0)
- return new String[0];
-
- List<String> list = new ArrayList<String>();
- int i = 0;
- String arg = ""; //$NON-NLS-1$
-
- // Split comma-separated list into a List
- while (i < argString.length()) {
- char c = argString.charAt(i++);
- if (c == ',') {
- list.add(arg);
- arg = ""; //$NON-NLS-1$
- } else
- arg += c;
- }
-
- list.add(arg);
- return list.toArray(new String[list.size()]);
- }
-
- // Store a single user argument, null removes stored values
- private static void setUserArg(Properties storage, String flag, String value) {
- if (value == null)
- storage.remove(PREFIX_USER_VALUE + flag);
- else
- storage.setProperty(PREFIX_USER_VALUE + flag, value);
- }
-
- protected static Properties load(File storageArea) throws IOException {
- Properties args = new Properties();
- File file = new File(storageArea, STORAGE);
- if (file.exists()) {
- // Only load if file already exists
- FileInputStream in = null;
- try {
- try {
- in = new FileInputStream(file);
- args.load(in);
- } finally {
- if (in != null)
- in.close();
- }
- } catch (FileNotFoundException e) {
- // Should not occur as we check to see if it exists
- }
- }
- return args;
- }
-
- protected static void save(Properties args, File storageArea) throws IOException {
- FileOutputStream out = null;
- File file = new File(storageArea, STORAGE);
- if (!file.exists())
- // Ensure parent directory exists
- file.getParentFile().mkdirs();
-
- try {
- try {
- out = new FileOutputStream(file);
- args.store(out, null);
- } finally {
- if (out != null)
- out.close();
- }
- } catch (FileNotFoundException e) {
- throw new IllegalStateException(NLS.bind(Messages.unable_to_open_file, file));
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java
deleted file mode 100644
index b44806f9d..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddProgramArgumentAction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class AddProgramArgumentAction extends ProvisioningAction {
- public static final String ID = "addProgramArg"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
- if (programArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID));
-
- String programArgValue = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG_VALUE);
- if (ActionConstants.PARM_IGNORE.equals(programArgValue))
- return Status.OK_STATUS;
-
- if (programArg.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- programArg = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
- manipulator.getLauncherData().addProgramArg(programArg);
-
- if (programArgValue != null) {
- if (programArgValue.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- programArgValue = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
- manipulator.getLauncherData().addProgramArg(programArgValue);
- }
-
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
- if (programArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID));
-
- String programArgValue = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG_VALUE);
- if (ActionConstants.PARM_IGNORE.equals(programArgValue))
- return Status.OK_STATUS;
-
- if (programArg.startsWith("-")) //$NON-NLS-1$
- manipulator.getLauncherData().removeProgramArg(programArg);
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
deleted file mode 100644
index 03d624dc8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddRepositoryAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-
-/**
- * An action that adds a repository to the list of known repositories.
- */
-public class AddRepositoryAction extends RepositoryAction {
- public static final String ID = "addRepository"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- try {
- IProvisioningAgent agent = getAgent(parameters);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- final RepositoryEvent event = createEvent(parameters);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- addRepositoryToProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
- //if provisioning into the current profile, broadcast an event to add this repository directly to the current repository managers.
- if (isSelfProfile(registry, profile))
- addToSelf(agent, agentLocation, event);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- protected String getId() {
- return ID;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- try {
- IProvisioningAgent agent = getAgent(parameters);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- final RepositoryEvent event = createEvent(parameters);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- removeRepositoryFromProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryType());
- //if provisioning into the current profile, broadcast an event to add this repository directly to the current repository managers.
- if (isSelfProfile(registry, profile))
- removeFromSelf(agent, agentLocation, event);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java
deleted file mode 100644
index 640132ec5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/AddSourceBundleAction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class AddSourceBundleAction extends ProvisioningAction {
- public static final String ID = "addSourceBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return AddSourceBundleAction.addSourceBundle(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return RemoveSourceBundleAction.removeSourceBundle(parameters);
- }
-
- public static IStatus addSourceBundle(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- SourceManipulator manipulator = (SourceManipulator) parameters.get(EclipseTouchpoint.PARM_SOURCE_BUNDLES);
- String bundleId = (String) parameters.get(ActionConstants.PARM_BUNDLE);
- if (bundleId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.size() == 0)
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(bundleId)) {
- artifactKey = candidate;
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
- if (bundleFile == null || !bundleFile.exists())
- return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
-
- try {
- manipulator.addBundle(bundleFile, artifactKey.getId(), artifactKey.getVersion());
- } catch (IOException e) {
- return Util.createError(NLS.bind(Messages.cannot_configure_source_bundle, artifactKey));
- }
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
deleted file mode 100644
index 713977723..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * This action collects the set of bundle files on which the signature trust check
- * should be performed. The actual trust checking is done by the CheckTrust phase.
- */
-public class CheckTrustAction extends ProvisioningAction {
-
- public static final String ID = "checkTrust"; //$NON-NLS-1$
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#execute(java.util.Map)
- */
- public IStatus execute(Map<String, Object> parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- if (iu == null)
- return null;
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- //if the IU is already in the profile there is nothing to do
- if (!profile.available(QueryUtil.createIUQuery(iu), null).isEmpty())
- return null;
- @SuppressWarnings("unchecked")
- Collection<File> bundleFiles = (Collection<File>) parameters.get(ActionConstants.PARM_ARTIFACT_FILES);
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null)
- return null;
- for (IArtifactKey key : artifacts) {
- File bundleFile = Util.getArtifactFile(agent, key, profile);
- if (!bundleFiles.contains(bundleFile))
- bundleFiles.add(bundleFile);
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction#undo(java.util.Map)
- */
- public IStatus undo(Map<String, Object> parameters) {
- return Status.OK_STATUS;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
deleted file mode 100644
index 6b49224f5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/ChmodAction.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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:
- * Red Hat Incorporated - initial API and implementation
- * IBM Corporation - ongoing development
- * Cloudsmith Inc - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-// This basically a copy of the chmod action in the native touchpoint only it provides @artifact support.
-// We should just use the native touchpoint copy when we have a replacement for the use of @artifact in parameters
-public class ChmodAction extends ProvisioningAction {
- private static final String ACTION_CHMOD = "chmod"; //$NON-NLS-1$
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public IStatus execute(Map<String, Object> parameters) {
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- if (targetDir == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_TARGET_DIR, ACTION_CHMOD));
- if (targetDir.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- targetDir = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
-
- File dir = new File(targetDir);
- if (!dir.isDirectory()) {
- return Util.createError(NLS.bind(Messages.artifact_not_directory, dir));
- }
- }
-
- String targetFile = (String) parameters.get(ActionConstants.PARM_TARGET_FILE);
- if (targetFile == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_TARGET_FILE, ACTION_CHMOD));
- String permissions = (String) parameters.get(ActionConstants.PARM_PERMISSIONS);
- if (permissions == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PERMISSIONS, ACTION_CHMOD));
- String optionsString = (String) parameters.get(ActionConstants.PARM_OPTIONS);
-
- // Check that file exist
- File probe = new File(targetDir + IPath.SEPARATOR + targetFile);
- if (!probe.exists())
- return Util.createError(NLS.bind(Messages.action_0_failed_file_1_doesNotExist, ACTION_CHMOD, probe.toString()));
-
- String options[] = null;
- if (optionsString != null) {
- ArrayList<String> collect = new ArrayList<String>();
- String r = optionsString.trim();
- while (r.length() > 0) {
- int spaceIdx = r.indexOf(' ');
- if (spaceIdx < 0) {
- collect.add(r);
- r = ""; //$NON-NLS-1$
- } else {
- collect.add(r.substring(0, spaceIdx));
- r = r.substring(spaceIdx + 1);
- r = r.trim();
- }
- }
- if (collect.size() > 0) {
- options = collect.toArray(new String[collect.size()]);
- }
- }
-
- chmod(targetDir, targetFile, permissions, options);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- //TODO: implement undo ??
- return Status.OK_STATUS;
- }
-
- public void chmod(String targetDir, String targetFile, String perms, String[] options) {
- if (WINDOWS)
- return;
- Runtime r = Runtime.getRuntime();
- try {
- // Note: 3 is from chmod, permissions, and target
- String[] args = new String[3 + (options == null ? 0 : options.length)];
- int i = 0;
- args[i++] = "chmod"; //$NON-NLS-1$
- if (options != null) {
- for (int j = 0; j < options.length; j++)
- args[i++] = options[j];
- }
- args[i++] = perms;
- args[i] = targetDir + IPath.SEPARATOR + targetFile;
- Process process = r.exec(args);
- readOffStream(process.getErrorStream());
- readOffStream(process.getInputStream());
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // mark thread interrupted and continue
- Thread.currentThread().interrupt();
- }
- } catch (IOException e) {
- // ignore
- }
- }
-
- private void readOffStream(InputStream inputStream) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
- try {
- while (reader.readLine() != null) {
- // do nothing
- }
- } catch (IOException e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
deleted file mode 100644
index fac359050..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CollectAction.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.osgi.util.NLS;
-
-public class CollectAction extends ProvisioningAction {
- public static final String ID = "collect"; //$NON-NLS-1$
- public static final String ARTIFACT_FOLDER = "artifact.folder"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- IArtifactRequest[] requests;
- try {
- requests = CollectAction.collect(agent, profile, iu);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
-
- @SuppressWarnings("unchecked")
- Collection<IArtifactRequest[]> artifactRequests = (Collection<IArtifactRequest[]>) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
- artifactRequests.add(requests);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- // nothing to do for now
- return Status.OK_STATUS;
- }
-
- public static boolean isZipped(Collection<ITouchpointData> data) {
- if (data == null || data.size() == 0)
- return false;
- for (ITouchpointData td : data) {
- if (td.getInstruction("zipped") != null) //$NON-NLS-1$
- return true;
- }
- return false;
- }
-
- public static Map<String, String> createArtifactDescriptorProperties(IInstallableUnit installableUnit) {
- Map<String, String> descriptorProperties = null;
- if (CollectAction.isZipped(installableUnit.getTouchpointData())) {
- descriptorProperties = new HashMap<String, String>();
- descriptorProperties.put(CollectAction.ARTIFACT_FOLDER, Boolean.TRUE.toString());
- }
- return descriptorProperties;
- }
-
- // TODO: Here we may want to consult multiple caches
- static IArtifactRequest[] collect(IProvisioningAgent agent, IProfile profile, IInstallableUnit installableUnit) throws ProvisionException {
- Collection<IArtifactKey> toDownload = installableUnit.getArtifacts();
- if (toDownload == null || toDownload.size() == 0)
- return IArtifactRepositoryManager.NO_ARTIFACT_REQUEST;
-
- IArtifactRepository aggregatedRepositoryView = Util.getAggregatedBundleRepository(agent, profile);
- IArtifactRepository bundlePool = Util.getBundlePoolRepository(agent, profile);
- if (bundlePool == null)
- throw new ProvisionException(Util.createError(NLS.bind(Messages.no_bundle_pool, profile.getProfileId())));
-
- List<IArtifactRequest> requests = new ArrayList<IArtifactRequest>();
- for (IArtifactKey key : toDownload) {
- if (!aggregatedRepositoryView.contains(key)) {
- Map<String, String> repositoryProperties = CollectAction.createArtifactDescriptorProperties(installableUnit);
- requests.add(Util.getArtifactRepositoryManager(agent).createMirrorRequest(key, bundlePool, null, repositoryProperties));
- }
- }
-
- if (requests.isEmpty())
- return IArtifactRepositoryManager.NO_ARTIFACT_REQUEST;
-
- IArtifactRequest[] result = requests.toArray(new IArtifactRequest[requests.size()]);
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
deleted file mode 100644
index 4a2ecfe99..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallBundleAction.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.osgi.util.NLS;
-
-public class InstallBundleAction extends ProvisioningAction {
- public static final String ID = "installBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return InstallBundleAction.installBundle(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return UninstallBundleAction.uninstallBundle(parameters);
- }
-
- public static IStatus installBundle(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String bundleId = (String) parameters.get(ActionConstants.PARM_BUNDLE);
- if (bundleId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
-
- //TODO: eventually remove this. What is a fragment doing here??
- if (QueryUtil.isFragment(iu)) {
- System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
- return Status.OK_STATUS;
- }
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(bundleId)) {
- artifactKey = candidate;
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
- if (bundleFile == null || !bundleFile.exists())
- return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
- if (bundleInfo == null)
- return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
- manipulator.getConfigData().addBundle(bundleInfo);
-
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
deleted file mode 100644
index b9d55ba06..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/InstallFeatureAction.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.p2.update.Site;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class InstallFeatureAction extends ProvisioningAction {
- public static final String ID = "installFeature"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_APPLICATION_PROP = "org.eclipse.update.feature.application"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PLUGIN_PROP = "org.eclipse.update.feature.plugin"; //$NON-NLS-1$
- private static final String UPDATE_FEATURE_PRIMARY_PROP = "org.eclipse.update.feature.primary"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return InstallFeatureAction.installFeature(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return UninstallFeatureAction.uninstallFeature(parameters);
- }
-
- public static IStatus installFeature(Map<String, Object> parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- PlatformConfigurationWrapper configuration = (PlatformConfigurationWrapper) parameters.get(EclipseTouchpoint.PARM_PLATFORM_CONFIGURATION);
- String feature = (String) parameters.get(ActionConstants.PARM_FEATURE);
- String featureId = (String) parameters.get(ActionConstants.PARM_FEATURE_ID);
- String featureVersion = (String) parameters.get(ActionConstants.PARM_FEATURE_VERSION);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(feature)) {
- artifactKey = candidate;
- break;
- }
- }
-
- if (featureId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_FEATURE_ID, ID));
- else if (ActionConstants.PARM_DEFAULT_VALUE.equals(featureId)) {
- featureId = artifactKey.getId();
- }
-
- if (featureVersion == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_FEATURE_VERSION, ID));
- else if (ActionConstants.PARM_DEFAULT_VALUE.equals(featureVersion)) {
- featureVersion = artifactKey.getVersion().toString();
- }
-
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- File file = Util.getArtifactFile(agent, artifactKey, profile);
- if (file == null || !file.exists()) {
- return Util.createError(NLS.bind(Messages.artifact_file_not_found, artifactKey));
- }
- String pluginId = iu.getProperty(UPDATE_FEATURE_PLUGIN_PROP);
- boolean isPrimary = Boolean.valueOf(iu.getProperty(UPDATE_FEATURE_PRIMARY_PROP)).booleanValue();
- String application = iu.getProperty(UPDATE_FEATURE_APPLICATION_PROP);
- // TODO this isn't right... but we will leave it for now because we don't actually use the value in the install
- String pluginVersion = artifactKey.getVersion().toString();
- return configuration.addFeatureEntry(file, featureId, featureVersion, pluginId, pluginVersion, isPrimary, application, /*root*/null, iu.getProperty(Site.PROP_LINK_FILE));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
deleted file mode 100644
index fa8825e88..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/LinkAction.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.*;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-//This is basically a copy of the ln action in the native touchpoint only it provides @artifact support and does not support the backup store.
-//We should just use the native touchpoint copy when we have a replacement for the use of @artifact in parameters
-public class LinkAction extends ProvisioningAction {
- public static final String ID = "ln"; //$NON-NLS-1$
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public IStatus execute(Map<String, Object> parameters) {
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- if (targetDir == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_TARGET_DIR, ID));
-
- if (targetDir.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- targetDir = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- File dir = new File(targetDir);
- if (!dir.isDirectory()) {
- return Util.createError(NLS.bind(Messages.artifact_not_directory, dir));
- }
- }
-
- String linkTarget = (String) parameters.get(ActionConstants.PARM_LINK_TARGET);
- if (linkTarget == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_LINK_TARGET, ID));
-
- String linkName = (String) parameters.get(ActionConstants.PARM_LINK_NAME);
- if (linkName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_LINK_NAME, ID));
-
- String force = (String) parameters.get(ActionConstants.PARM_LINK_FORCE);
-
- ln(targetDir, linkTarget, linkName, Boolean.valueOf(force).booleanValue());
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return null;
- }
-
- /**
- * Creates a link to the source file linkTarget - the created link is targetDir/linkName.
- * TODO: Only runs on systems with a "ln -s" command supported.
- * TODO: Does not report errors if the "ln -s" fails
- * @param targetDir the directory where the link is created
- * @param linkTarget the source
- * @param linkName the name of the created link
- * @param force if overwrite of existing file should be performed.
- */
- private void ln(String targetDir, String linkTarget, String linkName, boolean force) {
- if (WINDOWS)
- return;
-
- Runtime r = Runtime.getRuntime();
- try {
- Process process = r.exec(new String[] {"ln", "-s" + (force ? "f" : ""), linkTarget, targetDir + IPath.SEPARATOR + linkName}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- readOffStream(process.getErrorStream());
- readOffStream(process.getInputStream());
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // mark thread interrupted and continue
- Thread.currentThread().interrupt();
- }
- } catch (IOException e) {
- // ignore
- }
- }
-
- private void readOffStream(InputStream inputStream) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
- try {
- while (reader.readLine() != null) {
- // do nothing
- }
- } catch (IOException e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
deleted file mode 100644
index 832c147ad..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/MarkStartedAction.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class MarkStartedAction extends ProvisioningAction {
- public static final String ID = "markStarted"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- String started = (String) parameters.get(ActionConstants.PARM_STARTED);
- if (started == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_STARTED, ID));
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts.iterator().next();
-
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
- if (bundleInfo == null)
- return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
-
- if (bundleInfo.getFragmentHost() != null)
- return Status.OK_STATUS;
-
- BundleInfo[] bundles = manipulator.getConfigData().getBundles();
- for (int i = 0; i < bundles.length; i++) {
- if (bundles[i].equals(bundleInfo)) {
- getMemento().put(ActionConstants.PARM_PREVIOUS_STARTED, new Boolean(bundles[i].isMarkedAsStarted()));
- bundles[i].setMarkedAsStarted(Boolean.valueOf(started).booleanValue());
- break;
- }
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- Boolean previousStarted = (Boolean) getMemento().get(ActionConstants.PARM_PREVIOUS_STARTED);
- if (previousStarted == null)
- return Status.OK_STATUS;
-
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts.iterator().next();
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
- if (bundleInfo == null)
- return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
-
- BundleInfo[] bundles = manipulator.getConfigData().getBundles();
- for (int i = 0; i < bundles.length; i++) {
- if (bundles[i].equals(bundleInfo)) {
- bundles[i].setMarkedAsStarted(previousStarted.booleanValue());
- break;
- }
- }
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/Messages.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/Messages.java
deleted file mode 100644
index 7e8bddf77..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/Messages.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.messages"; //$NON-NLS-1$
- public static String artifact_file_not_found;
- public static String parameter_not_set;
- public static String iu_contains_no_arifacts;
- public static String no_matching_artifact;
- public static String missing_manifest;
- public static String failed_bundleinfo;
- public static String cannot_configure_source_bundle;
- public static String error_parsing_startlevel;
- public static String artifact_not_directory;
- public static String no_bundle_pool;
- public static String error_processing_vmargs;
- public static String invalid_byte_format;
- public static String unable_to_open_file;
- public static String action_0_failed_file_1_doesNotExist;
-
- static {
- // load message values from bundle file and assign to fields below
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java
deleted file mode 100644
index 10d00d6ad..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveJVMArgumentAction.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008-2009 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import java.util.Properties;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoveJVMArgumentAction extends ProvisioningAction {
- public static final String ID = "removeJvmArg"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
- if (jvmArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
- removeArg(jvmArg, parameters);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- String jvmArg = (String) parameters.get(ActionConstants.PARM_JVM_ARG);
- if (jvmArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_JVM_ARG, ID));
- AddJVMArgumentAction.addArg(jvmArg, parameters);
- return Status.OK_STATUS;
- }
-
- public static IStatus removeArg(String arg, Map<String, Object> parameters) {
- LauncherData launcherData = ((Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR)).getLauncherData();
- File storageArea = (File) parameters.get(ActionConstants.PARM_PROFILE_DATA_DIRECTORY);
-
- try {
- if (arg.startsWith(AddJVMArgumentAction.XMS))
- removeByteArg(arg, AddJVMArgumentAction.XMS, launcherData, storageArea);
- else if (arg.startsWith(AddJVMArgumentAction.XMX))
- removeByteArg(arg, AddJVMArgumentAction.XMX, launcherData, storageArea);
- else if (arg.startsWith(AddJVMArgumentAction.XX_MAX_PERM_SIZE))
- removeByteArg(arg, AddJVMArgumentAction.XX_MAX_PERM_SIZE, launcherData, storageArea);
- else
- // Argument with a non-byte value, no special handling
- launcherData.removeJvmArg(arg);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.error_processing_vmargs, e);
- } catch (IllegalArgumentException e) {
- return new Status(IStatus.ERROR, Activator.ID, Messages.error_processing_vmargs, e);
- }
- return Status.OK_STATUS;
- }
-
- private static void removeByteArg(String arg, String flag, LauncherData launcherData, File storageArea) throws IOException {
- Properties storedValues = AddJVMArgumentAction.load(storageArea);
-
- String argValue = arg.substring(flag.length());
- String currentArg = AddJVMArgumentAction.getCurrentArg(flag, launcherData.getJvmArgs());
- // Check for user changes
- AddJVMArgumentAction.detectUserValue(currentArg, flag, storedValues);
- AddJVMArgumentAction.validateValue(arg.substring(flag.length()));
-
- removeArg(storedValues, argValue, flag);
- launcherData.removeJvmArg(currentArg);
-
- // Set the argument to use & save stored values
- AddJVMArgumentAction.setToMax(flag, storedValues, launcherData);
- AddJVMArgumentAction.save(storedValues, storageArea);
- }
-
- private static void removeArg(Properties storage, String value, String flag) {
- String[] args = AddJVMArgumentAction.getArgs(storage, flag);
- for (int i = 0; i < args.length; i++)
- if (args[i].equals(value)) {
- args[i] = null;
- // Stop now that we've removed a matching argument
- break;
- }
- setArgs(storage, flag, args);
- }
-
- private static void setArgs(Properties storedValues, String flag, String[] args) {
- if (args == null || args.length == 0)
- // Null or empty list, unset flag
- storedValues.remove(flag);
- else {
- // Build a comma separated list of values for this flag
- String argString = ""; //$NON-NLS-1$
- for (int i = 0; i < args.length; i++)
- if (args[i] != null)
- argString += args[i] + ',';
-
- if (argString.length() > 0)
- // Strip the trailing comma
- storedValues.setProperty(flag, argString.substring(0, argString.length() - 1));
- else
- // Array was full of null values, unset flag
- storedValues.remove(flag);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java
deleted file mode 100644
index e61c38692..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveProgramArgumentAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoveProgramArgumentAction extends ProvisioningAction {
- public static final String ID = "removeProgramArg"; //$NON-NLS-1$
- public static final String EMPTY_ARGUMENT = ""; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
- if (programArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID));
-
- if (programArg.startsWith("-")) {//$NON-NLS-1$
- List<String> programArgs = Arrays.asList(manipulator.getLauncherData().getProgramArgs());
-
- int index = programArgs.indexOf(programArg);
- if (index == -1)
- return Status.OK_STATUS;
-
- index++; // move index to potential programArgValue
- if (programArgs.size() > index) {
- String programArgValue = programArgs.get(index);
- if (!programArgValue.startsWith("-")) //$NON-NLS-1$
- getMemento().put(ActionConstants.PARM_PROGRAM_ARG_VALUE, programArgValue);
- }
- manipulator.getLauncherData().removeProgramArg(programArg);
- }
-
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String programArg = (String) parameters.get(ActionConstants.PARM_PROGRAM_ARG);
- if (programArg == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROGRAM_ARG, ID));
-
- if (programArg.startsWith("-")) {//$NON-NLS-1$ {
- manipulator.getLauncherData().addProgramArg(programArg);
-
- String programArgValue = (String) getMemento().get(ActionConstants.PARM_PROGRAM_ARG_VALUE);
- if (programArgValue != null)
- manipulator.getLauncherData().addProgramArg(programArgValue);
- }
- return Status.OK_STATUS;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
deleted file mode 100644
index 0d63482a9..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveRepositoryAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-
-/**
- * An action that adds a repository to the list of known repositories.
- */
-public class RemoveRepositoryAction extends RepositoryAction {
- public static final String ID = "removeRepository"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- try {
- IProvisioningAgent agent = getAgent(parameters);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- RepositoryEvent event = createEvent(parameters);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- removeRepositoryFromProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryType());
- //if we are provisioning into the self profile, update the current set of repositories in this configuration
- if (isSelfProfile(registry, profile))
- removeFromSelf(agent, agentLocation, event);
- } catch (CoreException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- try {
- IProvisioningAgent agent = getAgent(parameters);
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- IAgentLocation agentLocation = (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- RepositoryEvent event = createEvent(parameters);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- if (profile != null)
- addRepositoryToProfile(agentLocation, profile, event.getRepositoryLocation(), event.getRepositoryNickname(), event.getRepositoryType(), event.isRepositoryEnabled());
- //if we are provisioning into the self profile, update the current set of repositories in this configuration
- if (isSelfProfile(registry, profile))
- addToSelf(agent, agentLocation, event);
- return Status.OK_STATUS;
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- protected String getId() {
- return ID;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java
deleted file mode 100644
index c94490478..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RemoveSourceBundleAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoveSourceBundleAction extends ProvisioningAction {
- public static final String ID = "removeSourceBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return RemoveSourceBundleAction.removeSourceBundle(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return AddSourceBundleAction.addSourceBundle(parameters);
- }
-
- public static IStatus removeSourceBundle(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- SourceManipulator manipulator = (SourceManipulator) parameters.get(EclipseTouchpoint.PARM_SOURCE_BUNDLES);
- String bundleId = (String) parameters.get(ActionConstants.PARM_BUNDLE);
- if (bundleId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(bundleId)) {
- artifactKey = candidate;
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- try {
- manipulator.removeBundle(bundleFile, artifactKey.getId(), artifactKey.getVersion());
- } catch (IOException e) {
- return Util.createError(NLS.bind(Messages.cannot_configure_source_bundle, artifactKey));
- }
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
deleted file mode 100644
index 2ded7cfa3..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/RepositoryAction.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Helper base class for dealing with repositories associated with profiles. Repositories
- * are associated with a profile by encoding the repository locations in a comma-delimited
- * list in a profile property.
- * @see AddRepositoryAction
- * @see RemoveRepositoryAction
- */
-abstract class RepositoryAction extends ProvisioningAction {
-
- private static final String METADATA_REPOSITORY = "org.eclipse.equinox.p2.metadata.repository"; //$NON-NLS-1$
- private static final String ARTIFACT_REPOSITORY = "org.eclipse.equinox.p2.artifact.repository"; //$NON-NLS-1$
-
- private static final String NODE_REPOSITORIES = "repositories"; //$NON-NLS-1$
- private static final String REPOSITORY_COUNT = "count"; //$NON-NLS-1$
- private static final String KEY_URI = "uri"; //$NON-NLS-1$
- private static final String KEY_ENABLED = "enabled"; //$NON-NLS-1$
- private static final String KEY_NICKNAME = "nickname"; //$NON-NLS-1$
-
- /**
- * Returns the repository manager of the given type, or <code>null</code>
- * if not available.
- */
- private static IRepositoryManager<?> getRepositoryManager(IProvisioningAgent agent, int type) {
- if (type == IRepository.TYPE_METADATA) {
- return (IRepositoryManager<?>) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- } else if (type == IRepository.TYPE_ARTIFACT) {
- return (IRepositoryManager<?>) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
- return null;
- }
-
- /**
- * Associates the repository described by the given event with the given profile.
- * Has no effect if the repository is already associated with this profile.
- */
- protected void addRepositoryToProfile(IAgentLocation agentLocation, IProfile profile, URI location, String nickname, int type, boolean enabled) {
- Preferences node = getRepositoryPreferenceNode(agentLocation, profile, location, type);
- int count = 0;
-
- if (repositoryExists(node)) {
- count = getRepositoryCount(node);
- // If a user has added a repository we need to set the initial count manually
- if (count == 0)
- count = 1;
- }
- node.put(KEY_URI, location.toString());
- node.put(KEY_ENABLED, Boolean.toString(enabled));
- if (nickname != null)
- node.put(KEY_NICKNAME, nickname);
- count++;
- setRepositoryCount(node, count);
- try {
- node.flush();
- } catch (BackingStoreException e) {
- // TODO: perhaps an Exception should be passed backwards and associated with State
- }
- }
-
- /**
- * Adds the repository corresponding to the given event to the currently running instance.
- */
- protected void addToSelf(IProvisioningAgent agent, IAgentLocation agentLocation, RepositoryEvent event) {
- IRepositoryManager<?> manager = getRepositoryManager(agent, event.getRepositoryType());
- final URI location = event.getRepositoryLocation();
- Preferences node = getRepositoryPreferenceNode(agentLocation, null, location, event.getRepositoryType());
-
- int count = getRepositoryCount(node);
- if (manager.contains(location)) {
- // If a user as added a repository we need to set the initial count manually
- if (count == 0)
- count = 1;
- } else {
- if (manager != null)
- manager.addRepository(location);
- }
- // increment the counter & send to preferences
- count++;
- setRepositoryCount(node, count);
-
- if (!event.isRepositoryEnabled())
- manager.setEnabled(location, false);
- final String name = event.getRepositoryNickname();
- if (name != null)
- manager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
- }
-
- protected RepositoryEvent createEvent(Map<String, Object> parameters) throws CoreException {
- String parm = (String) parameters.get(ActionConstants.PARM_REPOSITORY_LOCATION);
- if (parm == null)
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_REPOSITORY_LOCATION, getId())));
- URI location = null;
- try {
- location = new URI(parm);
- } catch (URISyntaxException e) {
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_REPOSITORY_LOCATION, getId()), e));
- }
- parm = (String) parameters.get(ActionConstants.PARM_REPOSITORY_TYPE);
- if (parm == null)
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_REPOSITORY_TYPE, getId())));
- int type = 0;
- try {
- type = Integer.parseInt(parm);
- } catch (NumberFormatException e) {
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_REPOSITORY_TYPE, getId()), e));
- }
- String name = (String) parameters.get(ActionConstants.PARM_REPOSITORY_NICKNAME);
- //default is to be enabled
- String enablement = (String) parameters.get(ActionConstants.PARM_REPOSITORY_ENABLEMENT);
- boolean enabled = enablement == null ? true : Boolean.valueOf(enablement).booleanValue();
- return RepositoryEvent.newDiscoveryEvent(location, name, type, enabled);
- }
-
- /**
- * Returns the id of this action.
- */
- protected abstract String getId();
-
- /**
- * Return <code>true</code> if the given profile is the currently running profile,
- * and <code>false</code> otherwise.
- */
- protected boolean isSelfProfile(IProfileRegistry registry, IProfile profile) {
- //if we can't determine the current profile, assume we are running on self
- if (profile == null)
- return true;
- if (registry == null)
- return false;
- final IProfile selfProfile = registry.getProfile(IProfileRegistry.SELF);
- //if we can't determine the self profile, assume we are running on self
- if (selfProfile == null)
- return true;
- return profile.getProfileId().equals(selfProfile.getProfileId());
- }
-
- /**
- * Removes the repository corresponding to the given event from the currently running instance.
- */
- protected void removeFromSelf(IProvisioningAgent agent, IAgentLocation agentLocation, RepositoryEvent event) {
- IRepositoryManager<?> manager = getRepositoryManager(agent, event.getRepositoryType());
- Preferences node = getRepositoryPreferenceNode(agentLocation, null, event.getRepositoryLocation(), event.getRepositoryType());
- int count = getRepositoryCount(node);
- if (--count < 1 && manager != null)
- manager.removeRepository(event.getRepositoryLocation());
- setRepositoryCount(node, count);
- }
-
- /**
- * Removes the association between the repository described by the given event
- * and the given profile. Has no effect if the location is not already associated with
- * this profile.
- */
- protected void removeRepositoryFromProfile(IAgentLocation agentLocation, IProfile profile, URI location, int type) {
- Preferences node = getRepositoryPreferenceNode(agentLocation, profile, location, type);
-
- int count = getRepositoryCount(node);
- if (--count < 1) {
- // TODO: Remove all associated values
- try {
- String[] keys = node.keys();
-
- for (int i = 0; i < keys.length; i++)
- node.remove(keys[i]);
- } catch (BackingStoreException e) {
- // TODO: Should this be passed back to be associated with State?
- }
-
- } else
- setRepositoryCount(node, count);
-
- try {
- node.flush();
- } catch (BackingStoreException e) {
- // TODO: perhaps an Exception should be passed backwards and associated with State
- }
- }
-
- /*
- * Get the counter associated with a repository
- */
- protected int getRepositoryCount(Preferences node) {
- return node.getInt(REPOSITORY_COUNT, 0);
- }
-
- /*
- * Sets the counter associated with this repository to a specific value
- */
- protected void setRepositoryCount(Preferences node, int count) {
- if (count < 1)
- node.remove(REPOSITORY_COUNT);
- else
- node.putInt(REPOSITORY_COUNT, count);
- }
-
- /*
- * Determine if a repository is already known
- */
- protected boolean repositoryExists(Preferences node) {
- if (node.get(KEY_URI, null) == null)
- return false;
- return true;
- }
-
- /*
- * Get the preference node associated with profile & location
- */
- protected Preferences getRepositoryPreferenceNode(IAgentLocation agentLocation, IProfile profile, URI location, int type) {
- String key = type == IRepository.TYPE_METADATA ? METADATA_REPOSITORY : ARTIFACT_REPOSITORY;
- String profileId = profile == null ? IProfileRegistry.SELF : profile.getProfileId();
- return new ProfileScope(agentLocation, profileId).getNode(key + '/' + NODE_REPOSITORIES + '/' + getKey(location));
- }
-
- /*
- * Copied from AbstractRepositoryManager
- */
- private String getKey(URI location) {
- String key = location.toString().replace('/', '_');
- //remove trailing slash
- if (key.endsWith("_")) //$NON-NLS-1$
- key = key.substring(0, key.length() - 1);
- return key;
- }
-
- protected IProvisioningAgent getAgent(Map<String, Object> parameters) throws CoreException {
- //We shouldn't really know about the session parameter
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get("agent"); //$NON-NLS-1$
- if (agent == null)
- throw new CoreException(Util.createError(NLS.bind(Messages.parameter_not_set, "agent", getId()))); //$NON-NLS-1$
- return agent;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
deleted file mode 100644
index c9101fe01..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetLauncherNameAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-
-public class SetLauncherNameAction extends ProvisioningAction {
- public static final String ID = "setLauncherName"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- getMemento().put(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, profile.getProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME));
- String launcherName = (String) parameters.get(ActionConstants.PARM_LAUNCHERNAME);
- setLauncher(manipulator, profile, launcherName);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- String previousLauncherName = (String) getMemento().get(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME);
- setLauncher(manipulator, profile, previousLauncherName);
- return Status.OK_STATUS;
- }
-
- private static void setLauncher(Manipulator manipulator, IProfile profile, String launcherName) {
- //Get the launcherData before changing the name so we don't lose anything from the old launcher.ini
- LauncherData launcherData = manipulator.getLauncherData();
- if (launcherName != null)
- ((Profile) profile).setProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME, launcherName);
- else
- ((Profile) profile).removeProperty(EclipseTouchpoint.PROFILE_PROP_LAUNCHER_NAME);
- launcherData.setLauncher(Util.getLauncherPath(profile));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java
deleted file mode 100644
index e334402a8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetProgramPropertyAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class SetProgramPropertyAction extends ProvisioningAction {
- public static final String ID = "setProgramProperty"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
- if (propName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROP_NAME, ID));
- String propValue = (String) parameters.get(ActionConstants.PARM_PROP_VALUE);
- if (propValue != null && propValue.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- try {
- propValue = Util.resolveArtifactParam(parameters);
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- getMemento().put(ActionConstants.PARM_PREVIOUS_VALUE, manipulator.getConfigData().getProperty(propName));
- manipulator.getConfigData().setProperty(propName, propValue);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String propName = (String) parameters.get(ActionConstants.PARM_PROP_NAME);
- if (propName == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_PROP_NAME, ID));
- String previousValue = (String) getMemento().get(ActionConstants.PARM_PREVIOUS_VALUE);
- manipulator.getConfigData().setProperty(propName, previousValue);
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
deleted file mode 100644
index 9452c7172..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/SetStartLevelAction.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class SetStartLevelAction extends ProvisioningAction {
- public static final String ID = "setStartLevel"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- String startLevel = (String) parameters.get(ActionConstants.PARM_START_LEVEL);
- if (startLevel == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_START_LEVEL, ID));
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts.iterator().next();
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
- if (bundleInfo == null)
- return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
-
- if (bundleInfo.getFragmentHost() != null)
- return Status.OK_STATUS;
-
- BundleInfo[] bundles = manipulator.getConfigData().getBundles();
- for (int i = 0; i < bundles.length; i++) {
- if (bundles[i].equals(bundleInfo)) {
- getMemento().put(ActionConstants.PARM_PREVIOUS_START_LEVEL, new Integer(bundles[i].getStartLevel()));
- try {
- bundles[i].setStartLevel(Integer.parseInt(startLevel));
- } catch (NumberFormatException e) {
- return Util.createError(NLS.bind(Messages.error_parsing_startlevel, startLevel, bundles[i].getSymbolicName()), e);
- }
- break;
- }
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- Integer previousStartLevel = (Integer) getMemento().get(ActionConstants.PARM_PREVIOUS_START_LEVEL);
- if (previousStartLevel == null)
- return Status.OK_STATUS;
-
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = artifacts.iterator().next();
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
- if (bundleInfo == null)
- return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
-
- BundleInfo[] bundles = manipulator.getConfigData().getBundles();
- for (int i = 0; i < bundles.length; i++) {
- if (bundles[i].equals(bundleInfo)) {
- bundles[i].setStartLevel(previousStartLevel.intValue());
- break;
- }
- }
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java
deleted file mode 100644
index a20aae951..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallBundleAction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.EclipseTouchpoint;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.osgi.util.NLS;
-
-public class UninstallBundleAction extends ProvisioningAction {
- public static final String ID = "uninstallBundle"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return UninstallBundleAction.uninstallBundle(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return InstallBundleAction.installBundle(parameters);
- }
-
- public static IStatus uninstallBundle(Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- Manipulator manipulator = (Manipulator) parameters.get(EclipseTouchpoint.PARM_MANIPULATOR);
- String bundleId = (String) parameters.get(ActionConstants.PARM_BUNDLE);
- if (bundleId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_BUNDLE, ID));
-
- //TODO: eventually remove this. What is a fragment doing here??
- if (QueryUtil.isFragment(iu)) {
- System.out.println("What is a fragment doing here!!! -- " + iu); //$NON-NLS-1$
- return Status.OK_STATUS;
- }
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(bundleId)) {
- artifactKey = candidate;
- break;
- }
- }
- if (artifactKey == null)
- throw new IllegalArgumentException(NLS.bind(Messages.no_matching_artifact, bundleId));
-
- // the bundleFile might be null here, that's OK.
- File bundleFile = Util.getArtifactFile(agent, artifactKey, profile);
-
- BundleInfo bundleInfo = Util.createBundleInfo(bundleFile, iu);
- if (bundleInfo == null)
- return Util.createError(NLS.bind(Messages.failed_bundleinfo, iu));
- manipulator.getConfigData().removeBundle(bundleInfo);
-
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java
deleted file mode 100644
index 33bee8ef9..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/UninstallFeatureAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions;
-
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class UninstallFeatureAction extends ProvisioningAction {
- public static final String ID = "uninstallFeature"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return UninstallFeatureAction.uninstallFeature(parameters);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return InstallFeatureAction.installFeature(parameters);
- }
-
- public static IStatus uninstallFeature(Map<String, Object> parameters) {
- IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
- PlatformConfigurationWrapper configuration = (PlatformConfigurationWrapper) parameters.get(EclipseTouchpoint.PARM_PLATFORM_CONFIGURATION);
- String feature = (String) parameters.get(ActionConstants.PARM_FEATURE);
- String featureId = (String) parameters.get(ActionConstants.PARM_FEATURE_ID);
- String featureVersion = (String) parameters.get(ActionConstants.PARM_FEATURE_VERSION);
-
- Collection<IArtifactKey> artifacts = iu.getArtifacts();
- if (artifacts == null || artifacts.isEmpty())
- return Util.createError(NLS.bind(Messages.iu_contains_no_arifacts, iu));
-
- IArtifactKey artifactKey = null;
- for (IArtifactKey candidate : artifacts) {
- if (candidate.toString().equals(feature)) {
- artifactKey = candidate;
- break;
- }
- }
-
- if (featureId == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_FEATURE_ID, ID));
- else if (ActionConstants.PARM_DEFAULT_VALUE.equals(featureId)) {
- featureId = artifactKey.getId();
- }
-
- if (featureVersion == null)
- return Util.createError(NLS.bind(Messages.parameter_not_set, ActionConstants.PARM_FEATURE_VERSION, ID));
- else if (ActionConstants.PARM_DEFAULT_VALUE.equals(featureVersion)) {
- featureVersion = artifactKey.getVersion().toString();
- }
-
- return configuration.removeFeatureEntry(featureId, featureVersion);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/messages.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/messages.properties
deleted file mode 100644
index 74c1907e1..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/messages.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-###############################################################################
-
-artifact_file_not_found=The artifact file for {0} was not found.
-artifact_not_directory=The artifact {0} is not a directory.
-parameter_not_set=The \"{0}\" parameter was not set in the \"{1}\" action.
-iu_contains_no_arifacts=Installable unit contains no artifacts: {0}.
-no_matching_artifact=No matching artifact found for: {0}.
-missing_manifest=The manifest is missing for: {0}.
-failed_bundleinfo=Failed to create bundleInfo for: {0}.
-cannot_configure_source_bundle=Cannot configure {0} as a source bundle.
-error_parsing_startlevel=Error parsing start level: {0} for bundle: {1}.
-no_bundle_pool=No bundle pool defined for profile: {0}.
-error_processing_vmargs=An error occurred while processing the JVM argument.
-invalid_byte_format=Invalid format for byte argument: {0}.
-unable_to_open_file=Unable to open file: {0}.
-action_0_failed_file_1_doesNotExist=The action {0} failed - file {1} does not exist.
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties
deleted file mode 100644
index 81f1ab022..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/messages.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-###############################################################################
-
-error_loading_manipulator=Error while loading manipulator.
-failed_acquire_framework_manipulator=Could not acquire the framework manipulator service.
-failed_prepareIU=Failed to prepare partial IU: {0}.
-error_saving_manipulator=Error saving manipulator.
-error_saving_platform_configuration=Error saving platform configuration.
-error_saving_source_bundles_list=Error saving source bundles list.
-error_parsing_configuration=Error parsing platform configuration.
-publisher_not_available=The partial IU could not be updated. Publisher not available: {0}.
-artifact_write_unsupported=Repository not writeable.
-artifact_file_not_found=The artifact file for {0} was not found.
-artifact_retrieval_unsupported=Repository does not support artifact retrieval
-bundle_pool_not_writeable=Bundle pool repository not writeable: {0}
-BundlePool=Bundle pool
-cannot_calculate_extension_location=Unable to calculate extension location for: {0}.
-parent_dir_features=Parent directory should be "features": {0}.
-platform_config_unavailable=Platform configuration not available.
-unexpected_prepareiu_error=Unexpected state: prepareIU
-error_validating_profile=Error validating profile {0}.
-iu_contains_no_arifacts=Installable unit contains no artifacts: {0}.
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java
deleted file mode 100644
index 588a5c767..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Configuration.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-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.URLUtil;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Util;
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-/**
- * @since 1.0
- */
-public class Configuration {
-
- private List<Site> sites = new ArrayList<Site>();
- String date;
- boolean transientProperty;
- String version;
- String shared_ur;
-
- public static Configuration load(File location, URL osgiInstallArea) throws ProvisionException {
- return ConfigurationIO.read(location, osgiInstallArea);
- }
-
- public Configuration() {
- super();
- }
-
- public void save(File location, URL osgiInstallArea) throws ProvisionException {
- ConfigurationIO.write(location, this, osgiInstallArea);
- }
-
- public String getSharedUR() {
- return shared_ur;
- }
-
- public void setSharedUR(String value) {
- shared_ur = value;
- }
-
- public List<Site> getSites() {
- return internalGetSites(true);
- }
-
- List<Site> internalGetSites(boolean includeParent) {
- if (!includeParent)
- return sites;
- String shared = getSharedUR();
- if (shared == null)
- return sites;
- List<Site> result = new ArrayList<Site>(sites);
- try {
- URL url = new URL(shared);
- File location = URLUtil.toFile(url);
- if (location == null)
- return result;
-
- if (!location.isAbsolute()) {
- File eclipseHome = Util.getEclipseHome();
- if (eclipseHome == null)
- return null;
-
- location = new File(eclipseHome, location.getPath());
- }
- Configuration parent = Configuration.load(location, Util.getOSGiInstallArea());
- if (parent == null)
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Unable to load parent configuration from: " + location)); //$NON-NLS-1$
- else
- result.addAll(parent.getSites());
- } catch (MalformedURLException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while getting parent configuration location.", e)); //$NON-NLS-1$
- } catch (ProvisionException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while loading parent configuratin from: " + shared, e)); //$NON-NLS-1$
- }
- return result;
- }
-
- public void add(Site site) {
- sites.add(site);
- }
-
- public boolean removeSite(Site site) {
- return sites.remove(site);
- }
-
- public String getDate() {
- return date;
- }
-
- public void setDate(String date) {
- this.date = date;
- }
-
- public void setVersion(String value) {
- version = value;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setTransient(boolean value) {
- transientProperty = value;
- }
-
- public boolean isTransient() {
- return transientProperty;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java
deleted file mode 100644
index 53c5c65f5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationCache.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * TODO ensure thread safety
- *
- */
-public class ConfigurationCache {
- private static Map<String, CacheEntry> cache = new HashMap<String, CacheEntry>();
-
- // class used to represent cache values
- static class CacheEntry {
- long timestamp;
- Configuration config;
- }
-
- // helper method to convert the file to a cache key. convert to an absolute
- // path to ensure equality between relative and absolute comparisons
- private static String toKey(File file) {
- try {
- return file.getCanonicalPath();
- } catch (IOException e) {
- // ignore and return the absolute value instead
- }
- return file.getAbsolutePath();
- }
-
- /*
- * Return the configuration object in the cache which is represented
- * by the given file. Do a check on disk to see if the cache is up-to-date.
- * If not, then treat it as a cache miss.
- */
- public static Configuration get(File file) {
- String key = toKey(file);
- CacheEntry entry = cache.get(key);
- if (entry == null)
- return null;
- return file.lastModified() == entry.timestamp ? entry.config : null;
- }
-
- /*
- * Store the given configuration in the cache.
- */
- public static void put(File file, Configuration config) {
- String key = toKey(file);
- if (config == null) {
- cache.remove(key);
- return;
- }
- CacheEntry entry = new CacheEntry();
- entry.config = config;
- entry.timestamp = file.lastModified();
- cache.put(key, entry);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationConstants.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationConstants.java
deleted file mode 100644
index 04fa2b325..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationConstants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-/**
- * @since 1.0
- */
-public interface ConfigurationConstants {
-
- final String ELEMENT_CONFIG = "config"; //$NON-NLS-1$
- final String ELEMENT_FEATURE = "feature"; //$NON-NLS-1$
- final String ELEMENT_SITE = "site"; //$NON-NLS-1$
-
- final String ATTRIBUTE_APPLICATION = "application"; //$NON-NLS-1$
- final String ATTRIBUTE_DATE = "date"; //$NON-NLS-1$
- final String ATTRIBUTE_ENABLED = "enabled"; //$NON-NLS-1$
- final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
- final String ATTRIBUTE_LINKFILE = "linkfile"; //$NON-NLS-1$
- final String ATTRIBUTE_LIST = "list"; //$NON-NLS-1$
- final String ATTRIBUTE_PLUGIN_IDENTIFIER = "plugin-identifier"; //$NON-NLS-1$
- final String ATTRIBUTE_PLUGIN_VERSION = "plugin-version"; //$NON-NLS-1$
- final String ATTRIBUTE_PRIMARY = "primary"; //$NON-NLS-1$
- final String ATTRIBUTE_POLICY = "policy"; //$NON-NLS-1$
- final String ATTRIBUTE_ROOT = "root"; //$NON-NLS-1$
- final String ATTRIBUTE_SHARED_UR = "shared_ur"; //$NON-NLS-1$
- final String ATTRIBUTE_TRANSIENT = "transient"; //$NON-NLS-1$
- final String ATTRIBUTE_UPDATEABLE = "updateable"; //$NON-NLS-1$
- final String ATTRIBUTE_URL = "url"; //$NON-NLS-1$
- final String ATTRIBUTE_VERSION = "version"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java
deleted file mode 100644
index 44dfae151..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationIO.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.File;
-import java.net.URL;
-import org.eclipse.equinox.p2.core.ProvisionException;
-
-/*
- * Class which controls the reading and writing of Configuration (platform.xml) objects.
- * We keep a local cached copy to avoid multiple reads. When we install new features we
- * seem to only write out the platform.xml in the "commit" phase so we don't need to
- * batch the writes.
- */
-public class ConfigurationIO {
- private static CacheEntry cache = null;
-
- // class used to represent cache values
- static class CacheEntry {
- Configuration config;
- URL osgiInstallArea;
- File location;
- long timestamp;
- }
-
- /*
- * Return the configuration object which is represented by the given file.
- */
- static Configuration read(File file, URL osgiInstallArea) throws ProvisionException {
- // check the cached copy first
- if (cache != null && file.lastModified() == cache.timestamp)
- return cache.config;
-
- // cache miss or file is out of date, read from disk
- Configuration config = ConfigurationParser.parse(file, osgiInstallArea);
- if (config == null)
- return null;
-
- // successful read, store in the cache before we return
- cache(file, config, osgiInstallArea);
- return config;
- }
-
- /*
- * Store the given configuration file in the local cache.
- */
- private static void cache(File location, Configuration config, URL osgiInstallArea) {
- CacheEntry entry = new CacheEntry();
- entry.config = config;
- entry.osgiInstallArea = osgiInstallArea;
- entry.location = location;
- entry.timestamp = location.lastModified();
- cache = entry;
- }
-
- /*
- * Save the given configuration to the file-system.
- */
- static void write(File location, Configuration config, URL osgiInstallArea) throws ProvisionException {
- // write it to disk
- ConfigurationWriter.save(config, location, osgiInstallArea);
- // save a copy in the cache
- cache(location, config, osgiInstallArea);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
deleted file mode 100644
index ae3e2c3c4..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationParser.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.*;
-import java.net.*;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.osgi.util.NLS;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-/**
- * Parser for platform.xml files.
- *
- * @since 1.0
- */
-public class ConfigurationParser implements ConfigurationConstants {
- static final String PLATFORM_BASE = "platform:/base/"; //$NON-NLS-1$
- private URL osgiInstallArea;
-
- /*
- * Parse the given file handle which points to a platform.xml file and a configuration object.
- * Returns null if the file doesn't exist.
- */
- static Configuration parse(File file, URL osgiInstallArea) throws ProvisionException {
- return new ConfigurationParser(osgiInstallArea).internalParse(file);
- }
-
- private ConfigurationParser(URL osgiInstallArea) {
- this.osgiInstallArea = osgiInstallArea;
- }
-
- /*
- * Create a feature object based on the given DOM node.
- * Return the new feature.
- */
- private Feature createFeature(Node node, Site site) {
- Feature result = new Feature(site);
- String id = getAttribute(node, ATTRIBUTE_ID);
- if (id != null)
- result.setId(id);
- String url = getAttribute(node, ATTRIBUTE_URL);
- if (url != null)
- result.setUrl(url);
- String version = getAttribute(node, ATTRIBUTE_VERSION);
- if (version != null)
- result.setVersion(version);
- String pluginIdentifier = getAttribute(node, ATTRIBUTE_PLUGIN_IDENTIFIER);
- if (pluginIdentifier != null)
- result.setPluginIdentifier(pluginIdentifier);
- String pluginVersion = getAttribute(node, ATTRIBUTE_PLUGIN_VERSION);
- // plug-in version is the same as the feature version if it is missing
- if (pluginVersion == null)
- pluginVersion = version;
- if (pluginVersion != null)
- result.setPluginVersion(pluginVersion);
- String application = getAttribute(node, ATTRIBUTE_APPLICATION);
- if (application != null)
- result.setApplication(application);
-
- // get primary flag
- String flag = getAttribute(node, ATTRIBUTE_PRIMARY);
- if (flag != null && Boolean.valueOf(flag).booleanValue())
- result.setPrimary(true);
-
- // get install locations
- String locations = getAttribute(node, ATTRIBUTE_ROOT);
- if (locations != null) {
- StringTokenizer tokenizer = new StringTokenizer(locations, ","); //$NON-NLS-1$
- ArrayList<URL> rootList = new ArrayList<URL>();
- while (tokenizer.hasMoreTokens()) {
- try {
- URL rootEntry = new URL(tokenizer.nextToken().trim());
- rootList.add(rootEntry);
- } catch (MalformedURLException e) {
- // skip bad entries ...
- }
- }
- URL[] roots = rootList.toArray(new URL[rootList.size()]);
- result.setRoots(roots);
- }
-
- return result;
- }
-
- /*
- * Create the features from the given DOM node.
- */
- private void createFeatures(Node node, Site site) {
- NodeList children = node.getChildNodes();
- int size = children.getLength();
- for (int i = 0; i < size; i++) {
- Node child = children.item(i);
- if (child.getNodeType() != Node.ELEMENT_NODE)
- continue;
- if (!ELEMENT_FEATURE.equalsIgnoreCase(child.getNodeName()))
- continue;
- Feature feature = createFeature(child, site);
- if (feature != null)
- site.addFeature(feature);
- }
- }
-
- /*
- * Create a site based on the given DOM node.
- */
- private Site createSite(Node node) {
- Site result = new Site();
- String policy = getAttribute(node, ATTRIBUTE_POLICY);
- if (policy != null)
- result.setPolicy(policy);
- String enabled = getAttribute(node, ATTRIBUTE_ENABLED);
- if (enabled != null)
- result.setEnabled(Boolean.valueOf(enabled).booleanValue());
- String updateable = getAttribute(node, ATTRIBUTE_UPDATEABLE);
- if (updateable != null)
- result.setUpdateable(Boolean.valueOf(updateable).booleanValue());
- String url = getAttribute(node, ATTRIBUTE_URL);
- if (url != null) {
- try {
- // do this to ensure the location is an encoded URI
- URI uri = URIUtil.fromString(url);
- URI osgiURI = osgiInstallArea != null ? URIUtil.toURI(osgiInstallArea) : null;
- result.setUrl(getLocation(uri, osgiURI).toString());
- } catch (URISyntaxException e) {
- result.setUrl(url);
- }
- }
- String linkFile = getAttribute(node, ATTRIBUTE_LINKFILE);
- if (linkFile != null)
- result.setLinkFile(linkFile);
- String list = getAttribute(node, ATTRIBUTE_LIST);
- if (list != null)
- for (StringTokenizer tokenizer = new StringTokenizer(list, ","); tokenizer.hasMoreTokens();) //$NON-NLS-1$
- result.addPlugin(tokenizer.nextToken());
- createFeatures(node, result);
- return result;
- }
-
- /*
- * Convert the given url string to an absolute url. If the string is
- * platform:/base/ then return a string which represents the osgi
- * install area.
- */
- private URI getLocation(URI location, URI osgiArea) {
- if (osgiArea == null)
- return location;
- if (PLATFORM_BASE.equals(location.toString()))
- return osgiArea;
- return URIUtil.makeAbsolute(location, osgiArea);
- }
-
- /*
- * Return the attribute with the given name, or null if it does
- * not exist.
- */
- private String getAttribute(Node node, String name) {
- NamedNodeMap attributes = node.getAttributes();
- Node temp = attributes.getNamedItem(name);
- return temp == null ? null : temp.getNodeValue();
- }
-
- /*
- * Load the given file into a DOM document.
- */
- private Document load(InputStream input) throws ParserConfigurationException, IOException, SAXException {
- // load the feature xml
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = factory.newDocumentBuilder();
- input = new BufferedInputStream(input);
- try {
- return builder.parse(input);
- } finally {
- if (input != null)
- try {
- input.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- /*
- * Parse the given file handle which points to a platform.xml file and a configuration object.
- * Returns null if the file doesn't exist.
- */
- private Configuration internalParse(File file) throws ProvisionException {
- if (!file.exists()) {
- // remove from cache since it doesn't exist anymore on disk
- ConfigurationCache.put(file, null);
- return null;
- }
- // have we read this before?
- Configuration result = ConfigurationCache.get(file);
- if (result != null)
- return result;
- try {
- InputStream input = new BufferedInputStream(new FileInputStream(file));
- Document document = load(input);
- result = process(document);
- // save for future use
- ConfigurationCache.put(file, result);
- return result;
- } catch (IOException e) {
- throw new ProvisionException(NLS.bind(Messages.error_reading_config, file), e);
- } catch (ParserConfigurationException e) {
- throw new ProvisionException(Messages.error_parsing_config, e);
- } catch (SAXException e) {
- throw new ProvisionException(Messages.error_parsing_config, e);
- }
- }
-
- /*
- * Process the given DOM document and create the appropriate
- * site objects.
- */
- private Configuration process(Document document) {
- Node node = getConfigElement(document);
- if (node == null)
- return null;
- Configuration configuration = createConfiguration(node);
- NodeList children = node.getChildNodes();
- int size = children.getLength();
- for (int i = 0; i < size; i++) {
- Node child = children.item(i);
- if (child.getNodeType() != Node.ELEMENT_NODE)
- continue;
- if (!ELEMENT_SITE.equalsIgnoreCase(child.getNodeName()))
- continue;
- Site site = createSite(child);
- if (site != null)
- configuration.add(site);
- }
- return configuration;
- }
-
- private Configuration createConfiguration(Node node) {
- Configuration result = new Configuration();
- String value = getAttribute(node, ATTRIBUTE_DATE);
- if (value != null)
- result.setDate(value);
- value = getAttribute(node, ATTRIBUTE_TRANSIENT);
- if (value != null)
- result.setTransient(Boolean.valueOf(value).booleanValue());
- value = getAttribute(node, ATTRIBUTE_SHARED_UR);
- if (value != null)
- result.setSharedUR(value);
- value = getAttribute(node, ATTRIBUTE_VERSION);
- if (value != null)
- result.setVersion(value);
- return result;
- }
-
- private Node getConfigElement(Document doc) {
- NodeList children = doc.getChildNodes();
- int size = children.getLength();
- for (int i = 0; i < size; i++) {
- Node child = children.item(i);
- if (child.getNodeType() != Node.ELEMENT_NODE)
- continue;
- if (ELEMENT_CONFIG.equalsIgnoreCase(child.getNodeName()))
- return child;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
deleted file mode 100644
index be55efdb3..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/ConfigurationWriter.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.core.helpers.URLUtil;
-import org.eclipse.equinox.internal.p2.touchpoint.eclipse.Activator;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @since 1.0
- */
-public class ConfigurationWriter implements ConfigurationConstants {
-
- /*
- * Save the given configuration to the specified location.
- */
- static void save(Configuration configuration, File location, URL osgiInstallArea) throws ProvisionException {
- XMLWriter writer = null;
- try {
- OutputStream output = new BufferedOutputStream(new FileOutputStream(location));
- writer = new XMLWriter(output);
- Map<String, String> args = new HashMap<String, String>();
-
- // always write out an up-to-date timestamp
- args.put(ATTRIBUTE_DATE, Long.toString(new Date().getTime()));
-
- String value = configuration.getSharedUR();
- if (value != null)
- args.put(ATTRIBUTE_SHARED_UR, value);
-
- value = configuration.getVersion();
- if (value != null)
- args.put(ATTRIBUTE_VERSION, value);
-
- args.put(ATTRIBUTE_TRANSIENT, Boolean.toString(configuration.isTransient()));
-
- writer.startTag(ELEMENT_CONFIG, args);
-
- for (Site site : configuration.internalGetSites(false)) {
- write(writer, site, osgiInstallArea);
- }
-
- writer.endTag(ELEMENT_CONFIG);
- } catch (UnsupportedEncodingException e) {
- throw new ProvisionException(NLS.bind(Messages.error_saving_config, location), e);
- } catch (FileNotFoundException e) {
- throw new ProvisionException(NLS.bind(Messages.error_saving_config, location), e);
- } finally {
- if (writer != null) {
- writer.flush();
- writer.close();
- }
- }
- // put the config in the cache in case someone in the same session wants to read it
- ConfigurationCache.put(location, configuration);
- }
-
- /*
- * Write out the given site.
- */
- private static void write(XMLWriter writer, Site site, URL osgiInstallArea) {
- Map<String, String> args = new HashMap<String, String>();
-
- String value = site.getLinkFile();
- if (value != null)
- args.put(ATTRIBUTE_LINKFILE, value);
-
- value = site.getPolicy();
- if (value != null)
- args.put(ATTRIBUTE_POLICY, value);
-
- value = site.getUrl();
- if (value != null) {
- try {
- value = URIUtil.toUnencodedString(new URI(value));
- } catch (URISyntaxException e) {
- // ignore this error and just use the value straight as-is
- }
- args.put(ATTRIBUTE_URL, getLocation(value, osgiInstallArea));
- }
-
- value = toString(site.getList());
- if (value != null)
- args.put(ATTRIBUTE_LIST, value);
-
- args.put(ATTRIBUTE_UPDATEABLE, Boolean.toString(site.isUpdateable()));
- args.put(ATTRIBUTE_ENABLED, Boolean.toString(site.isEnabled()));
-
- writer.startTag(ELEMENT_SITE, args);
- write(writer, site.getFeatures());
- writer.endTag(ELEMENT_SITE);
- }
-
- /*
- * Return the location for the given location which is a url string. Take into account
- * the specified osgi install area. This method should make the path relative if
- * possible and could potentially return platform:/base/.
- */
- private static String getLocation(String value, URL osgiInstallArea) {
- if (osgiInstallArea == null || !value.startsWith("file:")) //$NON-NLS-1$
- return value;
- try {
- // if our site represents the osgi install area, then write out platform:/base/
- File installArea = URLUtil.toFile(osgiInstallArea);
- File path = URLUtil.toFile(new URL(value));
- if (installArea.getAbsoluteFile().equals(path.getAbsoluteFile()))
- return ConfigurationParser.PLATFORM_BASE;
- } catch (MalformedURLException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while writing configuration.", e)); //$NON-NLS-1$
- }
- return PathUtil.makeRelative(value, osgiInstallArea);
- }
-
- /*
- * Convert the given list to a comma-separated string.
- */
- private static String toString(Object[] list) {
- if (list == null || list.length == 0)
- return null;
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < list.length; i++) {
- buffer.append(list[i].toString());
- if (i + 1 < list.length)
- buffer.append(',');
- }
- return buffer.toString();
- }
-
- /*
- * Write out the given list of features.
- */
- private static void write(XMLWriter writer, Feature[] features) {
- if (features == null || features.length == 0)
- return;
- for (int i = 0; i < features.length; i++) {
- Feature feature = features[i];
- Map<String, String> args = new HashMap<String, String>();
- String value = feature.getId();
- if (value != null)
- args.put(ATTRIBUTE_ID, value);
- value = feature.getUrl();
- if (value != null)
- args.put(ATTRIBUTE_URL, value);
- value = feature.getVersion();
- if (value != null)
- args.put(ATTRIBUTE_VERSION, value);
- value = feature.getPluginIdentifier();
- // only write out the plug-in identifier if it is different from the feature id
- if (value != null && !value.equals(feature.getId()))
- args.put(ATTRIBUTE_PLUGIN_IDENTIFIER, value);
- value = feature.getPluginVersion();
- // only write out the plug-in version if it is different from the feature version
- if (value != null && !value.equals(feature.getVersion()))
- args.put(ATTRIBUTE_PLUGIN_VERSION, value);
- if (feature.isPrimary())
- args.put(ATTRIBUTE_PRIMARY, "true"); //$NON-NLS-1$
- value = feature.getApplication();
- if (value != null)
- args.put(ATTRIBUTE_APPLICATION, value);
-
- // collect the roots
- URL[] roots = feature.getRoots();
- if (roots != null && roots.length > 0)
- args.put(ATTRIBUTE_ROOT, toString(roots));
-
- writer.startTag(ELEMENT_FEATURE, args);
- writer.endTag(ELEMENT_FEATURE);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java
deleted file mode 100644
index 0866b2b99..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Feature.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.net.URL;
-
-/*
- * Represents a feature entry in a platform.xml file.
- */
-public class Feature {
-
- private String id;
- private String url;
- private String version;
- private Site site;
- private String pluginIdentifier;
- private String pluginVersion;
- private String application;
- private URL[] roots;
- private boolean primary = false;
-
- public Feature(Site site) {
- super();
- if (site == null)
- throw new IllegalArgumentException(Messages.empty_feature_site);
- this.site = site;
- }
-
- public String getApplication() {
- return application;
- }
-
- public String getId() {
- return id;
- }
-
- public String getPluginIdentifier() {
- return pluginIdentifier;
- }
-
- public String getPluginVersion() {
- return pluginVersion;
- }
-
- public URL[] getRoots() {
- return roots;
- }
-
- public Site getSite() {
- return site;
- }
-
- public String getUrl() {
- return url;
- }
-
- public String getVersion() {
- return version;
- }
-
- public boolean isPrimary() {
- return primary;
- }
-
- public void setApplication(String application) {
- this.application = application;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public void setPluginIdentifier(String pluginIdentifier) {
- this.pluginIdentifier = pluginIdentifier;
- }
-
- public void setPluginVersion(String pluginVersion) {
- this.pluginVersion = pluginVersion;
- }
-
- public void setPrimary(boolean primary) {
- this.primary = primary;
- }
-
- public void setRoots(URL[] roots) {
- this.roots = roots;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (!(obj instanceof Feature))
- return false;
- Feature other = (Feature) obj;
- if (!equals(getId(), other.getId()))
- return false;
- // shallow equals here. sites should never be null
- if (!equals(getSite().getUrl(), other.getSite().getUrl()))
- return false;
- if (!equals(getUrl(), other.getUrl()))
- return false;
- if (!equals(getVersion(), other.getVersion()))
- return false;
- return true;
- }
-
- private boolean equals(Object one, Object two) {
- return one == null ? two == null : one.equals(two);
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return id.hashCode() + version.hashCode();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Messages.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Messages.java
deleted file mode 100644
index 845e206e5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Messages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.update.messages"; //$NON-NLS-1$
- public static String empty_feature_site;
- public static String error_saving_config;
- public static String error_reading_config;
- public static String error_parsing_config;
-
- static {
- // load message values from bundle file and assign to fields below
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java
deleted file mode 100644
index ece1efc13..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/PathUtil.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.File;
-import java.net.URL;
-import org.eclipse.core.runtime.*;
-
-/**
- * Note the methods on this class have inconsistent and unintuitive behaviour. However
- * they are unchanged for backwards compatibility. Clients should really use
- * {@link URIUtil} instead.
- * @since 1.0
- */
-public class PathUtil {
- public static boolean isWindows = System.getProperty("os.name").startsWith("Win"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private static final String FILE_PROTOCOL = "file:"; //$NON-NLS-1$
-
- public static String makeRelative(String urlString, URL rootURL) {
- // we only traffic in file: URLs
- int index = urlString.indexOf(FILE_PROTOCOL);
- if (index == -1)
- return urlString;
- index = index + 5;
-
- // ensure we have an absolute path to start with
- boolean done = false;
- URL url = null;
- String file = urlString;
- while (!done) {
- try {
- url = new URL(file);
- file = url.getFile();
- } catch (java.net.MalformedURLException e) {
- done = true;
- }
- }
- if (url == null || !new File(url.getFile()).isAbsolute())
- return urlString;
-
- String rootString = rootURL.toExternalForm();
- return urlString.substring(0, index) + makeRelative(urlString.substring(index), rootString.substring(rootString.indexOf(FILE_PROTOCOL) + 5));
- }
-
- public static String makeRelative(String original, String rootPath) {
- IPath path = new Path(original);
- // ensure we have an absolute path to start with
- if (!path.isAbsolute())
- return original;
-
- //Returns the original string if no relativization has been done
- String result = makeRelative(path, new Path(rootPath));
- return path.toOSString().equals(result) ? original : result;
- }
-
- /*
- * Make the given path relative to the specified root, if applicable. If not, then
- * return the path as-is.
- */
- private static String makeRelative(IPath toRel, IPath base) {
- //can't make relative if devices are not equal
- final String device = toRel.getDevice();
- if (device != base.getDevice() && (device == null || !device.equalsIgnoreCase(base.getDevice())))
- return toRel.toOSString();
- int i = base.matchingFirstSegments(toRel);
- if (i == 0) {
- return toRel.toOSString();
- }
- String result = ""; //$NON-NLS-1$
- for (int j = 0; j < base.segmentCount() - i; j++) {
- result += ".." + IPath.SEPARATOR; //$NON-NLS-1$
- }
- if (i == toRel.segmentCount())
- return "."; //$NON-NLS-1$
- //TODO This will return mixed path with some / and some \ on windows!!
- result += toRel.setDevice(null).removeFirstSegments(i).toOSString();
- return result;
- }
-
- /*
- * Make the given path absolute to the specified root, if applicable. If not, then
- * return the path as-is.
- *
- * Method similar to one from SimpleConfigurationManipulatorImpl.
- */
- public static String makeAbsolute(String original, String rootPath) {
- IPath path = new Path(original);
- // ensure we have a relative path to start with
- if (path.isAbsolute())
- return original;
- IPath root = new Path(rootPath);
- return root.addTrailingSeparator().append(original.replace(':', '}')).toOSString().replace('}', ':');
- }
-
- public static String makeAbsolute(String urlString, URL rootURL) {
- // we only traffic in file: URLs
- int index = urlString.indexOf(FILE_PROTOCOL);
- if (index == -1)
- return urlString;
- index = index + 5;
-
- // ensure we have a relative path to start with
- boolean done = false;
- URL url = null;
- String file = urlString;
- while (!done) {
- try {
- url = new URL(file);
- file = url.getFile();
- } catch (java.net.MalformedURLException e) {
- done = true;
- }
- }
- if (url == null || new File(url.getFile()).isAbsolute())
- return urlString;
-
- return urlString.substring(0, index - 5) + makeAbsolute(urlString.substring(index), rootURL.toExternalForm());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
deleted file mode 100644
index fa28bc920..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/Site.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.util.*;
-
-/*
- * Represents a site in a platform.xml file.
- */
-public class Site {
-
- public final static String POLICY_MANAGED_ONLY = "MANAGED-ONLY"; //$NON-NLS-1$
- public final static String POLICY_USER_EXCLUDE = "USER-EXCLUDE"; //$NON-NLS-1$
- public final static String POLICY_USER_INCLUDE = "USER-INCLUDE"; //$NON-NLS-1$
- public final static String PROP_LINK_FILE = "org.eclipse.update.site.linkFile"; //$NON-NLS-1$
-
- private String policy;
- private boolean enabled = true;
- private boolean updateable = true;
- private String url;
- private String linkFile;
- private Collection<Feature> features = new HashSet<Feature>();
- private List<String> list = new ArrayList<String>();
-
- public void addFeature(Feature feature) {
- this.features.add(feature);
- }
-
- public void addPlugin(String plugin) {
- this.list.add(plugin);
- }
-
- public boolean removePlugin(String plugin) {
- return this.list.remove(plugin);
- }
-
- public void setPluginList(List<String> plugins) {
- if (plugins == null)
- this.list = new ArrayList<String>();
- else
- this.list = plugins;
- }
-
- public Feature[] getFeatures() {
- return features.toArray(new Feature[features.size()]);
- }
-
- /*
- * Return the feature object with the specific id and version. Return null
- * if there is no match or the id is null. If the version is null then return the
- * first feature with a matching id.
- */
- public Feature getFeature(String id, String version) {
- if (id == null)
- return null;
- for (Feature feature : features) {
- if (id.equals(feature.getId())) {
- if (version == null || version.equals(feature.getVersion()))
- return feature;
- }
- }
- return null;
- }
-
- public Feature removeFeature(String featureURL) {
- for (Feature feature : features) {
- String nextURL = feature.getUrl();
- if (nextURL != null && nextURL.equals(featureURL))
- return features.remove(feature) ? feature : null;
- }
- return null;
- }
-
- public String getLinkFile() {
- return linkFile;
- }
-
- public String[] getList() {
- return list.toArray(new String[list.size()]);
- }
-
- public String getPolicy() {
- return policy;
- }
-
- /**
- * Note the string that we are returning is an <em>ENCODED</em> URI string.
- */
- public String getUrl() {
- return url;
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public boolean isUpdateable() {
- return updateable;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
- public void setLinkFile(String linkFile) {
- this.linkFile = linkFile;
- }
-
- public void setPolicy(String policy) {
- this.policy = policy;
- }
-
- public void setUpdateable(boolean updateable) {
- this.updateable = updateable;
- }
-
- /**
- * Note that the string should be an <em>ENCODED</em> URI string.
- */
- public void setUrl(String url) {
- this.url = url;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getUrl().hashCode();
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- if (!(obj instanceof Site))
- return false;
- Site other = (Site) obj;
- if (isEnabled() != other.isEnabled())
- return false;
- if (isUpdateable() != other.isUpdateable())
- return false;
- if (!getUrl().equals(other.getUrl()))
- return false;
- if (!Site.equals(getLinkFile(), other.getLinkFile()))
- return false;
- if (!Site.equals(getPolicy(), other.getPolicy()))
- return false;
- if (!Site.equals(getList(), other.getList()))
- return false;
- if (!Site.equals(getFeatures(), other.getFeatures()))
- return false;
- return true;
- }
-
- /*
- * Return a boolean value indicating whether or not the given
- * objects are considered equal.
- */
- public static boolean equals(Object one, Object two) {
- return one == null ? two == null : one.equals(two);
- }
-
- /*
- * Return a boolean value indicating whether or not the given
- * lists are considered equal.
- */
- public static boolean equals(Object[] one, Object[] two) {
- if (one == null && two == null)
- return true;
- if (one == null || two == null)
- return false;
- if (one.length != two.length)
- return false;
- for (int i = 0; i < one.length; i++) {
- boolean found = false;
- for (int j = 0; !found && j < two.length; j++)
- found = one[i].equals(two[j]);
- if (!found)
- return false;
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
deleted file mode 100644
index 192f1d708..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/XMLWriter.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.update;
-
-import java.io.*;
-import java.util.Map;
-
-/**
- * A simple XML writer.
- *
- * Copied from the org.eclipse.core.resources bundle.
- */
-public class XMLWriter extends PrintWriter {
- protected int tab;
-
- /* constants */
- protected static final String XML_VERSION = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$
-
- public XMLWriter(OutputStream output) throws UnsupportedEncodingException {
- super(new OutputStreamWriter(output, "UTF8")); //$NON-NLS-1$
- tab = 0;
- println(XML_VERSION);
- }
-
- public void endTag(String name) {
- tab--;
- printTag('/' + name, null);
- }
-
- public void printSimpleTag(String name, Object value) {
- if (value != null) {
- printTag(name, null, true, false);
- print(getEscaped(String.valueOf(value)));
- printTag('/' + name, null, false, true);
- }
- }
-
- public void printTabulation() {
- for (int i = 0; i < tab; i++)
- super.print('\t');
- }
-
- public void printTag(String name, Map<String, String> parameters) {
- printTag(name, parameters, true, true);
- }
-
- public void printTag(String name, Map<String, String> parameters, boolean shouldTab, boolean newLine) {
- StringBuffer sb = new StringBuffer();
- sb.append("<"); //$NON-NLS-1$
- sb.append(name);
- if (parameters != null)
- for (String key : parameters.keySet()) {
- sb.append(" "); //$NON-NLS-1$
- sb.append(key);
- sb.append("=\""); //$NON-NLS-1$
- sb.append(getEscaped(String.valueOf(parameters.get(key))));
- sb.append("\""); //$NON-NLS-1$
- }
- sb.append(">"); //$NON-NLS-1$
- if (shouldTab)
- printTabulation();
- if (newLine)
- println(sb.toString());
- else
- print(sb.toString());
- }
-
- public void startTag(String name, Map<String, String> parameters) {
- startTag(name, parameters, true);
- }
-
- public void startTag(String name, Map<String, String> parameters, boolean newLine) {
- printTag(name, parameters, true, newLine);
- tab++;
- }
-
- private static void appendEscapedChar(StringBuffer buffer, char c) {
- String replacement = getReplacement(c);
- if (replacement != null) {
- buffer.append('&');
- buffer.append(replacement);
- buffer.append(';');
- } else {
- buffer.append(c);
- }
- }
-
- public static String getEscaped(String s) {
- StringBuffer result = new StringBuffer(s.length() + 10);
- for (int i = 0; i < s.length(); ++i)
- appendEscapedChar(result, s.charAt(i));
- return result.toString();
- }
-
- private static String getReplacement(char c) {
- // Encode special XML characters into the equivalent character references.
- // These five are defined by default for all XML documents.
- switch (c) {
- case '<' :
- return "lt"; //$NON-NLS-1$
- case '>' :
- return "gt"; //$NON-NLS-1$
- case '"' :
- return "quot"; //$NON-NLS-1$
- case '\'' :
- return "apos"; //$NON-NLS-1$
- case '&' :
- return "amp"; //$NON-NLS-1$
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/messages.properties b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/messages.properties
deleted file mode 100644
index d32135ecb..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/update/messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2008 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
-###############################################################################
-empty_feature_site=Features should not have an empty site.
-error_parsing_config=An error occurred parsing the platform configuration
-error_reading_config=An error occurred reading the platform configuration file: {0}.
-error_saving_config=Exception when saving configuration to: {0}.
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java
deleted file mode 100644
index 35f14fee3..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/OSGiBundleQuery.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Cloudsmith Inc. - converted into expression based query
- *******************************************************************************/
-package org.eclipse.equinox.p2.touchpoint.eclipse.query;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-import org.eclipse.equinox.p2.metadata.expression.IMatchExpression;
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
-/**
- * A query matching every {@link IInstallableUnit} that describes an OSGi bundle.
- * @since 2.0
- */
-public final class OSGiBundleQuery extends ExpressionMatchQuery<IInstallableUnit> {
-
- private static final IMatchExpression<IInstallableUnit> bundleTest = ExpressionUtil.getFactory().matchExpression(ExpressionUtil.parse("providedCapabilities.exists(p | p.namespace == 'osgi.bundle')")); //$NON-NLS-1$
-
- public OSGiBundleQuery() {
- super(IInstallableUnit.class, bundleTest);
- }
-
- /**
- * Test if the {@link IInstallableUnit} describes an OSGi bundle.
- * @param iu the element being tested.
- * @return <tt>true</tt> if the parameter describes an OSGi bundle.
- */
- public static boolean isOSGiBundle(IInstallableUnit iu) {
- return bundleTest.isMatch(iu);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html
deleted file mode 100644
index 1af2a8419..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/p2/touchpoint/eclipse/query/package.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides query utilities specific to provisioning of OSGi bundles
-<h2>
-Package Specification</h2>
-<p>
-This package specifies API for querying and manipulating provisioning metadata that
-is specific to OSGi bundles or Eclipse-specific constructs such as features.
-<p>
-@since 2.0
-<p>
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath b/bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.touchpoint.natives/.cvsignore b/bundles/org.eclipse.equinox.p2.touchpoint.natives/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.project b/bundles/org.eclipse.equinox.p2.touchpoint.natives/.project
deleted file mode 100644
index 854172c94..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.touchpoint.natives</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c98f1d59f..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Dec 22 23:15:07 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 6eacd08fa..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:07 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 7913d20db..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
deleted file mode 100644
index 518dec99b..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.touchpoint.natives;singleton:=true
-Bundle-Version: 1.0.300.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.touchpoint.natives.Activator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.touchpoint.natives;x-internal:=true,
- org.eclipse.equinox.internal.p2.touchpoint.natives.actions;x-internal:=true
-Require-Bundle: org.eclipse.equinox.common
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.0.0",
- org.osgi.framework;version="1.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html b/bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties b/bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties
deleted file mode 100644
index 0328daa18..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties
-src.includes = about.html
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties b/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties
deleted file mode 100644
index 31cfe1f41..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Native Touchpoint
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml b/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml
deleted file mode 100644
index 2565253a1..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/plugin.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.5"?>
-<plugin>
- <extension point="org.eclipse.equinox.p2.engine.touchpoints" id="native" name="Native Touchpoint">
- <touchpoint
- type="org.eclipse.equinox.p2.native"
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.NativeTouchpoint"
- version="1.0.0"/>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ChmodAction"
- name="chmod"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupzipAction"
- name="cleanupzip"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CollectAction"
- name="collect"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.LinkAction"
- name="ln"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.MkdirAction"
- name="mkdir"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.RmdirAction"
- name="rmdir"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.UnzipAction"
- name="unzip"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CopyAction"
- description="copy(source,target[,overwrite])"
- name="copy"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.CleanupcopyAction"
- description="cleanupcopy(source,target)"
- name="cleanupcopy"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
- <extension
- point="org.eclipse.equinox.p2.engine.actions">
- <action
- class="org.eclipse.equinox.internal.p2.touchpoint.natives.actions.RemoveAction"
- description="remove(path)"
- name="remove"
- touchpointType="org.eclipse.equinox.p2.native"
- touchpointVersion="1.0.0"
- version="1.0.0">
- </action>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml b/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml
deleted file mode 100644
index 1d86bdb60..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.touchpoint.natives</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Activator.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Activator.java
deleted file mode 100644
index e3c7010d5..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Activator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator implements BundleActivator {
- public static final String ID = "org.eclipse.equinox.p2.touchpoint.natives"; //$NON-NLS-1$
- private static BundleContext context = null;
-
- public static BundleContext getContext() {
- return context;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext aContext) throws Exception {
- Activator.context = aContext;
- }
-
- /*
- * (non-Javadoc)
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext aContext) throws Exception {
- context = null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
deleted file mode 100644
index 82a3503cf..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Stores files by copying them to a uniquely named temporary directory.
- * The BackupStore remembers filenames and can recreate them in their original location.
- *
- * <h3>Usage</h3>
- * The user of this class should instantiate the BackupStore with some prefix that is
- * meaningful to a human. Uniqueness is obtained without the prefix - the prefix is used to
- * be able to differentiate between different backup directories by a human (in case of crashes etc).
- *
- * If instantiated with a directory this directory will be used to store the backup root directory. If
- * this directory is null, the users home directory is used by default.
- *
- * Once instantiated, use the {@link #backup(File)} and {@link #backupDirectory(File)} methods
- * to move files to backup instead of deleting them. A file that
- * is backed up should not be deleted - it is simply moved out of the way.
- * Use {@link #backupCopy(File)} to
- * move the file out of harms way, but keep a copy of it in the original location.
- * The methods {@link #backupAll(File)} and {@link #backupCopyAll(File)} backs up an entire structure.
- *
- * When backup is finished - the user should either call {@link #restore()} to put all
- * of the files back, or call {@link #discard()} to remove all of the backed up "copies".
- *
- * If {@link #restore()} or {@link #discard()} is not called the backup files will never be deleted.
- *
- * The backup store does not synchronize directories - actions that write new files are
- * responsible for removing them. Overwriting existing files should be done by first backing
- * up the file, and then creating a new file. Modifying a file, should be done by
- * using {@link #backupCopy(File)} or
- * first making a copy, then backing up the original, and then renaming the copy.
- *
- * <h3>Read Only and Permissions</h3>
- * Directories that are read only (to current user) can not be backed up.
- * Backup is performed using {@link File#renameTo(File)} and handling of permissions
- * is operating system dependent. It is expected that a Un*x type system retains the
- * permissions as a file is moved to the backup store and later gets restored.
- * Backup directories are created as they are needed and will (at least on Un*x) inherit the
- * permissions from its parent directory.
- *
- * If a rename can not be performed, the backup store will make a copy and delete the original
- * file. This makes it possible to backup and restore across volume boundaries.
- *
- * When restoring directories they
- * will be created with permissions in a platform specific way (on UN*IX they will inherit the permissions
- * of the parent directory).
- *
- * <h3>Checkpointing</h3>
- * Checkpointing (i.e. to be able to rollback to a particular point) can be implemented by using
- * multiple instances of BackupStore. The client code will need to remember the individual order
- * among the backup stores.
- *
- * <h3>Restartability</h3>
- * Not implemented - it is possible to obtain the name of the backup directories,
- * so manual restore is possible after a crash. An idea is to add persistence to a file, and
- * be able to read it back in again.
- *
- * <h3>A note about exceptions</h3>
- * In general {@link IllegalArgumentException} is thrown when attempting an operation
- * that is considered "wrong use", and an {@link IllegalStateException} or subclass thereof is thrown on an overall
- * wrong use of BackupStore (i.e. attempt to backup when store has been restored). Some cases of
- * "wrong use" can not be differentiated from I/O errors (like a "file not found" as this could
- * be caused by an entire disk disappearing - in these case an {@link IOException} is thrown.
- *
- * <h3>Implementation Note</h3>
- * The backup root directory will contain folders that reflects file system roots. These are encoded using
- * "_" for the UNI*X root directory, "__" for a Windows network mounted directory, and single "drive letter" folders
- * corresponding to Windows drive letters. Typically, on UN*X there will only be a "_" directory in the backup root,
- * and on windows there will typically be a single directory called "C".
- *
- *
- */
-public class BackupStore implements IBackupStore {
-
- /**
- * The name to use for a directory that represents leading separator (i.e. "/" or "\").
- */
- private static final String ROOTCHAR = "_"; //$NON-NLS-1$
-
- /**
- * Map of directory File to backup root (File) - the backup root has
- * a directory named {@link #backupName} where the backup is found.
- */
- //private Map backups = new HashMap();
- private final File backupRoot;
-
- /**
- * The name of the backup directory (no path - relative to the backup root).
- */
- private String backupName;
-
- /**
- * The name of a dummy file used to backup empty directories
- */
- private String dummyName;
-
- /**
- * A server socket that is used to obtain a port (a shared resource on this machine)
- * and thus create a unique number. Used as part of the unique id of backup directories
- * and probe files.
- */
- private ServerSocket socket = null;
-
- /**
- * Counter of how many files where backed up. Used as a simple check mechanism if
- * everything was restored (a guard against manual/external tampering with the backup directories).
- */
- private long backupCounter;
-
- /**
- * Counter of how many files where restored. See {@link #backupCounter}.
- */
- private long restoreCounter;
-
- /**
- * Flag indicating if this BackupStore has been restored or canceled.
- */
- private boolean closed;
-
- /**
- * Generates a BackupStore with a default prefix of ".p2bu" for backup directory and
- * probe file.
- * The full id of the store is on the format "prefix_hextime_hexIPport"
- * - see {@link #genUnique()} for more info.
- */
- public BackupStore() {
- this(null, ".p2bu"); //$NON-NLS-1$
- }
-
- /**
- * Generates a BackupStore with a specified prefix for backup directories and
- * probe file.
- * The full id of the store is on the format "prefix_hextime_hexipport"
- * - see {@link #genUnique()} for more info.
- *
- * @param buParentDirectory - name of directory where the backup directory should be created - if null, java.io.tmpdir is used
- * @param prefix - prefix used for human identification of backup directories
- */
- public BackupStore(File buParentDirectory, String prefix) {
- if (buParentDirectory == null)
- buParentDirectory = new File(System.getProperty("java.io.tmpdir")); //$NON-NLS-1$
- backupRoot = buParentDirectory;
-
- // generate a name for the backup store and the dummy file used for empty directories
- String unique = genUnique();
- dummyName = prefix + "d_" + unique; //$NON-NLS-1$
- backupName = prefix + "_" + unique; //$NON-NLS-1$
- backupCounter = 0;
- restoreCounter = 0;
- closed = false;
- }
-
- /**
- * Since a socket port is used to create a unique number, the socket
- * must be closed if this instance is garbage collected and the user
- * of the instance has not either restored or discarded.
- */
- protected void finalize() throws Throwable {
- try {
- if (socket != null && !socket.isClosed())
- socket.close();
- } finally {
- super.finalize();
- }
- }
-
- /**
- * Returns the unique backup name (this is the name of generated backup directories).
- * @return the backup name.
- */
- public String getBackupName() {
- return backupName;
- }
-
- public File getBackupRoot() {
- return backupRoot;
- }
-
- /**
- * Backup the file by moving it to the backup store (for later (optional) restore).
- * Calling this method with a file that represents a directory is equivalent to calling
- * {@link #backupDirectory(File)}.
- *
- * A file (path) can only be backed up once per BackupStore instance.
- * When the file is backed up, it is moved to a directory under this BackupStore instance's directory
- * with a relative path corresponding to the original relative path from the backup root e.g.
- * the file /A/B/C/foo.txt could be moved to /A/.p2bu_ffffff_ffffff/B/C/foo.txt when /A is the
- * backup root.
- *
- * If a directory is first backed up, and later replaced by a regular file, and this file
- * is backed up (or vice versa) - an {@link IllegalArgumentException} is thrown
- *
- * A backup can not be performed on a closed BackupStore.
- *
- * @param file - the file (or directory) to backup
- * @return true if the file was backed up, false if this file (path) has already been backed up (the file is not moved to the store).
- * @throws IOException - if the backup operation fails, or the file does not exist
- * @throws ClosedBackupStoreException - if the BackupStore has been closed
- * @throws IllegalArgumentException - on type mismatch (file vs. directory) of earlier backup, or if file does not exist
- */
- public boolean backup(File file) throws IOException {
- if (closed)
- throw new ClosedBackupStoreException("Can not perform backup()"); //$NON-NLS-1$
- if (!file.exists())
- throw new IOException(NLS.bind(Messages.BackupStore_file_not_found, file.getAbsolutePath()));
- if (file.isDirectory())
- return backupDirectory(file);
- file = makeParentCanonical(file);
- File buRoot = backupRoot;
- // File buRoot = findBackupRoot(file);
- File buDir = new File(buRoot, backupName);
- // move the file
- // create the relative path from root and use that in buDir
- File buFile = new File(buDir, makeRelativeFromRoot(file).getPath());
- // already backed up, but was a directory = wrong usage
- if (buFile.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_directory_file_mismatch, buFile.getAbsolutePath()));
- // has already been backed up - can only be done once with one BackupStore
- if (buFile.exists())
- return false;
-
- // make sure all of the directories exist / gets created
- buFile.getParentFile().mkdirs();
- if (buFile.getParentFile().exists() && !buFile.getParentFile().isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_file_directory_mismatch, buFile.getParentFile().getAbsolutePath()));
- if (file.renameTo(buFile)) {
- backupCounter++;
- return true;
- }
- // could not move - this can happen because source and target are on different volumes, or
- // that source is locked "in use" on a windows machine. The copy will work across volumes,
- // but the locked file will fail on the subsequent delete.
- //
- Util.copyStream(new FileInputStream(file), true, new FileOutputStream(buFile), true);
- backupCounter++;
-
- // need to remove the backed up file
- if (!file.delete())
- throw new IOException(NLS.bind(Messages.BackupStore_can_not_delete_after_copy_0, file));
-
- return true;
- }
-
- /**
- * Backs up a file, or everything under a directory.
- *
- * @param file - file to backup or directory
- * @throws IOException if backup operation failed
- */
- public void backupAll(File file) throws IOException {
- if (!file.exists())
- return;
- file = makeParentCanonical(file);
- if (file.isDirectory()) {
- File[] files = file.listFiles();
- if (files != null)
- for (int i = 0; i < files.length; i++)
- backupAll(files[i]);
- }
- backup(file);
- }
-
- /**
- * Backs up a file, or everything under a directory.
- * A copy of the backup is left in the original place.
- * @param file
- * @throws IOException
- */
- public void backupCopyAll(File file) throws IOException {
- if (!file.exists())
- return;
- file = makeParentCanonical(file);
- if (file.isDirectory()) {
- File[] files = file.listFiles();
- if (files != null)
- for (int i = 0; i < files.length; i++)
- backupCopyAll(files[i]);
- // if directory was empty, it needs to be backed up and then recreated
- //
- if (files == null || files.length == 0) {
- backupDirectory(file);
- file.mkdir();
- }
- } else
- backupCopy(file);
- }
-
- /**
- * Backup the file by moving it to the backup store (for later (optional) restore) but leaving
- * a copy of the contents in the original location.
- * Calling this method with a file that represents a directory throws an {@link IllegalArgumentException}.
- *
- * A file (path) can only be backed up once per BackupStore instance.
- * When the file is backed up, it is moved to a directory under this BackupStore instance's directory
- * with a relative path corresponding to the original relative path from the backup root e.g.
- * the file /A/B/C/foo.txt could be moved to /A/.p2bu_ffffff_ffffff/B/C/foo.txt when /A is the
- * backup root.
- *
- * If a directory is first backed up, and later replaced by a regular file, and this file
- * is backed up (or vice versa) - an {@link IllegalArgumentException} is thrown
- *
- * A backup can not be performed on a closed BackupStore.
- *
- * @param file - the file (or directory) to backup
- * @return true if the file was backed up, false if this file (path) has already been backed up (the file is not moved to the store).
- * @throws IOException - if the backup operation fails, or the file does not exist
- * @throws ClosedBackupStoreException - if the BackupStore has been closed
- * @throws IllegalArgumentException - on type mismatch (file vs. directory) of earlier backup, or if file is a Directory
- */
- public boolean backupCopy(File file) throws IOException {
- if (closed)
- throw new ClosedBackupStoreException(Messages.BackupStore_backupCopy_closed_store);
- if (!file.exists())
- throw new IOException(NLS.bind(Messages.BackupStore_file_not_found, file.getAbsolutePath()));
- if (file.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_can_not_copy_directory, file.getAbsolutePath()));
- file = makeParentCanonical(file);
- //File buRoot = backupRoot;
- // File buRoot = findBackupRoot(file);
- File buDir = new File(backupRoot, backupName);
- // move the file
- // create the relative path from root and use that in buDir
- File buFile = new File(buDir, makeRelativeFromRoot(file).getPath());
- // already backed up, but was a directory = wrong usage
- if (buFile.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_directory_file_mismatch, buFile.getAbsolutePath()));
- // has already been backed up - can only be done once with one BackupStore
- if (buFile.exists())
- return false;
-
- // make sure all of the directories exist / gets created
- buFile.getParentFile().getCanonicalFile().mkdirs();
- if (buFile.getParentFile().exists() && !buFile.getParentFile().isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_file_directory_mismatch, buFile.getParentFile().getAbsolutePath()));
-
- // just make a copy - one has to be made in one direction anyway
- // A renameTo followed by a copy is preferred as it preserves file permissions on the moved file
- // but it is easier to just copy and keep original.
- Util.copyStream(new FileInputStream(file), true, new FileOutputStream(buFile), true);
- backupCounter++;
- return true;
- }
-
- /**
- * Performs backup of an empty directory. The directory must be empty before it can be backed up (i.e.
- * similar to a delete of a directory). Backup the files of the directory first.
- * A call to backup a directory is really only needed for empty directories as a restore
- * of a file will also restore all of its parent directories.
- * @param file - the (empty) directory to back up
- * @return true if the directory was moved to backup. false if the directory was already backed up and remains.
- * @throws IllegalArgumentException if file is not a directory, or is not empty.
- * @throws IOException if directory can not be moved to the backup store, or if the directory is not writeable
- */
- public boolean backupDirectory(File file) throws IOException {
- if (!file.isDirectory())
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_not_a_directory, file.getAbsolutePath()));
- file = makeParentCanonical(file);
- if (file.list().length != 0)
- throw new IllegalArgumentException(NLS.bind(Messages.BackupStore_directory_not_empty, file.getAbsolutePath()));
- // the easiest is to create a dummy file and back that up (the dummy is simply ignored when restoring).
- File dummy = new File(file, dummyName);
- if (!dummy.createNewFile())
- throw new IOException(NLS.bind(Messages.BackupStore_can_not_create_dummy, dummy.getAbsolutePath()));
- boolean result = backup(dummy);
- // if already backed up - do not delete the directory
- if (result && !file.delete())
- throw new IOException(NLS.bind(Messages.BackupStore_can_not_remove, dummy.getAbsolutePath()));
- return result;
- }
-
- /**
- * Restores all backup files from backup store.
- * Note that restore of a (non directory) file deletes an existing file or directory found
- * in the restore location.
- * When the backup has been restored this BackupStore instance is closed and can not be
- * used for further backup or restore.
- *
- * If there are unrestorable items (non writable directories, or general IO exceptions) these items
- * are written to the log, and the backup copies remain in the file system and can be manually restored
- * (using a simple zip of the backup directory, and an unzip to the buRoot once the problem has been corrected).
- *
- * @throws IOException if the backup was not fully restored - unrestored items have been logged.
- * @throws ClosedBackupStoreException if the backup is already closed.
- */
- public void restore() throws IOException {
- if (closed)
- throw new ClosedBackupStoreException(Messages.BackupStore_restore_closed_store);
- // put back all files
- // collect things that could not be restored (so final status can be reported)
- Set<File> unrestorable = new HashSet<File>();
- boolean restored = true;
- if (!backupRoot.exists()) {
- logError(NLS.bind(Messages.BackupStore_missing_backup_directory, backupRoot.getAbsolutePath()));
- restored = false;
- } else
- restoreRoots(new File(backupRoot, backupName), unrestorable);
-
- logUnrestorables(unrestorable);
- if (unrestorable.size() > 0)
- restored = false;
- close(restored);
- closed = true;
- }
-
- private void logUnrestorables(Set<File> unrestorable) {
- // if there are unrestorable units log them
- //
- if (unrestorable != null && unrestorable.size() > 0) {
- for (File file : unrestorable)
- logError(NLS.bind(Messages.BackupStore_manual_restore_needed, file.getAbsolutePath()));
- }
- }
-
- /**
- * Discards and closes this BackupStore. Does nothing if this store is already
- * restored or discarded.
- */
- public void discard() {
- if (closed)
- return;
- closeSocket();
- removeBackups();
- closed = true;
- }
-
- private void close(boolean fullyRestored) throws IOException {
- closeSocket();
- // check external tampering with backup store
- if (backupCounter != restoreCounter) {
- if (!fullyRestored)
- logError(NLS.bind(Messages.BackupStore_0_of_1_items_restored, new Long(restoreCounter), new Long(backupCounter)));
- else {
- logError(NLS.bind(Messages.BackupStore_externally_modified_0_of_1_restored, new Long(restoreCounter), new Long(backupCounter)));
- fullyRestored = false;
- }
- }
- if (!fullyRestored)
- throw new IOException(Messages.BackupStore_errors_while_restoring_see_log);
- // everything has been restored - the backup can now be removed
- removeBackups();
- }
-
- private void closeSocket() {
- if (socket != null && !socket.isClosed())
- try {
- socket.close();
- } catch (IOException e) { /* ignored */
- logWarning(NLS.bind(Messages.BackupStore_can_not_close_tcp_port, new Integer(socket.getLocalPort())));
- }
- }
-
- private void removeBackups() {
- File buRoot = new File(backupRoot, backupName);
- if (!fullyDelete(buRoot))
- logWarning(NLS.bind(Messages.BackupStore_can_not_remove_bu_directory, buRoot.getAbsolutePath()));
- }
-
- private static void logWarning(String message) {
- LogHelper.log(createWarning(message));
- }
-
- private static IStatus createWarning(String message) {
- return new Status(IStatus.WARNING, Activator.ID, message);
- }
-
- private static void logError(String message) {
- LogHelper.log(createError(message));
- }
-
- private static IStatus createError(String message) {
- return new Status(IStatus.ERROR, Activator.ID, message);
- }
-
- /**
- * Deletes a file, or a directory with all of it's children.
- * @param file the file or directory to fully delete
- * @return true if, and only if the file is deleted without errors
- */
- private boolean fullyDelete(File file) {
- if (!file.exists())
- return true;
- if (file.isDirectory()) {
- File[] children = file.listFiles();
- if (children == null)
- return false;
- for (int i = 0; i < children.length; i++)
- if (!fullyDelete(new File(file, children[i].getName())))
- return false;
- }
- return file.delete();
- }
-
- private void restore(File root, File buRoot, Set<File> unrestorable) {
- File[] children = buRoot.listFiles();
- if (children == null) { // error - can't read the backup directory
- unrestorable.add(buRoot);
- return;
- }
- for (int i = 0; i < children.length; i++) {
- File bu = new File(buRoot, children[i].getName());
- File target = new File(root, bu.getName());
- if (bu.isDirectory()) {
- if (!target.exists() && !target.mkdir()) {
- unrestorable.add(bu);
- continue; // give up on this branch
- } else if (target.exists() && !target.isDirectory()) {
- // ouch, there is a file where we need a directory
- // that must be deleted.
- target.delete();
- if (!target.mkdir()) {
- unrestorable.add(bu);
- continue; // give up on branch
- }
- }
- restore(target, bu, unrestorable);
- } else {
- // do not restore the dummies (as they are used to trigger creation of
- // empty directories and are not wanted in the restored location.
- if (bu.getName().equals(dummyName)) {
- restoreCounter++; // count of the restored directory in this case.
- continue;
- }
- // if the original was overwritten by something and this file was not
- // removed, it needs to be deleted now. If it can't be deleted, the
- // renameTo will fail, and the bu is reported as not restorable.
- // fullyDelete will remove a directory completely - we are restoring a file so it can
- // not be kept.
- if (target.exists())
- fullyDelete(target);
-
- // rename if possible, but must copy if not possible to just rename
- if (!bu.renameTo(target)) {
- // did not work to rename, probably because of volume boundaries. Try to copy instead,
- try {
- Util.copyStream(new FileInputStream(bu), true, new FileOutputStream(target), true);
- restoreCounter++; // consider it restored
- } catch (FileNotFoundException e) {
- unrestorable.add(bu);
- continue;
- } catch (IOException e) {
- unrestorable.add(bu);
- continue;
- }
- if (!bu.delete()) { // cleanup
- // could not remove the backup after copy - log, safe to remove manually
- logWarning(NLS.bind(Messages.BackupStore_can_not_delete_tmp_file, bu.getAbsolutePath()));
- }
- } else
- restoreCounter++;
- }
- }
- }
-
- /**
- * Restores everything backed up in the buRoot. Responsible for decoding the specially named root
- * target directories (i.e. _/, __/, C/, etc.) into the real system names.
- * @param buRoot
- * @param unrestorable
- */
- private void restoreRoots(File buRoot, Set<File> unrestorable) {
- File[] children = buRoot.listFiles();
- if (children == null) { // error - can't read the backup directory
- unrestorable.add(buRoot);
- return;
- }
- for (int i = 0; i < children.length; i++) {
- // Names are root-chars, or drive letters in the root bu directory
- String name = children[i].getName();
- String rName = name;
- String prefix = ""; //$NON-NLS-1$
- while (rName.startsWith(ROOTCHAR)) {
- prefix += File.separator;
- rName = rName.substring(1);
- }
- if (prefix.length() < 1) {
- // The name is a drive name
- rName = rName + ":" + File.separator; //$NON-NLS-1$
- } else
- rName = prefix + rName;
- // File root = new File(rName);
- File bu = new File(buRoot, name);
- File target = new File(rName);
- if (!bu.isDirectory()) {
- // the roots should all be directories - so this can only happen if someone manually
- // stored files in the backup root - mark them as unrestorable and continue.
- unrestorable.add(bu);
- continue;
- }
- // the backup roots are system roots, and can not be created - but check root is directory and exists.
- // (Network drives could have gone away etc).
- //
- if (!(target.exists() && target.isDirectory())) {
- unrestorable.add(bu);
- continue; // give up on this branch
- }
- // then perform a recursive restore
- restore(target, bu, unrestorable);
- }
- }
-
- private static long msCounter = 0;
-
- /**
- * Generates a unique hex string by taking currentTimeMillis + sequence
- * number at the end allowing for 32 numbers to be generated per ms.
- * This is sufficient uniqueness in the same VM. (And is still just a fallback solution
- * if there is no access to a TCP port)
- *
- * To make number unique over multiple VMs - the PID of the process would be enough, but
- * it is complicated to get hold of - a separate program must be launched and its PPID
- * investigated. There is no standard API in Java to get the PID. Instead, a socket port is bound
- * to ensure local uniqueness.
- *
- * To make number unique across multiple hosts (we may be provisioning over NFS), the
- * 48 LS bits of the IP address is used (this is more than enough for an IPv4 address).
- * (If there is no IP address, the machine is not on a
- * network) - unfortunately the MAC address can not be used as this requires Java 6 (where
- * there also is a UUID that should be used instead of this method).
- *
- * This method needs to be modified when IPv6 addressing is the norm - at that time, the
- * restriction on Java 1.4 has hopefully been lifted, and it is possible to use the MAC address,
- * or the UUID provided since java 1.6
- *
- * @return a unique string
- */
- private String genUnique() {
- // use 5 LSB bits for counter within ms - i.e. 32 instances can be created
- // per millisecond.
- long timePart = (System.currentTimeMillis() << 5) | (msCounter++ & 31);
- // can't use the MAC address - but take IP address if provisioning across NFS
- long ipPart = 0;
- try {
- // the returned address can be 32 bits IPv4, or 128 bits IPv6 (?)
- // In any case use the LSB bits (as many as will fit
- byte[] address = InetAddress.getLocalHost().getAddress();
- for (int i = 0; i < address.length; i++)
- ipPart = ((ipPart << 8) | (address[i] & 0xff));
- } catch (UnknownHostException e) {
- // there is no IP address, and there and hence no concurrency from other machines.
- // use the default ip part 0
- }
- int port = 0;
- try {
- socket = new ServerSocket(0);
- port = socket.getLocalPort();
- } catch (IOException e) {
- try {
- if (socket != null)
- socket.close();
- } catch (IOException e1) { // ignore failure to close -
- }
- // use a random number as port in this case
- port = new Random().nextInt() & 0xffff;
- }
- // port is never > 0xffff
- long aPart = (ipPart << 16) | (port & 0xffff);
- return Long.toHexString(timePart) + "_" + Long.toHexString(aPart); //$NON-NLS-1$
-
- }
-
- /**
- * Turns a file into a "relativized" absolute file.
- * A leading "root" is transformed to the ROOTCHAR character. On Windows, network mapped drives starts
- * with two separators - and are encoded as two ROOTCHAR.
- * e.g.
- * \\Host\C$\File becomes __\Host\C$\File
- * /users/test/file becomes _/users/test/file
- * C:/somewhere/file becomes C/somewhere/file
- *
- * @param file
- * @return a relativized absolute abstract file
- */
- private File makeRelativeFromRoot(File file) {
- File absolute = file.getAbsoluteFile();
- String path = absolute.getPath();
- String prefix = ""; //$NON-NLS-1$
- while (path.startsWith(File.separator)) {
- prefix += ROOTCHAR;
- path = path.substring(1);
- }
- if (prefix.length() > 0) {
- path = prefix + File.separator + path;
- return new File(path);
- }
- // it is a windows drive letter first.
- // Transform C:/foo to C/foo
- //
- int idx = path.indexOf(":"); //$NON-NLS-1$
- if (idx < 1)
- throw new InternalError("File is neither absolute nor has a drive name: " + path); //$NON-NLS-1$
- path = path.substring(0, idx) + path.substring(idx + 1);
-
- return new File(path);
- }
-
- /**
- * The parent path may include ".." as a directory name - this must be made canonical. But if the file itself is
- * a symbolic link, it should not be resolved.
- */
- private File makeParentCanonical(File file) throws IOException {
- return new File(file.getParentFile().getCanonicalFile(), file.getName());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/ClosedBackupStoreException.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/ClosedBackupStoreException.java
deleted file mode 100644
index 7a19da549..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/ClosedBackupStoreException.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-public class ClosedBackupStoreException extends IllegalStateException {
- private static final long serialVersionUID = -5030940685029643678L;
-
- public ClosedBackupStoreException() {
- super();
- }
-
- public ClosedBackupStoreException(String message) {
- super(message);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/IBackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/IBackupStore.java
deleted file mode 100644
index 4b08dca09..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/IBackupStore.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import java.io.File;
-import java.io.IOException;
-
-public interface IBackupStore {
-
- /**
- * Backup the file.
- * Calling this method with a file that represents a directory is equivalent to calling
- * {@link #backupDirectory(File)}.
- *
- * A file (path) can only be backed up once per IBackupStore instance.
- *
- * If a directory is first backed up, and later replaced by a regular file, and this file
- * is also backed up (or vice versa) - an {@link IllegalArgumentException} is thrown
- *
- * A backup can not be performed on a closed IBackupStore.
- *
- * @param file - the file (or directory) to backup
- * @return true if the file was backed up, false if this file (path) has already been backed up (the file is not moved to the store).
- * @throws IOException - if the backup operation fails, or the file does not exist
- * @throws IllegalStateException - if the IBackupStore has been closed
- * @throws IllegalArgumentException - on type mismatch (file vs. directory) of earlier backup, or if file does not exist
- */
- public boolean backup(File file) throws IOException;
-
- /**
- * Same as {@link #backup(File)} except that a copy is kept in the original location.
- * Can not be used to copy directories.
- * @param file to backup and copy
- * @return true if the file was backed up, false if this file (path) has already been backed up (the file is not moved to the store).
- * @throws IOException - if the backup operation fails, if the file does not exist, or if the copy can not be created.
- * @throws IllegalStateException - if the IBackupStore has been closed
- * @throws IllegalArgumentException - on type mismatch (file vs. directory) of earlier backup, or if file is a directory.
- */
- public boolean backupCopy(File file) throws IOException;
-
- /**
- * Performs backup of an empty directory. The directory must be empty before it can be backed up (i.e.
- * similar to a delete of a directory). Backup the files of the directory first.
- * A call to backup a directory is really only needed for empty directories as a restore
- * of a file will also restore all of its parent directories.
- * @param file - the (empty) directory to back up
- * @return true if the directory was moved to backup. false if the directory was already backed up and remains.
- * @throws IllegalArgumentException if file is not a directory, or is not empty.
- * @throws IOException if directory can not be moved to the backup store, or if the directory is not writeable
- */
- public boolean backupDirectory(File file) throws IOException;
-
- /**
- * Discards and closes this BackupStore. Does nothing if this store is already
- * restored or discarded.
- */
- public void discard();
-
- /**
- * Restores all backup files from backup store.
- * Note that restore of a (non directory) file deletes an existing file or directory found
- * in the restore location.
- * When the backup has been restored it can not be
- * used for further backup or restore.
- *
- * If there are unrestorable items (non writeable directories, or general IO exceptions) these items
- * should be written to the log, and the backup copies should be retained
- * for manual restore.
- *
- * @throws IOException if the backup was not fully restored - unrestored items should have been logged.
- * @throws IllegalStateException if the backup is already closed.
- */
- public void restore() throws IOException;
-
- /**
- * Returns the unique backup name (this is the name of generated backup directories).
- * @return the backup name.
- */
- public String getBackupName();
-
- /**
- * Backs up a file, or everything under a directory.
- *
- * @param file - file to backup or directory
- * @throws IOException if backup operation failed
- */
- public void backupAll(File file) throws IOException;
-
- /**
- * Backs up a file, or everything under a directory.
- * A copy of the backup is left in the original place.
- * @param file
- * @throws IOException
- */
- public void backupCopyAll(File file) throws IOException;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/LazyBackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/LazyBackupStore.java
deleted file mode 100644
index e3dbc4c6f..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/LazyBackupStore.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * LazyBackupStore is a BackupStore that only instantiates a real backup store
- * when needed.
- *
- *
- */
-public class LazyBackupStore implements IBackupStore {
- private BackupStore delegate;
- private final String prefix;
-
- /**
- * Creates a new lazy backup store
- * @param prefix The prefix to use in constructing the backup store directory
- */
- public LazyBackupStore(String prefix) {
- this.prefix = prefix;
- }
-
- public boolean backup(File file) throws IOException {
- loadDelegate();
- return delegate.backup(file);
- }
-
- public boolean backupDirectory(File file) throws IOException {
- loadDelegate();
- return delegate.backupDirectory(file);
- }
-
- public void discard() {
- if (delegate == null)
- return;
- delegate.discard();
- }
-
- public void restore() throws IOException {
- if (delegate == null)
- return;
- delegate.restore();
- }
-
- private void loadDelegate() {
- if (delegate != null)
- return;
- delegate = new BackupStore(null, prefix);
- }
-
- public String getBackupName() {
- loadDelegate();
- return delegate.getBackupName();
- }
-
- public boolean backupCopy(File file) throws IOException {
- loadDelegate();
- return delegate.backupCopy(file);
- }
-
- public void backupCopyAll(File file) throws IOException {
- loadDelegate();
- delegate.backupCopyAll(file);
- }
-
- public void backupAll(File file) throws IOException {
- loadDelegate();
- delegate.backupAll(file);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Messages.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Messages.java
deleted file mode 100644
index 0d73c2a72..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Messages.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.touchpoint.natives.messages"; //$NON-NLS-1$
-
- static {
- // load message values from bundle file and assign to fields below
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String BackupStore_0_of_1_items_restored;
- public static String BackupStore_backupCopy_closed_store;
- public static String BackupStore_can_not_close_tcp_port;
- public static String BackupStore_can_not_copy_directory;
- public static String BackupStore_can_not_create_dummy;
- public static String BackupStore_can_not_delete_after_copy_0;
- public static String BackupStore_can_not_delete_tmp_file;
- public static String BackupStore_can_not_remove;
- public static String BackupStore_can_not_remove_bu_directory;
- public static String BackupStore_directory_file_mismatch;
- public static String BackupStore_directory_not_empty;
- public static String BackupStore_errors_while_restoring_see_log;
- public static String BackupStore_externally_modified_0_of_1_restored;
- public static String BackupStore_file_directory_mismatch;
- public static String BackupStore_file_not_found;
- public static String BackupStore_manual_restore_needed;
- public static String BackupStore_missing_backup_directory;
- public static String BackupStore_not_a_directory;
- public static String BackupStore_restore_closed_store;
-
- public static String action_0_failed_file_1_doesNotExist;
- public static String artifact_not_available;
- public static String artifact_repo_not_found;
- public static String could_not_obtain_download_cache;
- public static String download_cache_not_writeable;
- public static String unzipping;
- public static String param_not_set;
- public static String copy_failed;
- public static String failed_backup_restore;
- public static String backup_file_failed;
- public static String Error_list_children_0;
- public static String link_failed;
- public static String mkdir_failed;
- public static String rmdir_failed;
- public static String Util_Invalid_Zip_File_Format;
- public static String Util_Error_Unzipping;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
deleted file mode 100644
index b47bdd1ca..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/NativeTouchpoint.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import java.util.WeakHashMap;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ActionConstants;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.Touchpoint;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IFileArtifactRepository;
-import org.eclipse.osgi.util.NLS;
-
-public class NativeTouchpoint extends Touchpoint {
-
- public static final String PARM_BACKUP = "backup"; //$NON-NLS-1$
-
- public static final String PARM_ARTIFACT = "artifact"; //$NON-NLS-1$
-
- public static final String PARM_ARTIFACT_LOCATION = "artifact.location"; //$NON-NLS-1$
-
- private static Map<IProfile, IBackupStore> backups = new WeakHashMap<IProfile, IBackupStore>();
-
- public IStatus initializeOperand(IProfile profile, Map<String, Object> parameters) {
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(PARM_ARTIFACT);
- if (!parameters.containsKey(PARM_ARTIFACT_LOCATION) && artifactKey != null) {
- try {
- IFileArtifactRepository downloadCache = Util.getDownloadCacheRepo(agent);
- File fileLocation = downloadCache.getArtifactFile(artifactKey);
- if (fileLocation != null && fileLocation.exists())
- parameters.put(PARM_ARTIFACT_LOCATION, fileLocation.getAbsolutePath());
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- }
- return Status.OK_STATUS;
- }
-
- public IStatus initializePhase(IProgressMonitor monitor, IProfile profile, String phaseId, Map<String, Object> touchpointParameters) {
- touchpointParameters.put(PARM_BACKUP, getBackupStore(profile));
- return null;
- }
-
- public String qualifyAction(String actionId) {
- return Activator.ID + "." + actionId; //$NON-NLS-1$
- }
-
- public IStatus prepare(IProfile profile) {
- // does not have to do anything - everything is already in the correct place
- // the commit means that the backup is discarded - if that fails it is not a
- // terrible problem.
- return super.prepare(profile);
- }
-
- public IStatus commit(IProfile profile) {
- IBackupStore store = getBackupStore(profile);
- store.discard();
- clearProfileState(profile);
- return Status.OK_STATUS;
- }
-
- /**
- * Converts a profile id into a string that can be used as a file name in any file system.
- */
- public static String escape(String toEscape) {
- StringBuffer buffer = new StringBuffer();
- int length = toEscape.length();
- for (int i = 0; i < length; ++i) {
- char ch = toEscape.charAt(i);
- switch (ch) {
- case '\\' :
- case '/' :
- case ':' :
- case '*' :
- case '?' :
- case '"' :
- case '<' :
- case '>' :
- case '|' :
- case '%' :
- buffer.append("%" + (int) ch + ";"); //$NON-NLS-1$ //$NON-NLS-2$
- break;
- default :
- buffer.append(ch);
- }
- }
- return buffer.toString();
- }
-
- public IStatus rollback(IProfile profile) {
- IStatus returnStatus = Status.OK_STATUS;
- IBackupStore store = getBackupStore(profile);
- try {
- store.restore();
- } catch (IOException e) {
- returnStatus = new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.failed_backup_restore, store.getBackupName()), e);
- } catch (ClosedBackupStoreException e) {
- returnStatus = new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.failed_backup_restore, store.getBackupName()), e);
- }
- clearProfileState(profile);
- return returnStatus;
- }
-
- /**
- * Cleans up the transactional state associated with a profile.
- */
- private static synchronized void clearProfileState(IProfile profile) {
- backups.remove(profile);
- }
-
- /**
- * Gets the transactional state associated with a profile. A transactional state is
- * created if it did not exist.
- * @param profile
- * @return a lazily initialized backup store
- */
- private static synchronized IBackupStore getBackupStore(IProfile profile) {
- IBackupStore store = backups.get(profile);
- if (store == null) {
- store = new LazyBackupStore(escape(profile.getProfileId()));
- backups.put(profile, store);
- }
- return store;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java
deleted file mode 100644
index 60c1c0a86..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/Util.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives;
-
-import java.io.*;
-import java.net.URI;
-import java.util.*;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.p2.core.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.*;
-import org.eclipse.osgi.util.NLS;
-
-public class Util {
-
- public static void log(String message) {
- LogHelper.log(createError(message));
- }
-
- public static IStatus createError(String message) {
- return new Status(IStatus.ERROR, Activator.ID, message);
- }
-
- public static String getInstallFolder(IProfile profile) {
- return profile.getProperty(IProfile.PROP_INSTALL_FOLDER);
- }
-
- private static IAgentLocation getAgentLocation(IProvisioningAgent agent) {
- return (IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME);
- }
-
- public static IArtifactRepositoryManager getArtifactRepositoryManager(IProvisioningAgent agent) {
- return (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- public static IFileArtifactRepository getDownloadCacheRepo(IProvisioningAgent agent) throws ProvisionException {
- URI location = getDownloadCacheLocation(agent);
- if (location == null)
- throw new IllegalStateException(Messages.could_not_obtain_download_cache);
- IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
- if (manager == null)
- throw new IllegalStateException(Messages.artifact_repo_not_found);
- IArtifactRepository repository;
- try {
- repository = manager.loadRepository(location, null);
- } catch (ProvisionException e) {
- // the download cache doesn't exist or couldn't be read. Create new cache.
- String repositoryName = location + " - Agent download cache"; //$NON-NLS-1$
- Map<String, String> properties = new HashMap<String, String>(1);
- properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
- repository = manager.createRepository(location, repositoryName, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, properties);
- }
-
- IFileArtifactRepository downloadCache = (IFileArtifactRepository) repository.getAdapter(IFileArtifactRepository.class);
- if (downloadCache == null)
- throw new ProvisionException(NLS.bind(Messages.download_cache_not_writeable, location));
- return downloadCache;
- }
-
- static private URI getDownloadCacheLocation(IProvisioningAgent agent) {
- IAgentLocation location = getAgentLocation(agent);
- if (location == null)
- return null;
- return URIUtil.append(location.getDataArea("org.eclipse.equinox.p2.core"), "cache/"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Unzip from a File to an output directory, with progress indication and backup.
- * monitor and backup store may be null.
- */
- public static File[] unzipFile(File zipFile, File outputDir, IBackupStore store, String taskName, IProgressMonitor monitor) throws IOException {
- InputStream in = new FileInputStream(zipFile);
- try {
- return unzipStream(in, zipFile.length(), outputDir, store, taskName, monitor);
- } catch (IOException e) {
- // add the file name to the message
- throw new IOException(NLS.bind(Messages.Util_Error_Unzipping, zipFile, e.getMessage()));
- } finally {
- in.close();
- }
- }
-
- /**
- * Unzip from an InputStream to an output directory using backup of overwritten files
- * if backup store is not null.
- */
- public static File[] unzipStream(InputStream stream, long size, File outputDir, IBackupStore store, String taskName, IProgressMonitor monitor) throws IOException {
- InputStream is = monitor == null ? stream : stream; // new ProgressMonitorInputStream(stream, size, size, taskName, monitor); TODO Commented code
- ZipInputStream in = new ZipInputStream(new BufferedInputStream(is));
- ZipEntry ze = in.getNextEntry();
- if (ze == null) {
- // There must be at least one entry in a zip file.
- // When there isn't getNextEntry returns null.
- in.close();
- throw new IOException(Messages.Util_Invalid_Zip_File_Format);
- }
- ArrayList<File> unzippedFiles = new ArrayList<File>();
- do {
- File outFile = new File(outputDir, ze.getName());
- unzippedFiles.add(outFile);
- if (ze.isDirectory()) {
- outFile.mkdirs();
- } else {
- if (outFile.exists()) {
- if (store != null)
- store.backup(outFile);
- else
- outFile.delete();
- } else {
- outFile.getParentFile().mkdirs();
- }
- try {
- copyStream(in, false, new FileOutputStream(outFile), true);
- } catch (FileNotFoundException e) {
- // TEMP: ignore this for now in case we're trying to replace
- // a running eclipse.exe
- }
- outFile.setLastModified(ze.getTime());
- }
- in.closeEntry();
- } while ((ze = in.getNextEntry()) != null);
- in.close();
-
- return unzippedFiles.toArray(new File[unzippedFiles.size()]);
- }
-
- /**
- * Copy an input stream to an output stream.
- * Optionally close the streams when done.
- * Return the number of bytes written.
- */
- public static int copyStream(InputStream in, boolean closeIn, OutputStream out, boolean closeOut) throws IOException {
- try {
- int written = 0;
- byte[] buffer = new byte[16 * 1024];
- int len;
- while ((len = in.read(buffer)) != -1) {
- out.write(buffer, 0, len);
- written += len;
- }
- return written;
- } finally {
- try {
- if (closeIn) {
- in.close();
- }
- } finally {
- if (closeOut) {
- out.close();
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
deleted file mode 100644
index a3357eb03..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ActionConstants.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-public class ActionConstants {
-
- public static final String PARM_AGENT = "agent"; //$NON-NLS-1$
- public static final String PARM_PATH = "path"; //$NON-NLS-1$
- public static final String PARM_TARGET_FILE = "targetFile"; //$NON-NLS-1$
- public static final String PARM_PERMISSIONS = "permissions"; //$NON-NLS-1$
- public static final String PARM_TARGET_DIR = "targetDir"; //$NON-NLS-1$
- public static final String PARM_TARGET = "target"; //$NON-NLS-1$
- public static final String PARM_SOURCE = "source"; //$NON-NLS-1$
- public static final String PARM_IU = "iu"; //$NON-NLS-1$
- public static final String PIPE = "|"; //$NON-NLS-1$
- public static final String PARM_AT_ARTIFACT = "@artifact"; //$NON-NLS-1$
- public static final String PARM_ARTIFACT_REQUESTS = "artifactRequests"; //$NON-NLS-1$
- public static final String PARM_PROFILE = "profile"; //$NON-NLS-1$
- public static final String PARM_LINK_NAME = "linkName"; //$NON-NLS-1$
- public static final String PARM_LINK_TARGET = "linkTarget"; //$NON-NLS-1$
- public static final String PARM_LINK_FORCE = "force"; //$NON-NLS-1$
- public static final String PARM_COPY_TARGET = "target"; //$NON-NLS-1$
- public static final String PARM_COPY_SOURCE = "source"; //$NON-NLS-1$
- public static final String PARM_COPY_OVERWRITE = "overwrite"; //$NON-NLS-1$
- public static final String PARM_OPTIONS = "options"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java
deleted file mode 100644
index 5de59d276..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/ChmodAction.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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:
- * Red Hat Incorporated - initial API and implementation
- * IBM Corporation - ongoing development
- * Cloudsmith Inc - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Messages;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class ChmodAction extends ProvisioningAction {
- private static final String ACTION_CHMOD = "chmod"; //$NON-NLS-1$
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public IStatus execute(Map<String, Object> parameters) {
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- if (targetDir == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET_DIR, ACTION_CHMOD));
- String targetFile = (String) parameters.get(ActionConstants.PARM_TARGET_FILE);
- if (targetFile == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET_FILE, ACTION_CHMOD));
- String permissions = (String) parameters.get(ActionConstants.PARM_PERMISSIONS);
- if (permissions == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PERMISSIONS, ACTION_CHMOD));
- String optionsString = (String) parameters.get(ActionConstants.PARM_OPTIONS);
-
- // Check that file exist
- File probe = new File(targetDir + IPath.SEPARATOR + targetFile);
- if (!probe.exists())
- return Util.createError(NLS.bind(Messages.action_0_failed_file_1_doesNotExist, ACTION_CHMOD, probe.toString()));
-
- String options[] = null;
- if (optionsString != null) {
- ArrayList<String> collect = new ArrayList<String>();
- String r = optionsString.trim();
- while (r.length() > 0) {
- int spaceIdx = r.indexOf(' ');
- if (spaceIdx < 0) {
- collect.add(r);
- r = ""; //$NON-NLS-1$
- } else {
- collect.add(r.substring(0, spaceIdx));
- r = r.substring(spaceIdx + 1);
- r = r.trim();
- }
- }
- if (collect.size() > 0) {
- options = new String[collect.size()];
- collect.toArray(options);
- }
- }
-
- chmod(targetDir, targetFile, permissions, options);
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- //TODO: implement undo ??
- return Status.OK_STATUS;
- }
-
- public void chmod(String targetDir, String targetFile, String perms, String[] options) {
- if (WINDOWS)
- return;
- Runtime r = Runtime.getRuntime();
- try {
- // Note: 3 is from chmod, permissions, and target
- String[] args = new String[3 + (options == null ? 0 : options.length)];
- int i = 0;
- args[i++] = "chmod"; //$NON-NLS-1$
- if (options != null) {
- for (int j = 0; j < options.length; j++)
- args[i++] = options[j];
- }
- args[i++] = perms;
- args[i] = targetDir + IPath.SEPARATOR + targetFile;
- Process process = r.exec(args);
- readOffStream(process.getErrorStream());
- readOffStream(process.getInputStream());
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // mark thread interrupted and continue
- Thread.currentThread().interrupt();
- }
- } catch (IOException e) {
- // ignore
- }
- }
-
- private void readOffStream(InputStream inputStream) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
- try {
- while (reader.readLine() != null) {
- // do nothing
- }
- } catch (IOException e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java
deleted file mode 100644
index b394f0adf..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupcopyAction.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class CleanupcopyAction extends ProvisioningAction {
-
- public static final String ACTION_CLEANUPCOPY = "cleanupcopy"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return cleanupcopy(parameters, true);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return CopyAction.copy(parameters, false);
- }
-
- /**
- * Perform a cleanup of a previously made copy action.
- * @param parameters action parameters
- * @param restoreable flag indicating if the operation should be backed up
- * @return status
- */
- public static IStatus cleanupcopy(Map<String, Object> parameters, boolean restoreable) {
- String source = (String) parameters.get(ActionConstants.PARM_SOURCE);
- if (source == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_CLEANUPCOPY));
- String target = (String) parameters.get(ActionConstants.PARM_TARGET);
- if (target == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET, ACTION_CLEANUPCOPY));
- IBackupStore backupStore = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
-
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
-
- String copied = profile.getInstallableUnitProperty(iu, "copied" + ActionConstants.PIPE + source + ActionConstants.PIPE + target); //$NON-NLS-1$
-
- if (copied == null)
- return Status.OK_STATUS;
-
- StringTokenizer tokenizer = new StringTokenizer(copied, ActionConstants.PIPE);
- List<File> directories = new ArrayList<File>();
- while (tokenizer.hasMoreTokens()) {
- String fileName = tokenizer.nextToken();
- File file = new File(fileName);
- if (!file.exists())
- continue;
-
- //directories need to be deleted from the bottom-up, but directories are listed
- //in traversal order during copy, so we need to reverse the directory list
- if (file.isDirectory())
- directories.add(0, file);
- else {
- if (restoreable)
- try {
- backupStore.backup(file);
- } catch (IOException e) {
- return Util.createError(NLS.bind(Messages.backup_file_failed, file));
- }
- else
- file.delete();
- }
- }
-
- for (File directory : directories) {
- File[] children = directory.listFiles();
- if (children == null)
- return Util.createError(NLS.bind(Messages.Error_list_children_0, directory));
-
- if (children.length == 0) {
- if (restoreable)
- try {
- backupStore.backup(directory);
- } catch (IOException e) {
- return Util.createError(NLS.bind(Messages.backup_file_failed, directory));
- }
- else
- directory.delete();
- }
- }
-
- return Status.OK_STATUS;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
deleted file mode 100644
index 98201c991..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CleanupzipAction.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class CleanupzipAction extends ProvisioningAction {
-
- private static final String UNZIPPED = "unzipped"; //$NON-NLS-1$
- public static final String ACTION_CLEANUPZIP = "cleanupzip"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return cleanupzip(parameters, true);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return UnzipAction.unzip(parameters, false);
- }
-
- public static IStatus cleanupzip(Map<String, Object> parameters, boolean restoreable) {
- String source = (String) parameters.get(ActionConstants.PARM_SOURCE);
- if (source == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_CLEANUPZIP));
- String target = (String) parameters.get(ActionConstants.PARM_TARGET);
- if (target == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET, ACTION_CLEANUPZIP));
-
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
-
- String iuPropertyKey = UNZIPPED + ActionConstants.PIPE + source + ActionConstants.PIPE + target;
-
- String unzipped = profile.getInstallableUnitProperty(iu, iuPropertyKey);
- if (unzipped == null) {
- // best effort
- // we try to substitute the current target with what was written.
- Map<String, String> iuProperties = profile.getInstallableUnitProperties(iu);
- String sourcePrefix = UNZIPPED + ActionConstants.PIPE + source + ActionConstants.PIPE;
- for (String key : iuProperties.keySet()) {
- if (key.startsWith(sourcePrefix)) {
- if (unzipped == null) {
- iuPropertyKey = key;
- String storedTarget = key.substring(sourcePrefix.length());
- unzipped = substituteTarget(storedTarget, target, iuProperties.get(key));
- } else
- return Status.OK_STATUS; // possible two unzips of this source - give up on best effort
- }
- }
- // no match
- if (unzipped == null)
- return Status.OK_STATUS;
- }
-
- IBackupStore store = restoreable ? (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP) : null;
- StringTokenizer tokenizer = new StringTokenizer(unzipped, ActionConstants.PIPE);
- List<File> directories = new ArrayList<File>();
- while (tokenizer.hasMoreTokens()) {
- String fileName = tokenizer.nextToken();
- File file = new File(fileName);
- if (!file.exists())
- continue;
-
- if (file.isDirectory())
- directories.add(file);
- else {
- if (store != null)
- try {
- store.backup(file);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.backup_file_failed, file.getPath()), e);
- }
- else
- file.delete();
- }
- }
- // sort directories by path length longest path is in top
- // this will make sure that a sub folder will be removed before its parent
- Collections.sort(directories, new Comparator<File>() {
-
- public int compare(File f1, File f2) {
- if (f1 == f2)
- return 0;
- if (f1 != null && f2 == null)
- return -1;
- if (f1 == null)
- return 1;
- try {
- return new Integer(f2.getCanonicalPath().length()).compareTo(f1.getCanonicalPath().length());
- } catch (IOException e) {
- // did our best. try an absolute path compare
- return new Integer(f2.getAbsolutePath().length()).compareTo(f1.getAbsolutePath().length());
- }
- }
-
- });
- for (File directory : directories) {
- if (store != null) {
- File[] children = directory.listFiles();
- // Since backup will deny backup of non empty directory a check must be made
- if (children == null || children.length == 0)
- try {
- store.backupDirectory(directory);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.backup_file_failed, directory.getPath()), e);
- }
- } else
- directory.delete();
- }
-
- profile.removeInstallableUnitProperty(iu, iuPropertyKey);
- return Status.OK_STATUS;
- }
-
- private static String substituteTarget(String oldTarget, String newTarget, String value) {
- StringBuffer buffer = new StringBuffer();
- StringTokenizer tokenizer = new StringTokenizer(value, ActionConstants.PIPE);
- while (tokenizer.hasMoreTokens()) {
- String fileName = tokenizer.nextToken().trim();
- if (fileName.length() == 0)
- continue;
- if (fileName.startsWith(oldTarget))
- fileName = newTarget + fileName.substring(oldTarget.length());
-
- buffer.append(fileName).append(ActionConstants.PIPE);
- }
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
deleted file mode 100644
index 21c3cf159..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CollectAction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.util.Collection;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
-
-public class CollectAction extends ProvisioningAction {
-
- public static final String ACTION_COLLECT = "collect"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
- IProvisioningAgent agent = (IProvisioningAgent) parameters.get(ActionConstants.PARM_AGENT);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- try {
- IArtifactRequest[] requests = collect(agent, iu, profile);
- @SuppressWarnings("unchecked")
- Collection<IArtifactRequest[]> artifactRequests = (Collection<IArtifactRequest[]>) parameters.get(ActionConstants.PARM_ARTIFACT_REQUESTS);
- artifactRequests.add(requests);
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- // nothing to do for now
- return Status.OK_STATUS;
- }
-
- IArtifactRequest[] collect(IProvisioningAgent agent, IInstallableUnit installableUnit, IProfile profile) throws ProvisionException {
- Collection<IArtifactKey> toDownload = installableUnit.getArtifacts();
- if (toDownload == null)
- return new IArtifactRequest[0];
- IArtifactRepository destination = Util.getDownloadCacheRepo(agent);
- IArtifactRequest[] requests = new IArtifactRequest[toDownload.size()];
- int count = 0;
- for (IArtifactKey key : toDownload) {
- //TODO Here there are cases where the download is not necessary again because what needs to be done is just a configuration step
- requests[count++] = Util.getArtifactRepositoryManager(agent).createMirrorRequest(key, destination, null, null);
- }
-
- if (requests.length == count)
- return requests;
- IArtifactRequest[] result = new IArtifactRequest[count];
- System.arraycopy(requests, 0, result, 0, count);
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
deleted file mode 100644
index d9dab3c98..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/CopyAction.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Copies from PARM_COPY_SOURCE to PARAM_COPY_TARGET
- * The optional parameter PARAM_COPY_OVERWRITE overwrites and existing file if set to true, else
- * and existing file with the same name is an error. The default is false.
- * If the source is a directory, a merge copy to the target is performed.
- * Copy will copy files and directories (recursively).
- *
- */
-public class CopyAction extends ProvisioningAction {
- public static final String ID = "cp"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return copy(parameters, true);
- }
-
- /** Perform the copy.
- *
- * @param parameters action parameters
- * @param restoreable flag indicating if the operation should be backed up
- * @return status
- */
- public static IStatus copy(Map<String, Object> parameters, boolean restoreable) {
- String target = (String) parameters.get(ActionConstants.PARM_COPY_TARGET);
- IBackupStore backupStore = restoreable ? (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP) : null;
-
- if (target == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_COPY_TARGET, ID), null);
-
- String source = (String) parameters.get(ActionConstants.PARM_COPY_SOURCE);
- if (source == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_COPY_SOURCE, ID), null);
-
- String overwrite = (String) parameters.get(ActionConstants.PARM_COPY_OVERWRITE);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
-
- String originalSource = source;
- if (source.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- String artifactLocation = (String) parameters.get(NativeTouchpoint.PARM_ARTIFACT_LOCATION);
- if (artifactLocation == null) {
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(NativeTouchpoint.PARM_ARTIFACT);
- return Util.createError(NLS.bind(Messages.artifact_not_available, artifactKey));
- }
- source = artifactLocation;
- }
-
- File sourceFile = new File(source);
- File targetFile = new File(target);
- File[] copiedFiles = null;
- try {
- copiedFiles = mergeCopy(sourceFile, targetFile, Boolean.valueOf(overwrite).booleanValue(), backupStore);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.copy_failed, sourceFile.getPath()), e);
- }
- // keep copied file in the profile as memento for CleanupCopy
- StringBuffer copiedFileNameBuffer = new StringBuffer();
- for (int i = 0; i < copiedFiles.length; i++)
- copiedFileNameBuffer.append(copiedFiles[i].getAbsolutePath()).append(ActionConstants.PIPE);
-
- profile.setInstallableUnitProperty(iu, "copied" + ActionConstants.PIPE + originalSource + ActionConstants.PIPE + target, copiedFileNameBuffer.toString()); //$NON-NLS-1$
-
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return CleanupcopyAction.cleanupcopy(parameters, false);
- }
-
- /**
- * Merge-copy file or directory.
- * @param source
- * @param target
- * @param overwrite
- * @throws IOException
- */
- private static File[] mergeCopy(File source, File target, boolean overwrite, IBackupStore backupStore) throws IOException {
- ArrayList<File> copiedFiles = new ArrayList<File>();
- xcopy(copiedFiles, source, target, overwrite, backupStore);
- return copiedFiles.toArray(new File[copiedFiles.size()]);
- }
-
- /**
- * Merge-copy file or directory.
- * @param copiedFiles - ArrayList where copied files are collected
- * @param source
- * @param target
- * @param overwrite
- * @throws IOException
- */
- private static void xcopy(ArrayList<File> copiedFiles, File source, File target, boolean overwrite, IBackupStore backupStore) throws IOException {
- if (!source.exists())
- throw new IOException("Source: " + source + "does not exists"); //$NON-NLS-1$//$NON-NLS-2$
-
- if (source.isDirectory()) {
- if (target.exists() && target.isFile()) {
- if (!overwrite)
- throw new IOException("Target: " + target + " already exists"); //$NON-NLS-1$//$NON-NLS-2$
- if (backupStore != null)
- backupStore.backup(target);
- else
- target.delete();
- }
- if (!target.exists())
- target.mkdirs();
- copiedFiles.add(target);
- File[] children = source.listFiles();
- if (children == null)
- throw new IOException("Error while retrieving children of directory: " + source); //$NON-NLS-1$
- for (int i = 0; i < children.length; i++)
- xcopy(copiedFiles, children[i], new File(target, children[i].getName()), overwrite, backupStore);
- return;
- }
- if (target.exists() && !overwrite)
- throw new IOException("Target: " + target + " already exists"); //$NON-NLS-1$//$NON-NLS-2$
-
- if (!target.getParentFile().exists() && !target.getParentFile().mkdirs())
- throw new IOException("Target: Path " + target.getParent() + " could not be created"); //$NON-NLS-1$//$NON-NLS-2$
-
- try {
- Util.copyStream(new FileInputStream(source), true, new FileOutputStream(target), true);
- } catch (IOException e) {
- // get the original IOException to the log
- e.printStackTrace();
- throw new IOException("Error while copying:" + source.getAbsolutePath()); //$NON-NLS-1$
- }
- copiedFiles.add(target);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
deleted file mode 100644
index a27777cec..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/LinkAction.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.*;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class LinkAction extends ProvisioningAction {
- public static final String ID = "ln"; //$NON-NLS-1$
- private static final boolean WINDOWS = java.io.File.separatorChar == '\\';
-
- public IStatus execute(Map<String, Object> parameters) {
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- if (targetDir == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET_DIR, ID), null);
-
- String linkTarget = (String) parameters.get(ActionConstants.PARM_LINK_TARGET);
- if (linkTarget == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_LINK_TARGET, ID), null);
-
- String linkName = (String) parameters.get(ActionConstants.PARM_LINK_NAME);
- if (linkName == null)
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.param_not_set, ActionConstants.PARM_LINK_NAME, ID), null);
-
- String force = (String) parameters.get(ActionConstants.PARM_LINK_FORCE);
-
- IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
-
- try {
- ln(targetDir, linkTarget, linkName, Boolean.valueOf(force).booleanValue(), store);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.link_failed, linkName, ID), e);
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- if (WINDOWS)
- return Status.OK_STATUS;
- String targetDir = (String) parameters.get(ActionConstants.PARM_TARGET_DIR);
- String linkName = (String) parameters.get(ActionConstants.PARM_LINK_NAME);
-
- if (targetDir != null && linkName != null) {
- File linkFile = new File(targetDir, linkName);
- linkFile.delete(); // ok since if something was overwritten - it is restored from backup
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Creates a link to the source file linkTarget - the created link is targetDir/linkName.
- * TODO: Only runs on systems with a "ln -s" command supported.
- * TODO: Does not report errors if the "ln -s" fails
- * @param targetDir the directory where the link is created
- * @param linkTarget the source
- * @param linkName the name of the created link
- * @param force if overwrite of existing file should be performed.
- * @param store an (optional - set to null) backup store to use
- * @throws IOException if backup of existing file fails
- */
- private void ln(String targetDir, String linkTarget, String linkName, boolean force, IBackupStore store) throws IOException {
- if (WINDOWS)
- return;
- // backup a file that would be overwritten using "force == true"
- if (force && store != null) {
- File xFile = new File(targetDir, linkName);
- if (xFile.exists())
- store.backup(xFile);
- }
- Runtime r = Runtime.getRuntime();
- try {
- Process process = r.exec(new String[] {"ln", "-s" + (force ? "f" : ""), linkTarget, targetDir + IPath.SEPARATOR + linkName}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- readOffStream(process.getErrorStream());
- readOffStream(process.getInputStream());
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- // mark thread interrupted and continue
- Thread.currentThread().interrupt();
- }
- } catch (IOException e) {
- // ignore
- }
- }
-
- private void readOffStream(InputStream inputStream) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
- try {
- while (reader.readLine() != null) {
- // do nothing
- }
- } catch (IOException e) {
- // ignore
- } finally {
- try {
- reader.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java
deleted file mode 100644
index bea5668c0..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/MkdirAction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Messages;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.Util;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class MkdirAction extends ProvisioningAction {
- public static final String ID = "mkdir"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
- File dir = new File(path);
- // A created or existing directory is ok
- dir.mkdir();
- if (dir.isDirectory())
- return Status.OK_STATUS;
- // mkdir could have failed because of permissions, or because of an existing file
- return Util.createError(NLS.bind(Messages.mkdir_failed, path, ID));
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
- File dir = new File(path);
- // although not perfect, it at least prevents a faulty mkdir to delete a file on undo
- // worst case is that an empty directory could be deleted
- if (dir.isDirectory())
- dir.delete();
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java
deleted file mode 100644
index c820a9bbd..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RemoveAction.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Cloudsmith Inc. 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:
- * Cloudsmith Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class RemoveAction extends ProvisioningAction {
- public static final String ID = "remove"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
- File file = new File(path);
- // ignore if the file is already removed
- if (!file.exists())
- return Status.OK_STATUS;
- IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
- if (store == null)
- return Util.createError(NLS.bind(Messages.param_not_set, NativeTouchpoint.PARM_BACKUP, ID));
- try {
- store.backupAll(file);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.backup_file_failed, file.getPath()), e);
- }
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- // Does not have to do anything as the backup will restore what was deleted
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java
deleted file mode 100644
index 8473a2ae8..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/RmdirAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.osgi.util.NLS;
-
-public class RmdirAction extends ProvisioningAction {
- public static final String ID = "rmdir"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
-
- IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
-
- File dir = new File(path);
- if (!dir.isDirectory())
- return Util.createError(NLS.bind(Messages.rmdir_failed, path, ID));
- if (store != null)
- try {
- store.backupDirectory(dir);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.rmdir_failed, path, ID), e);
- } catch (IllegalArgumentException e) {
- // Ignore the delete/backup if the directory was not empty as this preserves the
- // the original semantics.
- // See Bug 272312 for more detail.
- // return new Status(IStatus.ERROR, Activator.ID, IStatus.OK, NLS.bind(Messages.rmdir_failed, ActionConstants.PARM_PATH, ID), e);
- //
- }
- else
- dir.delete();
- return Status.OK_STATUS;
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- String path = (String) parameters.get(ActionConstants.PARM_PATH);
- IBackupStore store = (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP);
- if (path == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_PATH, ID));
- // only need to create a dir if backup was not used
- if (store == null)
- new File(path).mkdir();
- return Status.OK_STATUS;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java
deleted file mode 100644
index 108161650..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/actions/UnzipAction.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.touchpoint.natives.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.engine.Profile;
-import org.eclipse.equinox.internal.p2.touchpoint.natives.*;
-import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-
-public class UnzipAction extends ProvisioningAction {
-
- public static final String ACTION_UNZIP = "unzip"; //$NON-NLS-1$
-
- public IStatus execute(Map<String, Object> parameters) {
- return unzip(parameters, true);
- }
-
- public IStatus undo(Map<String, Object> parameters) {
- return CleanupzipAction.cleanupzip(parameters, false);
- }
-
- /**
- * Unzip as directed by parameters.
- * Record what was zipped in the profile.
- * @param parameters
- * @param restoreable - if the unzip should be backed up
- * @return status
- */
- public static IStatus unzip(Map<String, Object> parameters, boolean restoreable) {
- String source = (String) parameters.get(ActionConstants.PARM_SOURCE);
- if (source == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_SOURCE, ACTION_UNZIP));
-
- String originalSource = source;
- String target = (String) parameters.get(ActionConstants.PARM_TARGET);
- if (target == null)
- return Util.createError(NLS.bind(Messages.param_not_set, ActionConstants.PARM_TARGET, ACTION_UNZIP));
-
- IInstallableUnit iu = (IInstallableUnit) parameters.get(ActionConstants.PARM_IU);
- Profile profile = (Profile) parameters.get(ActionConstants.PARM_PROFILE);
-
- if (source.equals(ActionConstants.PARM_AT_ARTIFACT)) {
- String artifactLocation = (String) parameters.get(NativeTouchpoint.PARM_ARTIFACT_LOCATION);
- if (artifactLocation == null) {
- IArtifactKey artifactKey = (IArtifactKey) parameters.get(NativeTouchpoint.PARM_ARTIFACT);
- return Util.createError(NLS.bind(Messages.artifact_not_available, artifactKey));
- }
- source = artifactLocation;
- }
- IBackupStore store = restoreable ? (IBackupStore) parameters.get(NativeTouchpoint.PARM_BACKUP) : null;
- File[] unzippedFiles = unzip(source, target, store);
- StringBuffer unzippedFileNameBuffer = new StringBuffer();
- for (int i = 0; i < unzippedFiles.length; i++)
- unzippedFileNameBuffer.append(unzippedFiles[i].getAbsolutePath()).append(ActionConstants.PIPE);
-
- profile.setInstallableUnitProperty(iu, "unzipped" + ActionConstants.PIPE + originalSource + ActionConstants.PIPE + target, unzippedFileNameBuffer.toString()); //$NON-NLS-1$
-
- return Status.OK_STATUS;
- }
-
- /**
- * Unzips a source zip into the given destination. Any existing contents in the destination
- * are backed up in the provided backup store.
- */
- private static File[] unzip(String source, String destination, IBackupStore store) {
- File zipFile = new File(source);
- if (zipFile == null || !zipFile.exists()) {
- Util.log(UnzipAction.class.getName() + " the files to be unzipped is not here"); //$NON-NLS-1$
- }
- try {
- String taskName = NLS.bind(Messages.unzipping, source);
- return Util.unzipFile(zipFile, new File(destination), store, taskName, new NullProgressMonitor());
- } catch (IOException e) {
- Util.log(UnzipAction.class.getName() + " error unzipping zipfile: " + zipFile.getAbsolutePath() + "destination: " + destination); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return new File[0];
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties
deleted file mode 100644
index 1dbe1a176..000000000
--- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/messages.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-
-BackupStore_backupCopy_closed_store=Can not perform backup on closed backup store.
-BackupStore_0_of_1_items_restored={0} items out of {1} items restored.
-BackupStore_can_not_close_tcp_port=Could not close tcp socket for port: {0}
-BackupStore_can_not_copy_directory=Can not copy a directory: {0}
-BackupStore_can_not_create_dummy=Can not create dummy file: {0}
-BackupStore_can_not_delete_after_copy_0=File that was copied to backup could not be deleted: {0}
-BackupStore_can_not_delete_tmp_file=Can not delete temporary file - it is safe to delete it manually: {0}
-BackupStore_can_not_remove=Can not remove : {0}
-BackupStore_can_not_remove_bu_directory=Could not remove temporary backup directory (it is safe to manually delete it and its contents): {0}
-BackupStore_directory_file_mismatch=File already backed up as a directory: {0}
-BackupStore_directory_not_empty=Directory is not empty: {0}
-BackupStore_errors_while_restoring_see_log=Errors while restoring - see earlier logged errors
-BackupStore_externally_modified_0_of_1_restored=Backup store modified externally\! {0} items out of {1} items restored. Remaining items can not be found.
-BackupStore_file_directory_mismatch=File already backed up as a file - and is now required as a directory: {0}
-BackupStore_file_not_found=File does not exist: {0}.
-BackupStore_manual_restore_needed=Manual restore of backup needed for: {0}
-BackupStore_missing_backup_directory=Missing backup directory - can not restore: {0}
-BackupStore_not_a_directory=File is not a directory: {0}
-BackupStore_restore_closed_store=Can not perform restore on closed backup store
-
-action_0_failed_file_1_doesNotExist=The action {0} failed - file {1} does not exist
-artifact_not_available=The artifact for {0} is not available.
-unzipping=Extracting {0}
-param_not_set=The \"{0}\" parameter was not set in the \"{1}\" action.
-artifact_repo_not_found=The artifact repository manager could not be found.
-could_not_obtain_download_cache=Could not obtain the download cache location.
-download_cache_not_writeable=Agent download cache not writeable: {0}.
-copy_failed=I/O Error while copying {0} - see details.
-failed_backup_restore=Restore of backup failed - see log for details. Backup directory name: {0}.
-backup_file_failed=Backup of file {0} failed.
-Error_list_children_0=Error while retrieving children of directory: {0}
-link_failed=Could not create link {0}.
-mkdir_failed=Could not create directory {0}.
-rmdir_failed=Could not remove directory {0}.
-Util_Invalid_Zip_File_Format=Invalid zip file format
-Util_Error_Unzipping=Error unzipping {0}: {1}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/.classpath b/bundles/org.eclipse.equinox.p2.ui.admin/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.admin/.cvsignore b/bundles/org.eclipse.equinox.p2.ui.admin/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/.project b/bundles/org.eclipse.equinox.p2.ui.admin/.project
deleted file mode 100644
index 7c3e924f0..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ui.admin</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index eba723b85..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Dec 22 23:48:18 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index c94f55995..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:19 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
deleted file mode 100644
index a11cc405d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,41 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.admin;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.ui.admin;x-friends:="org.eclipse.equinox.internal.p2.ui.analysis",
- org.eclipse.equinox.internal.p2.ui.admin.dialogs;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.admin.preferences;x-internal:=true
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.ui,
- org.eclipse.equinox.internal.p2.ui.actions,
- org.eclipse.equinox.internal.p2.ui.dialogs,
- org.eclipse.equinox.internal.p2.ui.model,
- org.eclipse.equinox.internal.p2.ui.query,
- org.eclipse.equinox.internal.p2.ui.viewers,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.director,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.updatechecker,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.ui;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.environment;version="1.0.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.3.0"
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/about.html b/bundles/org.eclipse.equinox.p2.ui.admin/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/build.properties b/bundles/org.eclipse.equinox.p2.ui.admin/build.properties
deleted file mode 100644
index b7d66df9b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-bin.includes = plugin.properties,\
- icons/,\
- .,\
- plugin.xml,\
- about.html,\
- META-INF/
-src.includes = about.html
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/artifact_repo_obj.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/artifact_repo_obj.gif
deleted file mode 100644
index 0470e1588..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/artifact_repo_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gif
deleted file mode 100644
index 8706680c7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/iu_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/metadata_repo_obj.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/metadata_repo_obj.gif
deleted file mode 100644
index b8568f4f8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/metadata_repo_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/profile_obj.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/profile_obj.gif
deleted file mode 100644
index c984fba70..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/profile_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/uninstalled_iu.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/uninstalled_iu.gif
deleted file mode 100644
index f192b8486..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/obj/uninstalled_iu.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/icons/provision.gif b/bundles/org.eclipse.equinox.p2.ui.admin/icons/provision.gif
deleted file mode 100644
index c984fba70..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/icons/provision.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.admin/plugin.properties
deleted file mode 100644
index 7298725a6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/plugin.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-#
-# Provisioning Admin UI plugin resources
-#
-providerName = Eclipse.org - Equinox
-bundleName=p2 Admin UI
-
-perspectiveName=Provisioning
-viewCategoryName=Provisioning
-MetadataRepositories.name=Metadata Repositories
-ArtifactRepositories.name=Artifact Repositories
-Profiles.name=Profiles
-Provisioning.title=Provisioning Admin
-Profile.name=Profile Admin Info
-IU.name=IU Admin Info
-InstalledIU.name=IU Profile Properties
-Repository.name=Repository Admin Info
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.admin/plugin.xml
deleted file mode 100644
index 6aa850827..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/plugin.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%Provisioning.title"
- class="org.eclipse.equinox.internal.p2.ui.admin.preferences.ProvisioningPrefPage"
- id="org.eclipse.p2.ui.preferences.ProvisioningPrefPage">
- </page>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.equinox.internal.p2.ui.admin.preferences.ProvUIPreferenceInitializer">
- </initializer>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <category
- name="%viewCategoryName"
- id="org.eclipse.p2.ui.admin">
- </category>
- <view
- name="%MetadataRepositories.name"
- icon="$nl$/icons/obj/metadata_repo_obj.gif"
- category="org.eclipse.p2.ui.admin"
- class="org.eclipse.equinox.internal.p2.ui.admin.MetadataRepositoriesView"
- id="org.eclipse.p2.ui.admin.MetadataRepositoriesView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%ArtifactRepositories.name"
- icon="$nl$/icons/obj/artifact_repo_obj.gif"
- category="org.eclipse.p2.ui.admin"
- class="org.eclipse.equinox.internal.p2.ui.admin.ArtifactRepositoriesView"
- id="org.eclipse.p2.ui.admin.ArtifactRepositoriesView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="%Profiles.name"
- icon="$nl$/icons/obj/profile_obj.gif"
- category="org.eclipse.p2.ui.admin"
- class="org.eclipse.equinox.internal.p2.ui.admin.ProfilesView"
- id="org.eclipse.p2.ui.admin.ProfilesView">
- </view>
- </extension>
-
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%perspectiveName"
- icon="$nl$/icons/provision.gif"
- class="org.eclipse.equinox.internal.p2.ui.admin.ProvisioningPerspective"
- id="org.eclipse.equinox.p2.ui.admin.ProvisioningPerspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- name="%Profile.name"
- class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.ProfilePropertyPage"
- id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.ProfilePropertyPage">
- <enabledWhen>
- <adapt type="org.eclipse.equinox.p2.engine.IProfile"/>
- </enabledWhen>
- </page>
- <page
- name="%IU.name"
- class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.IUImplementationPropertyPage"
- id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.IUImplementationPropertyPage">
- <enabledWhen>
- <adapt type="org.eclipse.equinox.p2.metadata.IInstallableUnit"/>
- </enabledWhen>
- </page>
- <page
- name="%InstalledIU.name"
- class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.InstalledIUPropertyPage"
- id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.InstalledIUPropertyPage">
- <enabledWhen>
- <instanceof
- value="org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement">
- </instanceof>
- </enabledWhen>
- </page>
- <page
- name="%Repository.name"
- class="org.eclipse.equinox.internal.p2.ui.admin.dialogs.RepositoryImplementationPropertyPage"
- id="org.eclipse.equinox.internal.p2.ui.admin.dialogs.RepositoryImplementationPropertyPage">
- <enabledWhen>
- <adapt type="org.eclipse.equinox.p2.repository.IRepository"/>
- </enabledWhen>
- </page>
-
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml b/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml
deleted file mode 100644
index c329656b1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui.admin</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
deleted file mode 100644
index ecc86f052..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/AddProfileJob.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-
-/**
- * Operation that adds the given profile to the profile registry.
- *
- * @since 3.6
- */
-public class AddProfileJob extends ProvisioningJob {
- private String profileId;
- private Map<String, String> profileProperties;
-
- public AddProfileJob(String label, ProvisioningSession session, String profileId, Map<String, String> profileProperties) {
- super(label, session);
- this.profileId = profileId;
- this.profileProperties = profileProperties;
- }
-
- public IStatus runModal(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- try {
- ProvAdminUIActivator.getDefault().getProfileRegistry().addProfile(profileId, profileProperties);
- } catch (ProvisionException e) {
- status = getErrorStatus(null, e);
- }
- return status;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
deleted file mode 100644
index a2bdc4e7b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoriesView.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.p2.ui.QueryableArtifactRepositoryManager;
-import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddArtifactRepositoryDialog;
-import org.eclipse.equinox.internal.p2.ui.model.ArtifactRepositories;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * This view allows users to interact with artifact repositories
- *
- * @since 3.4
- */
-public class ArtifactRepositoriesView extends RepositoriesView {
-
- private RepositoryTracker tracker;
-
- /**
- *
- */
- public ArtifactRepositoriesView() {
- // constructor
- }
-
- protected Object getInput() {
- return new ArtifactRepositories(getProvisioningUI(), new QueryableArtifactRepositoryManager(getProvisioningUI(), false));
- }
-
- protected String getAddCommandLabel() {
- return ProvAdminUIMessages.ArtifactRepositoriesView_AddRepositoryLabel;
- }
-
- protected String getAddCommandTooltip() {
- return ProvAdminUIMessages.ArtifactRepositoriesView_AddRepositoryTooltip;
- }
-
- protected String getRemoveCommandTooltip() {
- return ProvAdminUIMessages.ArtifactRepositoriesView_RemoveRepositoryTooltip;
- }
-
- protected int openAddRepositoryDialog(Shell shell) {
- return new AddArtifactRepositoryDialog(shell, getProvisioningUI()).open();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
- */
- protected int getListenerEventTypes() {
- return ProvUIProvisioningListener.PROV_EVENT_ARTIFACT_REPOSITORY;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
- */
- protected RepositoryTracker getRepositoryTracker() {
- if (tracker == null)
- tracker = new ArtifactRepositoryTracker(getProvisioningUI());
- return tracker;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
deleted file mode 100644
index 25c8f4bd0..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-public class ArtifactRepositoryTracker extends RepositoryTracker {
-
- ProvisioningUI ui;
-
- public ArtifactRepositoryTracker(ProvisioningUI ui) {
- this.ui = ui;
- }
-
- public URI[] getKnownRepositories(ProvisioningSession session) {
- return getArtifactRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
- }
-
- public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- getArtifactRepositoryManager().addRepository(repoLocation);
- if (nickname != null)
- getArtifactRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
- } finally {
- ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_ARTIFACT, RepositoryEvent.ADDED, true), true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
- */
- public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- for (int i = 0; i < repoLocations.length; i++) {
- getArtifactRepositoryManager().removeRepository(repoLocations[i]);
- }
- } finally {
- ui.signalRepositoryOperationComplete(null, true);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
- ui.signalRepositoryOperationStart();
- SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
- for (int i = 0; i < locations.length; i++) {
- try {
- getArtifactRepositoryManager().refreshRepository(locations[i], mon.newChild(100));
- } catch (ProvisionException e) {
- //ignore problematic repositories when refreshing
- }
- }
- // We have no idea how many repos may have been added/removed as a result of
- // refreshing these, this one, so we do not use a specific repository event to represent it.
- ui.signalRepositoryOperationComplete(null, true);
- }
-
- IArtifactRepositoryManager getArtifactRepositoryManager() {
- return ProvUI.getArtifactRepositoryManager(ui.getSession());
- }
-
- @Override
- protected boolean contains(URI location, ProvisioningSession session) {
- return ProvUI.getArtifactRepositoryManager(session).contains(location);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java
deleted file mode 100644
index f19ec30bb..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallAction.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.Collection;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction;
-import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddProfileDialog;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.internal.p2.ui.viewers.ProvElementContentProvider;
-import org.eclipse.equinox.internal.p2.ui.viewers.ProvElementLabelProvider;
-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.operations.InstallOperation;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.ui.dialogs.ListDialog;
-
-public class InstallAction extends ProfileModificationAction {
-
- String userChosenProfileId;
-
- public InstallAction(ProvisioningUI ui, ISelectionProvider selectionProvider) {
- super(ui, ProvUI.INSTALL_COMMAND_LABEL, selectionProvider, null);
- setToolTipText(ProvUI.INSTALL_COMMAND_TOOLTIP);
- userChosenProfileId = ui.getProfileId();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isEnabledFor(java.lang.Object[])
- */
- protected boolean isEnabledFor(Object[] selectionArray) {
- if (selectionArray.length == 0)
- return false;
- // We allow non-IU's to be selected at this point, but there
- // must be at least one installable unit selected that is
- // selectable
- for (int i = 0; i < selectionArray.length; i++) {
- if (selectionArray[i] instanceof InstalledIUElement && isSelectable((IIUElement) selectionArray[i]))
- return true;
- IInstallableUnit iu = ProvUI.getAdapter(selectionArray[i], IInstallableUnit.class);
- if (iu != null && isSelectable(iu))
- return true;
- }
- return false;
- }
-
- /*
- * Overridden to reject categories and nested IU's (parent is a non-category IU)
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.ProfileModificationAction#isSelectable(org.eclipse.equinox.internal.p2.ui.model.IUElement)
- */
- protected boolean isSelectable(IIUElement element) {
- return super.isSelectable(element) && !(element.getParent(element) instanceof AvailableIUElement);
- }
-
- protected int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius) {
- ProvisioningUI ui = ProvAdminUIActivator.getDefault().getProvisioningUI(userChosenProfileId);
- operation.setProfileId(userChosenProfileId);
- int ret = ui.openInstallWizard(ius, (InstallOperation) operation, null);
- userChosenProfileId = null;
- return ret;
- }
-
- protected ProfileChangeOperation getProfileChangeOperation(Collection<IInstallableUnit> ius) {
- InstallOperation op = new InstallOperation(getSession(), ius);
- op.setProfileId(userChosenProfileId);
- return op;
- }
-
- protected boolean isInvalidProfileId() {
- if (userChosenProfileId == null) {
- userChosenProfileId = getUserChosenProfileId();
- }
- return userChosenProfileId == null;
- }
-
- private String getUserChosenProfileId() {
- IProfileRegistry registry = ProvAdminUIActivator.getDefault().getProfileRegistry();
- if (registry.getProfiles().length == 0) {
- AddProfileDialog dialog = new AddProfileDialog(getShell(), new String[0]);
- if (dialog.open() == Window.OK) {
- return dialog.getAddedProfileId();
- }
- return null;
- }
-
- ListDialog dialog = new ListDialog(getShell());
- dialog.setTitle("Choose a Profile");
- dialog.setLabelProvider(new ProvElementLabelProvider());
- dialog.setInput(new Profiles(getProvisioningUI()));
- dialog.setContentProvider(new ProvElementContentProvider());
- dialog.open();
- Object[] result = dialog.getResult();
- if (result != null && result.length > 0) {
- IProfile profile = ProvUI.getAdapter(result[0], IProfile.class);
- if (profile != null)
- return profile.getProfileId();
- }
- return null;
- }
-
- protected void runCanceled() {
- super.runCanceled();
- userChosenProfileId = null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java
deleted file mode 100644
index b5257c7aa..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/InstallIUDropAdapter.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.dnd.*;
-
-/**
- * Defines drop behavior for selected IUs to mean install the IU on the target
- * profile.
- *
- * @since 3.4
- *
- */
-public class InstallIUDropAdapter extends ViewerDropAdapter {
-
- static boolean DEBUG = false;
-
- /**
- * Constructs a new drop adapter.
- *
- * @param viewer
- * the navigator's viewer
- */
- public InstallIUDropAdapter(StructuredViewer viewer) {
- super(viewer);
- }
-
- /**
- * Returns an error status with the given info.
- */
- IStatus error(String message) {
- return error(message, null);
- }
-
- /**
- * Returns an error status with the given info.
- */
- IStatus error(String message, Throwable exception) {
- return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, message, exception);
- }
-
- /**
- * Returns the target profile id for the drop. If the drop is positioned on an
- * IU, return its parent profile id.
- */
- private String getProfileTarget(Object mouseTarget) {
- IProfile profile = ProvUI.getAdapter(mouseTarget, IProfile.class);
- if (profile != null) {
- return profile.getProfileId();
- }
-
- if (mouseTarget instanceof InstalledIUElement) {
- return ((InstalledIUElement) mouseTarget).getProfileId();
- }
- return null;
- }
-
- /**
- * Returns an status indicating success.
- */
- private IStatus ok() {
- return new Status(IStatus.OK, ProvUIActivator.PLUGIN_ID, 0, null, null);
- }
-
- /**
- * Perform the drop.
- *
- * @see org.eclipse.swt.dnd.DropTargetListener#drop(org.eclipse.swt.dnd.DropTargetEvent)
- */
- public boolean performDrop(final Object data) {
- if (DEBUG) {
- System.out.println("Perform drop on target: " + getCurrentTarget() + " with data: " + data); //$NON-NLS-1$//$NON-NLS-2$
- }
- if (getCurrentTarget() == null || data == null)
- return false;
-
- ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
- if (!(selection instanceof IStructuredSelection) || selection.isEmpty())
- return false;
-
- String profileId = getProfileTarget(getCurrentTarget());
- if (getCurrentOperation() == DND.DROP_COPY && profileId != null) {
- final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- ISelectionProvider selectionProvider = new ISelectionProvider() {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- // Ignore because the selection won't change
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
- */
- public ISelection getSelection() {
- if (DEBUG) {
- System.out.println("Selection was queried by action"); //$NON-NLS-1$
- System.out.println(structuredSelection.toString());
- }
- return structuredSelection;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
- */
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- // ignore because the selection is static
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
- */
- public void setSelection(ISelection sel) {
- throw new UnsupportedOperationException("This ISelectionProvider is static, and cannot be modified."); //$NON-NLS-1$
- }
- };
- InstallAction action = new InstallAction(ProvAdminUIActivator.getDefault().getProvisioningUI(profileId), selectionProvider);
- if (DEBUG)
- System.out.println("Running install action"); //$NON-NLS-1$
- action.run();
- return true;
- }
- return false;
- }
-
- /**
- * Validate whether the drop is valid for the target
- */
- public boolean validateDrop(Object target, int dragOperation, TransferData transferType) {
-
- if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
- IStatus status = validateTarget(target, transferType);
- if (DEBUG) {
- System.out.println("Validate target: " + status); //$NON-NLS-1$
- }
- return status.isOK();
- }
- return false;
- }
-
- /*
- * Overridden to force a copy when the drag is valid.
- *
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ViewerDropAdapter#dragEnter(org.eclipse.swt.dnd.DropTargetEvent)
- */
- public void dragEnter(DropTargetEvent event) {
- event.detail = DND.DROP_COPY;
- super.dragEnter(event);
- }
-
- /**
- * Ensures that the drop target meets certain criteria
- */
- private IStatus validateTarget(Object target, TransferData transferType) {
- if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
- IInstallableUnit[] ius = getSelectedIUs();
-
- if (ius.length == 0) {
- return error(ProvUIMessages.ProvDropAdapter_NoIUsToDrop);
- }
- if (getProfileTarget(target) != null) {
- return ok();
- }
- return error(ProvUIMessages.ProvDropAdapter_InvalidDropTarget);
- }
- return error(ProvUIMessages.ProvDropAdapter_UnsupportedDropOperation);
- }
-
- /**
- * Returns the resource selection from the LocalSelectionTransfer.
- *
- * @return the resource selection from the LocalSelectionTransfer
- */
- private IInstallableUnit[] getSelectedIUs() {
- ISelection selection = LocalSelectionTransfer.getTransfer().getSelection();
- List<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
-
- if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
- return null;
- }
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-
- Iterator<?> iter = structuredSelection.iterator();
- while (iter.hasNext()) {
- IInstallableUnit iu = ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
- if (iu != null) {
- ius.add(iu);
- }
- }
- return ius.toArray(new IInstallableUnit[ius.size()]);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
deleted file mode 100644
index 8fed364f2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoriesView.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddMetadataRepositoryDialog;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositories;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDragAdapter;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.part.PluginTransfer;
-
-/**
- * This view allows users to interact with metadata repositories
- *
- * @since 3.4
- */
-public class MetadataRepositoriesView extends RepositoriesView {
-
- private InstallAction installAction;
- private RepositoryTracker tracker;
- MetadataRepositories input;
-
- /**
- * The constructor.
- */
- public MetadataRepositoriesView() {
- // constructor
- }
-
- protected Object getInput() {
- if (input == null) {
- // view by repo
- IUViewQueryContext context = new IUViewQueryContext(IUViewQueryContext.AVAILABLE_VIEW_BY_REPO);
- Policy policy = ProvAdminUIActivator.getDefault().getPolicy();
- context.setShowLatestVersionsOnly(policy.getShowLatestVersionsOnly());
- context.setShowInstallChildren(policy.getShowDrilldownRequirements());
- context.setShowProvisioningPlanChildren(policy.getShowDrilldownRequirements());
- context.setUseCategories(policy.getGroupByCategory());
-
- input = new MetadataRepositories(context, getProvisioningUI(), new QueryableMetadataRepositoryManager(getProvisioningUI(), false));
- }
- return input;
- }
-
- protected String getAddCommandLabel() {
- return ProvAdminUIMessages.MetadataRepositoriesView_AddRepositoryLabel;
- }
-
- protected String getAddCommandTooltip() {
- return ProvAdminUIMessages.MetadataRepositoriesView_AddRepositoryTooltip;
- }
-
- protected String getRemoveCommandTooltip() {
- return ProvAdminUIMessages.MetadataRepositoriesView_RemoveRepositoryTooltip;
- }
-
- protected int openAddRepositoryDialog(Shell shell) {
- return new AddMetadataRepositoryDialog(shell, getProvisioningUI()).open();
- }
-
- protected void makeActions() {
- super.makeActions();
- installAction = new InstallAction(getProvisioningUI(), viewer);
- }
-
- protected void fillContextMenu(IMenuManager manager) {
- if (installAction.isEnabled()) {
- manager.add(new Separator());
- manager.add(installAction);
- }
- super.fillContextMenu(manager);
- }
-
- protected void configureViewer(final TreeViewer treeViewer) {
- super.configureViewer(treeViewer);
- // Add drag support for IU's
- Transfer[] transfers = new Transfer[] {org.eclipse.jface.util.LocalSelectionTransfer.getTransfer(), PluginTransfer.getInstance(), TextTransfer.getInstance(),};
- treeViewer.addDragSupport(DND.DROP_COPY, transfers, new IUDragAdapter(treeViewer));
- }
-
- protected int getRepoFlags() {
- if (ProvAdminUIActivator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS))
- return IRepositoryManager.REPOSITORIES_NON_SYSTEM;
- return IRepositoryManager.REPOSITORIES_ALL;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getListenerEventTypes()
- */
- protected int getListenerEventTypes() {
- return ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY;
- }
-
- protected List<String> getVisualProperties() {
- List<String> list = super.getVisualProperties();
- list.add(PreferenceConstants.PREF_USE_CATEGORIES);
- list.add(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS);
- return list;
- }
-
- protected void updateCachesForPreferences() {
- // We want to reconstruct the input's query context based on the latest preferences
- input = null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.admin.RepositoriesView#getRepositoryTracker()
- */
- protected RepositoryTracker getRepositoryTracker() {
- if (tracker == null)
- tracker = new MetadataRepositoryTracker(getProvisioningUI());
- return tracker;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
deleted file mode 100644
index 50798e3e9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/MetadataRepositoryTracker.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-public class MetadataRepositoryTracker extends RepositoryTracker {
-
- ProvisioningUI ui;
-
- public MetadataRepositoryTracker(ProvisioningUI ui) {
- this.ui = ui;
- }
-
- public URI[] getKnownRepositories(ProvisioningSession session) {
- return getMetadataRepositoryManager().getKnownRepositories(getArtifactRepositoryFlags());
- }
-
- public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- getMetadataRepositoryManager().addRepository(repoLocation);
- if (nickname != null)
- getMetadataRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
-
- } finally {
- ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true), true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
- */
- public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- for (int i = 0; i < repoLocations.length; i++) {
- getMetadataRepositoryManager().removeRepository(repoLocations[i]);
- }
- } finally {
- ui.signalRepositoryOperationComplete(null, true);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
- ui.signalRepositoryOperationStart();
- SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
- for (int i = 0; i < locations.length; i++) {
- try {
- getMetadataRepositoryManager().refreshRepository(locations[i], mon.newChild(100));
- } catch (ProvisionException e) {
- //ignore problematic repositories when refreshing
- }
- }
- // We have no idea how many repos may have been added/removed as a result of
- // refreshing these, this one, so we do not use a specific repository event to represent it.
- ui.signalRepositoryOperationComplete(null, true);
- }
-
- IMetadataRepositoryManager getMetadataRepositoryManager() {
- return ProvUI.getMetadataRepositoryManager(ui.getSession());
- }
-
- @Override
- protected boolean contains(URI location, ProvisioningSession session) {
- return ProvUI.getMetadataRepositoryManager(session).contains(location);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
deleted file mode 100644
index 831213fe9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfileFactory.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.osgi.service.environment.EnvironmentInfo;
-
-/**
- * Factory class that can create a new profile with the correct
- * default values.
- *
- * @since 3.4
- *
- */
-public class ProfileFactory {
-
- static private String FLAVOR_DEFAULT = "tooling"; //$NON-NLS-1$
- static private String EMPTY = ""; //$NON-NLS-1$
- static private EnvironmentInfo info;
-
- public static IProfile makeProfile(String profileId) {
- Map<String, String> profileProperties = new HashMap<String, String>();
- profileProperties.put(IProfile.PROP_INSTALL_FOLDER, getDefaultLocation());
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, getDefaultEnvironments());
- profileProperties.put(IProfile.PROP_NL, getDefaultNL());
-
- try {
- return ProvAdminUIActivator.getDefault().getProfileRegistry().addProfile(profileId, profileProperties);
- } catch (ProvisionException e) {
- // log
- }
- return null;
- }
-
- public static String getDefaultLocation() {
- return Platform.getUserLocation().getURL().getPath();
- }
-
- public static String getDefaultFlavor() {
- return FLAVOR_DEFAULT;
- }
-
- private static EnvironmentInfo getEnvironmentInfo() {
- if (info == null) {
- info = (EnvironmentInfo) ServiceHelper.getService(ProvUIActivator.getContext(), EnvironmentInfo.class.getName());
- }
- return info;
- }
-
- public static String getDefaultNL() {
- if (getEnvironmentInfo() != null) {
- return info.getNL();
- }
- return EMPTY;
- }
-
- public static String getDefaultEnvironments() {
- if (getEnvironmentInfo() != null) {
- return "osgi.os=" //$NON-NLS-1$
- + info.getOS() + ",osgi.ws=" + info.getWS() //$NON-NLS-1$
- + ",osgi.arch=" + info.getOSArch(); //$NON-NLS-1$
- }
- return EMPTY;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
deleted file mode 100644
index fc2865bc7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProfilesView.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.actions.UninstallAction;
-import org.eclipse.equinox.internal.p2.ui.actions.UpdateAction;
-import org.eclipse.equinox.internal.p2.ui.admin.dialogs.AddProfileDialog;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.internal.p2.ui.viewers.ProvElementContentProvider;
-import org.eclipse.equinox.internal.p2.ui.viewers.StructuredViewerProvisioningListener;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-
-/**
- * This view allows users to interact with installed profiles.
- *
- * @since 3.4
- */
-public class ProfilesView extends ProvView {
- protected Action addProfileAction, removeProfileAction, uninstallAction;
- UpdateAction updateAction;
- private PropertyDialogAction propertiesAction;
- private StructuredViewerProvisioningListener listener;
-
- private class RemoveProfileAction extends Action {
- RemoveProfileAction() {
- setText(ProvAdminUIMessages.ProfilesView_RemoveProfileLabel);
- setToolTipText(ProvAdminUIMessages.ProfilesView_RemoveProfileTooltip);
- setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
- setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
-
- }
-
- public void run() {
- Object[] selections = getSelection().toArray();
- List<String> profilesOnly = new ArrayList<String>();
- for (int i = 0; i < selections.length; i++) {
- if (selections[i] instanceof ProfileElement)
- profilesOnly.add(((ProfileElement) selections[i]).getProfileId());
- }
- RemoveProfilesJob op = new RemoveProfilesJob(ProvAdminUIMessages.Ops_RemoveProfileOperationLabel, getProvisioningUI().getSession(), profilesOnly.toArray(new String[profilesOnly.size()]));
- ProfilesView.this.run(op);
- }
- }
-
- private class AddProfileAction extends Action {
- AddProfileAction() {
- setText(ProvAdminUIMessages.ProfilesView_AddProfileLabel);
- setToolTipText(ProvAdminUIMessages.ProfilesView_AddProfileTooltip);
- setImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.IMG_PROFILE));
- }
-
- public void run() {
- new AddProfileDialog(viewer.getControl().getShell(), getKnownProfileIds()).open();
- }
- }
-
- public ProfilesView() {
- // constructor
- }
-
- protected void addListeners() {
- super.addListeners();
- listener = new StructuredViewerProvisioningListener(getClass().getName(), viewer, ProvUIProvisioningListener.PROV_EVENT_IU | ProvUIProvisioningListener.PROV_EVENT_PROFILE);
- ProvUI.addProvisioningListener(listener);
- }
-
- protected void removeListeners() {
- super.removeListeners();
- ProvUI.removeProvisioningListener(listener);
- }
-
- protected void configureViewer(TreeViewer treeViewer) {
- super.configureViewer(treeViewer);
- InstallIUDropAdapter adapter = new InstallIUDropAdapter(treeViewer);
- adapter.setFeedbackEnabled(false);
- Transfer[] transfers = new Transfer[] {org.eclipse.jface.util.LocalSelectionTransfer.getTransfer()};
- treeViewer.addDropSupport(DND.DROP_COPY, transfers, adapter);
- }
-
- protected void fillLocalPullDown(IMenuManager manager) {
- manager.add(addProfileAction);
- manager.add(removeProfileAction);
- manager.add(propertiesAction);
- manager.add(new Separator());
- manager.add(updateAction);
- manager.add(uninstallAction);
- }
-
- protected void fillContextMenu(IMenuManager manager) {
- manager.add(addProfileAction);
- if (removeProfileAction.isEnabled()) {
- manager.add(removeProfileAction);
- }
- if (propertiesAction.isEnabled()) {
- manager.add(propertiesAction);
- }
- if (updateAction.isEnabled()) {
- manager.add(new Separator());
- manager.add(updateAction);
- manager.add(uninstallAction);
- }
- }
-
- protected void fillLocalToolBar(IToolBarManager manager) {
- manager.add(new Separator());
- manager.add(addProfileAction);
- manager.add(removeProfileAction);
- }
-
- protected void makeActions() {
- super.makeActions();
- addProfileAction = new AddProfileAction();
- removeProfileAction = new RemoveProfileAction();
- uninstallAction = new UninstallAction(getProvisioningUI(), viewer, null);
- propertiesAction = new PropertyDialogAction(this.getSite(), viewer);
- updateAction = new UpdateAction(getProvisioningUI(), viewer, null, true);
- updateAction.setSkipSelectionPage(true);
-
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
- ProfilesView.this.selectionChanged(ss);
- }
- });
-
- // prime the action validation
- selectionChanged((IStructuredSelection) viewer.getSelection());
- }
-
- protected void selectionChanged(IStructuredSelection ss) {
- super.selectionChanged(ss);
- propertiesAction.setEnabled(false);
- removeProfileAction.setEnabled(false);
- if (ss.size() == 1) {
- propertiesAction.setEnabled(true);
- }
- Object[] selectionArray = ss.toArray();
- if (selectionArray.length > 0) {
- removeProfileAction.setEnabled(true);
- for (int i = 0; i < selectionArray.length; i++) {
- IProfile profile = ProvUI.getAdapter(selectionArray[i], IProfile.class);
- if (profile == null) {
- removeProfileAction.setEnabled(false);
- break;
- }
- }
- }
- }
-
- protected IAction getDoubleClickAction() {
- return propertiesAction;
- }
-
- protected IContentProvider getContentProvider() {
- return new ProvElementContentProvider();
- }
-
- protected Object getInput() {
- return new Profiles(getProvisioningUI());
- }
-
- protected String getProfileId() {
- Object firstElement = getSelection().getFirstElement();
- if (firstElement instanceof InstalledIUElement) {
- return ((InstalledIUElement) firstElement).getProfileId();
- }
- IProfile profile = ProvUI.getAdapter(firstElement, IProfile.class);
- if (profile != null)
- return profile.getProfileId();
- return null;
- }
-
- protected List<String> getVisualProperties() {
- List<String> list = super.getVisualProperties();
- list.add(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY);
- return list;
- }
-
- String[] getKnownProfileIds() {
- IProfile[] allProfiles = ProvAdminUIActivator.getDefault().getProfileRegistry().getProfiles();
- String[] ids = new String[allProfiles.length];
- for (int i = 0; i < allProfiles.length; i++)
- ids[i] = allProfiles[i].getProfileId();
- return ids;
- }
-
- protected ProvisioningUI getProvisioningUI() {
- ProvisioningUI ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
- if (ui != null)
- return ui;
- return super.getProvisioningUI();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
deleted file mode 100644
index bc60857b2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIActivator.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * Activator class for the admin UI.
- */
-public class ProvAdminUIActivator extends AbstractUIPlugin {
-
- private static ProvAdminUIActivator plugin;
- private static BundleContext context;
-
- public static final String PLUGIN_ID = "org.eclipse.equinox.internal.provisional.p2.ui.admin"; //$NON-NLS-1$
- public static final String PERSPECTIVE_ID = "org.eclipse.equinox.internal.provisional.p2.ui.admin.ProvisioningPerspective"; //$NON-NLS-1$
-
- private IPropertyChangeListener preferenceListener;
-
- Policy policy;
-
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the singleton plugin instance
- *
- * @return the instance
- */
- public static ProvAdminUIActivator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in
- * relative path
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public ProvAdminUIActivator() {
- // constructor
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- super.start(bundleContext);
- plugin = this;
- ProvAdminUIActivator.context = bundleContext;
- initializePolicy();
- getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- plugin = null;
- getPreferenceStore().removePropertyChangeListener(preferenceListener);
- super.stop(bundleContext);
- policy = null;
- }
-
- private IPropertyChangeListener getPreferenceListener() {
- if (preferenceListener == null) {
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- updateForPreferences();
- }
- };
- }
- return preferenceListener;
- }
-
- void updateForPreferences() {
-
- if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_GROUPS_ONLY))
- policy.setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
- else
- policy.setVisibleAvailableIUQuery(QueryUtil.createIUAnyQuery());
- if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY))
- policy.setVisibleInstalledIUQuery(new UserVisibleRootQuery());
- else
- policy.setVisibleInstalledIUQuery(QueryUtil.createIUAnyQuery());
-
- RepositoryTracker tracker = getRepositoryTracker();
- if (getPreferenceStore().getBoolean(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS)) {
- tracker.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- tracker.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- } else {
- tracker.setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
- tracker.setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_ALL);
- }
- // store in ui prefs
- policy.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS));
- policy.setGroupByCategory(getPreferenceStore().getBoolean(PreferenceConstants.PREF_USE_CATEGORIES));
- }
-
- private RepositoryTracker getRepositoryTracker() {
- return (RepositoryTracker) ServiceHelper.getService(ProvUIActivator.getContext(), RepositoryTracker.class.getName());
- }
-
- void initializePolicy() {
- policy = new Policy();
- // Manipulate the default query context according to our preferences
- updateForPreferences();
- }
-
- public Policy getPolicy() {
- return policy;
- }
-
- public IProfileRegistry getProfileRegistry() {
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(context, IProvisioningAgent.SERVICE_NAME);
- return (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- }
-
- public ProvisioningUI getProvisioningUI(String profileId) {
- return new ProvisioningUI(ProvisioningUI.getDefaultUI().getSession(), profileId, policy);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java
deleted file mode 100644
index 37b28ca7e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvAdminUIMessages.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message class for provisioning UI messages.
- *
- * @since 3.4
- */
-public class ProvAdminUIMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.admin.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ProvAdminUIMessages.class);
- }
- public static String AddProfileDialog_Title;
- public static String MetadataRepositoriesView_AddRepositoryTooltip;
- public static String MetadataRepositoriesView_AddRepositoryLabel;
- public static String MetadataRepositoriesView_RemoveRepositoryTooltip;
- public static String ArtifactRepositoriesView_AddRepositoryTooltip;
- public static String ArtifactRepositoriesView_AddRepositoryLabel;
- public static String ArtifactRepositoriesView_RemoveRepositoryTooltip;
- public static String ProfilesView_AddProfileTooltip;
- public static String ProfilesView_AddProfileLabel;
- public static String ProfilesView_RemoveProfileLabel;
- public static String ProfilesView_RemoveProfileTooltip;
- public static String RepositoriesView_RemoveCommandLabel;
- // Preferences
- public static String ProvisioningPrefPage_HideSystemRepos;
- public static String ProvisioningPrefPage_ShowGroupsOnly;
- public static String ProvisioningPrefPage_ShowInstallRootsOnly;
- public static String ProvisioningPrefPage_CollapseIUVersions;
- public static String ProvisioningPrefPage_UseCategories;
-
- public static String Ops_RemoveProfileOperationLabel;
- public static String AddProfileDialog_OperationLabel;
- public static String AddProfileDialog_DuplicateProfileID;
- public static String ProvView_RefreshCommandTooltip;
-
- public static String ProfileRootPropertyName;
-
- public static String RepositoryImplementationPropertyPage_DescriptionLabel;
- public static String RepositoryImplementationPropertyPage_LocationLabel;
- public static String RepositoryImplementationPropertyPage_NameColumnLabel;
- public static String RepositoryImplementationPropertyPage_NameLabel;
- public static String RepositoryImplementationPropertyPage_NicknameLabel;
- public static String RepositoryImplementationPropertyPage_NoRepositorySelected;
- public static String RepositoryImplementationPropertyPage_PropertiesLabel;
- public static String RepositoryImplementationPropertyPage_ValueColumnLabel;
-
- public static String IUGroup_ID;
- public static String IUGroup_IU_ID_Required;
- public static String IUGroup_Namespace;
- public static String IUGroup_ProvidedCapabilities;
- public static String IUGroup_RequiredCapabilities;
- public static String IUGroup_TouchpointData;
- public static String IUGroup_TouchpointType;
- public static String IUGroup_Version;
-
- public static String IUPropertiesGroup_DescriptionPropertyLabel;
- public static String IUPropertiesGroup_NamePropertyLabel;
- public static String IUPropertiesGroup_ProviderPropertyLabel;
- public static String InstalledIUPropertyPage_NoInfoAvailable;
-
- public static String No_Property_Item_Selected;
-
- public static String ProfileGroup_Browse;
- public static String ProfileGroup_Browse2;
- public static String ProfileGroup_Environments;
- public static String ProfileGroup_ID;
- public static String ProfileGroup_Cache;
- public static String ProfileGroup_InstallFolder;
- public static String ProfileGroup_Name;
- public static String ProfileGroup_NL;
- public static String ProfileGroup_SelectProfileMessage;
- public static String ProfileGroup_Description;
- public static String ProfileGroup_ProfileIDRequired;
- public static String ProfileGroup_ProfileInstallFolderRequired;
- public static String ProfileGroup_SelectBundlePoolCache;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
deleted file mode 100644
index ebd8a393e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvView.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.QueryProvider;
-import org.eclipse.equinox.internal.p2.ui.actions.RefreshAction;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.viewers.*;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-
-/**
- * This class supports the common characteristics for views that manipulate
- * provisioning models.
- *
- * @since 3.4
- */
-abstract class ProvView extends ViewPart {
- protected TreeViewer viewer;
- RefreshAction refreshAction;
- private IPropertyChangeListener preferenceListener;
- protected Display display;
- private ProvisioningUI ui;
-
- /**
- * The constructor.
- */
- public ProvView() {
- // constructor
- }
-
- /**
- * Create and initialize the viewer
- */
- public void createPartControl(Composite parent) {
- // Store the display so we can make async calls from listeners
- display = parent.getDisplay();
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
- viewer.getTree().setHeaderVisible(true);
- configureViewer(viewer);
- // Do this after setting up sorters, filters, etc.
- // Otherwise it will retrieve content on each change.
- viewer.setContentProvider(getContentProvider());
-
- // Now set up the visuals, columns before labels.
- setTreeColumns(viewer.getTree());
- viewer.setLabelProvider(getLabelProvider());
-
- // Input is last
- viewer.setInput(getInput());
-
- addListeners();
- makeActions();
- hookContextMenu();
- hookDoubleClickAction();
- contributeToActionBars();
- }
-
- private void hookContextMenu() {
- MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
- menuMgr.setRemoveAllWhenShown(true);
- menuMgr.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- ProvView.this.fillContextMenu(manager);
- manager.add(new Separator());
- manager.add(refreshAction);
- manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
- });
- Menu menu = menuMgr.createContextMenu(viewer.getControl());
- viewer.getControl().setMenu(menu);
- getSite().registerContextMenu(menuMgr, viewer);
- }
-
- private void hookDoubleClickAction() {
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- IAction action = getDoubleClickAction();
- if (action != null && action.isEnabled()) {
- action.run();
- }
- }
- });
- }
-
- private void contributeToActionBars() {
- IActionBars bars = getViewSite().getActionBars();
- IMenuManager manager = bars.getMenuManager();
- fillLocalPullDown(manager);
- manager.add(new Separator());
- manager.add(refreshAction);
-
- fillLocalToolBar(bars.getToolBarManager());
- }
-
- protected abstract void fillLocalPullDown(IMenuManager manager);
-
- protected abstract void fillContextMenu(IMenuManager manager);
-
- protected abstract void fillLocalToolBar(IToolBarManager manager);
-
- protected abstract IAction getDoubleClickAction();
-
- protected void makeActions() {
- refreshAction = new RefreshAction(ProvisioningUI.getDefaultUI(), viewer, viewer.getControl()) {
- protected void refresh() {
- refreshAll(true);
- }
- };
- refreshAction.setToolTipText(ProvAdminUIMessages.ProvView_RefreshCommandTooltip);
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- */
- public void dispose() {
- removeListeners();
- super.dispose();
- }
-
- protected void addListeners() {
- IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (getVisualProperties().contains(event.getProperty())) {
- updateCachesForPreferences();
- ProvView.this.refreshAll(false);
- }
- }
-
- };
- store.addPropertyChangeListener(preferenceListener);
- }
-
- protected void updateCachesForPreferences() {
- // default is to do nothing
- }
-
- protected void removeListeners() {
- if (preferenceListener != null) {
- IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
- store.removePropertyChangeListener(preferenceListener);
- }
- }
-
- Shell getShell() {
- return viewer.getControl().getShell();
- }
-
- Control getViewerControl() {
- return viewer.getControl();
- }
-
- protected IStructuredSelection getSelection() {
- return (IStructuredSelection) viewer.getSelection();
- }
-
- protected void run(ProvisioningJob job) {
- IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getService(IWorkbenchSiteProgressService.class);
- if (service != null)
- service.schedule(job);
- else
- job.runModal(new NullProgressMonitor());
- }
-
- protected void configureViewer(final TreeViewer treeViewer) {
- viewer.setComparator(new IUComparator(IUComparator.IU_ID));
- viewer.setComparer(new ProvElementComparer());
- }
-
- protected void selectionChanged(IStructuredSelection selection) {
- // subclasses may override. Do nothing here.
- }
-
- protected abstract IContentProvider getContentProvider();
-
- protected Object getInput() {
- return null;
- }
-
- protected void setTreeColumns(Tree tree) {
- // For now we set two columns and the content depends on the elements
- TreeColumn tc = new TreeColumn(tree, SWT.LEFT, 0);
- tc.setResizable(true);
- tc.setWidth(400);
- tc = new TreeColumn(tree, SWT.LEFT, 1);
- tc.setWidth(600);
- tc.setResizable(true);
- }
-
- protected ILabelProvider getLabelProvider() {
- return new ProvElementLabelProvider();
- }
-
- protected void refreshUnderlyingModel() {
- // do nothing by default
- }
-
- protected List<String> getVisualProperties() {
- ArrayList<String> list = new ArrayList<String>(1);
- list.add(PreferenceConstants.PREF_SHOW_GROUPS_ONLY);
- return list;
- }
-
- final void refreshAll(boolean refreshModel) {
- // Refresh the underlying elements
- if (refreshModel)
- refreshUnderlyingModel();
- // We then reset the input to ensure that anything the content providers
- // are caching gets reset also. The net effect is that everything
- // will get queried again.
- viewer.setInput(getInput());
- }
-
- protected String getProfileId() {
- return null;
- }
-
- protected ProvisioningUI getProvisioningUI() {
- if (ui == null) {
- ui = ProvAdminUIActivator.getDefault().getProvisioningUI(getProfileId());
- ProvUI.setQueryProvider(new QueryProvider(ui));
- }
- return ui;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
deleted file mode 100644
index 4a5e01d56..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ProvisioningPerspective.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.ui.*;
-
-/**
- * Perspective which makes the standard provisioning views available.
- *
- * @since 3.4
- *
- */
-public class ProvisioningPerspective implements IPerspectiveFactory {
-
- private IPageLayout factory;
-
- public ProvisioningPerspective() {
- super();
- }
-
- public void createInitialLayout(IPageLayout layout) {
- this.factory = layout;
- addViews();
- addActionSets();
- addNewWizardShortcuts();
- addPerspectiveShortcuts();
- addViewShortcuts();
- }
-
- private void addViews() {
- // Creates the overall folder layout.
- // Note that each new Folder uses a percentage of the remaining
- // EditorArea.
-
- IFolderLayout bottom = factory.createFolder("bottomRight", //$NON-NLS-1$
- IPageLayout.BOTTOM, 0.75f, factory.getEditorArea());
- bottom.addView("org.eclipse.p2.ui.admin.ProfilesView"); //$NON-NLS-1$
-
- IFolderLayout topLeft = factory.createFolder("topLeft", //$NON-NLS-1$
- IPageLayout.LEFT, 0.4f, factory.getEditorArea());
- topLeft.addView("org.eclipse.p2.ui.admin.MetadataRepositoriesView"); //$NON-NLS-1$
- topLeft.addView("org.eclipse.p2.ui.admin.ArtifactRepositoriesView"); //$NON-NLS-1$
- }
-
- private void addActionSets() {
- factory.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); // NON-NLS-1
- }
-
- private void addPerspectiveShortcuts() {
- factory.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); //$NON-NLS-1$
- }
-
- private void addNewWizardShortcuts() {
- // factory.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//NON-NLS-1
- }
-
- private void addViewShortcuts() {
- factory.addShowViewShortcut("org.eclipse.p2.ui.admin.MetadataRepositoriesView"); //$NON-NLS-1$
- factory.addShowViewShortcut("org.eclipse.p2.ui.admin.ArtifactRepositoriesView"); //$NON-NLS-1$
- factory.addShowViewShortcut("org.eclipse.p2.ui.admin.ProfilesView"); //$NON-NLS-1$
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
deleted file mode 100644
index b43a74ce8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RemoveProfilesJob.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-
-/**
- * Job that removes one or more profiles.
- *
- * @since 3.6
- */
-public class RemoveProfilesJob extends ProvisioningJob {
- String[] profileIds;
-
- public RemoveProfilesJob(String label, ProvisioningSession session, String[] profileIds) {
- super(label, session);
- this.profileIds = profileIds;
- }
-
- public IStatus runModal(IProgressMonitor monitor) {
- for (int i = 0; i < profileIds.length; i++) {
- ProvAdminUIActivator.getDefault().getProfileRegistry().removeProfile(profileIds[i]);
- }
- return Status.OK_STATUS;
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
deleted file mode 100644
index 08af6d02e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/RepositoriesView.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.p2.ui.admin.preferences.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.internal.p2.ui.viewers.RepositoryContentProvider;
-import org.eclipse.equinox.internal.p2.ui.viewers.StructuredViewerProvisioningListener;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
-import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * This class supports the common characteristics for views that manipulate
- * provisioning repositories.
- *
- * @since 3.4
- */
-abstract class RepositoriesView extends ProvView {
-
- private class RemoveRepositoryAction extends Action {
- RemoveRepositoryAction() {
- setText(getRemoveCommandLabel());
- setToolTipText(getRemoveCommandTooltip());
- setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
- setDisabledImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
-
- }
-
- public void run() {
- RepositoryTracker tracker = RepositoriesView.this.getRepositoryTracker();
- Object[] elements = getSelection().toArray();
- ArrayList<URI> uris = new ArrayList<URI>(elements.length);
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof IRepositoryElement<?>)
- uris.add(((IRepositoryElement<?>) elements[i]).getLocation());
- }
- tracker.removeRepositories(uris.toArray(new URI[uris.size()]), RepositoriesView.this.getProvisioningUI().getSession());
- }
- }
-
- private class AddRepositoryAction extends Action {
- AddRepositoryAction() {
- setText(getAddCommandLabel());
- setToolTipText(getAddCommandTooltip());
- setImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.IMG_ARTIFACT_REPOSITORY));
-
- }
-
- public void run() {
- Object[] elements = ((ITreeContentProvider) viewer.getContentProvider()).getElements(getInput());
- ArrayList<URI> urls = new ArrayList<URI>();
- for (int i = 0; i < elements.length; i++)
- if (elements[i] instanceof IRepositoryElement<?>)
- urls.add(((IRepositoryElement<?>) elements[i]).getLocation());
- openAddRepositoryDialog(getShell());
- }
- }
-
- private Action addRepositoryAction, removeRepositoryAction;
- private PropertyDialogAction propertiesAction;
-
- private StructuredViewerProvisioningListener listener;
-
- /**
- * The constructor.
- */
- public RepositoriesView() {
- // nothing to do
- }
-
- protected void addListeners() {
- super.addListeners();
- listener = new StructuredViewerProvisioningListener(getClass().getName(), viewer, getListenerEventTypes()) {
- protected void refreshViewer() {
- RepositoriesView.this.refreshAll(false);
- }
- };
- ProvUI.addProvisioningListener(listener);
- }
-
- protected void removeListeners() {
- super.removeListeners();
- ProvUI.removeProvisioningListener(listener);
- }
-
- protected void fillLocalPullDown(IMenuManager manager) {
- manager.add(addRepositoryAction);
- manager.add(removeRepositoryAction);
- manager.add(propertiesAction);
- }
-
- protected void fillContextMenu(IMenuManager manager) {
- manager.add(addRepositoryAction);
- if (removeRepositoryAction.isEnabled()) {
- manager.add(removeRepositoryAction);
- }
- if (propertiesAction.isEnabled()) {
- manager.add(new Separator());
- manager.add(propertiesAction);
- }
- }
-
- protected void fillLocalToolBar(IToolBarManager manager) {
- manager.add(addRepositoryAction);
- manager.add(removeRepositoryAction);
- }
-
- protected void makeActions() {
- super.makeActions();
- addRepositoryAction = new AddRepositoryAction();
- removeRepositoryAction = new RemoveRepositoryAction();
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.DELETE.getId(), removeRepositoryAction);
-
- propertiesAction = new PropertyDialogAction(this.getSite(), viewer);
- getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
- IStructuredSelection selection = getSelection();
- if (selection.size() == 1 && isRepository(selection.getFirstElement())) {
- propertiesAction.setEnabled(true);
- removeRepositoryAction.setEnabled(true);
- } else {
- propertiesAction.setEnabled(false);
- removeRepositoryAction.setEnabled(false);
- }
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
- RepositoriesView.this.selectionChanged(ss);
- }
- });
- }
-
- protected IAction getDoubleClickAction() {
- return propertiesAction;
- }
-
- protected void selectionChanged(IStructuredSelection selection) {
- propertiesAction.setEnabled(selection.size() == 1 && ((ProvUI.getAdapter(selection.getFirstElement(), IInstallableUnit.class) != null) || (isRepository(selection.getFirstElement()))));
- boolean enabled = false;
- Object[] selectionArray = selection.toArray();
- for (int i = 0; i < selectionArray.length; i++) {
- if (!isRepository(selectionArray[i])) {
- enabled = false;
- break;
- }
- enabled = true;
- }
- removeRepositoryAction.setEnabled(enabled);
- }
-
- protected IContentProvider getContentProvider() {
- return new RepositoryContentProvider();
-
- }
-
- protected abstract RepositoryTracker getRepositoryTracker();
-
- protected abstract int openAddRepositoryDialog(Shell shell);
-
- protected abstract String getAddCommandLabel();
-
- protected abstract String getAddCommandTooltip();
-
- protected String getRemoveCommandLabel() {
- return ProvAdminUIMessages.RepositoriesView_RemoveCommandLabel;
- }
-
- protected abstract String getRemoveCommandTooltip();
-
- protected boolean isRepository(Object element) {
- return element instanceof IRepositoryElement<?>;
- }
-
- protected abstract int getListenerEventTypes();
-
- protected List<String> getVisualProperties() {
- List<String> list = super.getVisualProperties();
- list.add(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS);
- return list;
- }
-
- protected void refreshUnderlyingModel() {
- IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) getSite().getAdapter(IWorkbenchSiteProgressService.class);
- if (service != null) {
- try {
- service.run(true, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), monitor);
- }
- });
- } catch (InvocationTargetException e) {
- ProvUI.handleException(e, null, StatusManager.SHOW);
- } catch (InterruptedException e) {
- // ignore
- }
- } else
- getRepositoryTracker().refreshRepositories(getRepositoryTracker().getKnownRepositories(getProvisioningUI().getSession()), getProvisioningUI().getSession(), new NullProgressMonitor());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
deleted file mode 100644
index e94be5aac..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddArtifactRepositoryDialog.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.ArtifactRepositoryTracker;
-import org.eclipse.equinox.internal.p2.ui.dialogs.AddRepositoryDialog;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog that allows an artifact repository to be defined and added.
- *
- * @since 3.4
- *
- */
-public class AddArtifactRepositoryDialog extends AddRepositoryDialog {
-
- RepositoryTracker tracker;
-
- public AddArtifactRepositoryDialog(Shell parentShell, ProvisioningUI ui) {
- super(parentShell, ui);
- }
-
- protected RepositoryTracker getRepositoryTracker() {
- if (tracker == null) {
- tracker = new ArtifactRepositoryTracker(getProvisioningUI());
- }
- return tracker;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
deleted file mode 100644
index 8281f22bf..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddMetadataRepositoryDialog.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.MetadataRepositoryTracker;
-import org.eclipse.equinox.internal.p2.ui.dialogs.AddRepositoryDialog;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Dialog that allows a metadata repository to be defined and added.
- *
- * @since 3.4
- *
- */
-public class AddMetadataRepositoryDialog extends AddRepositoryDialog {
-
- RepositoryTracker tracker;
-
- public AddMetadataRepositoryDialog(Shell parentShell, ProvisioningUI ui) {
- super(parentShell, ui);
- }
-
- protected RepositoryTracker getRepositoryTracker() {
- if (tracker == null) {
- tracker = new MetadataRepositoryTracker(getProvisioningUI());
- }
- return tracker;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
deleted file mode 100644
index 7d5d88ce2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/AddProfileDialog.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import java.util.Map;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.admin.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Dialog that allows a profile to be defined and added.
- *
- * @since 3.4
- *
- */
-public class AddProfileDialog extends StatusDialog {
-
- private ProfileGroup profileGroup;
- private Button okButton;
- private String[] knownProfileIds;
- private String addedProfileId;
-
- public AddProfileDialog(Shell parentShell, String[] knownProfiles) {
-
- super(parentShell);
- this.knownProfileIds = knownProfiles;
- setTitle(ProvAdminUIMessages.AddProfileDialog_Title);
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- protected Control createDialogArea(Composite parent) {
- profileGroup = new ProfileGroup(parent, null, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- verifyComplete();
- }
- });
- Dialog.applyDialogFont(profileGroup.getComposite());
- return profileGroup.getComposite();
- }
-
- protected void okPressed() {
- verifyComplete();
- if (okButton.isEnabled()) {
- addProfile();
- super.okPressed();
- }
- }
-
- /*
- * We only get here if already validated (ok was pressed)
- */
- private void addProfile() {
- IProfile profile = profileGroup.getProfile();
- if (profile != null) {
- return;
- }
- addedProfileId = profileGroup.getProfileId();
- Map<String, String> profileProperties = profileGroup.getProfileProperties();
- AddProfileJob job = new AddProfileJob(ProvAdminUIMessages.AddProfileDialog_OperationLabel, ProvisioningUI.getDefaultUI().getSession(), addedProfileId, profileProperties);
- job.runModal(new NullProgressMonitor());
- }
-
- void verifyComplete() {
- if (okButton == null) {
- return;
- }
- IStatus status = profileGroup.verify();
- if (!status.isOK()) {
- this.updateStatus(status);
- setOkEnablement(false);
- return;
- }
- if (isDuplicate()) {
- return;
- }
- okButton.setEnabled(true);
- this.updateStatus(new Status(IStatus.OK, ProvAdminUIActivator.PLUGIN_ID, IStatus.OK, "", null)); //$NON-NLS-1$
-
- }
-
- private boolean isDuplicate() {
- if (knownProfileIds == null) {
- return false;
- }
-
- for (int i = 0; i < knownProfileIds.length; i++) {
- if (knownProfileIds[i].equals(profileGroup.getProfileId())) {
- setOkEnablement(false);
- this.updateStatus(new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, IStatus.OK, ProvAdminUIMessages.AddProfileDialog_DuplicateProfileID, null));
- return true;
- }
- }
- return false;
- }
-
- protected void updateButtonsEnableState(IStatus status) {
- setOkEnablement(!status.matches(IStatus.ERROR));
- }
-
- protected void setOkEnablement(boolean enable) {
- if (okButton != null && !okButton.isDisposed())
- okButton.setEnabled(enable);
- }
-
- /**
- * Return the profile id that was added with this dialog, or null
- * if no profile has been added. This method will not return
- * a valid profile until the user has pressed OK and the profile
- * has been added to the profile registry.
- * @return the added profile's id
- */
- public String getAddedProfileId() {
- return addedProfileId;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java
deleted file mode 100644
index e3729873a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUGroup.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * An IUGroup is a reusable UI component that displays properties of an IU. It can be used in
- * different dialogs that manipulate or define IU's.
- *
- * @since 3.4
- */
-public abstract class IUGroup {
-
- protected Object iuElement;
- private Composite composite;
-
- protected IUGroup(final Composite parent, Object iu, ModifyListener listener) {
- this.iuElement = iu;
- composite = createGroupComposite(parent, listener);
- }
-
- protected abstract Composite createGroupComposite(Composite parent, ModifyListener modifyListener);
-
- public Composite getComposite() {
- return composite;
- }
-
- public IInstallableUnit getIU() {
- return ProvUI.getAdapter(iuElement, IInstallableUnit.class);
- }
-
- public void updateIU() {
- // default is to do nothing
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
deleted file mode 100644
index 7f971df27..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationGroup.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.p2.metadata.MetadataFactory;
-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
-
-import java.util.Collection;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * An IUImplementationGroup is a reusable UI component that displays and edits the
- * implementation-oriented properties of an IU. It can be used in
- * different dialogs that manipulate or define IU's.
- *
- * @since 3.4
- */
-public class IUImplementationGroup extends IUGroup {
-
- private Text id;
- private Text version;
- private Text namespace;
- private Text touchpointType;
- private List touchpointData;
- private List requiredCapabilities;
- private List providedCapabilities;
-
- public IUImplementationGroup(final Composite parent, IInstallableUnit iu, ModifyListener listener) {
- super(parent, iu, listener);
- }
-
- protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 350;
- composite.setLayoutData(data);
-
- // Grid data for text controls
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-
- // Grid data for controls spanning both columns
- GridData gd2 = new GridData(GridData.FILL_HORIZONTAL);
- gd2.horizontalSpan = 2;
-
- // Grid data for lists grabbing vertical space
- GridData gdList = new GridData(GridData.FILL_HORIZONTAL);
- GC gc = new GC(parent);
- gc.setFont(JFaceResources.getDialogFont());
- FontMetrics fontMetrics = gc.getFontMetrics();
- gc.dispose();
- gdList.horizontalSpan = 2;
- gdList.heightHint = Dialog.convertHeightInCharsToPixels(fontMetrics, 5);
-
- boolean editable = iuElement == null && listener != null;
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_ID);
- id = new Text(composite, SWT.BORDER);
- id.setLayoutData(gd);
- if (editable) {
- id.addModifyListener(listener);
- } else {
- id.setEditable(false);
- }
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_Version);
- version = new Text(composite, SWT.BORDER);
- version.setLayoutData(gd);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_Namespace);
- namespace = new Text(composite, SWT.BORDER);
- namespace.setLayoutData(gd);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_TouchpointType);
- touchpointType = new Text(composite, SWT.BORDER | SWT.READ_ONLY);
- touchpointType.setLayoutData(gd);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_TouchpointData);
- label.setLayoutData(gd2);
- touchpointData = new List(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- touchpointData.setLayoutData(gdList);
- createCopyMenu(touchpointData);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_RequiredCapabilities);
- label.setLayoutData(gd2);
- requiredCapabilities = new List(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- requiredCapabilities.setLayoutData(gdList);
- createCopyMenu(requiredCapabilities);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.IUGroup_ProvidedCapabilities);
- label.setLayoutData(gd2);
- providedCapabilities = new List(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
- providedCapabilities.setLayoutData(gdList);
- createCopyMenu(providedCapabilities);
-
- if (editable) {
- id.addModifyListener(listener);
- version.addModifyListener(listener);
- namespace.addModifyListener(listener);
- touchpointType.addModifyListener(listener);
- } else {
- id.setEditable(false);
- version.setEditable(false);
- namespace.setEditable(false);
- touchpointType.setEditable(false);
- }
- initializeFields();
- return composite;
- }
-
- private void initializeFields() {
- IInstallableUnit iu = getIU();
- if (iu == null) {
- return;
- }
- id.setText(iu.getId());
- version.setText(iu.getVersion().toString());
-
- String value = iu.getProperty(IInstallableUnit.NAMESPACE_IU_ID);
- if (value != null) {
- namespace.setText(value);
- }
- ITouchpointType type = iu.getTouchpointType();
- if (type != null) {
- touchpointType.setText(type.getId());
- }
- Collection<ITouchpointData> data = iu.getTouchpointData();
- String[] items = new String[data.size()];
- int i = 0;
- for (ITouchpointData td : data) {
- items[i++] = td.toString();
- }
- touchpointData.setItems(items);
-
- Collection<IRequirement> reqs = iu.getRequirements();
- items = new String[reqs.size()];
- i = 0;
- for (IRequirement req : reqs) {
- items[i++] = req.toString();
- }
- requiredCapabilities.setItems(items);
- Collection<IProvidedCapability> prov = iu.getProvidedCapabilities();
- items = new String[prov.size()];
- i = 0;
- for (IProvidedCapability capability : prov) {
- items[i++] = capability.toString();
- }
- providedCapabilities.setItems(items);
- }
-
- public void updateIU() {
- // If it's not an InstallableUnit it is not editable
- if (iuElement == null || iuElement instanceof IInstallableUnit) {
- InstallableUnitDescription unit = new InstallableUnitDescription();
- unit.setId(id.getText().trim());
- unit.setVersion(Version.create(version.getText().trim()));
- unit.setProperty(IInstallableUnit.NAMESPACE_IU_ID, namespace.getText().trim());
- // TODO this is bogus because we don't let user provide a touchpoint type version
- unit.setTouchpointType(MetadataFactory.createTouchpointType(touchpointType.getText().trim(), Version.create("1.0.0"))); //$NON-NLS-1$
- iuElement = MetadataFactory.createInstallableUnit(unit);
- }
- }
-
- /**
- * Return a status indicating the validity of the profile info
- *
- * @return a status indicating the validity of the profile info
- */
- public IStatus verify() {
- if (id.getText().trim().length() == 0) {
- return new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, 0, ProvAdminUIMessages.IUGroup_IU_ID_Required, null);
- }
-
- // TODO what kind of validation do we perform for other properties?
- return new Status(IStatus.OK, ProvAdminUIActivator.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
-
- }
-
- private void createCopyMenu(final List list) {
- Menu copyMenu = new Menu(list);
- MenuItem copyItem = new MenuItem(copyMenu, SWT.NONE);
- copyItem.addSelectionListener(new SelectionListener() {
- /*
- * @see SelectionListener.widgetSelected (SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- copySelectionsToClipboard(list);
- }
-
- /*
- * @see SelectionListener.widgetDefaultSelected(SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- copySelectionsToClipboard(list);
- }
- });
- copyItem.setText(JFaceResources.getString("copy")); //$NON-NLS-1$
- list.setMenu(copyMenu);
- }
-
- void copySelectionsToClipboard(List list) {
- StringBuffer buffer = new StringBuffer();
- String[] selections = list.getSelection();
- for (int i = 0; i < selections.length; i++) {
- buffer.append(selections[i]);
- buffer.append("\n"); //$NON-NLS-1$
- }
- Clipboard clipboard = new Clipboard(list.getDisplay());
- clipboard.setContents(new Object[] {buffer.toString()}, new Transfer[] {TextTransfer.getInstance()});
- clipboard.dispose();
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
deleted file mode 100644
index 04a751e26..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUImplementationPropertyPage.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * PropertyPage that shows an IU's properties
- *
- * @since 3.4
- */
-public class IUImplementationPropertyPage extends PropertyPage {
-
- private IUImplementationGroup iuGroup;
-
- protected Control createContents(Composite parent) {
- IInstallableUnit iu = ProvUI.getAdapter(getElement(), IInstallableUnit.class);
- if (iu == null) {
- Label label = new Label(parent, SWT.DEFAULT);
- label.setText(ProvAdminUIMessages.No_Property_Item_Selected);
- }
- iuGroup = new IUImplementationGroup(parent, iu, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- verifyComplete();
- }
- });
- Dialog.applyDialogFont(iuGroup.getComposite());
- verifyComplete();
- return iuGroup.getComposite();
- }
-
- public boolean performOk() {
- return true;
- }
-
- void verifyComplete() {
- if (iuGroup == null) {
- return;
- }
- IStatus status = iuGroup.verify();
- setValid(status.isOK());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
deleted file mode 100644
index db4f4c612..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUProfilePropertiesGroup.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * An IUPropertiesGroup is a reusable UI component that displays and edits the
- * user-oriented properties of an IU. It can be used in
- * different dialogs that manipulate or define IU's.
- *
- * @since 3.4
- */
-public class IUProfilePropertiesGroup extends IUGroup {
-
- private Table propertiesTable;
-
- public IUProfilePropertiesGroup(final Composite parent, InstalledIUElement iuElement, ModifyListener listener) {
- super(parent, iuElement, listener);
- }
-
- protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 400;
- composite.setLayoutData(data);
-
- propertiesTable = new Table(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- propertiesTable.setLayoutData(data);
- propertiesTable.setHeaderVisible(true);
- TableColumn nameColumn = new TableColumn(propertiesTable, SWT.NONE);
- nameColumn.setResizable(true);
- nameColumn.setWidth(200);
- TableColumn valueColumn = new TableColumn(propertiesTable, SWT.NONE);
- valueColumn.setResizable(true);
- valueColumn.setWidth(250);
- initializeFields();
- return composite;
- }
-
- private void initializeFields() {
- if (iuElement == null || !(iuElement instanceof InstalledIUElement)) {
- return;
- }
- String[] propNames = new String[] {IProfile.PROP_PROFILE_ROOT_IU};
- String[] userPropNames = new String[] {ProvAdminUIMessages.ProfileRootPropertyName};
- for (int i = 0; i < propNames.length; i++) {
- TableItem item = new TableItem(propertiesTable, SWT.NULL);
- IProfile profile = getProfile((InstalledIUElement) iuElement);
- String value = profile == null ? null : profile.getInstallableUnitProperty(getIU(), propNames[i]);
- if (value != null)
- item.setText(new String[] {userPropNames[i], value});
- }
- }
-
- private IProfile getProfile(InstalledIUElement element) {
- return ProvAdminUIActivator.getDefault().getProfileRegistry().getProfile(element.getProfileId());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
deleted file mode 100644
index ac7b80810..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/IUPropertiesGroup.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * An IUPropertiesGroup is a reusable UI component that displays and edits the
- * user-oriented properties of an IU. It can be used in
- * different dialogs that manipulate or define IU's.
- *
- * @since 3.4
- */
-public class IUPropertiesGroup extends IUGroup {
-
- private Table propertiesTable;
-
- public IUPropertiesGroup(final Composite parent, IInstallableUnit iu, ModifyListener listener) {
- super(parent, iu, listener);
- }
-
- protected Composite createGroupComposite(Composite parent, ModifyListener listener) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 400;
- composite.setLayoutData(data);
-
- propertiesTable = new Table(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- data.grabExcessVerticalSpace = true;
- propertiesTable.setLayoutData(data);
- propertiesTable.setHeaderVisible(true);
- TableColumn nameColumn = new TableColumn(propertiesTable, SWT.NONE);
- nameColumn.setResizable(true);
- nameColumn.setWidth(200);
- TableColumn valueColumn = new TableColumn(propertiesTable, SWT.NONE);
- valueColumn.setResizable(true);
- valueColumn.setWidth(250);
- initializeFields();
- return composite;
- }
-
- private void initializeFields() {
- if (iuElement == null) {
- return;
- }
- String[] propNames = new String[] {IInstallableUnit.PROP_NAME, IInstallableUnit.PROP_DESCRIPTION, IInstallableUnit.PROP_PROVIDER};
- String[] userPropNames = new String[] {ProvAdminUIMessages.IUPropertiesGroup_NamePropertyLabel, ProvAdminUIMessages.IUPropertiesGroup_DescriptionPropertyLabel, ProvAdminUIMessages.IUPropertiesGroup_ProviderPropertyLabel};
- for (int i = 0; i < propNames.length; i++) {
- TableItem item = new TableItem(propertiesTable, SWT.NULL);
- String value = getIU().getProperty(propNames[i], null);
- if (value != null)
- item.setText(new String[] {userPropNames[i], value});
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
deleted file mode 100644
index 7694a0138..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/InstalledIUPropertyPage.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * PropertyPage that shows an IU's properties
- *
- * @since 3.4
- */
-public class InstalledIUPropertyPage extends PropertyPage {
-
- private IUProfilePropertiesGroup iuGroup;
-
- protected Control createContents(Composite parent) {
- Object element = getElement();
- if (!(element instanceof InstalledIUElement)) {
- Label label = new Label(parent, SWT.DEFAULT);
- label.setText(ProvAdminUIMessages.InstalledIUPropertyPage_NoInfoAvailable);
- return label;
- }
- iuGroup = new IUProfilePropertiesGroup(parent, (InstalledIUElement) element, new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- // not editable
- }
- });
- Dialog.applyDialogFont(iuGroup.getComposite());
- return iuGroup.getComposite();
- }
-
- public boolean performOk() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
deleted file mode 100644
index 453e74a7d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfileGroup.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * Andrew Overholt <overholt@redhat.com> - Fix for Bug 197970
- * [prov] unset Profile name causes exception bringing up profile properties
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.admin.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A ProfileGroup is a reusable UI component that displays the
- * properties of a profile. It can be used to create a new profile.
- * . It can be used in different dialogs that manipulate
- * or define profiles.
- *
- * @since 3.4
- *
- */
-public class ProfileGroup {
-
- Text id;
- Text location;
- Text cache;
- Text name;
- Text description;
- Text environments;
- Text nl;
- IProfile profile;
-
- public ProfileGroup(final Composite parent, IProfile profile, ModifyListener listener) {
- this.profile = profile;
-
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 350;
- composite.setLayoutData(data);
-
- // Grid data for most text controls
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_ID);
- id = new Text(composite, SWT.BORDER);
- id.setLayoutData(gd);
- setEditable(id, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_InstallFolder);
- location = new Text(composite, SWT.BORDER);
- location.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- setEditable(location, profile == null, listener);
-
- Button locationButton = new Button(composite, SWT.PUSH);
- locationButton.setText(ProvAdminUIMessages.ProfileGroup_Browse);
- locationButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
- dialog.setMessage(ProvAdminUIMessages.ProfileGroup_SelectProfileMessage);
- String dir = dialog.open();
- if (dir != null) {
- location.setText(dir);
- }
- }
- });
- setEditable(locationButton, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_Cache);
- cache = new Text(composite, SWT.BORDER);
- cache.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- setEditable(cache, profile == null, listener);
-
- locationButton = new Button(composite, SWT.PUSH);
- locationButton.setText(ProvAdminUIMessages.ProfileGroup_Browse2);
- locationButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- DirectoryDialog dialog = new DirectoryDialog(parent.getShell(), SWT.APPLICATION_MODAL);
- dialog.setMessage(ProvAdminUIMessages.ProfileGroup_SelectBundlePoolCache);
- String dir = dialog.open();
- if (dir != null) {
- cache.setText(dir);
- }
- }
- });
- setEditable(locationButton, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_Name);
- name = new Text(composite, SWT.BORDER);
- name.setLayoutData(gd);
- setEditable(name, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_Description);
- description = new Text(composite, SWT.BORDER);
- description.setLayoutData(gd);
- setEditable(description, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_Environments);
- environments = new Text(composite, SWT.BORDER);
- environments.setLayoutData(gd);
- setEditable(environments, profile == null, listener);
-
- label = new Label(composite, SWT.NONE);
- label.setText(ProvAdminUIMessages.ProfileGroup_NL);
- nl = new Text(composite, SWT.BORDER);
- nl.setLayoutData(gd);
- setEditable(nl, profile == null, listener);
-
- initializeFields();
- }
-
- private void initializeFields() {
- if (profile == null) {
- location.setText(ProfileFactory.getDefaultLocation());
- environments.setText(ProfileFactory.getDefaultEnvironments());
- nl.setText(ProfileFactory.getDefaultNL());
- } else {
- String value = profile.getProfileId();
- // Should not happen, profiles must have an id, but just in case.
- if (value == null)
- value = ""; //$NON-NLS-1$
- id.setText(value);
-
- // The remaining values may be null
- value = profile.getProperty(IProfile.PROP_INSTALL_FOLDER);
- if (value != null) {
- location.setText(value);
- }
- value = profile.getProperty(IProfile.PROP_CACHE);
- if (value != null) {
- cache.setText(value);
- }
-
- value = profile.getProperty(IProfile.PROP_NAME);
- if (value != null) {
- name.setText(value);
- }
- value = profile.getProperty(IProfile.PROP_DESCRIPTION);
- if (value != null) {
- description.setText(value);
- }
-
- value = profile.getProperty(IProfile.PROP_ENVIRONMENTS);
- if (value != null) {
- environments.setText(value);
- }
- value = profile.getProperty(IProfile.PROP_NL);
- if (value != null) {
- nl.setText(value);
- }
- }
- }
-
- public Map<String, String> getProfileProperties() {
- if (profile == null) {
- Map<String, String> profileProperties = new HashMap<String, String>();
-
- String value = location.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_INSTALL_FOLDER, value);
- }
-
- value = cache.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_CACHE, value);
- }
- value = name.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_NAME, value);
- }
- value = description.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_DESCRIPTION, value);
- }
- value = environments.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_ENVIRONMENTS, value);
- }
- value = nl.getText().trim();
- if (value.length() > 0) {
- profileProperties.put(IProfile.PROP_NL, value);
- }
- return profileProperties;
- }
- return profile.getProperties();
- }
-
- public Composite getComposite() {
- if (id == null) {
- return null;
- }
- return id.getParent();
- }
-
- public IProfile getProfile() {
- return profile;
- }
-
- public String getProfileId() {
- if (profile != null) {
- return profile.getProfileId();
- }
- return id.getText().trim();
- }
-
- /**
- * Return a status indicating the validity of the profile info
- *
- * @return a status indicating the validity of the profile info
- */
- public IStatus verify() {
- if (id.getText().trim().length() == 0) {
- return new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, 0, ProvAdminUIMessages.ProfileGroup_ProfileIDRequired, null);
- }
- if (location.getText().trim().length() == 0) {
- return new Status(IStatus.ERROR, ProvAdminUIActivator.PLUGIN_ID, 0, ProvAdminUIMessages.ProfileGroup_ProfileInstallFolderRequired, null);
- }
-
- // TODO what kind of validation do we perform for other properties?
- return new Status(IStatus.OK, ProvAdminUIActivator.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
-
- }
-
- private void setEditable(Control control, boolean editable, ModifyListener listener) {
- if (control instanceof Text) {
- Text text = (Text) control;
- text.setEditable(editable);
- if (listener != null && editable)
- text.addModifyListener(listener);
- } else {
- control.setEnabled(editable);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
deleted file mode 100644
index cea15ad83..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/ProfilePropertyPage.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * PropertyPage that shows an IU's properties
- *
- * @since 3.4
- */
-public class ProfilePropertyPage extends PropertyPage {
-
- private ProfileGroup profileGroup;
-
- protected Control createContents(Composite parent) {
- IProfile profile = ProvUI.getAdapter(getElement(), IProfile.class);
- if (profile == null) {
- Label label = new Label(parent, SWT.DEFAULT);
- label.setText(ProvAdminUIMessages.No_Property_Item_Selected);
- }
- // Assume that we do not edit profile properties for now
- noDefaultAndApplyButton();
-
- profileGroup = new ProfileGroup(parent, profile, null);
- Dialog.applyDialogFont(profileGroup.getComposite());
- return profileGroup.getComposite();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
deleted file mode 100644
index 7c28fc184..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/dialogs/RepositoryImplementationPropertyPage.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.dialogs;
-
-import java.util.Map;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IRepositoryElement;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * PropertyPage that shows a repository's properties
- *
- * @since 3.4
- */
-public class RepositoryImplementationPropertyPage extends PropertyPage {
- private IRepositoryElement<?> repositoryElement;
- private Composite composite;
- private Text name;
- private Text location;
- private Text nickname;
- private Text description;
- private Table propertiesTable;
-
- protected Control createContents(Composite parent) {
- this.repositoryElement = getRepositoryElement();
- if (repositoryElement == null) {
- Label label = new Label(parent, SWT.DEFAULT);
- label.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_NoRepositorySelected);
- return label;
- }
- noDefaultAndApplyButton();
-
- composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.widthHint = 350;
- composite.setLayoutData(data);
-
- Label urlLabel = new Label(composite, SWT.NONE);
- urlLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_LocationLabel);
- location = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- location.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label nameLabel = new Label(composite, SWT.NONE);
- nameLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_NameLabel);
- name = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- name.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label nicknameLabel = new Label(composite, SWT.NONE);
- nicknameLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_NicknameLabel);
- nickname = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- nickname.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label descriptionLabel = new Label(composite, SWT.NONE);
- descriptionLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_DescriptionLabel);
- data = new GridData();
- data.verticalAlignment = SWT.TOP;
- descriptionLabel.setLayoutData(data);
- description = new Text(composite, SWT.WRAP | SWT.READ_ONLY);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.verticalAlignment = SWT.TOP;
- data.grabExcessVerticalSpace = true;
- description.setLayoutData(data);
- Label propertiesLabel = new Label(composite, SWT.NONE);
- propertiesLabel.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_PropertiesLabel);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- propertiesLabel.setLayoutData(data);
-
- propertiesTable = new Table(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- data.grabExcessVerticalSpace = true;
- propertiesTable.setLayoutData(data);
- propertiesTable.setHeaderVisible(true);
- TableColumn nameColumn = new TableColumn(propertiesTable, SWT.NONE);
- nameColumn.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_NameColumnLabel);
- TableColumn valueColumn = new TableColumn(propertiesTable, SWT.NONE);
- valueColumn.setText(ProvAdminUIMessages.RepositoryImplementationPropertyPage_ValueColumnLabel);
-
- initializeFields();
- initializeTable();
-
- nameColumn.pack();
- valueColumn.pack();
-
- return composite;
-
- }
-
- private void initializeFields() {
- IRepositoryElement<?> element = getRepositoryElement();
- if (element != null) {
- IRepository<?> repo = getRepositoryElement().getRepository(null);
- location.setText(repo.getLocation().toString());
- String value = repo.getName();
- if (value != null)
- name.setText(value);
- value = repo.getDescription();
- if (value != null)
- description.setText(value);
- String nick = element.getName();
- // Kind of a hack, to avoid figuring out which manager to go to get the
- // nickname. Instead we are just assuming that any name stored in the element that
- // is not location or provider name is the nickname.
- if (!nick.equals(value) && !nick.equals(repo.getLocation().toString()))
- nickname.setText(nick);
- }
- }
-
- private void initializeTable() {
- if (getRepositoryElement() != null) {
- Map<String, String> repoProperties = getRepositoryElement().getRepository(null).getProperties();
- if (repoProperties != null) {
- String[] propNames = repoProperties.keySet().toArray(new String[repoProperties.size()]);
- for (int i = 0; i < propNames.length; i++) {
- TableItem item = new TableItem(propertiesTable, SWT.NULL);
- item.setText(new String[] {propNames[i], repoProperties.get(propNames[i]).toString()});
- }
- }
- }
- }
-
- private IRepositoryElement<?> getRepositoryElement() {
- if (repositoryElement == null) {
- repositoryElement = ProvUI.getAdapter(getElement(), IRepositoryElement.class);
- }
- return repositoryElement;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties
deleted file mode 100644
index af711da1f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/messages.properties
+++ /dev/null
@@ -1,69 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-
-ProvisioningPrefPage_ShowGroupsOnly=Show only &group IU's in repository views
-ProvisioningPrefPage_ShowInstallRootsOnly=Show only the install &roots in a profile
-ProvisioningPrefPage_HideSystemRepos=Hide &system repositories in repository views
-ProvisioningPrefPage_CollapseIUVersions=Show only the latest &versions of IU's
-ProvisioningPrefPage_UseCategories=Show IUs by &category in repository views
-InstalledIUPropertyPage_NoInfoAvailable=No profile-specific properties are available.
-AddProfileDialog_Title=Add Profile
-AddProfileDialog_OperationLabel=Add Profile
-MetadataRepositoriesView_AddRepositoryLabel=Add repository...
-MetadataRepositoriesView_AddRepositoryTooltip=Add a new metadata repository
-RepositoriesView_RemoveCommandLabel=Remove
-MetadataRepositoriesView_RemoveRepositoryTooltip=Remove the selected metadata repositories
-ArtifactRepositoriesView_AddRepositoryLabel=Add repository...
-ArtifactRepositoriesView_AddRepositoryTooltip=Add a new artifact repository
-ArtifactRepositoriesView_RemoveRepositoryTooltip=Remove the selected artifact repositories
-ProfilesView_AddProfileTooltip=Add a new profile
-ProvView_RefreshCommandTooltip=Refresh the items in the view.
-ProfilesView_AddProfileLabel=Add profile...
-ProfilesView_RemoveProfileLabel=Remove
-ProfilesView_RemoveProfileTooltip=Remove the selected profiles
-AddProfileDialog_DuplicateProfileID=The profile ID is already in use.
-Ops_RemoveProfileOperationLabel=Remove Profiles
-ProfileRootPropertyName=Profile Root
-RepositoryImplementationPropertyPage_DescriptionLabel=Description:
-RepositoryImplementationPropertyPage_LocationLabel=Location:
-RepositoryImplementationPropertyPage_PropertiesLabel=Repository properties:
-RepositoryImplementationPropertyPage_NameColumnLabel=Name
-RepositoryImplementationPropertyPage_NameLabel=Name:
-RepositoryImplementationPropertyPage_NicknameLabel=User nickname:
-RepositoryImplementationPropertyPage_NoRepositorySelected=There was no repository selected
-RepositoryImplementationPropertyPage_ValueColumnLabel=Value
-IUGroup_ID=IU &id:
-IUGroup_Version=&Version:
-No_Property_Item_Selected=There is nothing to show in the properties
-IUGroup_Namespace=&Namespace:
-IUGroup_TouchpointType=&Touchpoint type:
-IUGroup_TouchpointData=Touchpoint &data:
-IUGroup_RequiredCapabilities=&Required capabilities:
-IUGroup_ProvidedCapabilities=&Provided capabilities:
-IUGroup_IU_ID_Required=Must set an IU ID
-IUPropertiesGroup_DescriptionPropertyLabel=Description
-IUPropertiesGroup_NamePropertyLabel=Name
-IUPropertiesGroup_ProviderPropertyLabel=Provider
-ProfileGroup_ID=Profile &id:
-ProfileGroup_Browse=&Browse...
-ProfileGroup_Browse2=B&rowse...
-ProfileGroup_SelectProfileMessage=Select an installation directory:
-ProfileGroup_SelectBundlePoolCache=Select a bundle pool directory:
-ProfileGroup_Name=&Name:
-ProfileGroup_Description=&Description:
-ProfileGroup_NL=N&L:
-ProfileGroup_Cache=Bundle &pool location:
-ProfileGroup_InstallFolder=Install f&older:
-ProfileGroup_Environments=&Environments:
-ProfileGroup_ProfileIDRequired=Must specify a Profile ID
-ProfileGroup_ProfileInstallFolderRequired=Must specify an install folder
-
-
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/PreferenceConstants.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/PreferenceConstants.java
deleted file mode 100644
index c21680106..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/PreferenceConstants.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.preferences;
-
-/**
- * Constant definitions for plug-in preferences
- */
-public class PreferenceConstants {
-
- public static final String PREF_SHOW_GROUPS_ONLY = "org.eclipse.equinox.internal.provisional.p2.ui.admin.showGroupsOnly"; //$NON-NLS-1$
- public static final String PREF_HIDE_SYSTEM_REPOS = "org.eclipse.equinox.internal.provisional.p2.ui.admin.hideSystemRepos"; //$NON-NLS-1$
- public static final String PREF_COLLAPSE_IU_VERSIONS = "org.eclipse.equinox.internal.provisional.p2.ui.admin.collapseIUVersions"; //$NON-NLS-1$
- public static final String PREF_USE_CATEGORIES = "org.eclipse.equinox.internal.provisional.p2.ui.admin.useCategories"; //$NON-NLS-1$
- public static final String PREF_SHOW_INSTALL_ROOTS_ONLY = "org.eclipse.equinox.internal.provisional.p2.ui.admin.showInstallRoots"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java
deleted file mode 100644
index b16f0017f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvUIPreferenceInitializer.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-/**
- * Initializes the preferences for the provisioning UI.
- * @since 3.4
- *
- */
-public class ProvUIPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = ProvAdminUIActivator.getDefault().getPreferenceStore();
- store.setDefault(PreferenceConstants.PREF_SHOW_GROUPS_ONLY, true);
- store.setDefault(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY, true);
- store.setDefault(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS, true);
- store.setDefault(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS, true);
- store.setDefault(PreferenceConstants.PREF_USE_CATEGORIES, false);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java
deleted file mode 100644
index 3de6e31ed..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/preferences/ProvisioningPrefPage.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.admin.preferences;
-
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIActivator;
-import org.eclipse.equinox.internal.p2.ui.admin.ProvAdminUIMessages;
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-/**
- * Preference page for provisioning preferences.
- *
- * @since 3.4
- */
-
-public class ProvisioningPrefPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
- public ProvisioningPrefPage() {
- super(GRID);
- setPreferenceStore(ProvAdminUIActivator.getDefault().getPreferenceStore());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
- public void createFieldEditors() {
- addField(new BooleanFieldEditor(PreferenceConstants.PREF_SHOW_GROUPS_ONLY, ProvAdminUIMessages.ProvisioningPrefPage_ShowGroupsOnly, getFieldEditorParent()));
- addField(new BooleanFieldEditor(PreferenceConstants.PREF_SHOW_INSTALL_ROOTS_ONLY, ProvAdminUIMessages.ProvisioningPrefPage_ShowInstallRootsOnly, getFieldEditorParent()));
- addField(new BooleanFieldEditor(PreferenceConstants.PREF_HIDE_SYSTEM_REPOS, ProvAdminUIMessages.ProvisioningPrefPage_HideSystemRepos, getFieldEditorParent()));
- addField(new BooleanFieldEditor(PreferenceConstants.PREF_COLLAPSE_IU_VERSIONS, ProvAdminUIMessages.ProvisioningPrefPage_CollapseIUVersions, getFieldEditorParent()));
- addField(new BooleanFieldEditor(PreferenceConstants.PREF_USE_CATEGORIES, ProvAdminUIMessages.ProvisioningPrefPage_UseCategories, getFieldEditorParent()));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- // nothing to do
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/.classpath b/bundles/org.eclipse.equinox.p2.ui.discovery/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.discovery/.cvsignore b/bundles/org.eclipse.equinox.p2.ui.discovery/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/.gitignore b/bundles/org.eclipse.equinox.p2.ui.discovery/.gitignore
deleted file mode 100644
index ba077a403..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/.project b/bundles/org.eclipse.equinox.p2.ui.discovery/.project
deleted file mode 100644
index 185488de7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ui.discovery</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c65423da1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,349 +0,0 @@
-#Wed Feb 17 14:07:15 PST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-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=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.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=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-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=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 8f3db4a0a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Wed Feb 17 14:07:15 PST 2010
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Mon Jun 25 03:02:37 GMT 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.team.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
deleted file mode 100644
index 1f2471371..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.mylyn.team.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Feb 16 15:43:06 PST 2010
-commit.comment.template=${connector.task.prefix} ${task.key} - ${task.description}
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index 5937a85ac..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,24 +0,0 @@
-#Tue May 20 17:39:22 PDT 2008
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=2
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-bundle-classpath-entries=1
-compilers.p.missing-packages=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=0
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.discovery/META-INF/MANIFEST.MF
deleted file mode 100644
index 286ffc308..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.discovery;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.equinox.p2.discovery;bundle-version="[1.0.0,1.1.0)",
- org.eclipse.ui.browser,
- org.eclipse.equinox.p2.discovery.compatibility;bundle-version="[1.0.0,1.1.0)";resolution:=optional,
- org.eclipse.equinox.p2.core;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.operations;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;bundle-version="[2.0.0,3.0.0)"
-Export-Package: org.eclipse.equinox.internal.p2.ui.discovery;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.discovery.commands;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.discovery.operations;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.discovery.repository;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.discovery.util;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.discovery.wizards;x-internal:=true
-Bundle-ClassPath: .
-Import-Package: com.ibm.icu.text
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/about.html b/bundles/org.eclipse.equinox.p2.ui.discovery/about.html
deleted file mode 100644
index bc6e2b493..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>July 3, 2008</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
-
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/build.properties b/bundles/org.eclipse.equinox.p2.ui.discovery/build.properties
deleted file mode 100644
index 2aa561fa8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- about.html,\
- icons/,\
- plugin.properties
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/etool16/find.png b/bundles/org.eclipse.equinox.p2.ui.discovery/icons/etool16/find.png
deleted file mode 100644
index 611189d66..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/etool16/find.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_disabled_obj.gif b/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_disabled_obj.gif
deleted file mode 100644
index f192b8486..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_disabled_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_obj.gif b/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_obj.gif
deleted file mode 100644
index 8706680c7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_update_obj.gif b/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_update_obj.gif
deleted file mode 100644
index 16f4f7c4e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/iu_update_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/message_info.gif b/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/message_info.gif
deleted file mode 100644
index b484d9be1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/obj16/message_info.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/ovr32/message_warning.gif b/bundles/org.eclipse.equinox.p2.ui.discovery/icons/ovr32/message_warning.gif
deleted file mode 100644
index 8e054d073..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/ovr32/message_warning.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/wizban/banner-discovery.png b/bundles/org.eclipse.equinox.p2.ui.discovery/icons/wizban/banner-discovery.png
deleted file mode 100644
index cc4b2cfd7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/icons/wizban/banner-discovery.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.discovery/plugin.properties
deleted file mode 100644
index 68682584c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-Bundle-Vendor = Eclipse.org - Equinox
-Bundle-Name = Equinox Provisioning Discovery UI
-
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.discovery/plugin.xml
deleted file mode 100644
index 0622068f5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/plugin.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<!--
- Copyright (c) 2009 Tasktop Technologies 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:
- Tasktop Technologies - initial API and implementation
- -->
-<plugin>
- <extension
- point="org.eclipse.ui.commands">
- <command
- id="org.eclipse.equinox.p2.ui.discovery.commands.ShowBundleCatalog"
- name="Show Bundle Catalog">
- <commandParameter
- id="org.eclipse.equinox.p2.ui.discovery.commands.DirectoryParameter"
- name="Directory URL"
- optional="true">
- </commandParameter>
- <commandParameter
- id="org.eclipse.equinox.p2.ui.discovery.commands.TagsParameter"
- name="Tags"
- optional="true">
- </commandParameter>
- </command>
- <command
- id="org.eclipse.equinox.p2.ui.discovery.commands.ShowRepositoryCatalog"
- name="Show Repository Catalog">
- <commandParameter
- id="org.eclipse.equinox.p2.ui.discovery.commands.RepositoryParameter"
- name="P2 Repository URI"
- optional="true">
- </commandParameter>
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.equinox.internal.p2.ui.discovery.commands.ShowBundleCatalogCommandHandler"
- commandId="org.eclipse.equinox.p2.ui.discovery.commands.ShowBundleCatalog">
- </handler>
- <handler
- class="org.eclipse.equinox.internal.p2.ui.discovery.commands.ShowRepositoryCatalogCommandHandler"
- commandId="org.eclipse.equinox.p2.ui.discovery.commands.ShowRepositoryCatalog">
- </handler>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml b/bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml
deleted file mode 100644
index 303802560..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui.discovery</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryImages.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryImages.java
deleted file mode 100644
index cb9cbd05e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryImages.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author David Green
- * @author Steffen Pingel
- */
-public class DiscoveryImages {
-
- private static final String T_OVR_32 = "ovr32"; //$NON-NLS-1$
-
- private static final String T_OBJ_16 = "obj16"; //$NON-NLS-1$
-
- private static final String T_WIZBAN = "wizban"; //$NON-NLS-1$
-
- private static final String T_TOOL = "etool16"; //$NON-NLS-1$
-
- private static final URL baseURL = Platform.getBundle(DiscoveryUi.ID_PLUGIN).getEntry("/icons/"); //$NON-NLS-1$
-
- /**
- * image descriptor for a warning overlay suitable for use with 32x32 images.
- */
- public static final ImageDescriptor OVERLAY_WARNING_32 = create(T_OVR_32, "message_warning.gif"); //$NON-NLS-1$
-
- public static final ImageDescriptor BANNER_DISOVERY = create(T_WIZBAN, "banner-discovery.png"); //$NON-NLS-1$
-
- public static final ImageDescriptor IU_AVAILABLE = create(T_OBJ_16, "iu_disabled_obj.gif"); //$NON-NLS-1$
-
- public static final ImageDescriptor IU_INSTALLED = create(T_OBJ_16, "iu_obj.gif"); //$NON-NLS-1$
-
- public static final ImageDescriptor IU_UPDATABLE = create(T_OBJ_16, "iu_update_obj.gif"); //$NON-NLS-1$
-
- public static final ImageDescriptor MESSAGE_INFO = create(T_OBJ_16, "message_info.gif"); //$NON-NLS-1$
-
- public static final ImageDescriptor FIND_CLEAR = create(T_TOOL, "find-clear.gif"); //$NON-NLS-1$
-
- public static final ImageDescriptor FIND_CLEAR_DISABLED = create(T_TOOL, "find-clear-disabled.gif"); //$NON-NLS-1$
-
- private static ImageRegistry imageRegistry;
-
- private static ImageDescriptor create(String prefix, String name) {
- try {
- return ImageDescriptor.createFromURL(makeIconFileURL(prefix, name));
- } catch (MalformedURLException e) {
- return ImageDescriptor.getMissingImageDescriptor();
- }
- }
-
- private static URL makeIconFileURL(String prefix, String name) throws MalformedURLException {
- if (baseURL == null) {
- throw new MalformedURLException();
- }
-
- StringBuilder buffer = new StringBuilder(prefix);
- buffer.append('/');
- buffer.append(name);
- return new URL(baseURL, buffer.toString());
- }
-
- /**
- * Lazily initializes image map.
- *
- * @param imageDescriptor
- * @return Image
- */
- public static Image getImage(ImageDescriptor imageDescriptor) {
- ImageRegistry imageRegistry = getImageRegistry();
- Image image = imageRegistry.get("" + imageDescriptor.hashCode()); //$NON-NLS-1$
- if (image == null) {
- image = imageDescriptor.createImage(true);
- imageRegistry.put("" + imageDescriptor.hashCode(), image); //$NON-NLS-1$
- }
- return image;
- }
-
- private static ImageRegistry getImageRegistry() {
- if (imageRegistry == null) {
- imageRegistry = new ImageRegistry();
- }
- return imageRegistry;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryUi.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryUi.java
deleted file mode 100644
index e6edb58a1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/DiscoveryUi.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-import org.eclipse.equinox.internal.p2.ui.discovery.operations.DiscoveryInstallOperation;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.CommonColors;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @author David Green
- */
-public abstract class DiscoveryUi {
-
- public static final String ID_PLUGIN = "org.eclipse.equinox.p2.ui.discovery"; //$NON-NLS-1$
-
- private static CommonColors commonColors;
-
- private DiscoveryUi() {
- // don't allow clients to instantiate
- }
-
- public static boolean install(List<CatalogItem> descriptors, IRunnableContext context) {
- try {
- IRunnableWithProgress runner = new DiscoveryInstallOperation(descriptors);
- context.run(true, true, runner);
- } catch (InvocationTargetException e) {
- IStatus status = new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, NLS.bind(Messages.ConnectorDiscoveryWizard_installProblems, new Object[] {e.getCause().getMessage()}), e.getCause());
- StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
- return false;
- } catch (InterruptedException e) {
- // canceled
- return false;
- }
- return true;
- }
-
- public static CommonColors getCommonsColors() {
- if (commonColors == null) {
- commonColors = new CommonColors(Display.getDefault(), JFaceResources.getResources());
- }
- return commonColors;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/Messages.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/Messages.java
deleted file mode 100644
index e8b663ac7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/Messages.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.commands;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.discovery.commands.messages"; //$NON-NLS-1$
-
- public static String ShowRepositoryCatalogCommandHandler_Location_not_valid_Error;
-
- public static String ShowRepositoryCatalogCommandHandler_Required_parameter_not_specified_Error;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // constructor
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowBundleCatalogCommandHandler.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowBundleCatalogCommandHandler.java
deleted file mode 100644
index 570bf299b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowBundleCatalogCommandHandler.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.commands;
-
-import java.util.*;
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.BundleDiscoveryStrategy;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy;
-import org.eclipse.equinox.internal.p2.discovery.model.Tag;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-
-/**
- * A command that causes the {@link DiscoveryWizard} to appear in a dialog.
- *
- * @author David Green
- */
-public class ShowBundleCatalogCommandHandler extends AbstractHandler {
-
- private static final String ID_PARAMETER_DIRECTORY = "org.eclipse.equinox.p2.ui.discovery.commands.DirectoryParameter"; //$NON-NLS-1$
-
- private static final String ID_PARAMETER_TAGS = "org.eclipse.equinox.p2.ui.discovery.commands.TagsParameter"; //$NON-NLS-1$
-
- public Object execute(ExecutionEvent event) {
- Set<Tag> tags = new LinkedHashSet<Tag>();
- String tagString = event.getParameter(ID_PARAMETER_TAGS);
- if (tagString != null) {
- String[] tagIds = tagString.split("\\s*,\\s*"); //$NON-NLS-1$
- for (String id : tagIds) {
- String[] text = id.split("=", 2); //$NON-NLS-1$
- Tag tag;
- if (text.length > 1) {
- tag = new Tag(text[0], text[1]);
- } else {
- tag = new Tag(id, id);
- }
- tags.add(tag);
- }
- }
-
- Catalog catalog = new Catalog();
-
- // look for descriptors from installed bundles
- catalog.getDiscoveryStrategies().add(new BundleDiscoveryStrategy());
-
- // look for remote descriptor
- String directoryUrl = event.getParameter(ID_PARAMETER_DIRECTORY);
- if (directoryUrl != null && directoryUrl.length() > 0) {
- RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new RemoteBundleDiscoveryStrategy();
- remoteDiscoveryStrategy.setDirectoryUrl(directoryUrl);
- catalog.getDiscoveryStrategies().add(remoteDiscoveryStrategy);
- }
-
- catalog.setEnvironment(DiscoveryCore.createEnvironment());
- catalog.setVerifyUpdateSiteAvailability(true);
- catalog.setTags(new ArrayList<Tag>(tags));
-
- CatalogConfiguration configuration = new CatalogConfiguration();
- configuration.setShowTagFilter(tags.size() > 0);
- configuration.setSelectedTags(tags);
-
- DiscoveryWizard wizard = new DiscoveryWizard(catalog, configuration);
- WizardDialog dialog = new WizardDialog(WorkbenchUtil.getShell(), wizard);
- dialog.open();
-
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowRepositoryCatalogCommandHandler.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowRepositoryCatalogCommandHandler.java
deleted file mode 100644
index f4789b49f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/ShowRepositoryCatalogCommandHandler.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.commands;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.eclipse.core.commands.*;
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
-import org.eclipse.equinox.internal.p2.ui.discovery.repository.RepositoryDiscoveryStrategy;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.DiscoveryWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A command that causes the {@link DiscoveryWizard} to appear in a dialog.
- *
- * @author Steffen Pingel
- */
-public class ShowRepositoryCatalogCommandHandler extends AbstractHandler {
-
- private static final String ID_PARAMETER_REPOSITORY = "org.eclipse.equinox.p2.ui.discovery.commands.RepositoryParameter"; //$NON-NLS-1$
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- String location = event.getParameter(ID_PARAMETER_REPOSITORY);
- if (location == null) {
- throw new ExecutionException(NLS.bind(Messages.ShowRepositoryCatalogCommandHandler_Required_parameter_not_specified_Error, ID_PARAMETER_REPOSITORY));
- }
- URI uri;
- try {
- uri = new URI(location);
- } catch (URISyntaxException e) {
- throw new ExecutionException(Messages.ShowRepositoryCatalogCommandHandler_Location_not_valid_Error, e);
- }
-
- Catalog catalog = new Catalog();
-
- RepositoryDiscoveryStrategy strategy = new RepositoryDiscoveryStrategy();
- strategy.addLocation(uri);
- catalog.getDiscoveryStrategies().add(strategy);
-
- catalog.setEnvironment(DiscoveryCore.createEnvironment());
- catalog.setVerifyUpdateSiteAvailability(false);
-
- CatalogConfiguration configuration = new CatalogConfiguration();
- configuration.setShowTagFilter(false);
-
- DiscoveryWizard wizard = new DiscoveryWizard(catalog, configuration);
- WizardDialog dialog = new WizardDialog(WorkbenchUtil.getShell(), wizard);
- dialog.open();
-
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/messages.properties b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/messages.properties
deleted file mode 100644
index ec058da55..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/commands/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-ShowRepositoryCatalogCommandHandler_Location_not_valid_Error=Repository location is not a valid URI
-ShowRepositoryCatalogCommandHandler_Required_parameter_not_specified_Error=Required parameter {0} not specified.
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
deleted file mode 100644
index 001310110..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- * David Dubrow - fix for bug 313412
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.operations;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.*;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
-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.operations.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * A job that configures a p2 install action for installing one or more {@link CatalogItem
- * connectors}. The bulk of the installation work is done by p2; this class just sets up the p2 repository meta-data and
- * selects the appropriate features to install. After running the job the install action
- * must be run to perform the installation.
- *
- * @author David Green
- * @author Steffen Pingel
- */
-public class DiscoveryInstallOperation implements IRunnableWithProgress {
-
- private final List<CatalogItem> installableConnectors;
-
- private final ProvisioningUI provisioningUI;
-
- private Set<URI> repositoryLocations;
-
- public DiscoveryInstallOperation(List<CatalogItem> installableConnectors) {
- if (installableConnectors == null || installableConnectors.isEmpty()) {
- throw new IllegalArgumentException();
- }
- this.installableConnectors = new ArrayList<CatalogItem>(installableConnectors);
- this.provisioningUI = ProvisioningUI.getDefaultUI();
- }
-
- public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
- try {
- SubMonitor monitor = SubMonitor.convert(progressMonitor, Messages.InstallConnectorsJob_task_configuring, 100);
- try {
- final IInstallableUnit[] ius = computeInstallableUnits(monitor.newChild(50));
-
- checkCancelled(monitor);
-
- final InstallOperation installOperation = resolve(monitor.newChild(50), ius, repositoryLocations.toArray(new URI[0]));
-
- checkCancelled(monitor);
-
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- provisioningUI.openInstallWizard(Arrays.asList(ius), installOperation, null);
- }
- });
- } finally {
- monitor.done();
- }
- } catch (OperationCanceledException e) {
- throw new InterruptedException();
- } catch (Exception e) {
- throw new InvocationTargetException(e);
- }
- }
-
- private void checkCancelled(IProgressMonitor monitor) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
-
- private InstallOperation resolve(IProgressMonitor monitor, final IInstallableUnit[] ius, URI[] repositories) throws CoreException {
- final InstallOperation installOperation = provisioningUI.getInstallOperation(Arrays.asList(ius), repositories);
- IStatus operationStatus = installOperation.resolveModal(new SubProgressMonitor(monitor, installableConnectors.size()));
- if (operationStatus.getSeverity() > IStatus.WARNING) {
- throw new CoreException(operationStatus);
- }
- return installOperation;
- }
-
- public IInstallableUnit[] computeInstallableUnits(SubMonitor monitor) throws CoreException {
- try {
- monitor.setWorkRemaining(100);
- // add repository urls and load meta data
- List<IMetadataRepository> repositories = addRepositories(monitor.newChild(50));
- final List<IInstallableUnit> installableUnits = queryInstallableUnits(monitor.newChild(50), repositories);
- removeOldVersions(installableUnits);
- checkForUnavailable(installableUnits);
- return installableUnits.toArray(new IInstallableUnit[installableUnits.size()]);
-
- // MultiStatus status = new MultiStatus(DiscoveryUi.ID_PLUGIN, 0, Messages.PrepareInstallProfileJob_ok, null);
- // ius = installableUnits.toArray(new IInstallableUnit[installableUnits.size()]);
- // ProfileChangeRequest profileChangeRequest = InstallAction.computeProfileChangeRequest(ius, profileId,
- // status, new SubProgressMonitor(monitor, installableConnectors.size()));
- // if (status.getSeverity() > IStatus.WARNING) {
- // throw new CoreException(status);
- // }
- // if (profileChangeRequest == null) {
- // // failed but no indication as to why
- // throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN,
- // Messages.PrepareInstallProfileJob_computeProfileChangeRequestFailed, null));
- // }
- // PlannerResolutionOperation operation = new PlannerResolutionOperation(
- // Messages.PrepareInstallProfileJob_calculatingRequirements, profileId, profileChangeRequest, null,
- // status, true);
- // IStatus operationStatus = operation.execute(new SubProgressMonitor(monitor, installableConnectors.size()));
- // if (operationStatus.getSeverity() > IStatus.WARNING) {
- // throw new CoreException(operationStatus);
- // }
- //
- // plannerResolutionOperation = operation;
-
- } catch (URISyntaxException e) {
- // should never happen, since we already validated URLs.
- throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, Messages.InstallConnectorsJob_unexpectedError_url, e));
- } catch (MalformedURLException e) {
- // should never happen, since we already validated URLs.
- throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, Messages.InstallConnectorsJob_unexpectedError_url, e));
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Verifies that we found what we were looking for: it's possible that we have connector descriptors that are no
- * longer available on their respective sites. In that case we must inform the user. Unfortunately this is the
- * earliest point at which we can know.
- */
- private void checkForUnavailable(final List<IInstallableUnit> installableUnits) throws CoreException {
- // at least one selected connector could not be found in a repository
- Set<String> foundIds = new HashSet<String>();
- for (IInstallableUnit unit : installableUnits) {
- foundIds.add(unit.getId());
- }
-
- String message = ""; //$NON-NLS-1$
- String detailedMessage = ""; //$NON-NLS-1$
- for (CatalogItem descriptor : installableConnectors) {
- StringBuilder unavailableIds = null;
- for (String id : descriptor.getInstallableUnits()) {
- if (!foundIds.contains(id)) {
- if (unavailableIds == null) {
- unavailableIds = new StringBuilder();
- } else {
- unavailableIds.append(Messages.InstallConnectorsJob_commaSeparator);
- }
- unavailableIds.append(id);
- }
- }
- if (unavailableIds != null) {
- if (message.length() > 0) {
- message += Messages.InstallConnectorsJob_commaSeparator;
- }
- message += descriptor.getName();
-
- if (detailedMessage.length() > 0) {
- detailedMessage += Messages.InstallConnectorsJob_commaSeparator;
- }
- detailedMessage += NLS.bind(Messages.PrepareInstallProfileJob_notFoundDescriptorDetail, new Object[] {descriptor.getName(), unavailableIds.toString(), descriptor.getSiteUrl()});
- }
- }
-
- if (message.length() > 0) {
- // instead of aborting here we ask the user if they wish to proceed anyways
- final boolean[] okayToProceed = new boolean[1];
- final String finalMessage = message;
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- okayToProceed[0] = MessageDialog.openQuestion(WorkbenchUtil.getShell(), Messages.InstallConnectorsJob_questionProceed, NLS.bind(Messages.InstallConnectorsJob_questionProceed_long, new Object[] {finalMessage}));
- }
- });
- if (!okayToProceed[0]) {
- throw new CoreException(new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, NLS.bind(Messages.InstallConnectorsJob_connectorsNotAvailable, detailedMessage), null));
- }
- }
- }
-
- /**
- * Filters those installable units that have a duplicate in the list with a higher version number. it's possible
- * that some repositories will host multiple versions of a particular feature. we assume that the user wants the
- * highest version.
- */
- private void removeOldVersions(final List<IInstallableUnit> installableUnits) {
- Map<String, Version> symbolicNameToVersion = new HashMap<String, Version>();
- for (IInstallableUnit unit : installableUnits) {
- Version version = symbolicNameToVersion.get(unit.getId());
- if (version == null || version.compareTo(unit.getVersion()) < 0) {
- symbolicNameToVersion.put(unit.getId(), unit.getVersion());
- }
- }
- if (symbolicNameToVersion.size() != installableUnits.size()) {
- for (IInstallableUnit unit : new ArrayList<IInstallableUnit>(installableUnits)) {
- Version version = symbolicNameToVersion.get(unit.getId());
- if (!version.equals(unit.getVersion())) {
- installableUnits.remove(unit);
- }
- }
- }
- }
-
- /**
- * Perform a query to get the installable units. This causes p2 to determine what features are available in each
- * repository. We select installable units by matching both the feature id and the repository; it is possible though
- * unlikely that the same feature id is available from more than one of the selected repositories, and we must
- * ensure that the user gets the one that they asked for.
- */
- private List<IInstallableUnit> queryInstallableUnits(SubMonitor monitor, List<IMetadataRepository> repositories) throws URISyntaxException {
- final List<IInstallableUnit> installableUnits = new ArrayList<IInstallableUnit>();
-
- monitor.setWorkRemaining(repositories.size());
- for (final IMetadataRepository repository : repositories) {
- checkCancelled(monitor);
- final Set<String> installableUnitIdsThisRepository = getDescriptorIds(repository);
- IQueryResult<IInstallableUnit> result = repository.query(createInstalledIUsQuery(), monitor.newChild(1));
- for (Iterator<IInstallableUnit> iter = result.iterator(); iter.hasNext();) {
- IInstallableUnit iu = iter.next();
- String id = iu.getId();
- if (installableUnitIdsThisRepository.contains(id))
- installableUnits.add(iu);
- }
- }
- return installableUnits;
- }
-
- protected IQuery<IInstallableUnit> createInstalledIUsQuery() {
- return QueryUtil.createIUGroupQuery();
- }
-
- private List<IMetadataRepository> addRepositories(SubMonitor monitor) throws MalformedURLException, URISyntaxException, ProvisionException {
- // tell p2 that it's okay to use these repositories
- ProvisioningSession session = ProvisioningUI.getDefaultUI().getSession();
- RepositoryTracker repositoryTracker = ProvisioningUI.getDefaultUI().getRepositoryTracker();
- repositoryLocations = new HashSet<URI>();
- monitor.setWorkRemaining(installableConnectors.size() * 5);
- for (CatalogItem descriptor : installableConnectors) {
- URI uri = new URL(descriptor.getSiteUrl()).toURI();
- if (repositoryLocations.add(uri)) {
- checkCancelled(monitor);
- repositoryTracker.addRepository(uri, null, session);
- // ProvisioningUtil.addMetaDataRepository(url.toURI(), true);
- // ProvisioningUtil.addArtifactRepository(url.toURI(), true);
- // ProvisioningUtil.setColocatedRepositoryEnablement(url.toURI(), true);
- }
- monitor.worked(1);
- }
-
- // fetch meta-data for these repositories
- ArrayList<IMetadataRepository> repositories = new ArrayList<IMetadataRepository>();
- monitor.setWorkRemaining(repositories.size());
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) session.getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- for (URI uri : repositoryLocations) {
- checkCancelled(monitor);
- IMetadataRepository repository = manager.loadRepository(uri, monitor.newChild(1));
- repositories.add(repository);
- }
- return repositories;
- }
-
- private Set<String> getDescriptorIds(final IMetadataRepository repository) throws URISyntaxException {
- final Set<String> installableUnitIdsThisRepository = new HashSet<String>();
- // determine all installable units for this repository
- for (CatalogItem descriptor : installableConnectors) {
- try {
- if (repository.getLocation().equals(new URL(descriptor.getSiteUrl()).toURI())) {
- installableUnitIdsThisRepository.addAll(descriptor.getInstallableUnits());
- }
- } catch (MalformedURLException e) {
- // will never happen, ignore
- }
- }
- return installableUnitIdsThisRepository;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositoryDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositoryDiscoveryStrategy.java
deleted file mode 100644
index 9976ba087..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositoryDiscoveryStrategy.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.repository;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-import org.eclipse.equinox.internal.p2.discovery.AbstractDiscoveryStrategy;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.p2.metadata.TranslationSupport;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * @author Steffen Pingel
- */
-public class RepositoryDiscoveryStrategy extends AbstractDiscoveryStrategy {
-
- private static final String IU_PROPERTY_CATEGORY = "org.eclipse.equinox.p2.type.category"; //$NON-NLS-1$
-
- private static final String PLUGIN_ID = "org.eclipse.equinox.p2.discovery.repository"; //$NON-NLS-1$
-
- private final List<URI> locations;
-
- private final Map<IMetadataRepository, RepositorySource> sourceByRepository;
-
- private final Map<String, CatalogCategory> categoryById;
-
- private final Map<String, CatalogItem> catalogItemById;
-
- public RepositoryDiscoveryStrategy() {
- this.locations = new ArrayList<URI>();
- this.sourceByRepository = new HashMap<IMetadataRepository, RepositorySource>();
- this.categoryById = new HashMap<String, CatalogCategory>();
- this.catalogItemById = new HashMap<String, CatalogItem>();
- }
-
- public void addLocation(URI location) {
- locations.add(location);
- }
-
- public void removeLocation(URI location) {
- locations.remove(location);
- }
-
- @Override
- public void performDiscovery(IProgressMonitor progressMonitor) throws CoreException {
- // ignore
- SubMonitor monitor = SubMonitor.convert(progressMonitor);
- monitor.setWorkRemaining(100);
- try {
- List<IMetadataRepository> repositories = addRepositories(monitor.newChild(50));
- queryInstallableUnits(monitor.newChild(50), repositories);
- connectCategories();
- } catch (ProvisionException e) {
- throw new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, "Failed to process repository contents", e)); //$NON-NLS-1$
- }
- }
-
- @SuppressWarnings("restriction")
- private void connectCategories() {
- for (CatalogCategory category : categories) {
- if (category.getData() instanceof IInstallableUnit) {
- IInstallableUnit categoryIU = (IInstallableUnit) category.getData();
- Collection<IRequirement> required = categoryIU.getRequirements();
- for (IRequirement requirement : required) {
- if (requirement instanceof IRequiredCapability) {
- IRequiredCapability capability = (IRequiredCapability) requirement;
- CatalogItem item = catalogItemById.get(capability.getName());
- if (item != null) {
- item.setCategoryId(category.getId());
- }
- }
- }
- }
- }
- }
-
- private List<IMetadataRepository> addRepositories(SubMonitor monitor) throws ProvisionException {
- ProvisioningSession session = ProvisioningUI.getDefaultUI().getSession();
-
- monitor.setWorkRemaining(locations.size());
-
- RepositoryTracker repositoryTracker = ProvisioningUI.getDefaultUI().getRepositoryTracker();
- for (URI location : locations) {
- repositoryTracker.addRepository(location, null, session);
- monitor.worked(1);
- }
-
- // fetch meta-data for these repositories
- ArrayList<IMetadataRepository> repositories = new ArrayList<IMetadataRepository>();
- IMetadataRepositoryManager manager = (IMetadataRepositoryManager) session.getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- for (URI uri : locations) {
- IMetadataRepository repository = manager.loadRepository(uri, monitor.newChild(1));
- repositories.add(repository);
- }
- return repositories;
- }
-
- private void checkCancelled(IProgressMonitor monitor) {
- if (monitor.isCanceled()) {
- throw new OperationCanceledException();
- }
- }
-
- private void queryInstallableUnits(SubMonitor monitor, List<IMetadataRepository> repositories) {
- monitor.setWorkRemaining(repositories.size());
- for (final IMetadataRepository repository : repositories) {
- checkCancelled(monitor);
- IQuery<IInstallableUnit> query = QueryUtil.createMatchQuery(//
- "id ~= /*.feature.group/ " + // //$NON-NLS-1$
- "? providedCapabilities.exists(p | p.namespace == 'org.eclipse.equinox.p2.iu' && p.name ~= /*.feature.group/) " + // //$NON-NLS-1$
- ": properties['org.eclipse.equinox.p2.type.category'] == true"); //$NON-NLS-1$
- IQueryResult<IInstallableUnit> result = repository.query(query, monitor.newChild(1));
- for (Iterator<IInstallableUnit> iter = result.iterator(); iter.hasNext();) {
- process(repository, iter.next());
- }
- }
- }
-
- protected void process(IMetadataRepository repository, IInstallableUnit candidate) {
- if (isCategory(candidate)) {
- processCategory(repository, candidate);
- } else {
- processCatalogItem(repository, candidate);
- }
- }
-
- private CatalogItem processCatalogItem(IMetadataRepository repository, IInstallableUnit candidate) {
- CatalogItem item = catalogItemById.get(candidate.getId());
- if (item != null) {
- return item;
- }
-
- item = new CatalogItem();
- item.setId(candidate.getId());
- item.setDescription(getProperty(candidate, IInstallableUnit.PROP_DESCRIPTION));
- item.setName(getProperty(candidate, IInstallableUnit.PROP_NAME));
- item.setProvider(getProperty(candidate, IInstallableUnit.PROP_PROVIDER));
- item.setSource(getSource(repository));
- item.setData(candidate);
- item.setSiteUrl(repository.getLocation().toString());
- item.getInstallableUnits().add(item.getId());
-
- catalogItemById.put(item.getId(), item);
- items.add(item);
- return item;
- }
-
- public String getProperty(IInstallableUnit candidate, String key) {
- String value = TranslationSupport.getInstance().getIUProperty(candidate, key);
- return (value != null) ? value : "";
- }
-
- private AbstractCatalogSource getSource(IMetadataRepository repository) {
- RepositorySource source = sourceByRepository.get(repository);
- if (source == null) {
- source = new RepositorySource(repository);
- sourceByRepository.put(repository, source);
- }
- return source;
- }
-
- private CatalogCategory processCategory(IMetadataRepository repository, IInstallableUnit candidate) {
- CatalogCategory category = categoryById.get(candidate.getId());
- if (category != null) {
- return category;
- }
-
- category = new CatalogCategory();
- category.setId(candidate.getId());
- category.setDescription(getProperty(candidate, IInstallableUnit.PROP_DESCRIPTION));
- category.setName(getProperty(candidate, IInstallableUnit.PROP_NAME));
- category.setSource(getSource(repository));
- category.setData(candidate);
-
- categoryById.put(category.getId(), category);
- categories.add(category);
- return category;
- }
-
- private Boolean isCategory(IInstallableUnit candidate) {
- return Boolean.valueOf(candidate.getProperty(IU_PROPERTY_CATEGORY));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositorySource.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositorySource.java
deleted file mode 100644
index 7d2382ff9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/repository/RepositorySource.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.repository;
-
-import java.net.URL;
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-/**
- * @author Steffen Pingel
- */
-public class RepositorySource extends AbstractCatalogSource {
-
- private final IMetadataRepository repository;
-
- public RepositorySource(IMetadataRepository repository) {
- this.repository = repository;
- }
-
- @Override
- public Object getId() {
- return repository.getLocation();
- }
-
- @Override
- public URL getResource(String resourceName) {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/CommonColors.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/CommonColors.java
deleted file mode 100644
index 65abd87c0..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/CommonColors.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- * Benjamin Pasero - initial contribution from RSSOwl, bug 177974
- * Tasktop Technologies - improvements
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import org.eclipse.jface.resource.DeviceResourceException;
-import org.eclipse.jface.resource.ResourceManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Based on {org.eclipse.ui.forms.FormColors}.
- *
- * @author Benjamin Pasero
- * @author Mik Kersten
- */
-public class CommonColors {
-
- private final Display display;
-
- private Color titleText;
-
- private Color gradientBegin;
-
- private Color gradientEnd;
-
- private Color border;
-
- private final ResourceManager resourceManager;
-
- public CommonColors(Display display, ResourceManager resourceManager) {
- this.display = display;
- this.resourceManager = resourceManager;
-
- createColors();
- }
-
- private void createColors() {
- createBorderColor();
- createGradientColors();
- // previously used SWT.COLOR_TITLE_INACTIVE_FOREGROUND, but too light on Windows XP
- titleText = getColor(resourceManager, getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
- }
-
- public Color getGradientBegin() {
- return gradientBegin;
- }
-
- public Color getGradientEnd() {
- return gradientEnd;
- }
-
- public Color getBorder() {
- return border;
- }
-
- public Color getTitleText() {
- return titleText;
- }
-
- private void createBorderColor() {
- RGB tbBorder = getSystemColor(SWT.COLOR_TITLE_BACKGROUND);
- RGB bg = getImpliedBackground().getRGB();
-
- // Group 1
- // Rule: If at least 2 of the RGB values are equal to or between 180 and
- // 255, then apply specified opacity for Group 1
- // Examples: Vista, XP Silver, Wn High Con #2
- // Keyline = TITLE_BACKGROUND @ 70% Opacity over LIST_BACKGROUND
- if (testTwoPrimaryColors(tbBorder, 179, 256)) {
- tbBorder = blend(tbBorder, bg, 70);
- } else if (testTwoPrimaryColors(tbBorder, 120, 180)) {
- tbBorder = blend(tbBorder, bg, 50);
- } else {
- tbBorder = blend(tbBorder, bg, 30);
- }
-
- border = getColor(resourceManager, tbBorder);
- }
-
- private void createGradientColors() {
- RGB titleBg = getSystemColor(SWT.COLOR_TITLE_BACKGROUND);
- Color bgColor = getImpliedBackground();
- RGB bg = bgColor.getRGB();
- RGB bottom, top;
-
- // Group 1
- // Rule: If at least 2 of the RGB values are equal to or between 180 and
- // 255, then apply specified opacity for Group 1
- // Examples: Vista, XP Silver, Wn High Con #2
- // Gradient Bottom = TITLE_BACKGROUND @ 30% Opacity over LIST_BACKGROUND
- // Gradient Top = TITLE BACKGROUND @ 0% Opacity over LIST_BACKGROUND
- if (testTwoPrimaryColors(titleBg, 179, 256)) {
- bottom = blend(titleBg, bg, 30);
- top = bg;
- }
-
- // Group 2
- // Rule: If at least 2 of the RGB values are equal to or between 121 and
- // 179, then apply specified opacity for Group 2
- // Examples: XP Olive, OSX Graphite, Linux GTK, Wn High Con Black
- // Gradient Bottom = TITLE_BACKGROUND @ 20% Opacity over LIST_BACKGROUND
- // Gradient Top = TITLE BACKGROUND @ 0% Opacity over LIST_BACKGROUND
- else if (testTwoPrimaryColors(titleBg, 120, 180)) {
- bottom = blend(titleBg, bg, 20);
- top = bg;
- }
-
- // Group 3
- // Rule: If at least 2 of the RGB values are equal to or between 0 and
- // 120, then apply specified opacity for Group 3
- // Examples: XP Default, Wn Classic Standard, Wn Marine, Wn Plum, OSX
- // Aqua, Wn High Con White, Wn High Con #1
- // Gradient Bottom = TITLE_BACKGROUND @ 10% Opacity over LIST_BACKGROUND
- // Gradient Top = TITLE BACKGROUND @ 0% Opacity over LIST_BACKGROUND
- else {
- bottom = blend(titleBg, bg, 10);
- top = bg;
- }
-
- gradientBegin = getColor(resourceManager, top);
- gradientEnd = getColor(resourceManager, bottom);
- }
-
- private RGB blend(RGB c1, RGB c2, int ratio) {
- int r = blend(c1.red, c2.red, ratio);
- int g = blend(c1.green, c2.green, ratio);
- int b = blend(c1.blue, c2.blue, ratio);
- return new RGB(r, g, b);
- }
-
- private int blend(int v1, int v2, int ratio) {
- int b = (ratio * v1 + (100 - ratio) * v2) / 100;
- return Math.min(255, b);
- }
-
- private boolean testTwoPrimaryColors(RGB rgb, int from, int to) {
- int total = 0;
- if (testPrimaryColor(rgb.red, from, to)) {
- total++;
- }
- if (testPrimaryColor(rgb.green, from, to)) {
- total++;
- }
- if (testPrimaryColor(rgb.blue, from, to)) {
- total++;
- }
- return total >= 2;
- }
-
- private boolean testPrimaryColor(int value, int from, int to) {
- return value > from && value < to;
- }
-
- private RGB getSystemColor(int code) {
- return getDisplay().getSystemColor(code).getRGB();
- }
-
- private Color getImpliedBackground() {
- return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- }
-
- private Display getDisplay() {
- return display;
- }
-
- private Color getColor(ResourceManager manager, RGB rgb) {
- try {
- return manager.createColor(rgb);
- } catch (DeviceResourceException e) {
- return manager.getDevice().getSystemColor(SWT.COLOR_BLACK);
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListItem.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListItem.java
deleted file mode 100644
index c66e167f2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListItem.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- * Tasktop Technologies - generalized ProgressInfoItem for reuse
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Based on {@link org.eclipse.ui.internal.progress.ProgressInfoItem}.
- *
- * @author Steffen Pingel
- */
-public abstract class ControlListItem<T> extends Composite {
-
- static String DARK_COLOR_KEY = "org.eclipse.mylyn.commons.ui.ControlListItem.DARK_COLOR"; //$NON-NLS-1$
-
- interface IndexListener {
-
- /**
- * Select the item previous to the receiver.
- */
- public void selectPrevious();
-
- /**
- * Select the next previous to the receiver.
- */
- public void selectNext();
-
- /**
- * Select the receiver.
- */
- public void select();
-
- public void open();
-
- }
-
- IndexListener indexListener;
-
- private int currentIndex;
-
- private boolean selected;
-
- private final MouseAdapter mouseListener;
-
- private boolean isShowing = true;
-
- private final MouseTrackAdapter mouseTrackListener;
-
- private boolean hot;
-
- static {
- // Mac has different Gamma value
- int shift = "carbon".equals(SWT.getPlatform()) ? -25 : -10;//$NON-NLS-1$
-
- Color lightColor = PlatformUI.getWorkbench().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
-
- // Determine a dark color by shifting the list color
- RGB darkRGB = new RGB(Math.max(0, lightColor.getRed() + shift), Math.max(0, lightColor.getGreen() + shift), Math.max(0, lightColor.getBlue() + shift));
- JFaceResources.getColorRegistry().put(DARK_COLOR_KEY, darkRGB);
- }
-
- /**
- * Create a new instance of the receiver with the specified parent, style and info object/
- *
- * @param parent
- * @param style
- * @param element
- */
- public ControlListItem(Composite parent, int style, T element) {
- super(parent, style | SWT.NO_FOCUS);
- Assert.isNotNull(element);
- super.setData(element);
- setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
- mouseListener = doCreateMouseListener();
- mouseTrackListener = doCreateMouseTrackListener();
- registerChild(this);
- // Control[] children = getChildren();
- // for (Control child : children) {
- // registerChild(child);
- // }
- setHot(false);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public T getData() {
- return (T) super.getData();
- }
-
- @Override
- public void setData(Object data) {
- throw new IllegalArgumentException();
- }
-
- private MouseTrackAdapter doCreateMouseTrackListener() {
- return new MouseTrackAdapter() {
- private int enterCount;
-
- @Override
- public void mouseEnter(MouseEvent e) {
- enterCount++;
- updateHotState();
- }
-
- @Override
- public void mouseExit(MouseEvent e) {
- enterCount--;
- getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!isDisposed()) {
- updateHotState();
- }
- }
- });
- }
-
- private void updateHotState() {
- if (enterCount == 0) {
- if (isHot()) {
- setHot(false);
- }
- } else {
- if (!isHot()) {
- setHot(true);
- }
- }
- }
- };
- }
-
- private MouseAdapter doCreateMouseListener() {
- return new MouseAdapter() {
- @Override
- public void mouseDown(MouseEvent e) {
- if (indexListener != null) {
- if (e.count == 2) {
- indexListener.open();
- } else {
- indexListener.select();
- }
- }
- }
- };
- }
-
- public boolean isHot() {
- return hot;
- }
-
- public void setHot(boolean hot) {
- this.hot = hot;
- }
-
- protected void registerChild(Control child) {
- child.addMouseListener(mouseListener);
- child.addMouseTrackListener(mouseTrackListener);
-
- }
-
- /**
- * Refresh the contents of the receiver.
- */
- protected abstract void refresh();
-
- /**
- * Set the color base on the index
- *
- * @param index
- */
- public void updateColors(int index) {
- currentIndex = index;
-
- if (selected) {
- setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION));
- setForeground(getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT));
- } else {
- if (index % 2 == 0) {
- setBackground(JFaceResources.getColorRegistry().get(DARK_COLOR_KEY));
- } else {
- setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- }
- setForeground(getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND));
- }
- }
-
- @Override
- public void setForeground(Color color) {
- super.setForeground(color);
- Control[] children = getChildren();
- for (Control child : children) {
- child.setForeground(color);
- }
- }
-
- @Override
- public void setBackground(Color color) {
- super.setBackground(color);
- Control[] children = getChildren();
- for (Control child : children) {
- child.setBackground(color);
- }
- }
-
- /**
- * Set the selection colors.
- *
- * @param select
- * boolean that indicates whether or not to show selection.
- */
- public void setSelected(boolean select) {
- selected = select;
- updateColors(currentIndex);
- }
-
- /**
- * Set the listener for index changes.
- *
- * @param indexListener
- */
- void setIndexListener(IndexListener indexListener) {
- this.indexListener = indexListener;
- }
-
- /**
- * Return whether or not the receiver is selected.
- *
- * @return boolean
- */
- public boolean isSelected() {
- return selected;
- }
-
- /**
- * Set whether or not the receiver is being displayed based on the top and bottom of the currently visible area.
- *
- * @param top
- * @param bottom
- */
- void setDisplayed(int top, int bottom) {
- int itemTop = getLocation().y;
- int itemBottom = itemTop + getBounds().height;
- setDisplayed(itemTop <= bottom && itemBottom > top);
-
- }
-
- /**
- * Set whether or not the receiver is being displayed
- *
- * @param displayed
- */
- private void setDisplayed(boolean displayed) {
- // See if this element has been turned off
- boolean refresh = !isShowing && displayed;
- isShowing = displayed;
- if (refresh) {
- refresh();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java
deleted file mode 100644
index fc5a6eafb..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import java.util.*;
-import java.util.List;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Based on {@link org.eclipse.ui.internal.progress.DetailedProgressViewer}.
- *
- * @author Steffen Pingel
- */
-@SuppressWarnings("restriction")
-public abstract class ControlListViewer extends StructuredViewer {
-
- Composite control;
-
- private final ScrolledComposite scrolled;
-
- private final Composite noEntryArea;
-
- protected boolean hasFocus;
-
- /**
- * Create a new instance of the receiver with a control that is a child of parent with style style.
- *
- * @param parent
- * @param style
- */
- public ControlListViewer(Composite parent, int style) {
- scrolled = new ScrolledComposite(parent, style | SWT.VERTICAL);
- int height = JFaceResources.getDefaultFont().getFontData()[0].getHeight();
- scrolled.getVerticalBar().setIncrement(height * 2);
- scrolled.setExpandHorizontal(true);
- scrolled.setExpandVertical(true);
- // bug 311276: can cause unintended scrolling of viewer
- //scrolled.setShowFocusedControl(true);
-
- control = new Composite(scrolled, SWT.NONE) {
-// @Override
-// public boolean setFocus() {
-// forceFocus();
-// return true;
-// }
-
- @Override
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- updateSize(control);
- }
- }
- };
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.horizontalSpacing = 0;
- layout.verticalSpacing = 0;
- control.setLayout(layout);
- control.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- control.setBackgroundMode(SWT.INHERIT_FORCE);
- control.addControlListener(new ControlListener() {
- public void controlMoved(ControlEvent e) {
- updateVisibleItems();
- }
-
- public void controlResized(ControlEvent e) {
- updateVisibleItems();
- }
- });
-
- scrolled.setContent(control);
- hookControl(control);
-
- noEntryArea = new Composite(scrolled, SWT.NONE);
- doCreateNoEntryArea(noEntryArea);
-
- scrolled.setExpandHorizontal(true);
- scrolled.setExpandVertical(true);
- scrolled.addControlListener(new ControlAdapter() {
- @Override
- public void controlResized(ControlEvent e) {
- updateSize(scrolled.getContent());
- }
- });
- control.addTraverseListener(new TraverseListener() {
- private boolean handleEvent = true;
-
- public void keyTraversed(TraverseEvent event) {
- if (!handleEvent) {
- return;
- }
- switch (event.detail) {
- case SWT.TRAVERSE_ARROW_PREVIOUS : {
- Control[] children = control.getChildren();
- if (children.length > 0) {
- boolean selected = false;
- for (int i = 0; i < children.length; i++) {
- ControlListItem item = (ControlListItem) children[i];
- if (item.isSelected()) {
- selected = true;
- if (i > 0) {
- setSelection(new StructuredSelection(children[i - 1].getData()), true);
- }
- break;
- }
- }
- if (!selected) {
- setSelection(new StructuredSelection(children[children.length - 1].getData()), true);
- }
- }
- break;
- }
- case SWT.TRAVERSE_ARROW_NEXT : {
- Control[] children = control.getChildren();
- if (children.length > 0) {
- boolean selected = false;
- for (int i = 0; i < children.length; i++) {
- ControlListItem item = (ControlListItem) children[i];
- if (item.isSelected()) {
- selected = true;
- if (i < children.length - 1) {
- setSelection(new StructuredSelection(children[i + 1].getData()), true);
- }
- break;
- }
- }
- if (!selected) {
- setSelection(new StructuredSelection(children[0].getData()), true);
- }
- }
- break;
- }
- default :
- handleEvent = false;
- event.doit = true;
- Control control = ControlListViewer.this.control;
- Shell shell = control.getShell();
- while (control != null) {
- if (control.traverse(event.detail)) {
- break;
- }
- if (!event.doit || control == shell) {
- break;
- }
- control = control.getParent();
- }
- handleEvent = true;
- break;
- }
- }
- });
- }
-
- protected void doCreateNoEntryArea(Composite parent) {
- }
-
- public void add(Object[] elements) {
- ViewerComparator sorter = getComparator();
-
- // Use a Set in case we are getting something added that exists
- Set<Object> newItems = new HashSet<Object>(elements.length);
-
- Control[] existingChildren = control.getChildren();
- for (Control element : existingChildren) {
- if (element.getData() != null) {
- newItems.add(element.getData());
- }
- }
-
- for (Object element : elements) {
- if (element != null) {
- newItems.add(element);
- }
- }
-
- Object[] infos = new Object[newItems.size()];
- newItems.toArray(infos);
-
- if (sorter != null) {
- sorter.sort(this, infos);
- }
-
- // Update with the new elements to prevent flash
- for (Control element : existingChildren) {
- ((ControlListItem) element).dispose();
- }
-
- for (int i = 0; i < infos.length; i++) {
- ControlListItem item = createNewItem(infos[i]);
- item.updateColors(i);
- }
-
- control.layout(true);
- doUpdateContent();
- }
-
- private void updateSize(Control control) {
- if (control == null) {
- return;
- }
- // XXX need a small offset in case the list has a scroll bar
- Point size = control.computeSize(scrolled.getClientArea().width - 20, SWT.DEFAULT, true);
- control.setSize(size);
- scrolled.setMinSize(size);
- }
-
- protected void doUpdateContent() {
- if (control.getChildren().length > 0) {
- updateSize(control);
- scrolled.setContent(control);
- } else {
- updateSize(noEntryArea);
- scrolled.setContent(noEntryArea);
- }
- }
-
- /**
- * Create a new item for info.
- *
- * @param element
- * @return ControlListItem
- */
- private ControlListItem createNewItem(Object element) {
- final ControlListItem item = doCreateItem(control, element);
- // item.getChildren()[0].addPaintListener(new PaintListener() {
- // public void paintControl(PaintEvent e) {
- // if (hasFocus && item.isSelected()) {
- // Point size = item.getSize();
- // e.gc.setForeground(e.gc.getDevice().getSystemColor(SWT.COLOR_DARK_GRAY));
- // e.gc.setLineDash(new int[] { 1, 2 });
- // e.gc.drawRoundRectangle(0, 0, size.x - 1, size.y - 1, 5, 5);
- // }
- // }
- // });
- item.setIndexListener(new ControlListItem.IndexListener() {
- public void selectNext() {
- Control[] children = control.getChildren();
- for (int i = 0; i < children.length; i++) {
- if (item == children[i]) {
- if (i < children.length - 1) {
- setSelection(new StructuredSelection(children[i + 1].getData()));
- }
- break;
- }
- }
- }
-
- public void selectPrevious() {
- Control[] children = control.getChildren();
- for (int i = 0; i < children.length; i++) {
- if (item == children[i]) {
- if (i > 0) {
- setSelection(new StructuredSelection(children[i - 1].getData()));
- }
- break;
- }
- }
- }
-
- public void select() {
- setSelection(new StructuredSelection(item.getData()));
- setFocus();
- }
-
- public void open() {
- handleOpen();
- }
- });
- GridDataFactory.fillDefaults().grab(true, false).applyTo(item);
- // Refresh to populate with the current tasks
- item.refresh();
- return item;
- }
-
- protected abstract ControlListItem doCreateItem(Composite parent, Object element);
-
- @Override
- protected ControlListItem doFindInputItem(Object element) {
- return null;
- }
-
- @Override
- protected ControlListItem doFindItem(Object element) {
- Control[] children = control.getChildren();
- for (Control child : children) {
- if (child.isDisposed() || child.getData() == null) {
- continue;
- }
- if (child.getData().equals(element)) {
- return (ControlListItem) child;
- }
- }
- return null;
- }
-
- @Override
- protected void doUpdateItem(Widget item, Object element, boolean fullMap) {
- if (usingElementMap()) {
- unmapElement(item);
- }
- item.dispose();
- add(new Object[] {element});
- }
-
- @Override
- public ScrolledComposite getControl() {
- return scrolled;
- }
-
- @Override
- protected List<?> getSelectionFromWidget() {
- Control[] children = control.getChildren();
- ArrayList<Object> selection = new ArrayList<Object>(children.length);
- for (Control child : children) {
- ControlListItem item = (ControlListItem) child;
- if (item.isSelected() && item.getData() != null) {
- selection.add(item.getData());
- }
- }
- return selection;
- }
-
- protected void handleOpen() {
- Control control = getControl();
- if (control != null && !control.isDisposed()) {
- ISelection selection = getSelection();
- fireOpen(new OpenEvent(this, selection));
- }
- }
-
- @Override
- protected void inputChanged(Object input, Object oldInput) {
- super.inputChanged(input, oldInput);
- refreshAll();
- doUpdateContent();
- }
-
- @Override
- protected void internalRefresh(Object element) {
- if (element == null) {
- return;
- }
-
- if (element.equals(getRoot())) {
- refreshAll();
- return;
- }
- Widget widget = findItem(element);
- if (widget == null) {
- add(new Object[] {element});
- return;
- }
- ((ControlListItem) widget).refresh();
-
- updateSize(control);
- }
-
- public void remove(Object[] elements) {
- for (Object element : elements) {
- Widget item = doFindItem(element);
- if (item != null) {
- unmapElement(element);
- item.dispose();
- }
- }
-
- Control[] existingChildren = control.getChildren();
- for (int i = 0; i < existingChildren.length; i++) {
- ControlListItem item = (ControlListItem) existingChildren[i];
- item.updateColors(i);
- }
- control.layout(true);
- doUpdateContent();
- }
-
- @Override
- public void reveal(Object element) {
- Control control = doFindItem(element);
- if (control != null) {
- revealControl(control);
- }
- }
-
- private void revealControl(Control control) {
- Rectangle clientArea = scrolled.getClientArea();
- Point origin = scrolled.getOrigin();
- Point location = control.getLocation();
- Point size = control.getSize();
- if (location.y + size.y > origin.y + clientArea.height) {
- scrolled.setOrigin(origin.x, location.y + size.y - clientArea.height);
- }
- if (location.y < origin.y) {
- scrolled.setOrigin(origin.x, location.y);
- }
- }
-
- @SuppressWarnings({"unchecked", "rawtypes"})
- @Override
- protected void setSelectionToWidget(List list, boolean reveal) {
- if (list != null) {
- HashSet<Object> elements = new HashSet<Object>(list);
- Control[] children = control.getChildren();
- for (Control control : children) {
- ControlListItem child = (ControlListItem) control;
- boolean selected = elements.contains(child.getData());
- if (selected != child.isSelected()) {
- child.setSelected(selected);
- }
- if (reveal && selected) {
- revealControl(child);
- reveal = false;
- }
- }
- } else {
- Control[] children = control.getChildren();
- for (Control control : children) {
- ControlListItem child = (ControlListItem) control;
- if (child.isSelected()) {
- child.setSelected(false);
- }
- }
- }
- }
-
- /**
- * Set focus on the current selection.
- */
- public void setFocus() {
- Control[] children = control.getChildren();
- if (children.length > 0) {
- // causes the item's tool bar to get focus when clicked which is undesirable
- // for (Control element : children) {
- // ControlListItem item = (ControlListItem) element;
- // if (item.isSelected()) {
- // if (item.setFocus()) {
- // return;
- // }
- // }
- // }
- control.forceFocus();
- } else {
- noEntryArea.setFocus();
- }
- }
-
- /**
- * Refresh everything as the root is being refreshed.
- */
- private void refreshAll() {
- Object[] infos = getSortedChildren(getRoot());
- Control[] existingChildren = control.getChildren();
-
- for (Control element : existingChildren) {
- element.dispose();
- }
-
- for (int i = 0; i < infos.length; i++) {
- ControlListItem item = createNewItem(infos[i]);
- item.updateColors(i);
- }
-
- control.layout(true);
- doUpdateContent();
- }
-
- /**
- * Set the virtual items to be visible or not depending on the displayed area.
- */
- private void updateVisibleItems() {
- Control[] children = control.getChildren();
- int top = scrolled.getOrigin().y;
- int bottom = top + scrolled.getParent().getBounds().height;
- for (Control element : children) {
- ControlListItem item = (ControlListItem) element;
- item.setDisplayed(top, bottom);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/FilteredViewer.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/FilteredViewer.java
deleted file mode 100644
index 6b78e3969..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/FilteredViewer.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Jacek Pospychala - bug 187762
- * Mohamed Tarief - tarief@eg.ibm.com - IBM - Bug 174481
- * Tasktop Technologies - generalized filter code for structured viewers
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.Messages;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-/**
- * Based on {@link org.eclipse.ui.dialogs.FilteredTree}.
- *
- * @author Steffen Pingel
- */
-public abstract class FilteredViewer {
-
- private boolean automaticFind;
-
- private Label clearFilterTextControl;
-
- private Composite container;
-
- TextSearchControl filterText;
-
- private int minimumHeight;
-
- String previousFilterText = ""; //$NON-NLS-1$
-
- WorkbenchJob refreshJob;
-
- private long refreshJobDelay = 200L;
-
- private PatternFilter searchFilter;
-
- protected StructuredViewer viewer;
-
- private Composite header;
-
- public FilteredViewer() {
- setAutomaticFind(true);
- }
-
- void clearFilterText() {
- filterText.getTextControl().setText(""); //$NON-NLS-1$
- filterTextChanged();
- }
-
- public void createControl(Composite parent) {
- container = new Composite(parent, SWT.NONE);
- GridLayoutFactory.fillDefaults().margins(0, 0).applyTo(container);
- container.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (refreshJob != null) {
- refreshJob.cancel();
- }
- }
- });
-
- doCreateHeader();
-
- viewer = doCreateViewer(container);
- searchFilter = doCreateFilter();
- viewer.addFilter(searchFilter);
- GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, minimumHeight).applyTo(viewer.getControl());
- }
-
- protected PatternFilter doCreateFilter() {
- return new PatternFilter() {
- @Override
- protected boolean isParentMatch(Viewer viewer, Object element) {
- return false;
- }
- };
- }
-
- private void doCreateFindControl(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(Messages.ConnectorDiscoveryWizardMainPage_filterLabel);
- GridDataFactory.swtDefaults().align(SWT.BEGINNING, SWT.CENTER).applyTo(label);
-
- filterText = new TextSearchControl(parent, automaticFind);
- if (automaticFind) {
- filterText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- filterTextChanged();
- }
- });
- } else {
- filterText.getTextControl().addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- e.doit = false;
- filterTextChanged();
- }
- }
- });
- }
- filterText.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- if (e.detail == SWT.ICON_CANCEL) {
- clearFilterText();
- } else {
- // search icon and enter
- filterTextChanged();
- }
- }
- });
- GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.CENTER).applyTo(filterText);
- }
-
- private void doCreateHeader() {
- header = new Composite(container, SWT.NONE);
- GridLayoutFactory.fillDefaults().applyTo(header);
- GridDataFactory.fillDefaults().grab(true, false).applyTo(header);
-
- doCreateFindControl(header);
- doCreateHeaderControls(header);
-
- // arrange all header controls horizontally
- GridLayoutFactory.fillDefaults().numColumns(header.getChildren().length).applyTo(header);
- }
-
- protected void doCreateHeaderControls(Composite parent) {
- // ignore
- }
-
- public void setHeaderVisible(boolean visible) {
- if (header != null && visible != header.getVisible()) {
- header.setVisible(visible);
- GridData headerLayout = (GridData) header.getLayoutData();
- headerLayout.exclude = !visible;
- container.layout(true, true);
- }
- }
-
- public boolean isHeaderVisible() {
- return header != null && header.getVisible();
- }
-
- protected WorkbenchJob doCreateRefreshJob() {
- return new WorkbenchJob("filter") { //$NON-NLS-1$
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (filterText.isDisposed()) {
- return Status.CANCEL_STATUS;
- }
- String text = filterText.getTextControl().getText();
- text = text.trim();
-
- if (!previousFilterText.equals(text)) {
- previousFilterText = text;
- doFind(text);
- }
- return Status.OK_STATUS;
- }
- };
- }
-
- protected abstract StructuredViewer doCreateViewer(Composite parent);
-
- protected void doFind(String text) {
- searchFilter.setPattern(text);
- if (clearFilterTextControl != null) {
- clearFilterTextControl.setVisible(text != null && text.length() != 0);
- }
- viewer.refresh(true);
- }
-
- /**
- * Invoked whenever the filter text is changed or the user otherwise causes the filter text to change.
- */
- protected void filterTextChanged() {
- if (refreshJob == null) {
- refreshJob = doCreateRefreshJob();
- } else {
- refreshJob.cancel();
- }
- refreshJob.schedule(refreshJobDelay);
- }
-
- /**
- * Provides the text string of the search widget.
- */
- protected String getFilterText() {
- return filterText == null ? null : filterText.getTextControl().getText();
- }
-
- public Control getControl() {
- return container;
- }
-
- public int getMinimumHeight() {
- return minimumHeight;
- }
-
- protected long getRefreshJobDelay() {
- return refreshJobDelay;
- }
-
- public StructuredViewer getViewer() {
- return viewer;
- }
-
- public void setMinimumHeight(int minimumHeight) {
- this.minimumHeight = minimumHeight;
- if (viewer != null) {
- GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, minimumHeight).applyTo(viewer.getControl());
- }
- }
-
- protected void setRefreshJobDelay(long refreshJobDelay) {
- this.refreshJobDelay = refreshJobDelay;
- }
-
- public final void setAutomaticFind(boolean automaticFind) {
- if (filterText != null) {
- throw new IllegalStateException("setAutomaticFind() needs be invoked before controls are created"); //$NON-NLS-1$
- }
- this.automaticFind = automaticFind;
- }
-
- public final boolean isAutomaticFind() {
- return automaticFind;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientCanvas.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientCanvas.java
deleted file mode 100644
index 2f47eb2b2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientCanvas.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 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
- * Tasktop Technologies - extracted FormHeading implementation for Mylyn
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import java.util.Hashtable;
-import java.util.Map;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Based on org.eclipse.ui.internal.forms.widgets.FormHeading.
- */
-public class GradientCanvas extends Canvas {
-
- private static final int SEPARATOR = 1 << 1;
-
- private static final int BOTTOM_SEPARATOR = 1 << 2;
-
- private static final int BACKGROUND_IMAGE_TILED = 1 << 3;
-
- public static final String COLOR_BASE_BG = "baseBg"; //$NON-NLS-1$
-
- static String PREFIX = "org.eclipse.ui.forms."; //$NON-NLS-1$
-
- static String H_PREFIX = PREFIX + "H_"; //$NON-NLS-1$
-
- public static String H_BOTTOM_KEYLINE1 = H_PREFIX + "BOTTOM_KEYLINE1"; //$NON-NLS-1$
-
- /**
- * Key for the form header bottom keyline 2 color.
- */
- public static String H_BOTTOM_KEYLINE2 = H_PREFIX + "BOTTOM_KEYLINE2"; //$NON-NLS-1$
-
- private Image backgroundImage;
-
- private Image gradientImage;
-
- Map<String, Color> colors = new Hashtable<String, Color>();
-
- private int flags;
-
- private GradientInfo gradientInfo;
-
- private class GradientInfo {
- Color[] gradientColors;
-
- int[] percents;
-
- boolean vertical;
- }
-
- @Override
- public boolean forceFocus() {
- return false;
- }
-
- /**
- * Creates the form content control as a child of the provided parent.
- *
- * @param parent
- * the parent widget
- */
- public GradientCanvas(Composite parent, int style) {
- super(parent, style);
- setBackgroundMode(SWT.INHERIT_DEFAULT);
- setSeparatorAlignment(SWT.BOTTOM);
- addListener(SWT.Paint, new Listener() {
- public void handleEvent(Event e) {
- onPaint(e.gc);
- }
- });
- addListener(SWT.Dispose, new Listener() {
- public void handleEvent(Event e) {
- if (gradientImage != null) {
- // TODO e3.4 FormImages.getInstance().markFinished(gradientImage);
- gradientImage.dispose();
- gradientImage = null;
- }
- }
- });
- addListener(SWT.Resize, new Listener() {
- public void handleEvent(Event e) {
- if (gradientInfo != null || (backgroundImage != null && !isBackgroundImageTiled())) {
- updateGradientImage();
- }
- }
- });
- }
-
- @Override
- public void setBackground(Color bg) {
- super.setBackground(bg);
- internalSetBackground(bg);
- }
-
- private void internalSetBackground(Color bg) {
- putColor(COLOR_BASE_BG, bg);
- }
-
- public void setBackgroundGradient(Color[] gradientColors, int[] percents, boolean vertical) {
- if (gradientColors != null) {
- gradientInfo = new GradientInfo();
- gradientInfo.gradientColors = gradientColors;
- gradientInfo.percents = percents;
- gradientInfo.vertical = vertical;
- setBackground(null);
- updateGradientImage();
- } else {
- // reset
- gradientInfo = null;
- if (gradientImage != null) {
- // TODO e3.4 FormImages.getInstance().markFinished(gradientImage);
- gradientImage.dispose();
- gradientImage = null;
- setBackgroundImage(null);
- }
- }
- }
-
- public void setHeadingBackgroundImage(Image image) {
- this.backgroundImage = image;
- if (image != null) {
- setBackground(null);
- }
- if (isBackgroundImageTiled()) {
- setBackgroundImage(image);
- } else {
- updateGradientImage();
- }
- }
-
- public Image getHeadingBackgroundImage() {
- return backgroundImage;
- }
-
- public void setBackgroundImageTiled(boolean tiled) {
- if (tiled) {
- flags |= BACKGROUND_IMAGE_TILED;
- } else {
- flags &= ~BACKGROUND_IMAGE_TILED;
- }
- setHeadingBackgroundImage(this.backgroundImage);
- }
-
- public boolean isBackgroundImageTiled() {
- return (flags & BACKGROUND_IMAGE_TILED) != 0;
- }
-
- @Override
- public void setBackgroundImage(Image image) {
- super.setBackgroundImage(image);
- if (image != null) {
- internalSetBackground(null);
- }
- }
-
- private void onPaint(GC gc) {
- if (!isSeparatorVisible() && getBackgroundImage() == null) {
- return;
- }
- Rectangle carea = getClientArea();
- Image buffer = new Image(getDisplay(), carea.width, carea.height);
- buffer.setBackground(getBackground());
- GC igc = new GC(buffer);
- igc.setBackground(getBackground());
- igc.fillRectangle(0, 0, carea.width, carea.height);
- if (getBackgroundImage() != null) {
- if (gradientInfo != null) {
- drawBackground(igc, carea.x, carea.y, carea.width, carea.height);
- } else {
- Image bgImage = getBackgroundImage();
- Rectangle ibounds = bgImage.getBounds();
- drawBackground(igc, carea.x, carea.y, ibounds.width, ibounds.height);
- }
- }
-
- if (isSeparatorVisible()) {
- drawSeparator(carea, igc);
- }
- igc.dispose();
- gc.drawImage(buffer, carea.x, carea.y);
- buffer.dispose();
- }
-
- private void drawSeparator(Rectangle carea, GC igc) {
- // bg separator
- if (hasColor(H_BOTTOM_KEYLINE1)) {
- igc.setForeground(getColor(H_BOTTOM_KEYLINE1));
- } else {
- igc.setForeground(getBackground());
- }
- if (getSeparatorAlignment() == SWT.BOTTOM) {
- igc.drawLine(carea.x, carea.height - 2, carea.x + carea.width - 1, carea.height - 2);
- } else {
- igc.drawLine(carea.x, 1, carea.x + carea.width - 1, 1);
- }
- if (hasColor(H_BOTTOM_KEYLINE2)) {
- igc.setForeground(getColor(H_BOTTOM_KEYLINE2));
- } else {
- igc.setForeground(getForeground());
- }
- if (getSeparatorAlignment() == SWT.BOTTOM) {
- igc.drawLine(carea.x, carea.height - 1, carea.x + carea.width - 1, carea.height - 1);
- } else {
- igc.drawLine(carea.x, 0, carea.x + carea.width - 1, 0);
- }
- }
-
- private void updateGradientImage() {
- Rectangle rect = getBounds();
- if (gradientImage != null) {
- // TODO e3.4 FormImages.getInstance().markFinished(gradientImage);
- gradientImage.dispose();
- gradientImage = null;
- }
- if (gradientInfo != null) {
- // TODO e3.4 use FormImages
- // gradientImage = FormImages.getInstance().getGradient(gradientInfo.gradientColors, gradientInfo.percents,
- // gradientInfo.vertical ? rect.height : rect.width, gradientInfo.vertical, getColor(COLOR_BASE_BG));
- boolean vertical = gradientInfo.vertical;
- int width = vertical ? 1 : rect.width;
- int height = vertical ? rect.height : 1;
- gradientImage = new Image(getDisplay(), Math.max(width, 1), Math.max(height, 1));
- GC gc = new GC(gradientImage);
- drawTextGradient(gc, width, height);
- gc.dispose();
- } else if (backgroundImage != null && !isBackgroundImageTiled()) {
- gradientImage = new Image(getDisplay(), Math.max(rect.width, 1), Math.max(rect.height, 1));
- gradientImage.setBackground(getBackground());
- GC gc = new GC(gradientImage);
- gc.drawImage(backgroundImage, 0, 0);
- gc.dispose();
- }
- setBackgroundImage(gradientImage);
- }
-
- private void drawTextGradient(GC gc, int width, int height) {
- final Color oldBackground = gc.getBackground();
- if (gradientInfo.gradientColors.length == 1) {
- if (gradientInfo.gradientColors[0] != null) {
- gc.setBackground(gradientInfo.gradientColors[0]);
- }
- gc.fillRectangle(0, 0, width, height);
- } else {
- final Color oldForeground = gc.getForeground();
- Color lastColor = gradientInfo.gradientColors[0];
- if (lastColor == null) {
- lastColor = oldBackground;
- }
- int pos = 0;
- for (int i = 0; i < gradientInfo.percents.length; ++i) {
- gc.setForeground(lastColor);
- lastColor = gradientInfo.gradientColors[i + 1];
- if (lastColor == null) {
- lastColor = oldBackground;
- }
- gc.setBackground(lastColor);
- if (gradientInfo.vertical) {
- final int gradientHeight = (gradientInfo.percents[i] * height / 100) - pos;
- gc.fillGradientRectangle(0, pos, width, gradientHeight, true);
- pos += gradientHeight;
- } else {
- final int gradientWidth = (gradientInfo.percents[i] * width / 100) - pos;
- gc.fillGradientRectangle(pos, 0, gradientWidth, height, false);
- pos += gradientWidth;
- }
- }
- if (gradientInfo.vertical && pos < height) {
- gc.setBackground(getColor(COLOR_BASE_BG));
- gc.fillRectangle(0, pos, width, height - pos);
- }
- if (!gradientInfo.vertical && pos < width) {
- gc.setBackground(getColor(COLOR_BASE_BG));
- gc.fillRectangle(pos, 0, width - pos, height);
- }
-
- if (isSeparatorVisible()) {
- drawSeparator(getClientArea(), gc);
- }
- gc.setForeground(oldForeground);
- }
- }
-
- public boolean isSeparatorVisible() {
- return (flags & SEPARATOR) != 0;
- }
-
- public void setSeparatorVisible(boolean addSeparator) {
- if (addSeparator) {
- flags |= SEPARATOR;
- } else {
- flags &= ~SEPARATOR;
- }
- }
-
- public void setSeparatorAlignment(int alignment) {
- if (alignment == SWT.BOTTOM) {
- flags |= BOTTOM_SEPARATOR;
- } else {
- flags &= ~BOTTOM_SEPARATOR;
- }
- }
-
- public int getSeparatorAlignment() {
- return (flags & BOTTOM_SEPARATOR) != 0 ? SWT.BOTTOM : SWT.TOP;
- }
-
- public void putColor(String key, Color color) {
- if (color == null) {
- colors.remove(key);
- } else {
- colors.put(key, color);
- }
- }
-
- public Color getColor(String key) {
- return colors.get(key);
- }
-
- public boolean hasColor(String key) {
- return colors.containsKey(key);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientToolTip.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientToolTip.java
deleted file mode 100644
index 4f97659a7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/GradientToolTip.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
-import org.eclipse.jface.window.ToolTip;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A custom {@link ToolTip} that applies a gradient to the contents.
- *
- * @author Shawn Minto
- */
-public abstract class GradientToolTip extends ToolTip {
-
- private CommonColors colors;
-
- public GradientToolTip(Control control, int style, boolean manualActivation) {
- super(control, style, manualActivation);
- initResources(control);
- }
-
- public GradientToolTip(Control control) {
- super(control);
- initResources(control);
- }
-
- private void initResources(Control control) {
- colors = DiscoveryUi.getCommonsColors();
- }
-
- @Override
- protected final Composite createToolTipContentArea(Event event, final Composite parent) {
- GradientCanvas gradient = new GradientCanvas(parent, SWT.NONE);
- gradient.setSeparatorVisible(false);
- GridLayout headLayout = new GridLayout();
- headLayout.marginHeight = 0;
- headLayout.marginWidth = 0;
- headLayout.horizontalSpacing = 0;
- headLayout.verticalSpacing = 0;
- headLayout.numColumns = 1;
- gradient.setLayout(headLayout);
-
- gradient.setBackgroundGradient(new Color[] {colors.getGradientBegin(), colors.getGradientEnd()}, new int[] {100}, true);
-
- createToolTipArea(event, gradient);
-
- // force a null background so that the gradient shines through
- for (Control c : gradient.getChildren()) {
- setNullBackground(c);
- }
-
- return gradient;
- }
-
- private void setNullBackground(final Control outerCircle) {
- outerCircle.setBackground(null);
- if (outerCircle instanceof Composite) {
- ((Composite) outerCircle).setBackgroundMode(SWT.INHERIT_FORCE);
- for (Control c : ((Composite) outerCircle).getChildren()) {
- setNullBackground(c);
- }
- }
- }
-
- protected abstract Composite createToolTipArea(Event event, Composite parent);
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/Messages.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/Messages.java
deleted file mode 100644
index 94b357499..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/Messages.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author David Green
- */
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.discovery.util.messages"; //$NON-NLS-1$
-
- static {
- // load message values from bundle file
- reloadMessages();
- }
-
- public static void reloadMessages() {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String WorkbenchUtil_Browser_Initialization_Failed;
-
- public static String WorkbenchUtil_Invalid_URL_Error;
-
- public static String WorkbenchUtil_No_URL_Error;
-
- public static String WorkbenchUtil_Open_Location_Title;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java
deleted file mode 100644
index 8c20dabfd..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Tasktop Technologies - generalization for structured viewers
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import com.ibm.icu.text.BreakIterator;
-import java.util.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.ui.internal.misc.StringMatcher;
-
-/**
- * A filter used in conjunction with <code>FilteredTree</code>. In order to determine if a node should be filtered it
- * uses the content and label provider of the tree to do pattern matching on its children. This causes the entire tree
- * structure to be realized. Note that the label provider must implement ILabelProvider.
- *
- * @see org.eclipse.ui.dialogs.FilteredTree
- * @since 3.2
- */
-public class PatternFilter extends ViewerFilter {
- /*
- * Cache of filtered elements in the tree
- */
- private final Map cache = new HashMap();
-
- /*
- * Maps parent elements to TRUE or FALSE
- */
- private final Map foundAnyCache = new HashMap();
-
- private boolean useCache = false;
-
- /**
- * Whether to include a leading wildcard for all provided patterns. A trailing wildcard is always included.
- */
- private boolean includeLeadingWildcard = false;
-
- /**
- * The string pattern matcher used for this pattern filter.
- */
- private StringMatcher matcher;
-
- private boolean useEarlyReturnIfMatcherIsNull = true;
-
- private static Object[] EMPTY = new Object[0];
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#filter(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object[])
- */
- @Override
- public final Object[] filter(Viewer viewer, Object parent, Object[] elements) {
- // we don't want to optimize if we've extended the filter ... this
- // needs to be addressed in 3.4
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=186404
- if (matcher == null && useEarlyReturnIfMatcherIsNull) {
- return elements;
- }
-
- if (!useCache) {
- return super.filter(viewer, parent, elements);
- }
-
- Object[] filtered = (Object[]) cache.get(parent);
- if (filtered == null) {
- Boolean foundAny = (Boolean) foundAnyCache.get(parent);
- if (foundAny != null && !foundAny.booleanValue()) {
- filtered = EMPTY;
- } else {
- filtered = super.filter(viewer, parent, elements);
- }
- cache.put(parent, filtered);
- }
- return filtered;
- }
-
- /**
- * Returns true if any of the elements makes it through the filter. This method uses caching if enabled; the
- * computation is done in computeAnyVisible.
- *
- * @param viewer
- * @param parent
- * @param elements
- * the elements (must not be an empty array)
- * @return true if any of the elements makes it through the filter.
- */
- private boolean isAnyVisible(Viewer viewer, Object parent, Object[] elements) {
- if (matcher == null) {
- return true;
- }
-
- if (!useCache) {
- return computeAnyVisible(viewer, elements);
- }
-
- Object[] filtered = (Object[]) cache.get(parent);
- if (filtered != null) {
- return filtered.length > 0;
- }
- Boolean foundAny = (Boolean) foundAnyCache.get(parent);
- if (foundAny == null) {
- foundAny = computeAnyVisible(viewer, elements) ? Boolean.TRUE : Boolean.FALSE;
- foundAnyCache.put(parent, foundAny);
- }
- return foundAny.booleanValue();
- }
-
- /**
- * Returns true if any of the elements makes it through the filter.
- *
- * @param viewer
- * the viewer
- * @param elements
- * the elements to test
- * @return <code>true</code> if any of the elements makes it through the filter
- */
- private boolean computeAnyVisible(Viewer viewer, Object[] elements) {
- boolean elementFound = false;
- for (int i = 0; i < elements.length && !elementFound; i++) {
- Object element = elements[i];
- elementFound = isElementVisible(viewer, element);
- }
- return elementFound;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- @Override
- public final boolean select(Viewer viewer, Object parentElement, Object element) {
- return isElementVisible(viewer, element);
- }
-
- /**
- * Sets whether a leading wildcard should be attached to each pattern string.
- *
- * @param includeLeadingWildcard
- * Whether a leading wildcard should be added.
- */
- public final void setIncludeLeadingWildcard(final boolean includeLeadingWildcard) {
- this.includeLeadingWildcard = includeLeadingWildcard;
- }
-
- /**
- * The pattern string for which this filter should select elements in the viewer.
- *
- * @param patternString
- */
- public void setPattern(String patternString) {
- // these 2 strings allow the PatternFilter to be extended in
- // 3.3 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=186404
- if ("org.eclipse.ui.keys.optimization.true".equals(patternString)) { //$NON-NLS-1$
- useEarlyReturnIfMatcherIsNull = true;
- return;
- } else if ("org.eclipse.ui.keys.optimization.false".equals(patternString)) { //$NON-NLS-1$
- useEarlyReturnIfMatcherIsNull = false;
- return;
- }
- clearCaches();
- if (patternString == null || patternString.equals("")) { //$NON-NLS-1$
- matcher = null;
- } else {
- String pattern = patternString + "*"; //$NON-NLS-1$
- if (includeLeadingWildcard) {
- pattern = "*" + pattern; //$NON-NLS-1$
- }
- matcher = new StringMatcher(pattern, true, false);
- }
- }
-
- /**
- * Clears the caches used for optimizing this filter. Needs to be called whenever the tree content changes.
- */
- /* package */void clearCaches() {
- cache.clear();
- foundAnyCache.clear();
- }
-
- /**
- * Answers whether the given String matches the pattern.
- *
- * @param string
- * the String to test
- * @return whether the string matches the pattern
- */
- private boolean match(String string) {
- if (matcher == null) {
- return true;
- }
- return matcher.match(string);
- }
-
- /**
- * Answers whether the given element is a valid selection in the filtered tree. For example, if a tree has items
- * that are categorized, the category itself may not be a valid selection since it is used merely to organize the
- * elements.
- *
- * @param element
- * @return true if this element is eligible for automatic selection
- */
- public boolean isElementSelectable(Object element) {
- return element != null;
- }
-
- /**
- * Answers whether the given element in the given viewer matches the filter pattern. This is a default
- * implementation that will show a leaf element in the tree based on whether the provided filter text matches the
- * text of the given element's text, or that of it's children (if the element has any). Subclasses may override this
- * method.
- *
- * @param viewer
- * the tree viewer in which the element resides
- * @param element
- * the element in the tree to check for a match
- * @return true if the element matches the filter pattern
- */
- public boolean isElementVisible(Viewer viewer, Object element) {
- return isParentMatch(viewer, element) || isLeafMatch(viewer, element);
- }
-
- /**
- * Check if the parent (category) is a match to the filter text. The default behavior returns true if the element
- * has at least one child element that is a match with the filter text. Subclasses may override this method.
- *
- * @param viewer
- * the viewer that contains the element
- * @param element
- * the tree element to check
- * @return true if the given element has children that matches the filter text
- */
- protected boolean isParentMatch(Viewer viewer, Object element) {
- Object[] children = getChildren(element);
-
- if ((children != null) && (children.length > 0)) {
- return isAnyVisible(viewer, element, children);
- }
- return false;
- }
-
- protected Object[] getChildren(Object element) {
- return null;
- }
-
- /**
- * Check if the current (leaf) element is a match with the filter text. The default behavior checks that the label
- * of the element is a match. Subclasses should override this method.
- *
- * @param viewer
- * the viewer that contains the element
- * @param element
- * the tree element to check
- * @return true if the given element's label matches the filter text
- */
- protected boolean isLeafMatch(Viewer viewer, Object element) {
- String labelText = ((ILabelProvider) ((StructuredViewer) viewer).getLabelProvider()).getText(element);
-
- if (labelText == null) {
- return false;
- }
- return wordMatches(labelText);
- }
-
- /**
- * Take the given filter text and break it down into words using a BreakIterator.
- *
- * @param text
- * @return an array of words
- */
- private String[] getWords(String text) {
- List words = new ArrayList();
- // Break the text up into words, separating based on whitespace and
- // common punctuation.
- // Previously used String.split(..., "\\W"), where "\W" is a regular
- // expression (see the Javadoc for class Pattern).
- // Need to avoid both String.split and regular expressions, in order to
- // compile against JCL Foundation (bug 80053).
- // Also need to do this in an NL-sensitive way. The use of BreakIterator
- // was suggested in bug 90579.
- BreakIterator iter = BreakIterator.getWordInstance();
- iter.setText(text);
- int i = iter.first();
- while (i != java.text.BreakIterator.DONE && i < text.length()) {
- int j = iter.following(i);
- if (j == java.text.BreakIterator.DONE) {
- j = text.length();
- }
- // match the word
- if (Character.isLetterOrDigit(text.charAt(i))) {
- String word = text.substring(i, j);
- words.add(word);
- }
- i = j;
- }
- return (String[]) words.toArray(new String[words.size()]);
- }
-
- /**
- * Return whether or not if any of the words in text satisfy the match critera.
- *
- * @param text
- * the text to match
- * @return boolean <code>true</code> if one of the words in text satisifes the match criteria.
- */
- protected boolean wordMatches(String text) {
- if (text == null) {
- return false;
- }
-
- //If the whole text matches we are all set
- if (match(text)) {
- return true;
- }
-
- // Otherwise check if any of the words of the text matches
- String[] words = getWords(text);
- for (String word : words) {
- if (match(word)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Can be called by the filtered tree to turn on caching.
- *
- * @param useCache
- * The useCache to set.
- */
- void setUseCache(boolean useCache) {
- this.useCache = useCache;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/SelectionProviderAdapter.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/SelectionProviderAdapter.java
deleted file mode 100644
index e77d25920..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/SelectionProviderAdapter.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import org.eclipse.core.commands.common.EventManager;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jface.viewers.*;
-
-/**
- * Provides an simple implementation of {@link ISelectionProvider} that propagates selection events to registered
- * listeners.
- *
- * @author Steffen Pingel
- */
-public class SelectionProviderAdapter extends EventManager implements ISelectionProvider, ISelectionChangedListener {
-
- private ISelection selection;
-
- /**
- * Constructs a <code>SelectionProviderAdapter</code> and initializes the selection to <code>selection</code>.
- *
- * @param selection
- * the initial selection
- * @see #setSelection(ISelection)
- */
- public SelectionProviderAdapter(ISelection selection) {
- setSelection(selection);
- }
-
- /**
- * Constructs a <code>SelectionProviderAdapter</code> with a <code>null</code> selection.
- */
- public SelectionProviderAdapter() {
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- addListenerObject(listener);
- }
-
- public ISelection getSelection() {
- return selection;
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- removeListenerObject(listener);
- }
-
- public void selectionChanged(final SelectionChangedEvent event) {
- this.selection = event.getSelection();
- Object[] listeners = getListeners();
- for (int i = 0; i < listeners.length; ++i) {
- final ISelectionChangedListener listener = (ISelectionChangedListener) listeners[i];
- SafeRunner.run(new SafeRunnable() {
- public void run() {
- listener.selectionChanged(event);
- }
- });
- }
- }
-
- public void setSelection(ISelection selection) {
- selectionChanged(new SelectionChangedEvent(this, selection));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
deleted file mode 100644
index 340744fc9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/TextSearchControl.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import java.util.*;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * @author Shawn Minto
- */
-public class TextSearchControl extends Composite {
-
- private static final String FIND_TEXT_MEMENTO_ELEMENT = "text"; //$NON-NLS-1$
-
- private static final String FIND_MEMENTO_ELEMENT = "historyItem"; //$NON-NLS-1$
-
- private static final String FIND_MEMENTO_TYPE = "filteredTreeFindHistory"; //$NON-NLS-1$
-
- private static final int MAX_HISTORY_ITEMS = 50;
-
- /**
- * Image descriptor for enabled clear button.
- */
- private static final String CLEAR_ICON = "org.eclipse.ui.internal.dialogs.CLEAR_ICON"; //$NON-NLS-1$
-
- /**
- * Image descriptor for enabled clear button.
- */
- private static final String FIND_ICON = "org.eclipse.ui.internal.dialogs.FIND_ICON"; //$NON-NLS-1$
-
- /* SWT STYLE BIT AVAILABLE ON 3.5 AND HIGHER */
- public static final int ICON_SEARCH = 1 << 9;
-
- /* SWT STYLE BIT AVAILABLE ON 3.5 AND HIGHER */
- public static final int ICON_CANCEL = 1 << 8;
-
- /**
- * Get image descriptors for the clear button.
- */
- static {
- ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PlatformUI.PLUGIN_ID, "$nl$/icons/full/etool16/clear_co.gif"); //$NON-NLS-1$
- if (descriptor != null) {
- JFaceResources.getImageRegistry().put(CLEAR_ICON, descriptor);
- }
-
- descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(DiscoveryUi.ID_PLUGIN, "$nl$/icons/etool16/find.png"); //$NON-NLS-1$
- if (descriptor != null) {
- JFaceResources.getImageRegistry().put(FIND_ICON, descriptor);
- }
- }
-
- private final Text textControl;
-
- private Control clearControl;
-
- private Control findControl;
-
- private final boolean automaticFind;
-
- private final Set<SelectionListener> selectionListeners = new HashSet<SelectionListener>();
-
- private Collection<String> searchHistory = new LinkedHashSet<String>();
-
- private boolean hasHistorySupport;
-
- private static Boolean useNativeSearchField;
-
- @SuppressWarnings("restriction")
- public TextSearchControl(Composite parent, boolean automaticFind) {
- super(parent, getCompositeStyle(automaticFind, parent));
- this.automaticFind = automaticFind;
-
- int textStyle = SWT.SINGLE;
- int numColumns = 1;
- if (useNativeSearchField(automaticFind, parent)) {
- if (automaticFind) {
- textStyle |= SWT.SEARCH | ICON_CANCEL;
- } else {
- textStyle |= SWT.SEARCH | ICON_SEARCH | ICON_CANCEL;
- }
- } else {
- super.setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- super.setFont(parent.getFont());
- numColumns = 2;
- if (!automaticFind) {
- numColumns += 1;
- }
- }
- GridLayoutFactory.swtDefaults().margins(0, 0).extendedMargins(0, 0, 0, 0).spacing(0, 1).numColumns(numColumns).applyTo(this);
-
- textControl = new Text(this, textStyle);
-
- GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
- textControl.setLayoutData(gridData);
-
- if (useNativeSearchField == null || !useNativeSearchField) {
- findControl = createLabelButtonControl(this, textControl, JFaceResources.getImageRegistry().getDescriptor(FIND_ICON), "Find", "Find", ICON_SEARCH);
- clearControl = createLabelButtonControl(this, textControl, JFaceResources.getImageRegistry().getDescriptor(CLEAR_ICON), WorkbenchMessages.FilteredTree_ClearToolTip,//FilteredTree_AccessibleListenerClearButton,
- WorkbenchMessages.FilteredTree_ClearToolTip, ICON_CANCEL);
- addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- updateButtonVisibilityAndEnablement();
-
- }
- });
- updateButtonVisibilityAndEnablement();
- }
-
- registerListeners();
- }
-
- public boolean hasHistorySupport() {
- return hasHistorySupport;
- }
-
- private void registerListeners() {
- addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- if (textControl != null && !textControl.isDisposed()) {
- addToSearchHistory(textControl.getText());
- }
-
- }
- });
- textControl.addFocusListener(new FocusAdapter() {
-
- @Override
- public void focusLost(FocusEvent e) {
- if (textControl != null && !textControl.isDisposed()) {
- addToSearchHistory(textControl.getText());
- }
- }
- });
- }
-
- private static int getCompositeStyle(boolean automaticFind, Composite parent) {
- if (useNativeSearchField(automaticFind, parent)) {
- return SWT.NONE;
- }
- return SWT.BORDER;
- }
-
- private static boolean useNativeSearchField(boolean automaticFind, Composite parent) {
- if (parent != null) {
- if (useNativeSearchField == null) {
- useNativeSearchField = Boolean.FALSE;
- Text testText = null;
- try {
- int style = SWT.SEARCH | ICON_CANCEL;
- if (automaticFind) {
- style |= ICON_SEARCH;
- }
- testText = new Text(parent, style);
- useNativeSearchField = new Boolean((testText.getStyle() & ICON_CANCEL) != 0 && (!automaticFind || (testText.getStyle() & ICON_SEARCH) != 0));
- } finally {
- if (testText != null) {
- testText.dispose();
- }
- }
-
- }
- } else {
- useNativeSearchField = Boolean.FALSE;
- }
- return useNativeSearchField.booleanValue();
- }
-
- private Control createLabelButtonControl(Composite parent, final Text textControl, ImageDescriptor activeImageDescriptor, final String accessibilityText, String toolTipText, final int detail) {
-
- final Image nativeImage = parent.getDisplay().getSystemImage(detail);
-
- final Image activeImage = nativeImage != null ? nativeImage : activeImageDescriptor.createImage();
- final Image inactiveImage = new Image(parent.getDisplay(), activeImage, SWT.IMAGE_GRAY);
- final Image pressedImage = inactiveImage;
-
- final Label labelButton = new Label(parent, SWT.NONE);
- labelButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
- labelButton.setImage(inactiveImage);
- labelButton.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- labelButton.setToolTipText(toolTipText);
- labelButton.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- if (nativeImage == null && activeImage != null && !activeImage.isDisposed()) {
- activeImage.dispose();
- }
- if (inactiveImage != null && !inactiveImage.isDisposed()) {
- inactiveImage.dispose();
- }
- if (pressedImage != null && !pressedImage.isDisposed()) {
- pressedImage.dispose();
- }
- }
- });
- labelButton.addMouseListener(new MouseAdapter() {
- private MouseMoveListener fMoveListener;
-
- @Override
- public void mouseDown(MouseEvent e) {
- labelButton.setImage(pressedImage);
- fMoveListener = new MouseMoveListener() {
- private boolean fMouseInButton = true;
-
- public void mouseMove(MouseEvent e) {
- boolean mouseInButton = isMouseInButton(e);
- if (mouseInButton != fMouseInButton) {
- fMouseInButton = mouseInButton;
- labelButton.setImage(mouseInButton ? pressedImage : inactiveImage);
- }
- }
- };
- labelButton.addMouseMoveListener(fMoveListener);
- }
-
- @Override
- public void mouseUp(MouseEvent e) {
- if (fMoveListener != null) {
- labelButton.removeMouseMoveListener(fMoveListener);
- fMoveListener = null;
- boolean mouseInButton = isMouseInButton(e);
- labelButton.setImage(mouseInButton ? activeImage : inactiveImage);
- if (mouseInButton) {
- if (textControl.isEnabled() && textControl.getText().length() > 0) {
- notifySelectionChanged(detail);
- }
- }
- }
- }
-
- private boolean isMouseInButton(MouseEvent e) {
- Point buttonSize = labelButton.getSize();
- return 0 <= e.x && e.x < buttonSize.x && 0 <= e.y && e.y < buttonSize.y;
- }
- });
-
- labelButton.addMouseTrackListener(new MouseTrackListener() {
- public void mouseEnter(MouseEvent e) {
- if (labelButton.getImage() != activeImage) {
- labelButton.setImage(activeImage);
- }
- }
-
- public void mouseExit(MouseEvent e) {
- if (labelButton.getImage() != inactiveImage) {
- labelButton.setImage(inactiveImage);
- }
- }
-
- public void mouseHover(MouseEvent e) {
- }
- });
-
- labelButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {
- @Override
- public void getName(AccessibleEvent e) {
- e.result = accessibilityText;
- }
- });
- labelButton.getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {
- @Override
- public void getRole(AccessibleControlEvent e) {
- e.detail = ACC.ROLE_PUSHBUTTON;
- }
- });
- return labelButton;
- }
-
- public void addSelectionListener(SelectionListener listener) {
- textControl.addSelectionListener(listener);
- selectionListeners.add(listener);
- }
-
- public void removeSelectionListener(SelectionListener listener) {
- textControl.removeSelectionListener(listener);
- selectionListeners.remove(listener);
- }
-
- public void addModifyListener(ModifyListener listener) {
- textControl.addModifyListener(listener);
- }
-
- public void removeModifyListener(ModifyListener listener) {
- textControl.removeModifyListener(listener);
- }
-
- private void notifySelectionChanged(int detail) {
- if (useNativeSearchField != null && useNativeSearchField) {
- // notification should happen via the widgets selection listener
- return;
- }
- Event event = new Event();
- event.detail = detail;
- event.widget = textControl;
- event.display = textControl.getDisplay();
-
- SelectionEvent e = new SelectionEvent(event);
- for (Object element : selectionListeners) {
- ((SelectionListener) element).widgetDefaultSelected(e);
- }
- }
-
- private void updateButtonVisibilityAndEnablement() {
- if (textControl != null && !textControl.isDisposed()) {
- boolean hasText = textControl.getText().length() > 0;
-
- setFindButtonVisibility(!(hasText && automaticFind));
- setClearButtonVisibility(hasText);
- }
- }
-
- private void setFindButtonVisibility(boolean visible) {
- if (findControl != null && !findControl.isDisposed()) {
- findControl.setVisible(visible);
- if (findControl.getLayoutData() instanceof GridData) {
- ((GridData) findControl.getLayoutData()).exclude = !visible;
- findControl.getParent().layout();
- }
- }
- }
-
- private void setClearButtonVisibility(boolean visible) {
- if (clearControl != null && !clearControl.isDisposed()) {
- clearControl.setVisible(visible);
- if (clearControl.getLayoutData() instanceof GridData) {
- ((GridData) clearControl.getLayoutData()).exclude = !visible;
- clearControl.getParent().layout();
- }
- }
- }
-
- public Text getTextControl() {
- return textControl;
- }
-
- @Override
- public void setBackground(Color color) {
- if (useNativeSearchField != null && useNativeSearchField) {
- super.setBackground(color);
- }
- }
-
- public Collection<String> getSearchHistory() {
- return Collections.unmodifiableCollection(searchHistory);
- }
-
- void addToSearchHistory(String searchString) {
- if (searchString != null && searchString.trim().length() > 0) {
- searchHistory.remove(searchString);
- searchHistory.add(searchString);
- }
- }
-
- public void saveState(IMemento memento) {
- if (memento == null) {
- return;
- }
-
- IMemento rootMemento = memento.createChild(FIND_MEMENTO_TYPE);
- int i = 0;
- for (String text : searchHistory) {
- IMemento child = rootMemento.createChild(FIND_MEMENTO_ELEMENT);
- child.putString(FIND_TEXT_MEMENTO_ELEMENT, text);
- i++;
- if (i > MAX_HISTORY_ITEMS) {
- break;
- }
- }
- }
-
- public void restoreState(IMemento memento) {
- if (memento == null) {
- return;
- }
- List<String> history = new ArrayList<String>();
-
- IMemento rootMemento = memento.getChild(FIND_MEMENTO_TYPE);
- if (rootMemento != null) {
- IMemento[] children = rootMemento.getChildren(FIND_MEMENTO_ELEMENT);
- if (children != null && children.length > 0) {
- for (IMemento child : children) {
- String historyItem = child.getString(FIND_TEXT_MEMENTO_ELEMENT);
- // add to the end of the list
- history.add(history.size(), historyItem);
- }
- }
- }
- if (history != null) {
- searchHistory = history;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/WorkbenchUtil.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/WorkbenchUtil.java
deleted file mode 100644
index abb2a696b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/WorkbenchUtil.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- * IBM Corporation - helper methods from
- * org.eclipse.wst.common.frameworks.internal.ui.WTPActivityHelper
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.util;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Calendar;
-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.ui.discovery.DiscoveryUi;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.*;
-import org.eclipse.ui.activities.IIdentifier;
-import org.eclipse.ui.activities.IWorkbenchActivitySupport;
-import org.eclipse.ui.browser.IWebBrowser;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-import org.eclipse.ui.internal.browser.WebBrowserPreference;
-import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport;
-
-/**
- * @author Mik Kersten
- * @author Steffen Pingel
- */
-public class WorkbenchUtil {
-
- /**
- * Return the modal shell that is currently open. If there isn't one then return null.
- * <p>
- * <b>Note: Applied from patch on bug 99472.</b>
- *
- * @param shell
- * A shell to exclude from the search. May be <code>null</code>.
- * @return Shell or <code>null</code>.
- */
- private static Shell getModalShellExcluding(Shell shell) {
- IWorkbench workbench = PlatformUI.getWorkbench();
- Shell[] shells = workbench.getDisplay().getShells();
- int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL;
- for (Shell shell2 : shells) {
- if (shell2.equals(shell)) {
- break;
- }
- // Do not worry about shells that will not block the user.
- if (shell2.isVisible()) {
- int style = shell2.getStyle();
- if ((style & modal) != 0) {
- return shell2;
- }
- }
- }
- return null;
- }
-
- /**
- * Utility method to get the best parenting possible for a dialog. If there is a modal shell create it so as to
- * avoid two modal dialogs. If not then return the shell of the active workbench window. If neither can be found
- * return null.
- * <p>
- * <b>Note: Applied from patch on bug 99472.</b>
- *
- * @return Shell or <code>null</code>
- */
- public static Shell getShell() {
- if (!PlatformUI.isWorkbenchRunning() || PlatformUI.getWorkbench().isClosing()) {
- return null;
- }
- Shell modal = getModalShellExcluding(null);
- if (modal != null) {
- return modal;
- }
- return getNonModalShell();
- }
-
- /**
- * Get the active non modal shell. If there isn't one return null.
- * <p>
- * <b>Note: Applied from patch on bug 99472.</b>
- *
- * @return Shell
- */
- private static Shell getNonModalShell() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window == null) {
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- if (windows.length > 0) {
- return windows[0].getShell();
- }
- } else {
- return window.getShell();
- }
-
- return null;
- }
-
- /**
- * @return whether the UI is set up to filter contributions (has defined activity categories).
- */
- public static final boolean isFiltering() {
- return !PlatformUI.getWorkbench().getActivitySupport().getActivityManager().getDefinedActivityIds().isEmpty();
- }
-
- public static boolean allowUseOf(Object object) {
- if (!isFiltering()) {
- return true;
- }
- if (object instanceof IPluginContribution) {
- IPluginContribution contribution = (IPluginContribution) object;
- if (contribution.getPluginId() != null) {
- IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
- IIdentifier identifier = workbenchActivitySupport.getActivityManager().getIdentifier(createUnifiedId(contribution));
- return identifier.isEnabled();
- }
- }
- if (object instanceof String) {
- IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
- IIdentifier identifier = workbenchActivitySupport.getActivityManager().getIdentifier((String) object);
- return identifier.isEnabled();
- }
- return true;
- }
-
- private static final String createUnifiedId(IPluginContribution contribution) {
- if (contribution.getPluginId() != null) {
- return contribution.getPluginId() + '/' + contribution.getLocalId();
- }
- return contribution.getLocalId();
- }
-
- /**
- * Opens <code>location</code> in a web-browser according to the Eclipse workbench preferences.
- *
- * @param location
- * the url to open
- * @see #openUrl(String, int)
- */
- public static void openUrl(String location) {
- openUrl(location, SWT.NONE);
- }
-
- /**
- * Opens <code>location</code> in a web-browser according to the Eclipse workbench preferences.
- *
- * @param location
- * the url to open
- * @param customFlags
- * additional flags that are passed to {@link IWorkbenchBrowserSupport}, pass
- * {@link IWorkbenchBrowserSupport#AS_EXTERNAL} to force opening external browser
- */
- public static void openUrl(String location, int customFlags) {
- try {
- URL url = null;
- if (location != null) {
- url = new URL(location);
- }
- if (WebBrowserPreference.getBrowserChoice() == WebBrowserPreference.EXTERNAL || (customFlags & IWorkbenchBrowserSupport.AS_EXTERNAL) != 0) {
- try {
- IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
- support.getExternalBrowser().openURL(url);
- } catch (PartInitException e) {
- Status status = new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, Messages.WorkbenchUtil_Browser_Initialization_Failed);
- MessageDialog.openError(getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage());
- }
- } else {
- IWebBrowser browser = null;
- int flags = customFlags;
- if (WorkbenchBrowserSupport.getInstance().isInternalWebBrowserAvailable()) {
- flags |= IWorkbenchBrowserSupport.AS_EDITOR | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR;
- } else {
- flags |= IWorkbenchBrowserSupport.AS_EXTERNAL | IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR;
- }
-
- String generatedId = "org.eclipse.mylyn.web.browser-" + Calendar.getInstance().getTimeInMillis(); //$NON-NLS-1$
- browser = WorkbenchBrowserSupport.getInstance().createBrowser(flags, generatedId, null, null);
- browser.openURL(url);
- }
- } catch (PartInitException e) {
- Status status = new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, Messages.WorkbenchUtil_Browser_Initialization_Failed, e);
- LogHelper.log(status);
- MessageDialog.openError(getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage());
- } catch (MalformedURLException e) {
- if (location != null && location.trim().equals("")) { //$NON-NLS-1$
- Status status = new Status(IStatus.WARNING, DiscoveryUi.ID_PLUGIN, Messages.WorkbenchUtil_No_URL_Error, e);
- MessageDialog.openWarning(getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage());
- } else {
- Status status = new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, NLS.bind(Messages.WorkbenchUtil_Invalid_URL_Error, location), e);
- MessageDialog.openError(getShell(), Messages.WorkbenchUtil_Open_Location_Title, status.getMessage());
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/messages.properties b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/messages.properties
deleted file mode 100644
index 565b48db1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/messages.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-WorkbenchUtil_Browser_Initialization_Failed=Browser initialization failed.
-WorkbenchUtil_Invalid_URL_Error=Invalid URL specified: ''{0}''.
-WorkbenchUtil_No_URL_Error=No URL specified when opening browser.
-WorkbenchUtil_Open_Location_Title=Open Location
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/AbstractDiscoveryItem.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/AbstractDiscoveryItem.java
deleted file mode 100644
index 3237d0c69..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/AbstractDiscoveryItem.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-import org.eclipse.equinox.internal.p2.discovery.model.Overview;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.ControlListItem;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * @author Steffen Pingel
- */
-public abstract class AbstractDiscoveryItem<T> extends ControlListItem<T> {
-
- protected final DiscoveryResources resources;
-
- public AbstractDiscoveryItem(Composite parent, int style, DiscoveryResources resources, T element) {
- super(parent, style, element);
- this.resources = resources;
- }
-
- private void hookRecursively(Control control, Listener listener) {
- control.addListener(SWT.Dispose, listener);
- control.addListener(SWT.MouseHover, listener);
- control.addListener(SWT.MouseMove, listener);
- control.addListener(SWT.MouseExit, listener);
- control.addListener(SWT.MouseDown, listener);
- control.addListener(SWT.MouseWheel, listener);
- if (control instanceof Composite) {
- for (Control child : ((Composite) control).getChildren()) {
- hookRecursively(child, listener);
- }
- }
- }
-
- protected void hookTooltip(final Control parent, final Widget tipActivator, final Control exitControl, final Control titleControl, AbstractCatalogSource source, Overview overview, Image image) {
- final OverviewToolTip toolTip = new OverviewToolTip(parent, source, overview, image);
- Listener listener = new Listener() {
- public void handleEvent(Event event) {
- switch (event.type) {
- case SWT.MouseHover :
- toolTip.show(titleControl);
- break;
- case SWT.Dispose :
- case SWT.MouseWheel :
- toolTip.hide();
- break;
- }
-
- }
- };
- tipActivator.addListener(SWT.Dispose, listener);
- tipActivator.addListener(SWT.MouseWheel, listener);
- if (image != null) {
- tipActivator.addListener(SWT.MouseHover, listener);
- }
- Listener selectionListener = new Listener() {
- public void handleEvent(Event event) {
- toolTip.show(titleControl);
- }
- };
- tipActivator.addListener(SWT.Selection, selectionListener);
- Listener exitListener = new Listener() {
- public void handleEvent(Event event) {
- switch (event.type) {
- case SWT.MouseWheel :
- toolTip.hide();
- break;
- case SWT.MouseExit :
- /*
- * Check if the mouse exit happened because we move over the
- * tooltip
- */
- Rectangle containerBounds = exitControl.getBounds();
- Point displayLocation = exitControl.getParent().toDisplay(containerBounds.x, containerBounds.y);
- containerBounds.x = displayLocation.x;
- containerBounds.y = displayLocation.y;
- if (containerBounds.contains(Display.getCurrent().getCursorLocation())) {
- break;
- }
- toolTip.hide();
- break;
- }
- }
- };
- hookRecursively(exitControl, exitListener);
- }
-
- @Override
- public void updateColors(int index) {
- // ignore
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogConfiguration.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogConfiguration.java
deleted file mode 100644
index 33ea6e884..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogConfiguration.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.discovery.model.Tag;
-
-/**
- * A configuration for the discovery wizard that affects its presentation and behavior.
- *
- * @author David Green
- */
-public class CatalogConfiguration {
-
- private final List<CatalogFilter> filters = new ArrayList<CatalogFilter>();
-
- private boolean showCategories = true;
-
- private boolean showInstalled = false;
-
- private boolean showInstalledFilter = true;
-
- private boolean showTagFilter = true;
-
- private boolean showTextFilter = true;
-
- private boolean verifyUpdateSiteAvailability = true;
-
- private Set<Tag> selectedTags;
-
- public List<CatalogFilter> getFilters() {
- return filters;
- }
-
- public Set<Tag> getSelectedTags() {
- return selectedTags;
- }
-
- public boolean isShowCategories() {
- return showCategories;
- }
-
- public boolean isShowInstalled() {
- return showInstalled;
- }
-
- public boolean isShowInstalledFilter() {
- return showInstalledFilter;
- }
-
- public boolean isShowTagFilter() {
- return showTagFilter;
- }
-
- /**
- * indicate if a text field should be provided to allow the user to filter connector descriptors
- */
- public boolean isShowTextFilter() {
- return showTextFilter;
- }
-
- public boolean isVerifyUpdateSiteAvailability() {
- return verifyUpdateSiteAvailability;
- }
-
- public void setShowCategories(boolean showCategories) {
- this.showCategories = showCategories;
- }
-
- public void setShowInstalled(boolean showInstalled) {
- this.showInstalled = showInstalled;
- }
-
- public void setShowInstalledFilter(boolean showInstalledFilter) {
- this.showInstalledFilter = showInstalledFilter;
- }
-
- public void setShowTagFilter(boolean showTagFilter) {
- this.showTagFilter = showTagFilter;
- }
-
- /**
- * indicate if a text field should be provided to allow the user to filter connector descriptors
- */
- public void setShowTextFilter(boolean showTextFilter) {
- this.showTextFilter = showTextFilter;
- }
-
- public void setVerifyUpdateSiteAvailability(boolean verifyUpdateSiteAvailability) {
- this.verifyUpdateSiteAvailability = verifyUpdateSiteAvailability;
- }
-
- public void setSelectedTags(Collection<Tag> selectedTags) {
- if (selectedTags != null) {
- this.selectedTags = new HashSet<Tag>(selectedTags);
- } else {
- this.selectedTags = null;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogFilter.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogFilter.java
deleted file mode 100644
index 36c652e4e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogFilter.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-
-/**
- * @author David Green
- */
-public abstract class CatalogFilter {
-
- public abstract boolean select(CatalogItem item);
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogPage.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogPage.java
deleted file mode 100644
index d1d31b3e5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogPage.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- * David Green
- * Shawn Minto bug 275513
- * Steffen Pingel bug 276012 code review, bug 277191 gradient canvas
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import java.util.List;
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * A wizard page that allows users to select connectors that they wish to install.
- *
- * @see DiscoveryWizard
- * @author David Green
- * @author Steffen Pingel
- */
-public class CatalogPage extends WizardPage implements IShellProvider {
-
- protected static final int MINIMUM_HEIGHT = 480;
-
- private final Catalog catalog;
-
- private boolean updated;
-
- private CatalogViewer viewer;
-
- public CatalogPage(Catalog catalog) {
- super(CatalogPage.class.getSimpleName());
- this.catalog = catalog;
- setPageComplete(false);
- setTitle(Messages.ConnectorDiscoveryWizardMainPage_connectorDiscovery);
- setDescription(Messages.ConnectorDiscoveryWizardMainPage_pageDescription);
- }
-
- public void createControl(Composite parent) {
- viewer = doCreateViewer(parent);
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- setPageComplete(!viewer.getCheckedItems().isEmpty());
- }
- });
- setControl(viewer.getControl());
- }
-
- protected CatalogViewer doCreateViewer(Composite parent) {
- CatalogViewer viewer = new CatalogViewer(getCatalog(), this, getContainer(), getWizard().getConfiguration());
- viewer.setMinimumHeight(MINIMUM_HEIGHT);
- viewer.createControl(parent);
- return viewer;
- }
-
- protected CatalogViewer getViewer() {
- return viewer;
- }
-
- protected void doUpdateCatalog() {
- if (!updated) {
- updated = true;
- Display.getCurrent().asyncExec(new Runnable() {
- public void run() {
- if (!getControl().isDisposed() && isCurrentPage()) {
- viewer.updateCatalog();
- }
- }
- });
- }
- }
-
- public Catalog getCatalog() {
- return catalog;
- }
-
- public List<CatalogItem> getInstallableConnectors() {
- return viewer.getCheckedItems();
- }
-
- @Override
- public DiscoveryWizard getWizard() {
- return (DiscoveryWizard) super.getWizard();
- }
-
- @Override
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible) {
- doUpdateCatalog();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java
deleted file mode 100644
index 6f7d1b997..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java
+++ /dev/null
@@ -1,621 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.*;
-import java.util.List;
-import java.util.regex.Pattern;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.SiteVerifier;
-import org.eclipse.equinox.internal.p2.discovery.model.*;
-import org.eclipse.equinox.internal.p2.discovery.util.CatalogCategoryComparator;
-import org.eclipse.equinox.internal.p2.discovery.util.CatalogItemComparator;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * The main wizard page that allows users to select connectors that they wish to install.
- *
- * @author David Green
- * @author Steffen Pingel
- */
-public class CatalogViewer extends FilteredViewer {
-
- protected static class CatalogContentProvider implements ITreeContentProvider {
-
- private Catalog catalog;
-
- private boolean hasCategories;
-
- public boolean hasCategories() {
- return hasCategories;
- }
-
- public void setHasCategories(boolean hasCategories) {
- this.hasCategories = hasCategories;
- }
-
- public void dispose() {
- catalog = null;
- }
-
- public Catalog getCatalog() {
- return catalog;
- }
-
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof CatalogCategory) {
- return ((CatalogCategory) parentElement).getItems().toArray();
- }
- return null;
- }
-
- public Object[] getElements(Object inputElement) {
- if (catalog != null) {
- List<Object> elements = new ArrayList<Object>();
- if (hasCategories()) {
- elements.addAll(catalog.getCategories());
- }
- elements.addAll(catalog.getItems());
- return elements.toArray(new Object[0]);
- }
- return new Object[0];
- }
-
- public Object getParent(Object element) {
- if (element instanceof CatalogCategory) {
- return catalog;
- }
- if (element instanceof CatalogItem) {
- return ((CatalogItem) element).getCategory();
- }
- return null;
- }
-
- public boolean hasChildren(Object element) {
- if (element instanceof CatalogCategory) {
- return ((CatalogCategory) element).getItems().size() > 0;
- }
- return false;
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- this.catalog = (Catalog) newInput;
- }
-
- }
-
- private class Filter extends ViewerFilter {
-
- public Filter() {
- // constructor
- }
-
- @Override
- public boolean select(Viewer filteredViewer, Object parentElement, Object element) {
- if (element instanceof CatalogItem) {
- return doFilter((CatalogItem) element);
- } else if (element instanceof CatalogCategory) {
- // only show categories if at least one child is visible
- CatalogCategory category = (CatalogCategory) element;
- for (CatalogItem item : category.getItems()) {
- if (doFilter(item)) {
- return true;
- }
- }
- return false;
- }
- return true;
- }
-
- }
-
- private class FindFilter extends PatternFilter {
-
- public FindFilter() {
- // constructor
- }
-
- private boolean filterMatches(String text) {
- return text != null && wordMatches(text);
- }
-
- @Override
- protected Object[] getChildren(Object element) {
- if (element instanceof CatalogCategory) {
- return ((CatalogCategory) element).getItems().toArray();
- }
- return super.getChildren(element);
- }
-
- @Override
- protected boolean isLeafMatch(Viewer filteredViewer, Object element) {
- if (element instanceof CatalogItem) {
- CatalogItem descriptor = (CatalogItem) element;
- if (!(filterMatches(descriptor.getName()) || filterMatches(descriptor.getDescription()) || filterMatches(descriptor.getProvider()) || filterMatches(descriptor.getLicense()))) {
- return false;
- }
- return true;
- }
- return false;
- }
-
- }
-
- // private class ConnectorBorderPaintListener implements PaintListener {
- // public void paintControl(PaintEvent e) {
- // Composite composite = (Composite) e.widget;
- // Rectangle bounds = composite.getBounds();
- // GC gc = e.gc;
- // gc.setLineStyle(SWT.LINE_DOT);
- // gc.drawLine(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y);
- // }
- // }
-
- private static final int DEFAULT_HEIGHT = 250;
-
- final Catalog catalog;
-
- private final List<CatalogItem> checkedItems = new ArrayList<CatalogItem>();
-
- private boolean complete;
-
- private final CatalogConfiguration configuration;
-
- protected final IRunnableContext context;
-
- boolean ignoreUpdates;
-
- Set<String> installedFeatures;
-
- DiscoveryResources resources;
-
- private final SelectionProviderAdapter selectionProvider;
-
- protected final IShellProvider shellProvider;
-
- boolean showInstalled;
-
- Button showInstalledCheckbox;
-
- Set<Tag> visibleTags;
-
- private boolean showCategories;
-
- private CatalogContentProvider contentProvider;
-
- public CatalogViewer(Catalog catalog, IShellProvider shellProvider, IRunnableContext context, CatalogConfiguration configuration) {
- Assert.isNotNull(catalog);
- Assert.isNotNull(shellProvider);
- Assert.isNotNull(context);
- Assert.isNotNull(configuration);
- this.catalog = catalog;
- this.shellProvider = shellProvider;
- this.context = context;
- this.configuration = configuration;
- this.selectionProvider = new SelectionProviderAdapter();
- this.showInstalled = configuration.isShowInstalled();
- this.showCategories = configuration.isShowCategories();
- if (configuration.getSelectedTags() != null) {
- this.visibleTags = new HashSet<Tag>(configuration.getSelectedTags());
- } else {
- this.visibleTags = new HashSet<Tag>();
- }
- setMinimumHeight(DEFAULT_HEIGHT);
- setComplete(false);
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionProvider.addSelectionChangedListener(listener);
- }
-
- protected void catalogUpdated(boolean wasCancelled, boolean wasError) {
- if (catalog != null && !wasCancelled && !wasError) {
- doCheckCatalog();
- }
- viewer.setInput(catalog);
- selectionProvider.setSelection(StructuredSelection.EMPTY);
- }
-
- protected void doCheckCatalog() {
- int categoryWithConnectorCount = 0;
- for (CatalogCategory category : catalog.getCategories()) {
- categoryWithConnectorCount += category.getItems().size();
- }
- if (categoryWithConnectorCount == 0) {
- // nothing was discovered: notify the user
- MessageDialog.openWarning(getShell(), Messages.ConnectorDiscoveryWizardMainPage_noConnectorsFound, Messages.ConnectorDiscoveryWizardMainPage_noConnectorsFound_description);
- }
- }
-
- protected IStatus computeStatus(InvocationTargetException e, String message) {
- Throwable cause = e.getCause();
- if (cause.getMessage() != null) {
- message = NLS.bind(Messages.ConnectorDiscoveryWizardMainPage_message_with_cause, message, cause.getMessage());
- }
- return new Status(IStatus.ERROR, DiscoveryUi.ID_PLUGIN, message, e);
- }
-
- protected Pattern createPattern(String filterText) {
- if (filterText == null || filterText.length() == 0) {
- return null;
- }
- String regex = filterText;
- regex.replace("\\", "\\\\").replace("?", ".").replace("*", ".*?"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- return Pattern.compile(regex, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
- }
-
- @Override
- protected PatternFilter doCreateFilter() {
- return new FindFilter();
- }
-
- @Override
- protected void doCreateHeaderControls(Composite parent) {
- if (configuration.isShowInstalledFilter()) {
- showInstalledCheckbox = new Button(parent, SWT.CHECK);
- showInstalledCheckbox.setSelection(showInstalled);
- showInstalledCheckbox.setText(Messages.DiscoveryViewer_Show_Installed);
- showInstalledCheckbox.addSelectionListener(new SelectionListener() {
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e) {
- if (ignoreUpdates) {
- return;
- }
-
- ignoreUpdates = true;
- setShowInstalled(showInstalledCheckbox.getSelection());
- ignoreUpdates = false;
- }
- });
- }
- if (configuration.isShowTagFilter()) {
- for (final Tag tag : catalog.getTags()) {
- final Button checkbox = new Button(parent, SWT.CHECK);
- checkbox.setSelection(visibleTags.contains(tag));
- checkbox.setText(tag.getLabel());
- checkbox.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e) {
- boolean selection = checkbox.getSelection();
- if (selection) {
- visibleTags.add(tag);
- } else {
- visibleTags.remove(tag);
- }
- refresh();
- }
- });
- }
- }
- }
-
- @Override
- protected StructuredViewer doCreateViewer(Composite container) {
- @SuppressWarnings("hiding")
- StructuredViewer viewer = new ControlListViewer(container, SWT.BORDER) {
- @Override
- protected ControlListItem<?> doCreateItem(Composite parent, Object element) {
- return doCreateViewerItem(parent, element);
- }
- };
- contentProvider = doCreateContentProvider();
- contentProvider.setHasCategories(isShowCategories());
- viewer.setContentProvider(contentProvider);
- viewer.setSorter(new ViewerSorter() {
- CatalogCategoryComparator categoryComparator = new CatalogCategoryComparator();
-
- CatalogItemComparator itemComparator = new CatalogItemComparator();
-
- @Override
- public int compare(@SuppressWarnings("hiding") Viewer viewer, Object o1, Object o2) {
- CatalogCategory cat1 = getCategory(o1);
- CatalogCategory cat2 = getCategory(o2);
-
- // FIXME filter uncategorized items?
- if (cat1 == null) {
- return (cat2 != null) ? 1 : 0;
- } else if (cat2 == null) {
- return 1;
- }
-
- int i = categoryComparator.compare(cat1, cat2);
- if (i == 0) {
- if (o1 instanceof CatalogCategory) {
- return -1;
- }
- if (o2 instanceof CatalogCategory) {
- return 1;
- }
- if (cat1 == cat2 && o1 instanceof CatalogItem && o2 instanceof CatalogItem) {
- return itemComparator.compare((CatalogItem) o1, (CatalogItem) o2);
- }
- return super.compare(viewer, o1, o2);
- }
- return i;
- }
-
- // private int compare(Comparator<Object> comparator, Object key1, Object key2) {
- // if (key1 == null) {
- // return (key2 != null) ? 1 : 0;
- // } else if (key2 == null) {
- // return -1;
- // }
- // return comparator.compare(key1, key2);
- // }
- private CatalogCategory getCategory(Object o) {
- if (o instanceof CatalogCategory) {
- return (CatalogCategory) o;
- }
- if (o instanceof CatalogItem) {
- return ((CatalogItem) o).getCategory();
- }
- return null;
- }
- });
-
- resources = new DiscoveryResources(container.getDisplay());
- viewer.getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- resources.dispose();
- if (catalog != null)
- catalog.dispose();
- }
- });
- viewer.addFilter(new Filter());
- return viewer;
- }
-
- protected CatalogContentProvider doCreateContentProvider() {
- return new CatalogContentProvider();
- }
-
- @SuppressWarnings({"rawtypes", "unchecked"})
- protected ControlListItem<?> doCreateViewerItem(Composite parent, Object element) {
- if (element instanceof CatalogItem) {
- return new DiscoveryItem(parent, SWT.NONE, resources, shellProvider, (CatalogItem) element, this);
- } else if (element instanceof CatalogCategory) {
- return new CategoryItem(parent, SWT.NONE, resources, (CatalogCategory) element);
- }
- return null;
- }
-
- protected boolean doFilter(CatalogItem item) {
- if (!showInstalled && item.isInstalled()) {
- return false;
- }
-
- if (!isTagVisible(item)) {
- return false;
- }
-
- for (CatalogFilter filter : configuration.getFilters()) {
- if (!filter.select(item)) {
- return false;
- }
- }
-
- return true;
- }
-
- public Catalog getCatalog() {
- return catalog;
- }
-
- public List<CatalogItem> getCheckedItems() {
- return new ArrayList<CatalogItem>(checkedItems);
- }
-
- public CatalogConfiguration getConfiguration() {
- return configuration;
- }
-
- protected Set<String> getInstalledFeatures(IProgressMonitor monitor) {
- Set<String> features = new HashSet<String>();
- IProfile profile = ProvUI.getProfileRegistry(ProvisioningUI.getDefaultUI().getSession()).getProfile(ProvisioningUI.getDefaultUI().getProfileId());
- if (profile != null) {
- IQueryResult<IInstallableUnit> result = profile.available(QueryUtil.createIUGroupQuery(), monitor);
- for (Iterator<IInstallableUnit> it = result.iterator(); it.hasNext();) {
- IInstallableUnit unit = it.next();
- features.add(unit.getId());
- }
- }
- return features;
- }
-
- protected DiscoveryResources getResources() {
- return resources;
- }
-
- public IStructuredSelection getSelection() {
- return (IStructuredSelection) selectionProvider.getSelection();
- }
-
- private Shell getShell() {
- return shellProvider.getShell();
- }
-
- public boolean isComplete() {
- return complete;
- }
-
- public boolean isShowCategories() {
- return showCategories;
- }
-
- public boolean isShowInstalled() {
- return showInstalled;
- }
-
- private boolean isTagVisible(CatalogItem item) {
- if (!configuration.isShowTagFilter()) {
- return true;
- }
- for (Tag selectedTag : visibleTags) {
- for (Tag tag : item.getTags()) {
- if (tag.equals(selectedTag)) {
- return true;
- }
- }
- }
- return false;
- }
-
- protected void modifySelection(final CatalogItem connector, boolean selected) {
- modifySelectionInternal(connector, selected);
- updateState();
- }
-
- private void modifySelectionInternal(final CatalogItem connector, boolean selected) {
- connector.setSelected(selected);
- if (selected) {
- checkedItems.add(connector);
- } else {
- checkedItems.remove(connector);
- }
- }
-
- protected void postDiscovery() {
- for (CatalogItem connector : catalog.getItems()) {
- connector.setInstalled(installedFeatures != null && installedFeatures.containsAll(connector.getInstallableUnits()));
- }
- }
-
- public void refresh() {
- if (viewer != null && !viewer.getControl().isDisposed()) {
- viewer.refresh();
- }
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionProvider.removeSelectionChangedListener(listener);
- }
-
- public void setComplete(boolean complete) {
- this.complete = complete;
- }
-
- public void setSelection(IStructuredSelection selection) {
- Set<CatalogItem> selected = new HashSet<CatalogItem>();
- for (Object descriptor : selection.toArray()) {
- if (descriptor instanceof CatalogItem) {
- selected.add((CatalogItem) descriptor);
- }
- }
- for (CatalogItem connector : catalog.getItems()) {
- modifySelectionInternal(connector, selected.contains(connector));
- }
- updateState();
- }
-
- public void setShowInstalled(boolean showInstalled) {
- this.showInstalled = showInstalled;
- showInstalledCheckbox.setSelection(showInstalled);
- refresh();
- }
-
- public void setShowCategories(boolean showCategories) {
- this.showCategories = showCategories;
- if (contentProvider != null) {
- contentProvider.setHasCategories(showCategories);
- refresh();
- }
- }
-
- public void updateCatalog() {
- boolean wasCancelled = false;
- boolean wasError = false;
- try {
- final IStatus[] result = new IStatus[1];
- context.run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) throws InterruptedException {
- if (installedFeatures == null) {
- installedFeatures = getInstalledFeatures(monitor);
- }
-
- result[0] = catalog.performDiscovery(monitor);
- if (monitor.isCanceled()) {
- throw new InterruptedException();
- }
-
- postDiscovery();
- }
- });
-
- if (result[0] != null && !result[0].isOK()) {
- StatusManager.getManager().handle(result[0], StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
- wasError = true;
- }
- } catch (InvocationTargetException e) {
- IStatus status = computeStatus(e, Messages.ConnectorDiscoveryWizardMainPage_unexpectedException);
- StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
- wasError = true;
- } catch (InterruptedException e) {
- // cancelled by user so nothing to do here.
- wasCancelled = true;
- }
- if (catalog != null) {
- catalogUpdated(wasCancelled, wasError);
- verifyUpdateSiteAvailability();
- }
- // help UI tests
- viewer.setData("discoveryComplete", "true"); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- protected void verifyUpdateSiteAvailability() {
- if (configuration.isVerifyUpdateSiteAvailability() && !catalog.getItems().isEmpty()) {
- try {
- context.run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- SiteVerifier verifier = new SiteVerifier(catalog);
- verifier.verifySiteAvailability(monitor);
- }
- });
- } catch (InvocationTargetException e) {
- IStatus status = computeStatus(e, Messages.ConnectorDiscoveryWizardMainPage_unexpectedException);
- StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG);
- } catch (InterruptedException e) {
- // cancelled by user so nothing to do here.
- }
- }
- }
-
- private void updateState() {
- setComplete(!checkedItems.isEmpty());
- selectionProvider.setSelection(new StructuredSelection(getCheckedItems()));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CategoryItem.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CategoryItem.java
deleted file mode 100644
index 1731819dd..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CategoryItem.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogCategory;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.GradientCanvas;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * @author Steffen Pingel
- */
-public class CategoryItem<T extends CatalogCategory> extends AbstractDiscoveryItem<T> {
-
- public CategoryItem(Composite parent, int style, DiscoveryResources resources, T category) {
- super(parent, style, resources, category);
- createContent(category);
- }
-
- protected boolean hasTooltip(final CatalogCategory category) {
- return category.getOverview() != null && category.getOverview().getSummary() != null && category.getOverview().getSummary().length() > 0;
- }
-
- private void createContent(T category) {
- setLayout(new FillLayout());
-
- final GradientCanvas categoryHeaderContainer = new GradientCanvas(this, SWT.NONE);
- categoryHeaderContainer.setSeparatorVisible(true);
- categoryHeaderContainer.setSeparatorAlignment(SWT.TOP);
- categoryHeaderContainer.setBackgroundGradient(new Color[] {resources.getGradientBeginColor(), resources.getGradientEndColor()}, new int[] {100}, true);
- categoryHeaderContainer.putColor(GradientCanvas.H_BOTTOM_KEYLINE1, resources.getGradientBeginColor());
- categoryHeaderContainer.putColor(GradientCanvas.H_BOTTOM_KEYLINE2, resources.getGradientEndColor());
-
- //GridDataFactory.fillDefaults().span(2, 1).applyTo(categoryHeaderContainer);
- GridLayoutFactory.fillDefaults().numColumns(3).margins(5, 5).equalWidth(false).applyTo(categoryHeaderContainer);
-
- Label iconLabel = new Label(categoryHeaderContainer, SWT.NULL);
- if (category.getIcon() != null) {
- iconLabel.setImage(resources.getIconImage(category.getSource(), category.getIcon(), 48, true));
- }
- iconLabel.setBackground(null);
- GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.BEGINNING).span(1, 2).applyTo(iconLabel);
-
- Label nameLabel = new Label(categoryHeaderContainer, SWT.NULL);
- nameLabel.setFont(resources.getHeaderFont());
- nameLabel.setText(category.getName());
- nameLabel.setBackground(null);
-
- GridDataFactory.fillDefaults().grab(true, false).applyTo(nameLabel);
- if (hasTooltip(category)) {
- ToolBar toolBar = new ToolBar(categoryHeaderContainer, SWT.FLAT);
- toolBar.setBackground(null);
- ToolItem infoButton = new ToolItem(toolBar, SWT.PUSH);
- infoButton.setImage(resources.getInfoImage());
- infoButton.setToolTipText(Messages.ConnectorDiscoveryWizardMainPage_tooltip_showOverview);
- hookTooltip(toolBar, infoButton, categoryHeaderContainer, nameLabel, category.getSource(), category.getOverview(), null);
- GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar);
- } else {
- new Label(categoryHeaderContainer, SWT.NULL).setText(" "); //$NON-NLS-1$
- }
- if (category.getDescription() != null) {
- Label description = new Label(categoryHeaderContainer, SWT.WRAP);
- GridDataFactory.fillDefaults().grab(true, false).span(2, 1).hint(100, SWT.DEFAULT).applyTo(description);
- description.setBackground(null);
- description.setText(category.getDescription());
- }
- }
-
- @Override
- protected void refresh() {
- // ignore
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryItem.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryItem.java
deleted file mode 100644
index e0d3b3fa6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryItem.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-import org.eclipse.equinox.internal.p2.discovery.model.Overview;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-
-/**
- * @author Steffen Pingel
- */
-public class DiscoveryItem<T extends CatalogItem> extends AbstractDiscoveryItem<T> implements PropertyChangeListener {
-
- Button checkbox;
-
- private Composite checkboxContainer;
-
- private final CatalogItem item;
-
- private Label description;
-
- private Label iconLabel;
-
- private ToolItem infoButton;
-
- private Label nameLabel;
-
- private Link providerLabel;
-
- private final IShellProvider shellProvider;
-
- private final CatalogViewer viewer;
-
- public DiscoveryItem(Composite parent, int style, DiscoveryResources resources, IShellProvider shellProvider, final T item, CatalogViewer viewer) {
- super(parent, style, resources, item);
- this.shellProvider = shellProvider;
- this.item = item;
- this.viewer = viewer;
- item.addPropertyChangeListener(this);
- this.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- item.removePropertyChangeListener(DiscoveryItem.this);
- }
- });
- createContent();
- initializeListeners();
- }
-
- private void createContent() {
- GridLayout layout = new GridLayout(3, false);
- layout.marginLeft = 7;
- layout.marginTop = 2;
- layout.marginBottom = 2;
- setLayout(layout);
-
- checkboxContainer = new Composite(this, SWT.INHERIT_NONE);
- GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.BEGINNING).span(1, 2).applyTo(checkboxContainer);
- GridLayoutFactory.fillDefaults().spacing(1, 1).numColumns(2).applyTo(checkboxContainer);
-
- checkbox = new Button(checkboxContainer, SWT.CHECK | SWT.INHERIT_FORCE);
- checkbox.setSelection(item.isSelected());
- checkbox.setText(" "); //$NON-NLS-1$
- // help UI tests
- checkbox.setData("connectorId", item.getId()); //$NON-NLS-1$
- // FIXME
- // checkbox.addFocusListener(new FocusAdapter() {
- // @Override
- // public void focusGained(FocusEvent e) {
- // bodyScrolledComposite.showControl(this);
- // }
- // });
- GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(checkbox);
-
- iconLabel = new Label(checkboxContainer, SWT.NONE);
- GridDataFactory.swtDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(iconLabel);
- if (item.getIcon() != null) {
- iconLabel.setImage(resources.getIconImage(item.getSource(), item.getIcon(), 32, false));
- }
-
- nameLabel = new Label(this, SWT.NONE);
- GridDataFactory.fillDefaults().grab(true, false).align(SWT.BEGINNING, SWT.CENTER).applyTo(nameLabel);
- nameLabel.setFont(resources.getSmallHeaderFont());
- if (item.isInstalled()) {
- nameLabel.setText(NLS.bind(Messages.DiscoveryItem_Extension_installed, item.getName()));
- } else {
- nameLabel.setText(item.getName());
- }
-
- if (hasTooltip()) {
- ToolBar toolBar = new ToolBar(this, SWT.FLAT);
- GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar);
-
- infoButton = new ToolItem(toolBar, SWT.PUSH);
- infoButton.setImage(resources.getInfoImage());
- infoButton.setToolTipText(Messages.ConnectorDiscoveryWizardMainPage_tooltip_showOverview);
- hookTooltip(toolBar, infoButton, this, nameLabel, item.getSource(), item.getOverview(), null);
- } else {
- Label label = new Label(this, SWT.NULL);
- label.setText(" "); //$NON-NLS-1$
- }
-
- description = new Label(this, SWT.NULL | SWT.WRAP);
- GridDataFactory.fillDefaults().grab(true, false).span(3, 1).hint(100, SWT.DEFAULT).applyTo(description);
- String descriptionText = item.getDescription();
- int maxDescriptionLength = 162;
- if (descriptionText == null) {
- descriptionText = ""; //$NON-NLS-1$
- }
- if (descriptionText.length() > maxDescriptionLength) {
- descriptionText = descriptionText.substring(0, maxDescriptionLength);
- }
- description.setText(descriptionText.replaceAll("(\\r\\n)|\\n|\\r", " ")); //$NON-NLS-1$ //$NON-NLS-2$
-
- createProviderLabel();
- }
-
- public void createProviderLabel() {
- providerLabel = new Link(this, SWT.RIGHT);
- GridDataFactory.fillDefaults().span(3, 1).align(SWT.BEGINNING, SWT.CENTER).applyTo(providerLabel);
- // always disabled color to make it less prominent
- providerLabel.setForeground(resources.getColorDisabled());
- if (item.getCertification() != null) {
- providerLabel.setText(NLS.bind(Messages.DiscoveryViewer_Certification_Label0, new String[] {item.getProvider(), item.getLicense(), item.getCertification().getName()}));
- if (item.getCertification().getUrl() != null) {
- providerLabel.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- WorkbenchUtil.openUrl(item.getCertification().getUrl(), IWorkbenchBrowserSupport.AS_EXTERNAL);
- }
- });
- }
- Overview overview = new Overview();
- overview.setSummary(item.getCertification().getDescription());
- overview.setUrl(item.getCertification().getUrl());
- Image image = resources.getIconImage(item.getSource(), item.getCertification().getIcon(), 48, true);
- hookTooltip(providerLabel, providerLabel, this, providerLabel, item.getSource(), overview, image);
- } else if (item.getLicense() != null) {
- providerLabel.setText(NLS.bind(Messages.ConnectorDiscoveryWizardMainPage_provider_and_license, item.getProvider(), item.getLicense()));
- } else {
- providerLabel.setText(item.getProvider());
- }
- }
-
- protected boolean hasTooltip() {
- return item.getOverview() != null && item.getOverview().getSummary() != null && item.getOverview().getSummary().length() > 0;
- }
-
- public void initializeListeners() {
- checkbox.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e) {
- boolean selected = checkbox.getSelection();
- maybeModifySelection(selected);
- }
- });
- MouseListener connectorItemMouseListener = new MouseAdapter() {
- @Override
- public void mouseUp(MouseEvent e) {
- boolean selected = !checkbox.getSelection();
- if (maybeModifySelection(selected)) {
- checkbox.setSelection(selected);
- }
- }
- };
- checkboxContainer.addMouseListener(connectorItemMouseListener);
- this.addMouseListener(connectorItemMouseListener);
- iconLabel.addMouseListener(connectorItemMouseListener);
- nameLabel.addMouseListener(connectorItemMouseListener);
- // the provider has clickable links
- //providerLabel.addMouseListener(connectorItemMouseListener);
- description.addMouseListener(connectorItemMouseListener);
- }
-
- protected boolean maybeModifySelection(boolean selected) {
- if (selected) {
- if (item.isInstalled()) {
- MessageDialog.openWarning(shellProvider.getShell(), Messages.DiscoveryItem_Connector_already_installed_Error_Title, NLS.bind(Messages.DiscoveryItem_Connector_already_installed_Error_Message, item.getName()));
- return false;
- }
- if (item.getAvailable() != null && !item.getAvailable()) {
- MessageDialog.openWarning(shellProvider.getShell(), Messages.ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable, NLS.bind(Messages.ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable, item.getName()));
- return false;
- }
- }
- viewer.modifySelection(item, selected);
- return true;
- }
-
- public void propertyChange(PropertyChangeEvent evt) {
- if (!isDisposed()) {
- getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (!isDisposed()) {
- refresh();
- }
- }
- });
- }
- }
-
- @Override
- protected void refresh() {
- boolean enabled = !item.isInstalled() && (item.getAvailable() == null || item.getAvailable());
-
- checkbox.setEnabled(enabled);
- nameLabel.setEnabled(enabled);
- providerLabel.setEnabled(enabled);
- description.setEnabled(enabled);
-
- Color foreground;
- if (enabled) {
- foreground = getForeground();
- } else {
- foreground = resources.getColorDisabled();
- }
- nameLabel.setForeground(foreground);
- description.setForeground(foreground);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryResources.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryResources.java
deleted file mode 100644
index 88918d345..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryResources.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import java.net.URL;
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-import org.eclipse.equinox.internal.p2.discovery.model.Icon;
-import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryImages;
-import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
-import org.eclipse.jface.resource.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * @author Steffen Pingel
- */
-public class DiscoveryResources {
-
- private final ResourceManager resourceManager;
-
- private final FontDescriptor h1FontDescriptor;
-
- private final Display display;
-
- private final FontDescriptor h2FontDescriptor;
-
- private final RGB disabledColorDescriptor;
-
- public DiscoveryResources(Display display) {
- this.display = display;
- this.resourceManager = new LocalResourceManager(JFaceResources.getResources(display));
- this.h1FontDescriptor = createFontDescriptor(SWT.BOLD, 1.35f);
- this.h2FontDescriptor = createFontDescriptor(SWT.BOLD, 1.25f);
- this.disabledColorDescriptor = new RGB(0x69, 0x69, 0x69);
- }
-
- public Cursor getHandCursor() {
- return display.getSystemCursor(SWT.CURSOR_HAND);
- }
-
- private FontDescriptor createFontDescriptor(int style, float heightMultiplier) {
- Font baseFont = JFaceResources.getDialogFont();
- FontData[] fontData = baseFont.getFontData();
- FontData[] newFontData = new FontData[fontData.length];
- for (int i = 0; i < newFontData.length; i++) {
- newFontData[i] = new FontData(fontData[i].getName(), (int) (fontData[i].getHeight() * heightMultiplier), fontData[i].getStyle() | style);
- }
- return FontDescriptor.createFrom(newFontData);
- }
-
- public void dispose() {
- resourceManager.dispose();
- }
-
- public Font getHeaderFont() {
- return resourceManager.createFont(h1FontDescriptor);
- }
-
- public Font getSmallHeaderFont() {
- return resourceManager.createFont(h2FontDescriptor);
- }
-
- public Image getInfoImage() {
- return resourceManager.createImage(DiscoveryImages.MESSAGE_INFO);
- }
-
- public Image getIconImage(AbstractCatalogSource discoverySource, Icon icon, int dimension, boolean fallback) {
- String imagePath;
- switch (dimension) {
- case 64 :
- imagePath = icon.getImage64();
- if (imagePath != null || !fallback) {
- break;
- }
- case 48 :
- imagePath = icon.getImage48();
- if (imagePath != null || !fallback) {
- break;
- }
- case 32 :
- imagePath = icon.getImage32();
- break;
- default :
- throw new IllegalArgumentException();
- }
- if (imagePath != null && imagePath.length() > 0) {
- URL resource = discoverySource.getResource(imagePath);
- if (resource != null) {
- ImageDescriptor descriptor = ImageDescriptor.createFromURL(resource);
- return resourceManager.createImage(descriptor);
- }
- }
- return null;
- }
-
- public Color getGradientBeginColor() {
- return DiscoveryUi.getCommonsColors().getGradientBegin();
- }
-
- public Color getGradientEndColor() {
- return DiscoveryUi.getCommonsColors().getGradientEnd();
- }
-
- public Color getColorDisabled() {
- return resourceManager.createColor(disabledColorDescriptor);
- }
-
- public Image getUpdateImage() {
- return resourceManager.createImage(DiscoveryImages.IU_UPDATABLE);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryWizard.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryWizard.java
deleted file mode 100644
index 708f78690..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/DiscoveryWizard.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryImages;
-import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
-import org.eclipse.equinox.internal.p2.ui.discovery.operations.DiscoveryInstallOperation;
-import org.eclipse.jface.wizard.Wizard;
-
-/**
- * A wizard for performing discovery and selecting items from a catalog to install. When finish is pressed, selected
- * items are downloaded and installed.
- *
- * @see DiscoveryInstallOperation
- * @see CatalogPage
- * @author David Green
- * @author Steffen Pingel
- */
-public class DiscoveryWizard extends Wizard {
-
- private final Catalog catalog;
-
- private CatalogPage catalogPage;
-
- private final CatalogConfiguration configuration;
-
- public DiscoveryWizard(Catalog catalog, CatalogConfiguration configuration) {
- Assert.isNotNull(catalog);
- Assert.isNotNull(configuration);
- this.catalog = catalog;
- this.configuration = configuration;
- setWindowTitle(Messages.DiscoveryWizard_Install_Window_Title);
- setNeedsProgressMonitor(true);
- setDefaultPageImageDescriptor(DiscoveryImages.BANNER_DISOVERY);
- }
-
- @Override
- public void addPages() {
- addPage(getCatalogPage());
- }
-
- protected CatalogPage doCreateCatalogPage() {
- return new CatalogPage(getCatalog());
- }
-
- public Catalog getCatalog() {
- return catalog;
- }
-
- public CatalogPage getCatalogPage() {
- if (catalogPage == null) {
- catalogPage = doCreateCatalogPage();
- }
- return catalogPage;
- }
-
- public CatalogConfiguration getConfiguration() {
- return configuration;
- }
-
- @Override
- public boolean performFinish() {
- return DiscoveryUi.install(catalogPage.getInstallableConnectors(), getContainer());
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/Messages.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/Messages.java
deleted file mode 100644
index 91a02beb2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/Messages.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author David Green
- */
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.discovery.wizards.messages"; //$NON-NLS-1$
-
- public static String ConnectorDescriptorToolTip_detailsLink;
-
- public static String ConnectorDescriptorToolTip_detailsLink_tooltip;
-
- public static String ConnectorDiscoveryWizard_installProblems;
-
- public static String InstallConnectorsJob_commaSeparator;
-
- public static String InstallConnectorsJob_connectorsNotAvailable;
-
- public static String InstallConnectorsJob_questionProceed;
-
- public static String InstallConnectorsJob_questionProceed_long;
-
- public static String InstallConnectorsJob_task_configuring;
-
- public static String InstallConnectorsJob_unexpectedError_url;
-
- public static String ConnectorDiscoveryWizardMainPage_connectorDiscovery;
-
- public static String ConnectorDiscoveryWizardMainPage_filterLabel;
-
- public static String ConnectorDiscoveryWizardMainPage_message_with_cause;
-
- public static String ConnectorDiscoveryWizardMainPage_noConnectorsFound;
-
- public static String ConnectorDiscoveryWizardMainPage_noConnectorsFound_description;
-
- public static String ConnectorDiscoveryWizardMainPage_pageDescription;
-
- public static String ConnectorDiscoveryWizardMainPage_provider_and_license;
-
- public static String ConnectorDiscoveryWizardMainPage_tooltip_showOverview;
-
- public static String ConnectorDiscoveryWizardMainPage_unexpectedException;
-
- public static String ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable;
-
- public static String ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable;
-
- public static String DiscoveryItem_Connector_already_installed_Error_Message;
-
- public static String DiscoveryItem_Connector_already_installed_Error_Title;
-
- public static String DiscoveryItem_Extension_installed;
-
- public static String DiscoveryViewer_Certification_Label0;
-
- public static String DiscoveryViewer_Show_Installed;
-
- public static String DiscoveryWizard_Install_Window_Title;
-
- public static String PrepareInstallProfileJob_notFoundDescriptorDetail;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- // constructor
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/OverviewToolTip.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/OverviewToolTip.java
deleted file mode 100644
index c0c17f634..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/OverviewToolTip.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Tasktop Technologies 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:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.discovery.wizards;
-
-import java.net.URL;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.p2.discovery.AbstractCatalogSource;
-import org.eclipse.equinox.internal.p2.discovery.model.Overview;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.GradientToolTip;
-import org.eclipse.equinox.internal.p2.ui.discovery.util.WorkbenchUtil;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.window.ToolTip;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-
-/**
- * @author David Green
- */
-class OverviewToolTip extends GradientToolTip {
-
- private final Overview overview;
-
- private final AbstractCatalogSource source;
-
- private final Control parent;
-
- private final Image leftImage;
-
- public OverviewToolTip(Control control, AbstractCatalogSource source, Overview overview, Image leftImage) {
- super(control, ToolTip.RECREATE, true);
- Assert.isNotNull(source);
- Assert.isNotNull(overview);
- this.parent = control;
- this.source = source;
- this.overview = overview;
- this.leftImage = leftImage;
- setHideOnMouseDown(false); // required for links to work
- }
-
- @Override
- protected Composite createToolTipArea(Event event, final Composite parent) {
- GridLayoutFactory.fillDefaults().applyTo(parent);
-
- Composite container = new Composite(parent, SWT.NULL);
- container.setBackground(null);
-
- Image image = null;
- if (overview.getScreenshot() != null) {
- image = computeImage(source, overview.getScreenshot());
- if (image != null) {
- final Image fimage = image;
- container.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- fimage.dispose();
- }
- });
- }
- }
- final boolean hasLearnMoreLink = overview.getUrl() != null && overview.getUrl().length() > 0;
-
- final int borderWidth = 1;
- final int fixedImageHeight = 240;
- final int fixedImageWidth = 320;
- final int heightHint = fixedImageHeight + (borderWidth * 2);
- final int widthHint = fixedImageWidth;
-
- final int containerWidthHintWithImage = 650;
- final int containerWidthHintWithoutImage = 500;
-
- GridDataFactory.fillDefaults().grab(true, true).hint(image == null ? containerWidthHintWithoutImage : containerWidthHintWithImage, SWT.DEFAULT).applyTo(container);
-
- GridLayoutFactory.fillDefaults().numColumns((leftImage != null) ? 3 : 2).margins(5, 5).spacing(3, 0).applyTo(container);
-
- if (leftImage != null) {
- Label imageLabel = new Label(container, SWT.NONE);
- imageLabel.setImage(leftImage);
- int imageWidthHint = leftImage.getBounds().width + 5;
- GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.BEGINNING).hint(imageWidthHint, SWT.DEFAULT).applyTo(imageLabel);
- }
-
- String summary = overview.getSummary();
-
- Composite summaryContainer = new Composite(container, SWT.NULL);
- summaryContainer.setBackground(null);
- GridLayoutFactory.fillDefaults().applyTo(summaryContainer);
-
- GridDataFactory gridDataFactory = GridDataFactory.fillDefaults().grab(true, true).span(image == null ? 2 : 1, 1);
- if (image != null) {
- gridDataFactory.hint(widthHint, heightHint);
- }
- gridDataFactory.applyTo(summaryContainer);
-
- StyledText summaryLabel = new StyledText(summaryContainer, SWT.WRAP | SWT.READ_ONLY | SWT.NO_FOCUS);
- summaryLabel.setText(summary);
- Point size = summaryLabel.computeSize(widthHint, SWT.DEFAULT);
- if (size.y > heightHint - 20) {
- summaryLabel.dispose();
- summaryLabel = new StyledText(summaryContainer, SWT.WRAP | SWT.READ_ONLY | SWT.NO_FOCUS | SWT.V_SCROLL);
- summaryLabel.setText(summary);
- }
- summaryLabel.setBackground(null);
-
- GridDataFactory.fillDefaults().grab(true, true).align(SWT.BEGINNING, SWT.BEGINNING).applyTo(summaryLabel);
-
- if (image != null) {
- final Composite imageContainer = new Composite(container, SWT.BORDER);
- GridLayoutFactory.fillDefaults().applyTo(imageContainer);
-
- GridDataFactory.fillDefaults().grab(false, false).align(SWT.CENTER, SWT.BEGINNING).hint(widthHint + (borderWidth * 2), heightHint).applyTo(imageContainer);
-
- Label imageLabel = new Label(imageContainer, SWT.NULL);
- GridDataFactory.fillDefaults().hint(widthHint, fixedImageHeight).indent(borderWidth, borderWidth).applyTo(imageLabel);
- imageLabel.setImage(image);
- imageLabel.setBackground(null);
- imageLabel.setSize(widthHint, fixedImageHeight);
-
- // creates a border
- imageContainer.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_BLACK));
- }
- if (hasLearnMoreLink) {
- Link link = new Link(summaryContainer, SWT.NULL);
- GridDataFactory.fillDefaults().grab(false, false).align(SWT.BEGINNING, SWT.CENTER).applyTo(link);
- link.setText(Messages.ConnectorDescriptorToolTip_detailsLink);
- link.setBackground(null);
- link.setToolTipText(NLS.bind(Messages.ConnectorDescriptorToolTip_detailsLink_tooltip, overview.getUrl()));
- link.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- WorkbenchUtil.openUrl(overview.getUrl(), IWorkbenchBrowserSupport.AS_EXTERNAL);
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
- });
- }
- if (image == null) {
- // prevent overviews with no image from providing unlimited text.
- Point optimalSize = summaryContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- if (optimalSize.y > (heightHint + 10)) {
- ((GridData) summaryContainer.getLayoutData()).heightHint = heightHint;
- container.layout(true);
- }
- }
- // hack: cause the tooltip to gain focus so that we can capture the escape key
- // this must be done async since the tooltip is not yet visible.
- Display.getCurrent().asyncExec(new Runnable() {
- public void run() {
- if (!parent.isDisposed()) {
- parent.setFocus();
- }
- }
- });
- return container;
- }
-
- private Image computeImage(AbstractCatalogSource discoverySource, String imagePath) {
- URL resource = discoverySource.getResource(imagePath);
- if (resource != null) {
- ImageDescriptor descriptor = ImageDescriptor.createFromURL(resource);
- Image image = descriptor.createImage();
- return image;
- }
- return null;
- }
-
- public void show(Control titleControl) {
- Point titleAbsLocation = titleControl.getParent().toDisplay(titleControl.getLocation());
- Point containerAbsLocation = parent.getParent().toDisplay(parent.getLocation());
- Rectangle bounds = titleControl.getBounds();
- int relativeX = titleAbsLocation.x - containerAbsLocation.x;
- int relativeY = titleAbsLocation.y - containerAbsLocation.y;
-
- relativeY += bounds.height + 3;
- show(new Point(relativeX, relativeY));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/messages.properties b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/messages.properties
deleted file mode 100644
index 6eb528502..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/messages.properties
+++ /dev/null
@@ -1,39 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-ConnectorDescriptorToolTip_detailsLink=<a>Learn more</a>
-ConnectorDescriptorToolTip_detailsLink_tooltip=Open {0} in an external browser
-ConnectorDiscoveryWizard_installProblems=Problems occurred while performing installation: {0}
-ConnectorDiscoveryWizardMainPage_connectorDiscovery=Install Extensions
-ConnectorDiscoveryWizardMainPage_filterLabel=F&ind:
-ConnectorDiscoveryWizardMainPage_message_with_cause={0}: {1}
-ConnectorDiscoveryWizardMainPage_noConnectorsFound=No Extensions Found
-ConnectorDiscoveryWizardMainPage_noConnectorsFound_description=Discovery completed without finding any extensions. Please check your network connection and try again.
-ConnectorDiscoveryWizardMainPage_pageDescription=\
- Select extensions to install. Press Finish to proceed with installation.\n\
- Press the information button to see a detailed overview and a link to more information.
-ConnectorDiscoveryWizardMainPage_provider_and_license=by {0}, {1}
-ConnectorDiscoveryWizardMainPage_tooltip_showOverview=Show Overview
-ConnectorDiscoveryWizardMainPage_unexpectedException=Unexpected exception
-ConnectorDiscoveryWizardMainPage_warningMessageConnectorUnavailable=Sorry, {0} is unavailable. Please try again later.
-ConnectorDiscoveryWizardMainPage_warningTitleConnectorUnavailable=Extension Unavailable
-DiscoveryItem_Connector_already_installed_Error_Message={0} is already installed.
-DiscoveryItem_Connector_already_installed_Error_Title=Install Extension
-DiscoveryItem_Extension_installed={0} (installed)
-DiscoveryViewer_Certification_Label0=by {0}, {1}, <a>Certified</a>
-DiscoveryViewer_Show_Installed=Show &Installed
-DiscoveryWizard_Install_Window_Title=Install
-InstallConnectorsJob_commaSeparator=,
-InstallConnectorsJob_connectorsNotAvailable=The following extensions are not available: {0}
-InstallConnectorsJob_questionProceed=Proceed With Installation?
-InstallConnectorsJob_questionProceed_long=The following extensions are not available: {0}\nProceed with the installation anyways?
-InstallConnectorsJob_task_configuring=Configuring installation selection
-InstallConnectorsJob_unexpectedError_url=Unexpected error handling repository URL
-PrepareInstallProfileJob_notFoundDescriptorDetail={0} (id={1}, site={2})
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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/.cvsignore b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.project b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.project
deleted file mode 100644
index 4f6093809..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ui.sdk.scheduler</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
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
deleted file mode 100644
index f14e3bffe..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Mar 16 19:07:09 EDT 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 2ee161f08..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:31 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
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
deleted file mode 100644
index 8c03c3228..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,38 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk.scheduler;singleton:=true
-Bundle-Version: 1.0.100.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatePlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.ui.sdk.scheduler;x-internal:=true
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.updatechecker,
- org.eclipse.equinox.p2.ui
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: com.ibm.icu.util;version="4.0.1",
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.engine,
- org.eclipse.equinox.internal.p2.engine.phases,
- org.eclipse.equinox.internal.p2.metadata.query,
- org.eclipse.equinox.internal.p2.ui.actions,
- org.eclipse.equinox.internal.p2.ui.query,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.internal.provisional.p2.updatechecker,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.ui;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.service.resolver;version="1.1.0",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.6.0",
- org.osgi.service.packageadmin;version="1.2.0"
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/about.html b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties
deleted file mode 100644
index 2d22063e4..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2008 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
-###############################################################################
-bin.includes = plugin.properties,\
- icons/,\
- .,\
- about.html,\
- META-INF/,\
- plugin.xml
-src.includes = about.html
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5 \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gif b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gif
deleted file mode 100644
index 1aca259db..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gif b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gif
deleted file mode 100644
index d5360165c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/close_hot.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gif b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gif
deleted file mode 100644
index aa84ebeaa..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gif b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gif
deleted file mode 100644
index c0cfaca34..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/icons/tool/update_problems.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.properties
deleted file mode 100644
index 13b5161b8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-#
-# Provisioning Automatic Update plugin resources
-#
-providerName = Eclipse.org - Equinox
-bundleName=Equinox Provisioning Platform Automatic Update Support
-IU.general=General Information
-IU.license=License Agreement
-IU.copyright=Copyright
-automaticUpdatesPrefPage = Automatic Updates
-preferenceKeywords.general=automatic update schedule download software install import bundle \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml
deleted file mode 100644
index 3072ef78b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%automaticUpdatesPrefPage">
- <initializer class="org.eclipse.equinox.internal.p2.ui.sdk.scheduler.PreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.ui.startup">
- <startup class="org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdateScheduler">
- </startup>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%automaticUpdatesPrefPage"
- category="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"
- class="org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatesPreferencePage"
- id="org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatesPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
- </extension>
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml
deleted file mode 100644
index 5689df805..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui.sdk.scheduler</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
deleted file mode 100644
index 17be7f356..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateMessages.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message class for provisioning UI messages.
- *
- * @since 3.5
- */
-public class AutomaticUpdateMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.sdk.scheduler.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, AutomaticUpdateMessages.class);
- }
- public static String SchedulerStartup_day;
- public static String SchedulerStartup_Monday;
- public static String SchedulerStartup_Tuesday;
- public static String SchedulerStartup_Wednesday;
- public static String SchedulerStartup_Thursday;
- public static String SchedulerStartup_Friday;
- public static String SchedulerStartup_Saturday;
- public static String SchedulerStartup_Sunday;
- public static String SchedulerStartup_1AM;
- public static String SchedulerStartup_2AM;
- public static String SchedulerStartup_3AM;
- public static String SchedulerStartup_4AM;
- public static String SchedulerStartup_5AM;
- public static String SchedulerStartup_6AM;
- public static String SchedulerStartup_7AM;
- public static String SchedulerStartup_8AM;
- public static String SchedulerStartup_9AM;
- public static String SchedulerStartup_10AM;
- public static String SchedulerStartup_11AM;
- public static String SchedulerStartup_12PM;
- public static String SchedulerStartup_1PM;
- public static String SchedulerStartup_2PM;
- public static String SchedulerStartup_3PM;
- public static String SchedulerStartup_4PM;
- public static String SchedulerStartup_5PM;
- public static String SchedulerStartup_6PM;
- public static String SchedulerStartup_7PM;
- public static String SchedulerStartup_8PM;
- public static String SchedulerStartup_9PM;
- public static String SchedulerStartup_10PM;
- public static String SchedulerStartup_11PM;
- public static String SchedulerStartup_12AM;
- public static String AutomaticUpdatesPopup_PrefLinkOnly;
- public static String AutomaticUpdatesPopup_RemindAndPrefLink;
- public static String AutomaticUpdatesPopup_ReminderJobTitle;
- public static String AutomaticUpdatesPreferencePage_findUpdates;
- public static String AutomaticUpdateScheduler_30Minutes;
- public static String AutomaticUpdateScheduler_60Minutes;
- public static String AutomaticUpdateScheduler_240Minutes;
- public static String AutomaticUpdateScheduler_UpdateNotInitialized;
- public static String AutomaticUpdatesPopup_UpdatesAvailableTitle;
- public static String AutomaticUpdater_AutomaticDownloadOperationName;
- public static String AutomaticUpdater_ClickToReviewUpdates;
- public static String AutomaticUpdater_ClickToReviewUpdatesWithProblems;
- public static String AutomaticUpdatesPreferencePage_UpdateSchedule;
- public static String AutomaticUpdatesPreferencePage_findOnStart;
- public static String AutomaticUpdatesPreferencePage_findOnSchedule;
- public static String AutomaticUpdatesPreferencePage_downloadOptions;
- public static String AutomaticUpdatesPreferencePage_searchAndNotify;
- public static String AutomaticUpdatesPreferencePage_downloadAndNotify;
- public static String AutomaticUpdatesPreferencePage_at;
- public static String AutomaticUpdatesPreferencePage_GenericProductName;
- public static String AutomaticUpdatesPreferencePage_RemindGroup;
- public static String AutomaticUpdatesPreferencePage_RemindSchedule;
- public static String AutomaticUpdatesPreferencePage_RemindOnce;
- public static String AutomaticUpdatesPopup_ClickToReviewDownloaded;
- public static String AutomaticUpdatesPopup_ClickToReviewNotDownloaded;
- public static String ErrorSavingPreferences;
- public static String ErrorSavingClassicPreferences;
- public static String ErrorLoadingPreferenceKeys;
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
deleted file mode 100644
index 25bd314e6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatePlugin.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import java.io.IOException;
-import java.net.URL;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * Activator class for the automatic updates plugin
- */
-public class AutomaticUpdatePlugin extends AbstractUIPlugin {
-
- // bundle-relative icon path
- public final static String ICON_PATH = "$nl$/icons/"; //$NON-NLS-1$
-
- // tool icons
- public final static String IMG_TOOL_UPDATE = "tool/update.gif"; //$NON-NLS-1$
- public final static String IMG_TOOL_UPDATE_PROBLEMS = "tool/update_problems.gif"; //$NON-NLS-1$
- public final static String IMG_TOOL_CLOSE = "tool/close.gif"; //$NON-NLS-1$
- public final static String IMG_TOOL_CLOSE_HOT = "tool/close_hot.gif"; //$NON-NLS-1$
-
- private static AutomaticUpdatePlugin plugin;
- private static BundleContext context;
-
- private AutomaticUpdateScheduler scheduler;
- private AutomaticUpdater updater;
- private ScopedPreferenceStore preferenceStore;
-
- private ProvisioningSession session;
-
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui.sdk.scheduler"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the singleton plugin instance
- *
- * @return the instance
- */
- public static AutomaticUpdatePlugin getDefault() {
- return plugin;
- }
-
- public AutomaticUpdatePlugin() {
- // constructor
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
- * )
- */
- public void start(BundleContext bundleContext) throws Exception {
- super.start(bundleContext);
- plugin = this;
- context = bundleContext;
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(getContext(), IProvisioningAgent.SERVICE_NAME);
- session = new ProvisioningSession(agent);
-
- PreferenceInitializer.migratePreferences();
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- if (scheduler != null) {
- scheduler.shutdown();
- scheduler = null;
- }
- if (updater != null) {
- updater.shutdown();
- updater = null;
- }
- plugin = null;
- super.stop(bundleContext);
- context = null;
- }
-
- public AutomaticUpdateScheduler getScheduler() {
- // If the scheduler was disabled, it does not get initialized
- if (scheduler == null)
- scheduler = new AutomaticUpdateScheduler();
- return scheduler;
- }
-
- public AutomaticUpdater getAutomaticUpdater() {
- if (updater == null)
- updater = new AutomaticUpdater();
- return updater;
- }
-
- void setScheduler(AutomaticUpdateScheduler scheduler) {
- this.scheduler = scheduler;
- }
-
- public IProvisioningEventBus getProvisioningEventBus() {
- ServiceReference<?> busReference = context.getServiceReference(IProvisioningEventBus.SERVICE_NAME);
- if (busReference == null)
- return null;
- return (IProvisioningEventBus) context.getService(busReference);
- }
-
- /*
- * Overridden to use a profile scoped preference store. (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- */
- public IPreferenceStore getPreferenceStore() {
- // Create the preference store lazily.
- if (preferenceStore == null) {
- final IAgentLocation agentLocation = getAgentLocation();
- if (agentLocation == null)
- return super.getPreferenceStore();
- preferenceStore = new ScopedPreferenceStore(new ProfileScope(agentLocation, IProfileRegistry.SELF), PLUGIN_ID);
- }
- return preferenceStore;
- }
-
- public IAgentLocation getAgentLocation() {
- ServiceReference<?> ref = getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
- if (ref == null)
- return null;
- IAgentLocation location = (IAgentLocation) getContext().getService(ref);
- getContext().ungetService(ref);
- return location;
- }
-
- public void savePreferences() {
- if (preferenceStore != null)
- try {
- preferenceStore.save();
- } catch (IOException e) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, AutomaticUpdatePlugin.PLUGIN_ID, 0, AutomaticUpdateMessages.ErrorSavingPreferences, e), StatusManager.LOG | StatusManager.SHOW);
- }
- }
-
- protected void initializeImageRegistry(ImageRegistry reg) {
- createImageDescriptor(IMG_TOOL_UPDATE, reg);
- createImageDescriptor(IMG_TOOL_UPDATE_PROBLEMS, reg);
- createImageDescriptor(IMG_TOOL_CLOSE, reg);
- createImageDescriptor(IMG_TOOL_CLOSE_HOT, reg);
- }
-
- /**
- * Creates the specified image descriptor and registers it
- */
- private void createImageDescriptor(String id, ImageRegistry reg) {
- URL url = FileLocator.find(getBundle(), new Path(ICON_PATH).append(id), null);
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- reg.put(id, desc);
- }
-
- public ProvisioningSession getSession() {
- return session;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
deleted file mode 100644
index cfb42f3cc..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdateScheduler.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import com.ibm.icu.util.Calendar;
-import com.ibm.icu.util.ULocale;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.*;
-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.engine.query.IUProfilePropertyQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.IStartup;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * This plug-in is loaded on startup to register with the update checker.
- *
- * @since 3.5
- */
-public class AutomaticUpdateScheduler implements IStartup {
- // values are to be picked up from the arrays DAYS and HOURS
- public static final String P_DAY = "day"; //$NON-NLS-1$
-
- public static final String P_HOUR = "hour"; //$NON-NLS-1$
-
- public static final String[] DAYS;
-
- public static final String[] HOURS = {AutomaticUpdateMessages.SchedulerStartup_1AM, AutomaticUpdateMessages.SchedulerStartup_2AM, AutomaticUpdateMessages.SchedulerStartup_3AM, AutomaticUpdateMessages.SchedulerStartup_4AM, AutomaticUpdateMessages.SchedulerStartup_5AM, AutomaticUpdateMessages.SchedulerStartup_6AM, AutomaticUpdateMessages.SchedulerStartup_7AM, AutomaticUpdateMessages.SchedulerStartup_8AM, AutomaticUpdateMessages.SchedulerStartup_9AM, AutomaticUpdateMessages.SchedulerStartup_10AM, AutomaticUpdateMessages.SchedulerStartup_11AM, AutomaticUpdateMessages.SchedulerStartup_12PM, AutomaticUpdateMessages.SchedulerStartup_1PM, AutomaticUpdateMessages.SchedulerStartup_2PM, AutomaticUpdateMessages.SchedulerStartup_3PM, AutomaticUpdateMessages.SchedulerStartup_4PM,
- AutomaticUpdateMessages.SchedulerStartup_5PM, AutomaticUpdateMessages.SchedulerStartup_6PM, AutomaticUpdateMessages.SchedulerStartup_7PM, AutomaticUpdateMessages.SchedulerStartup_8PM, AutomaticUpdateMessages.SchedulerStartup_9PM, AutomaticUpdateMessages.SchedulerStartup_10PM, AutomaticUpdateMessages.SchedulerStartup_11PM, AutomaticUpdateMessages.SchedulerStartup_12AM,};
-
- private IUpdateListener listener = null;
- private IUpdateChecker checker = null;
- String profileId;
-
- static {
- Calendar calendar = Calendar.getInstance(new ULocale(Platform.getNL()));
- String[] daysAsStrings = {AutomaticUpdateMessages.SchedulerStartup_day, AutomaticUpdateMessages.SchedulerStartup_Sunday, AutomaticUpdateMessages.SchedulerStartup_Monday, AutomaticUpdateMessages.SchedulerStartup_Tuesday, AutomaticUpdateMessages.SchedulerStartup_Wednesday, AutomaticUpdateMessages.SchedulerStartup_Thursday, AutomaticUpdateMessages.SchedulerStartup_Friday, AutomaticUpdateMessages.SchedulerStartup_Saturday};
- int firstDay = calendar.getFirstDayOfWeek();
- DAYS = new String[8];
- DAYS[0] = daysAsStrings[0];
- int countDays = 0;
- for (int i = firstDay; i <= 7; i++) {
- DAYS[++countDays] = daysAsStrings[i];
- }
- for (int i = 1; i < firstDay; i++) {
- DAYS[++countDays] = daysAsStrings[i];
- }
- }
-
- /**
- * The constructor.
- */
- public AutomaticUpdateScheduler() {
- AutomaticUpdatePlugin.getDefault().setScheduler(this);
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(AutomaticUpdatePlugin.getContext(), IProvisioningAgent.SERVICE_NAME);
- checker = (IUpdateChecker) agent.getService(IUpdateChecker.SERVICE_NAME);
- if (checker == null) {
- // Something did not initialize properly
- IStatus status = new Status(IStatus.ERROR, AutomaticUpdatePlugin.PLUGIN_ID, AutomaticUpdateMessages.AutomaticUpdateScheduler_UpdateNotInitialized);
- StatusManager.getManager().handle(status, StatusManager.LOG);
- return;
- }
- profileId = IProfileRegistry.SELF;
- }
-
- public void earlyStartup() {
- scheduleUpdate();
- }
-
- public void shutdown() {
- removeUpdateListener();
- }
-
- public void rescheduleUpdate() {
- removeUpdateListener();
- IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
- String schedule = pref.getString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE);
- // See if we have a scheduled check or startup only. If it is
- // startup only, there is nothing more to do now, a listener will
- // be created on the next startup.
- if (schedule.equals(PreferenceConstants.PREF_UPDATE_ON_STARTUP)) {
- return;
- }
- scheduleUpdate();
- }
-
- private void scheduleUpdate() {
- // Nothing to do if we don't know what profile we are checking
- if (profileId == null)
- return;
- IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
- // See if automatic search is enabled at all
- if (!pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED))
- return;
- String schedule = pref.getString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE);
- long delay = IUpdateChecker.ONE_TIME_CHECK;
- long poll = IUpdateChecker.ONE_TIME_CHECK;
- if (!schedule.equals(PreferenceConstants.PREF_UPDATE_ON_STARTUP)) {
- delay = computeDelay(pref);
- poll = computePoll(pref);
- }
- // We do not access the AutomaticUpdater directly when we register
- // the listener. This prevents the UI classes from being started up
- // too soon.
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=227582
- listener = new IUpdateListener() {
- public void updatesAvailable(UpdateEvent event) {
- AutomaticUpdatePlugin.getDefault().getAutomaticUpdater().updatesAvailable(event);
- }
-
- };
- checker.addUpdateCheck(profileId, getProfileQuery(), delay, poll, listener);
-
- }
-
- private IQuery<IInstallableUnit> getProfileQuery() {
- // We specifically avoid using the default policy's root property so that we don't load all the
- // p2 UI classes in doing so.
- return new IUProfilePropertyQuery(IProfile.PROP_PROFILE_ROOT_IU, Boolean.TRUE.toString());
- }
-
- private int getDay(IPreferenceStore pref) {
- String day = pref.getString(P_DAY);
- for (int d = 0; d < DAYS.length; d++)
- if (DAYS[d].equals(day))
- switch (d) {
- case 0 :
- return -1;
- case 1 :
- return Calendar.MONDAY;
- case 2 :
- return Calendar.TUESDAY;
- case 3 :
- return Calendar.WEDNESDAY;
- case 4 :
- return Calendar.THURSDAY;
- case 5 :
- return Calendar.FRIDAY;
- case 6 :
- return Calendar.SATURDAY;
- case 7 :
- return Calendar.SUNDAY;
- }
- return -1;
- }
-
- private int getHour(IPreferenceStore pref) {
- String hour = pref.getString(P_HOUR);
- for (int h = 0; h < HOURS.length; h++)
- if (HOURS[h].equals(hour))
- return h + 1;
- return 1;
- }
-
- /*
- * Computes the number of milliseconds from this moment to the next
- * scheduled update check. If that moment has already passed, returns 0L (start
- * immediately).
- */
- private long computeDelay(IPreferenceStore pref) {
-
- int target_d = getDay(pref);
- int target_h = getHour(pref);
-
- Calendar calendar = Calendar.getInstance();
- // may need to use the BootLoader locale
- int current_d = calendar.get(Calendar.DAY_OF_WEEK);
- // starts with SUNDAY
- int current_h = calendar.get(Calendar.HOUR_OF_DAY);
- int current_m = calendar.get(Calendar.MINUTE);
- int current_s = calendar.get(Calendar.SECOND);
- int current_ms = calendar.get(Calendar.MILLISECOND);
-
- long delay = 0L; // milliseconds
-
- if (target_d == -1) {
- // Compute the delay for "every day at x o'clock"
- // Is it now ?
- if (target_h == current_h && current_m == 0 && current_s == 0)
- return delay;
-
- int delta_h = target_h - current_h;
- if (target_h <= current_h)
- delta_h += 24;
- delay = ((delta_h * 60 - current_m) * 60 - current_s) * 1000 - current_ms;
- return delay;
- }
- // Compute the delay for "every Xday at x o'clock"
- // Is it now ?
- if (target_d == current_d && target_h == current_h && current_m == 0 && current_s == 0)
- return delay;
-
- int delta_d = target_d - current_d;
- if (target_d < current_d || target_d == current_d && (target_h < current_h || target_h == current_h && current_m > 0))
- delta_d += 7;
-
- delay = (((delta_d * 24 + target_h - current_h) * 60 - current_m) * 60 - current_s) * 1000 - current_ms;
- return delay;
- }
-
- /*
- * Computes the number of milliseconds for the polling frequency.
- * We have already established that there is a schedule, vs. only
- * on startup.
- */
- private long computePoll(IPreferenceStore pref) {
-
- int target_d = getDay(pref);
- if (target_d == -1) {
- // Every 24 hours
- return 24 * 60 * 60 * 1000;
- }
- return 7 * 24 * 60 * 60 * 1000;
- }
-
- private void removeUpdateListener() {
- // Remove the current listener if there is one
- if (listener != null && checker != null) {
- checker.removeUpdateCheck(listener);
- listener = null;
- }
- }
-}
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
deleted file mode 100644
index 63d13d338..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdater.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener;
-import org.eclipse.equinox.internal.provisional.p2.updatechecker.UpdateEvent;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.*;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * @since 3.5
- */
-public class AutomaticUpdater implements IUpdateListener {
-
- StatusLineCLabelContribution updateAffordance;
- IStatusLineManager statusLineManager;
- Collection<IInstallableUnit> iusWithUpdates;
- String profileId;
- ProvisioningListener profileListener;
- AutomaticUpdatesPopup popup;
- boolean alreadyDownloaded = false;
- UpdateOperation operation;
- private static final String AUTO_UPDATE_STATUS_ITEM = "AutoUpdatesStatus"; //$NON-NLS-1$
-
- public AutomaticUpdater() {
- createProfileListener();
- }
-
- private void createProfileListener() {
- profileListener = new ProvisioningListener() {
- public void notify(EventObject o) {
- if (o instanceof IProfileEvent) {
- IProfileEvent event = (IProfileEvent) o;
- if (event.getReason() == IProfileEvent.CHANGED && sameProfile(event.getProfileId())) {
- triggerNewUpdateNotification();
- }
- }
- }
- };
- getProvisioningEventBus().addListener(profileListener);
- }
-
- boolean sameProfile(String another) {
- if (another.equals(IProfileRegistry.SELF)) {
- another = getProfileRegistry().getProfile(another).getProfileId();
- }
- if (profileId.equals(IProfileRegistry.SELF)) {
- profileId = getProfileRegistry().getProfile(profileId).getProfileId();
- }
- return profileId.equals(another);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener
- * #
- * updatesAvailable(org.eclipse.equinox.internal.provisional.p2.updatechecker
- * .UpdateEvent)
- */
- public void updatesAvailable(UpdateEvent event) {
- updatesAvailable(event, true);
- }
-
- void updatesAvailable(final UpdateEvent event, final boolean notifyWithPopup) {
- final boolean download = getPreferenceStore().getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY);
- profileId = event.getProfileId();
- iusWithUpdates = event.getIUs();
- validateIusToUpdate();
- alreadyDownloaded = false;
-
- // Create an update operation to reflect the new updates that are available.
- operation = new UpdateOperation(getSession(), iusWithUpdates);
- operation.setProfileId(event.getProfileId());
- IStatus status = operation.resolveModal(new NullProgressMonitor());
-
- if (!status.isOK() || operation.getPossibleUpdates() == null || operation.getPossibleUpdates().length == 0) {
- if (PlatformUI.isWorkbenchRunning()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- clearUpdateAffordances();
- }
- });
- }
- return;
- }
- // Download the items before notifying user if the
- // preference dictates.
-
- if (download) {
- ProfileModificationJob job = new ProfileModificationJob(AutomaticUpdateMessages.AutomaticUpdater_AutomaticDownloadOperationName, getSession(), event.getProfileId(), operation.getProvisioningPlan(), new ProvisioningContext(getSession().getProvisioningAgent()));
- job.setPhaseSet(PhaseSetFactory.createPhaseSetIncluding(new String[] {PhaseSetFactory.PHASE_COLLECT}));
- job.setUser(false);
- job.setSystem(true);
- job.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent jobEvent) {
- IStatus jobStatus = jobEvent.getResult();
- if (jobStatus.isOK()) {
- alreadyDownloaded = true;
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup);
- }
- });
- } else if (jobStatus.getSeverity() != IStatus.CANCEL) {
- StatusManager.getManager().handle(jobStatus, StatusManager.LOG);
- }
- }
- });
- job.schedule();
- } else {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- notifyUserOfUpdates(operation.getResolutionResult().isOK(), notifyWithPopup);
- }
- });
- }
-
- }
-
- ProvisioningSession getSession() {
- return AutomaticUpdatePlugin.getDefault().getSession();
- }
-
- /*
- * Use with caution, as this still start the whole UI bundle. Shouldn't be used
- * in any of the update checking code, only the code that presents updates when notified.
- */
- ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /*
- * Filter out the ius that aren't visible to the user or are
- * locked for updating.
- */
-
- void validateIusToUpdate() {
- ArrayList<IInstallableUnit> list = new ArrayList<IInstallableUnit>(iusWithUpdates.size());
- IProfile profile = getProfileRegistry().getProfile(profileId);
-
- for (IInstallableUnit iuWithUpdate : iusWithUpdates) {
- try {
- if (validToUpdate(profile, iuWithUpdate))
- list.add(iuWithUpdate);
- } catch (OperationCanceledException e) {
- // Nothing to report
- }
- }
- iusWithUpdates = list;
- }
-
- // A proposed update is valid if it is still visible to the user as an
- // installed item (it is a root)
- // and if it is not locked for updating.
- private boolean validToUpdate(IProfile profile, IInstallableUnit iu) {
- int lock = IProfile.LOCK_NONE;
- boolean isRoot = false;
- try {
- String value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU);
- if (value != null)
- lock = Integer.parseInt(value);
- value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_ROOT_IU);
- isRoot = value == null ? false : Boolean.valueOf(value).booleanValue();
- } catch (NumberFormatException e) {
- // ignore and assume no lock
- }
- return isRoot && (lock & IProfile.LOCK_UPDATE) == 0;
- }
-
- Shell getWorkbenchWindowShell() {
- IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- return activeWindow != null ? activeWindow.getShell() : null;
-
- }
-
- IStatusLineManager getStatusLineManager() {
- if (statusLineManager != null)
- return statusLineManager;
- IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (activeWindow == null)
- return null;
- // YUCK! YUCK! YUCK!
- // IWorkbenchWindow does not define getStatusLineManager(), yet
- // WorkbenchWindow does
- try {
- Method method = activeWindow.getClass().getDeclaredMethod("getStatusLineManager", new Class[0]); //$NON-NLS-1$
- try {
- Object statusLine = method.invoke(activeWindow, new Object[0]);
- if (statusLine instanceof IStatusLineManager) {
- statusLineManager = (IStatusLineManager) statusLine;
- return statusLineManager;
- }
- } catch (InvocationTargetException e) {
- // oh well
- } catch (IllegalAccessException e) {
- // I tried
- }
- } catch (NoSuchMethodException e) {
- // can't blame us for trying.
- }
-
- IWorkbenchPartSite site = activeWindow.getActivePage().getActivePart().getSite();
- if (site instanceof IViewSite) {
- statusLineManager = ((IViewSite) site).getActionBars().getStatusLineManager();
- } else if (site instanceof IEditorSite) {
- statusLineManager = ((IEditorSite) site).getActionBars().getStatusLineManager();
- }
- return statusLineManager;
- }
-
- void updateStatusLine() {
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null)
- manager.update(true);
- }
-
- void createUpdateAffordance() {
- updateAffordance = new StatusLineCLabelContribution(AUTO_UPDATE_STATUS_ITEM, 5);
- updateAffordance.addListener(SWT.MouseDown, new Listener() {
- public void handleEvent(Event event) {
- launchUpdate();
- }
- });
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null) {
- manager.add(updateAffordance);
- manager.update(true);
- }
- }
-
- void notifyUserOfUpdates(boolean isValid, boolean showPopup) {
- if (updateAffordance == null)
- createUpdateAffordance();
- if (isValid) {
- if (showPopup)
- openUpdatePopup();
- updateAffordance.setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdates);
- updateAffordance.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_UPDATE)));
- } else {
- updateAffordance.setTooltip(AutomaticUpdateMessages.AutomaticUpdater_ClickToReviewUpdatesWithProblems);
- updateAffordance.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_UPDATE_PROBLEMS)));
- }
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null) {
- manager.update(true);
- }
- }
-
- void checkUpdateAffordanceEnablement() {
- // We don't currently support enablement in the affordance,
- // so we hide it if it should not be enabled.
- if (updateAffordance == null)
- return;
- boolean shouldBeVisible = getProvisioningUI().hasScheduledOperations();
- if (updateAffordance.isVisible() != shouldBeVisible) {
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null) {
- updateAffordance.setVisible(shouldBeVisible);
- manager.update(true);
- }
- }
- }
-
- void openUpdatePopup() {
- if (popup == null)
- popup = new AutomaticUpdatesPopup(getWorkbenchWindowShell(), alreadyDownloaded, getPreferenceStore());
- popup.open();
-
- }
-
- void clearUpdateAffordances() {
- if (updateAffordance != null) {
- IStatusLineManager manager = getStatusLineManager();
- if (manager != null) {
- manager.remove(updateAffordance);
- manager.update(true);
- }
- updateAffordance.dispose();
- updateAffordance = null;
- }
- if (popup != null) {
- popup.close(false);
- popup = null;
- }
- }
-
- public void launchUpdate() {
- getProvisioningUI().openUpdateWizard(false, operation, null);
- }
-
- /*
- * The profile has changed. Make sure our toUpdate list is still valid and
- * if there is nothing to update, get rid of the update popup and
- * affordance.
- */
- void triggerNewUpdateNotification() {
- Job notifyJob = new Job("Update validate job") { //$NON-NLS-1$
- public IStatus run(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- // notify that updates are available for all roots. We don't know for sure that
- // there are any, but this will cause everything to be rechecked. Don't trigger
- // a popup, just update the affordance and internal state.
- updatesAvailable(new UpdateEvent(profileId, getInstalledIUs()));
- return Status.OK_STATUS;
- }
- };
- notifyJob.setSystem(true);
- notifyJob.setUser(false);
- notifyJob.setPriority(Job.LONG);
- notifyJob.schedule();
- }
-
- /*
- * Get the IInstallable units for the specified profile
- *
- * @param profileId the profile in question
- * @param all <code>true</code> if all IInstallableUnits in the profile should
- * be returned, <code>false</code> only those IInstallableUnits marked as (user visible) roots
- * should be returned.
- *
- * @return an array of IInstallableUnits installed in the profile.
- */
- public Collection<IInstallableUnit> getInstalledIUs() {
- IProfile profile = getProfileRegistry().getProfile(profileId);
- if (profile == null)
- return CollectionUtils.emptyList();
- IQuery<IInstallableUnit> query = new UserVisibleRootQuery();
- IQueryResult<IInstallableUnit> queryResult = profile.query(query, null);
- return queryResult.toUnmodifiableSet();
- }
-
- public void shutdown() {
- statusLineManager = null;
- if (profileListener != null) {
- getProvisioningEventBus().removeListener(profileListener);
- profileListener = null;
- }
- }
-
- IProfileRegistry getProfileRegistry() {
- return (IProfileRegistry) getSession().getProvisioningAgent().getService(IProfileRegistry.SERVICE_NAME);
- }
-
- IProvisioningEventBus getProvisioningEventBus() {
- return (IProvisioningEventBus) getSession().getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
- }
-
- IPreferenceStore getPreferenceStore() {
- return AutomaticUpdatePlugin.getDefault().getPreferenceStore();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
deleted file mode 100644
index 1b8acef28..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * 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
- * Johannes Michler <orgler@gmail.com> - Bug 321568 - [ui] Preference for automatic-update-reminder doesn't work in multilanguage-environments
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.PopupDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-/**
- * AutomaticUpdatesPopup is an async popup dialog for notifying
- * the user of updates.
- *
- * @since 3.4
- */
-public class AutomaticUpdatesPopup extends PopupDialog {
- public static final String[] ELAPSED_VALUES = {PreferenceConstants.PREF_REMIND_30Minutes, PreferenceConstants.PREF_REMIND_60Minutes, PreferenceConstants.PREF_REMIND_240Minutes};
- public static final String[] ELAPSED_LOCALIZED_STRINGS = {AutomaticUpdateMessages.AutomaticUpdateScheduler_30Minutes, AutomaticUpdateMessages.AutomaticUpdateScheduler_60Minutes, AutomaticUpdateMessages.AutomaticUpdateScheduler_240Minutes};
- private static final long MINUTE = 60 * 1000L;
- private static final String PREFS_HREF = "PREFS"; //$NON-NLS-1$
- private static final String DIALOG_SETTINGS_SECTION = "AutomaticUpdatesPopup"; //$NON-NLS-1$
- private static final int POPUP_OFFSET = 20;
-
- IPreferenceStore prefs;
- long remindDelay = -1L;
- IPropertyChangeListener prefListener;
- WorkbenchJob remindJob;
- boolean downloaded;
- Composite dialogArea;
- Link remindLink;
- MouseListener clickListener;
-
- public AutomaticUpdatesPopup(Shell parentShell, boolean alreadyDownloaded, IPreferenceStore prefs) {
- super(parentShell, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE | SWT.MODELESS, false, true, true, false, false, AutomaticUpdateMessages.AutomaticUpdatesPopup_UpdatesAvailableTitle, null);
- downloaded = alreadyDownloaded;
- this.prefs = prefs;
- remindDelay = computeRemindDelay();
- clickListener = new MouseAdapter() {
- public void mouseDown(MouseEvent e) {
- AutomaticUpdatePlugin.getDefault().getAutomaticUpdater().launchUpdate();
- }
- };
- }
-
- protected Control createDialogArea(Composite parent) {
- dialogArea = new Composite(parent, SWT.NONE);
- dialogArea.setLayoutData(new GridData(GridData.FILL_BOTH));
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- dialogArea.setLayout(layout);
- dialogArea.addMouseListener(clickListener);
-
- // The "click to update" label
- Label infoLabel = new Label(dialogArea, SWT.NONE);
- if (downloaded)
- infoLabel.setText(AutomaticUpdateMessages.AutomaticUpdatesPopup_ClickToReviewDownloaded);
- else
- infoLabel.setText(AutomaticUpdateMessages.AutomaticUpdatesPopup_ClickToReviewNotDownloaded);
- infoLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
- infoLabel.addMouseListener(clickListener);
-
- createRemindSection(dialogArea);
-
- return dialogArea;
-
- }
-
- private void createRemindSection(Composite parent) {
- remindLink = new Link(parent, SWT.MULTI | SWT.WRAP | SWT.RIGHT);
- updateRemindText();
- remindLink.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), PreferenceConstants.PREF_PAGE_AUTO_UPDATES, null, null);
- dialog.open();
-
- }
- });
- remindLink.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- private void updateRemindText() {
- if (prefs.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE))
- remindLink.setText(NLS.bind(AutomaticUpdateMessages.AutomaticUpdatesPopup_RemindAndPrefLink, new String[] {getElapsedTimeString(prefs.getString(PreferenceConstants.PREF_REMIND_ELAPSED)), PREFS_HREF}));
- else
- remindLink.setText(AutomaticUpdateMessages.AutomaticUpdatesPopup_PrefLinkOnly);
- remindLink.getParent().layout(true);
- }
-
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = AutomaticUpdatePlugin.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION);
- if (section == null) {
- section = settings.addNewSection(DIALOG_SETTINGS_SECTION);
- }
- return section;
- }
-
- public int open() {
- prefListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- handlePreferenceChange(event);
- }
- };
- prefs.addPropertyChangeListener(prefListener);
- return super.open();
- }
-
- public boolean close() {
- return close(true);
- }
-
- public boolean close(boolean remind) {
- if (remind && prefs.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE))
- scheduleRemindJob();
- else
- cancelRemindJob();
- if (prefListener != null) {
- prefs.removePropertyChangeListener(prefListener);
- prefListener = null;
- }
- return super.close();
-
- }
-
- void scheduleRemindJob() {
- // Cancel any pending remind job if there is one
- if (remindJob != null)
- remindJob.cancel();
- // If no updates have been found, there is nothing to remind
- if (remindDelay < 0)
- return;
- remindJob = new WorkbenchJob(AutomaticUpdateMessages.AutomaticUpdatesPopup_ReminderJobTitle) {
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- open();
- return Status.OK_STATUS;
- }
- };
- remindJob.setSystem(true);
- remindJob.setPriority(Job.INTERACTIVE);
- remindJob.schedule(remindDelay);
-
- }
-
- /*
- * Computes the number of milliseconds for the delay
- * in reminding the user of updates
- */
- long computeRemindDelay() {
- if (prefs.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE)) {
- String elapsed = prefs.getString(PreferenceConstants.PREF_REMIND_ELAPSED);
- for (int d = 0; d < ELAPSED_VALUES.length; d++)
- if (ELAPSED_VALUES[d].equals(elapsed))
- switch (d) {
- case 0 :
- // 30 minutes
- return 30 * MINUTE;
- case 1 :
- // 60 minutes
- return 60 * MINUTE;
- case 2 :
- // 240 minutes
- return 240 * MINUTE;
- }
- }
- return -1L;
- }
-
- void cancelRemindJob() {
- if (remindJob != null) {
- remindJob.cancel();
- remindJob = null;
- }
- }
-
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(AutomaticUpdateMessages.AutomaticUpdatesPopup_UpdatesAvailableTitle);
- }
-
- /**
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.window.Window#getInitialLocation(org.eclipse.swt.graphics.Point)
- */
- protected Point getInitialLocation(Point initialSize) {
- Shell parent = getParentShell();
- Point parentSize, parentLocation;
-
- if (parent != null) {
- parentSize = parent.getSize();
- parentLocation = parent.getLocation();
- } else {
- Rectangle bounds = getShell().getDisplay().getBounds();
- parentSize = new Point(bounds.width, bounds.height);
- parentLocation = new Point(0, 0);
- }
- // We have to take parent location into account because SWT considers all
- // shell locations to be in display coordinates, even if the shell is parented.
- return new Point(parentSize.x - initialSize.x + parentLocation.x - POPUP_OFFSET, parentSize.y - initialSize.y + parentLocation.y - POPUP_OFFSET);
- }
-
- void handlePreferenceChange(PropertyChangeEvent event) {
- if (PreferenceConstants.PREF_REMIND_SCHEDULE.equals(event.getProperty())) {
- // Reminders turned on
- if (prefs.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE)) {
- if (remindLink == null)
- createRemindSection(dialogArea);
- else {
- updateRemindText();
- getShell().layout(true, true);
- }
- computeRemindDelay();
- scheduleRemindJob();
- } else { // reminders turned off
- if (remindLink != null) {
- updateRemindText();
- getShell().layout(true, true);
- }
- cancelRemindJob();
- }
- } else if (PreferenceConstants.PREF_REMIND_ELAPSED.equals(event.getProperty())) {
- // Reminding schedule changed
- computeRemindDelay();
- scheduleRemindJob();
- }
- }
-
- /*
- * Overridden so that clicking in the title menu area closes the dialog.
- * Also creates a close box menu in the title area.
- */
- protected Control createTitleMenuArea(Composite parent) {
- Composite titleComposite = (Composite) super.createTitleMenuArea(parent);
- titleComposite.addMouseListener(clickListener);
-
- ToolBar toolBar = new ToolBar(titleComposite, SWT.FLAT);
- ToolItem closeButton = new ToolItem(toolBar, SWT.PUSH, 0);
-
- GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar);
- closeButton.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE)));
- closeButton.setHotImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE_HOT)));
- closeButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- close();
- }
- });
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=177183
- toolBar.addMouseListener(new MouseAdapter() {
- public void mouseDown(MouseEvent e) {
- close();
- }
- });
- return titleComposite;
- }
-
- /*
- * Overridden to adjust the span of the title label.
- * Reachy, reachy....
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.PopupDialog#createTitleControl(org.eclipse.swt.widgets.Composite)
- */
- protected Control createTitleControl(Composite parent) {
- Control control = super.createTitleControl(parent);
- Object data = control.getLayoutData();
- if (data instanceof GridData) {
- ((GridData) data).horizontalSpan = 1;
- }
- return control;
- }
-
- public static String getElapsedTimeString(String elapsedTimeKey) {
- for (int i = 0; i < AutomaticUpdatesPopup.ELAPSED_VALUES.length; i++) {
- if (AutomaticUpdatesPopup.ELAPSED_VALUES[i].equals(elapsedTimeKey))
- return AutomaticUpdatesPopup.ELAPSED_LOCALIZED_STRINGS[i];
- }
- return AutomaticUpdatesPopup.ELAPSED_LOCALIZED_STRINGS[0];
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
deleted file mode 100644
index db602870f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPreferencePage.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*******************************************************************************
- * 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
- * Johannes Michler <orgler@gmail.com> - Bug 321568 - [ui] Preference for automatic-update-reminder doesn't work in multilanguage-environments
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import org.eclipse.core.runtime.IProduct;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-
-/**
- * Preference page for automated updates.
- *
- * @since 3.4
- *
- */
-public class AutomaticUpdatesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Button enabledCheck;
- private Button onStartupRadio, onScheduleRadio;
- private Combo dayCombo;
- private Label atLabel;
- private Combo hourCombo;
- private Button searchOnlyRadio, searchAndDownloadRadio;
- private Button remindOnceRadio, remindScheduleRadio;
- private Combo remindElapseCombo;
- private Group updateScheduleGroup, downloadGroup, remindGroup;
-
- public void init(IWorkbench workbench) {
- // nothing to init
- }
-
- protected Control createContents(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IAutomaticUpdaterHelpContextIds.AUTOMATIC_UPDATES_PREFERENCE_PAGE);
-
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- container.setLayout(layout);
-
- enabledCheck = new Button(container, SWT.CHECK);
- enabledCheck.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findUpdates);
-
- createSpacer(container, 1);
-
- updateScheduleGroup = new Group(container, SWT.NONE);
- updateScheduleGroup.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_UpdateSchedule);
- layout = new GridLayout();
- layout.numColumns = 3;
- updateScheduleGroup.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- updateScheduleGroup.setLayoutData(gd);
-
- onStartupRadio = new Button(updateScheduleGroup, SWT.RADIO);
- IProduct product = Platform.getProduct();
- String productName = product != null && product.getName() != null ? product.getName() : AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_GenericProductName;
- onStartupRadio.setText(NLS.bind(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findOnStart, productName));
- gd = new GridData();
- gd.horizontalSpan = 3;
- onStartupRadio.setLayoutData(gd);
- onStartupRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- onScheduleRadio = new Button(updateScheduleGroup, SWT.RADIO);
- onScheduleRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_findOnSchedule);
- gd = new GridData();
- gd.horizontalSpan = 3;
- onScheduleRadio.setLayoutData(gd);
- onScheduleRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- dayCombo = new Combo(updateScheduleGroup, SWT.READ_ONLY);
- dayCombo.setItems(AutomaticUpdateScheduler.DAYS);
- gd = new GridData();
- gd.widthHint = 200;
- gd.horizontalIndent = 30;
- dayCombo.setLayoutData(gd);
-
- atLabel = new Label(updateScheduleGroup, SWT.NULL);
- atLabel.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_at);
-
- hourCombo = new Combo(updateScheduleGroup, SWT.READ_ONLY);
- hourCombo.setItems(AutomaticUpdateScheduler.HOURS);
- gd = new GridData();
- hourCombo.setLayoutData(gd);
-
- createSpacer(container, 1);
-
- downloadGroup = new Group(container, SWT.NONE);
- downloadGroup.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_downloadOptions);
- layout = new GridLayout();
- layout.numColumns = 3;
- downloadGroup.setLayout(layout);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- downloadGroup.setLayoutData(gd);
-
- searchOnlyRadio = new Button(downloadGroup, SWT.RADIO);
- searchOnlyRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_searchAndNotify);
- gd = new GridData();
- gd.horizontalSpan = 3;
- searchOnlyRadio.setLayoutData(gd);
- searchOnlyRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- searchAndDownloadRadio = new Button(downloadGroup, SWT.RADIO);
- searchAndDownloadRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_downloadAndNotify);
- gd = new GridData();
- gd.horizontalSpan = 3;
- searchAndDownloadRadio.setLayoutData(gd);
- searchAndDownloadRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- createSpacer(container, 1);
-
- remindGroup = new Group(container, SWT.NONE);
- remindGroup.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindGroup);
- layout = new GridLayout();
- layout.numColumns = 3;
- remindGroup.setLayout(layout);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- remindGroup.setLayoutData(gd);
-
- remindOnceRadio = new Button(remindGroup, SWT.RADIO);
- remindOnceRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindOnce);
- gd = new GridData();
- gd.horizontalSpan = 3;
- remindOnceRadio.setLayoutData(gd);
- remindOnceRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- remindScheduleRadio = new Button(remindGroup, SWT.RADIO);
- remindScheduleRadio.setText(AutomaticUpdateMessages.AutomaticUpdatesPreferencePage_RemindSchedule);
- gd = new GridData();
- gd.horizontalSpan = 3;
- remindScheduleRadio.setLayoutData(gd);
- remindScheduleRadio.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- remindElapseCombo = new Combo(remindGroup, SWT.READ_ONLY);
- remindElapseCombo.setItems(AutomaticUpdatesPopup.ELAPSED_LOCALIZED_STRINGS);
-
- gd = new GridData();
- gd.widthHint = 200;
- gd.horizontalIndent = 30;
- remindElapseCombo.setLayoutData(gd);
-
- initialize();
-
- enabledCheck.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- pageChanged();
- }
- });
-
- Dialog.applyDialogFont(container);
- return container;
- }
-
- protected void createSpacer(Composite composite, int columnSpan) {
- Label label = new Label(composite, SWT.NONE);
- GridData gd = new GridData();
- gd.horizontalSpan = columnSpan;
- label.setLayoutData(gd);
- }
-
- private void initialize() {
- IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
- enabledCheck.setSelection(pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
- setSchedule(pref.getString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE));
-
- dayCombo.setText(AutomaticUpdateScheduler.DAYS[getDay(pref, false)]);
- hourCombo.setText(AutomaticUpdateScheduler.HOURS[getHour(pref, false)]);
-
- remindScheduleRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
- remindOnceRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
- remindElapseCombo.setText(AutomaticUpdatesPopup.getElapsedTimeString(pref.getString(PreferenceConstants.PREF_REMIND_ELAPSED)));
- searchOnlyRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
- searchAndDownloadRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
-
- pageChanged();
- }
-
- private void setSchedule(String value) {
- if (value.equals(PreferenceConstants.PREF_UPDATE_ON_STARTUP))
- onStartupRadio.setSelection(true);
- else
- onScheduleRadio.setSelection(true);
- }
-
- void pageChanged() {
- boolean master = enabledCheck.getSelection();
- updateScheduleGroup.setEnabled(master);
- onStartupRadio.setEnabled(master);
- onScheduleRadio.setEnabled(master);
- dayCombo.setEnabled(master && onScheduleRadio.getSelection());
- atLabel.setEnabled(master && onScheduleRadio.getSelection());
- hourCombo.setEnabled(master && onScheduleRadio.getSelection());
- downloadGroup.setEnabled(master);
- searchOnlyRadio.setEnabled(master);
- searchAndDownloadRadio.setEnabled(master);
- remindGroup.setEnabled(master);
- remindScheduleRadio.setEnabled(master);
- remindOnceRadio.setEnabled(master);
- remindElapseCombo.setEnabled(master && remindScheduleRadio.getSelection());
- }
-
- protected void performDefaults() {
- super.performDefaults();
- IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
- enabledCheck.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED));
-
- setSchedule(pref.getDefaultString(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE));
- onScheduleRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE));
-
- dayCombo.setText(AutomaticUpdateScheduler.DAYS[getDay(pref, true)]);
- hourCombo.setText(AutomaticUpdateScheduler.HOURS[getHour(pref, true)]);
-
- remindOnceRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
- remindScheduleRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE));
- remindElapseCombo.setText(AutomaticUpdatesPopup.getElapsedTimeString(pref.getDefaultString(PreferenceConstants.PREF_REMIND_ELAPSED)));
-
- searchOnlyRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
- searchAndDownloadRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY));
- pageChanged();
- }
-
- /**
- * Method declared on IPreferencePage. Subclasses should override
- */
- public boolean performOk() {
- IPreferenceStore pref = AutomaticUpdatePlugin.getDefault().getPreferenceStore();
- pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, enabledCheck.getSelection());
- if (onStartupRadio.getSelection())
- pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, PreferenceConstants.PREF_UPDATE_ON_STARTUP);
- else
- pref.setValue(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, PreferenceConstants.PREF_UPDATE_ON_SCHEDULE);
-
- if (remindScheduleRadio.getSelection()) {
- pref.setValue(PreferenceConstants.PREF_REMIND_SCHEDULE, true);
- pref.setValue(PreferenceConstants.PREF_REMIND_ELAPSED, AutomaticUpdatesPopup.ELAPSED_VALUES[remindElapseCombo.getSelectionIndex()]);
- } else {
- pref.setValue(PreferenceConstants.PREF_REMIND_SCHEDULE, false);
- }
-
- pref.setValue(AutomaticUpdateScheduler.P_DAY, dayCombo.getText());
- pref.setValue(AutomaticUpdateScheduler.P_HOUR, hourCombo.getText());
-
- pref.setValue(PreferenceConstants.PREF_DOWNLOAD_ONLY, searchAndDownloadRadio.getSelection());
-
- AutomaticUpdatePlugin.getDefault().savePreferences();
- AutomaticUpdatePlugin.getDefault().getScheduler().rescheduleUpdate();
- return true;
- }
-
- private int getDay(IPreferenceStore pref, boolean useDefault) {
- String day = useDefault ? pref.getDefaultString(AutomaticUpdateScheduler.P_DAY) : pref.getString(AutomaticUpdateScheduler.P_DAY);
- for (int i = 0; i < AutomaticUpdateScheduler.DAYS.length; i++)
- if (AutomaticUpdateScheduler.DAYS[i].equals(day))
- return i;
- return 0;
- }
-
- private int getHour(IPreferenceStore pref, boolean useDefault) {
- String hour = useDefault ? pref.getDefaultString(AutomaticUpdateScheduler.P_HOUR) : pref.getString(AutomaticUpdateScheduler.P_HOUR);
- for (int i = 0; i < AutomaticUpdateScheduler.HOURS.length; i++)
- if (AutomaticUpdateScheduler.HOURS[i].equals(hour))
- return i;
- return 0;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/IAutomaticUpdaterHelpContextIds.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/IAutomaticUpdaterHelpContextIds.java
deleted file mode 100644
index 608b68402..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/IAutomaticUpdaterHelpContextIds.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-/**
- * Help context ids for the P2 Automatic Updater.
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- * @since 3.5
- */
-
-public interface IAutomaticUpdaterHelpContextIds {
- public static final String PREFIX = AutomaticUpdatePlugin.PLUGIN_ID + "."; //$NON-NLS-1$
-
- public static final String AUTOMATIC_UPDATES_PREFERENCE_PAGE = PREFIX + "automatic_updates_preference_page_context"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java
deleted file mode 100644
index 6f2de2be3..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceConstants.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Johannes Michler <orgler@gmail.com> - Bug 321568 - [ui] Preference for automatic-update-reminder doesn't work in multilanguage-environments
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-/**
- * @since 3.5
- */
-public class PreferenceConstants {
- public static final String PREF_PAGE_AUTO_UPDATES = "org.eclipse.equinox.internal.p2.ui.sdk.scheduler.AutomaticUpdatesPreferencePage"; //$NON-NLS-1$
- public static final String PREF_AUTO_UPDATE_ENABLED = "enabled"; //$NON-NLS-1$
- public static final String PREF_AUTO_UPDATE_SCHEDULE = "schedule"; //$NON-NLS-1$
- public static final String PREF_UPDATE_ON_STARTUP = "on-startup"; //$NON-NLS-1$
- public static final String PREF_UPDATE_ON_SCHEDULE = "on-schedule"; //$NON-NLS-1$ // string value defined in AutomaticUpdateScheduler
- public static final String PREF_DOWNLOAD_ONLY = "download"; // value is true or false, default is false //$NON-NLS-1$
- public static final String PREF_REMIND_SCHEDULE = "remindOnSchedule"; // value is true or false //$NON-NLS-1$
- public static final String PREF_REMIND_ELAPSED = "remindElapsedTime";//$NON-NLS-1$
- public static final String PREF_REMIND_30Minutes = "30 minutes";//$NON-NLS-1$
- public static final String PREF_REMIND_60Minutes = "Hour";//$NON-NLS-1$
- public static final String PREF_REMIND_240Minutes = "4 Hours";//$NON-NLS-1$
- public static final String PREF_AUTO_UPDATE_INIT = "autoUpdateInit"; //$NON-NLS-1$
- public static final String PREF_MIGRATED_34 = "migrated34Prefs"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
deleted file mode 100644
index eeca5763a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/PreferenceInitializer.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Johannes Michler <orgler@gmail.com> - Bug 321568 - [ui] Preference for automatic-update-reminder doesn't work in multilanguage-environments
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- private static final String P_ENABLED = "enabled"; //$NON-NLS-1$
- private static final String UPDATE_PLUGIN_ID = "org.eclipse.update.scheduler"; //$NON-NLS-1$
- private static final String SDK_UI_PLUGIN_ID = "org.eclipse.equinox.p2.ui.sdk"; //$NON-NLS-1$
-
- public static void migratePreferences() {
- // Migrate preference values that were stored in alternate locations.
- // 1) migrate from instance scope (during 3.5 development) to profile
- // scope (final 3.5 format)
- // 2) if applicable, migrate from 3.4 prefs kept in a different bundle
- // 3) if applicable, migrate from 3.3 prefs known by Update Manager
- // 4) check value of auto update reminder time and if it is a localized string, change it to the english string
- // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=321568)
- final IAgentLocation agentLocation = AutomaticUpdatePlugin.getDefault().getAgentLocation();
- if (agentLocation == null)
- return;
- Preferences pref = new ProfileScope(agentLocation, IProfileRegistry.SELF).getNode(AutomaticUpdatePlugin.PLUGIN_ID);
- try {
- if (pref.keys().length == 0) {
- // migrate preferences from instance scope to profile scope
- Preferences oldPref = new InstanceScope().getNode(AutomaticUpdatePlugin.PLUGIN_ID);
- String[] keys = oldPref.keys();
- for (int i = 0; i < keys.length; i++)
- pref.put(keys[i], oldPref.get(keys[i], "")); //$NON-NLS-1$
-
- if (keys.length > 0)
- pref.flush();
- }
- } catch (BackingStoreException e) {
- handleException(e, AutomaticUpdateMessages.ErrorLoadingPreferenceKeys);
- }
-
- // Have we migrated from 3.4 pref values?
- boolean migrated34 = pref.getBoolean(PreferenceConstants.PREF_MIGRATED_34, false);
- boolean node34exists = false;
- if (!migrated34) {
- // first look for the 3.4 automatic update preferences, which were
- // located in a different bundle than now, in the instance scope.
- Preferences instanceScope = Platform.getPreferencesService().getRootNode().node(InstanceScope.SCOPE);
- try {
- node34exists = instanceScope.nodeExists(SDK_UI_PLUGIN_ID);
- } catch (BackingStoreException e1) {
- // nothing to report, assume node does not exist
- }
- if (node34exists) {
- Preferences node34 = instanceScope.node(SDK_UI_PLUGIN_ID);
- // We only migrate the preferences associated with auto update.
- // Other preferences still remain in that bundle and are handled
- // there. We don't migrate if the value was never set.
- // We use string literals rather than pref constants because we want to
- // ensure we match the 3.4 values.
- if (pref.get(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, null) == null && node34.get("enabled", null) != null) { //$NON-NLS-1$
- pref.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, node34.getBoolean("enabled", false)); //$NON-NLS-1$
- }
- if (pref.get(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, null) == null && node34.get("schedule", null) != null) { //$NON-NLS-1$
- pref.put(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, node34.get("schedule", //$NON-NLS-1$
- PreferenceConstants.PREF_UPDATE_ON_STARTUP));
- }
- if (pref.get(PreferenceConstants.PREF_DOWNLOAD_ONLY, null) == null && node34.get("download", null) != null) { //$NON-NLS-1$
- pref.putBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY, node34.getBoolean("download", false)); //$NON-NLS-1$
- }
- if (pref.get(PreferenceConstants.PREF_REMIND_SCHEDULE, null) == null && node34.get("remindOnSchedule", null) != null) { //$NON-NLS-1$
- pref.putBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE, node34.getBoolean("remindOnSchedule", false)); //$NON-NLS-1$
- }
- if (pref.get(PreferenceConstants.PREF_REMIND_ELAPSED, null) == null && node34.get("remindElapsedTime", null) != null) { //$NON-NLS-1$
- pref.put(PreferenceConstants.PREF_REMIND_ELAPSED, node34.get("remindElapsedTime", //$NON-NLS-1$
- PreferenceConstants.PREF_REMIND_30Minutes));
- }
- }
- // mark the pref that says we've migrated
- pref.putBoolean(PreferenceConstants.PREF_MIGRATED_34, true);
- try {
- pref.flush();
- } catch (BackingStoreException e) {
- handleException(e, AutomaticUpdateMessages.ErrorSavingPreferences);
- }
- }
- // pref used to track 3.3 migration
- // Have we initialized the auto update prefs from previous
- // releases?
- boolean autoUpdateInit = pref.getBoolean(PreferenceConstants.PREF_AUTO_UPDATE_INIT, false);
-
- if (!migrated34 && !autoUpdateInit) {
- // Look for the 3.3 UM automatic update preferences. We will
- // not migrate them if we already pulled values from 3.4.
- // However, we always want to turn off the UM automatic update
- // checker if it is found to be on.
- Preferences instanceScope = Platform.getPreferencesService().getRootNode().node(InstanceScope.SCOPE);
- try {
- boolean updateNodeExists = instanceScope.nodeExists(UPDATE_PLUGIN_ID);
- Preferences prefUM = instanceScope.node(UPDATE_PLUGIN_ID);
- boolean enableUpdate = prefUM.getBoolean(P_ENABLED, false);
- // set p2 automatic update preference to match UM preference,
- // only if we haven't already set a value.
- if (pref.get(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, null) == null && updateNodeExists) {
- pref.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, enableUpdate);
- }
- // turn off UM automatic update preference if it exists
- if (updateNodeExists) {
- prefUM.putBoolean(P_ENABLED, false);
- prefUM.flush();
- }
- // mark the pref that says we migrated
- pref.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_INIT, true);
- pref.flush();
- } catch (BackingStoreException e) {
- handleException(e, AutomaticUpdateMessages.ErrorSavingClassicPreferences);
- }
- }
-
- // All migration is done, check that the value of the auto update reminder time is *not* localized
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=321568
- String value = pref.get(PreferenceConstants.PREF_REMIND_ELAPSED, PreferenceConstants.PREF_REMIND_30Minutes);
- for (int i = 0; i < AutomaticUpdatesPopup.ELAPSED_VALUES.length; i++)
- if (AutomaticUpdatesPopup.ELAPSED_VALUES[i].equals(value))
- // it's a known value, all is well, no need to go further.
- return;
- try {
- // The stored value is not a known value. See if it is a localized value and if so, use the corresponding value string instead.
- for (int i = 0; i < AutomaticUpdatesPopup.ELAPSED_LOCALIZED_STRINGS.length; i++)
- if (AutomaticUpdatesPopup.ELAPSED_LOCALIZED_STRINGS[i].equals(value)) {
- pref.put(PreferenceConstants.PREF_REMIND_ELAPSED, AutomaticUpdatesPopup.ELAPSED_VALUES[i]);
- pref.flush();
- return;
- }
- // The string does not reflect a known value, nor does it reflect the current locale.
- // Set it to the default value. Note that we've never handled a change of locale properly in the
- // preference migration, so losing a not known setting is not a regression. At least we tried to
- // handle the current locale...
- pref.put(PreferenceConstants.PREF_REMIND_ELAPSED, PreferenceConstants.PREF_REMIND_30Minutes);
- pref.flush();
- } catch (BackingStoreException e) {
- handleException(e, AutomaticUpdateMessages.ErrorSavingPreferences);
- }
- }
-
- private static void handleException(Exception e, String message) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, AutomaticUpdatePlugin.PLUGIN_ID, 0, message, e), StatusManager.LOG);
- }
-
- public void initializeDefaultPreferences() {
- // initialize the default scope
- Preferences node = new DefaultScope().getNode(AutomaticUpdatePlugin.PLUGIN_ID);
- node.putBoolean(PreferenceConstants.PREF_AUTO_UPDATE_ENABLED, false);
- node.put(PreferenceConstants.PREF_AUTO_UPDATE_SCHEDULE, PreferenceConstants.PREF_UPDATE_ON_STARTUP);
- node.putBoolean(PreferenceConstants.PREF_DOWNLOAD_ONLY, false);
- node.putBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE, false);
- node.put(PreferenceConstants.PREF_REMIND_ELAPSED, PreferenceConstants.PREF_REMIND_30Minutes);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/StatusLineCLabelContribution.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/StatusLineCLabelContribution.java
deleted file mode 100644
index 224afa793..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/StatusLineCLabelContribution.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.scheduler;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Listener;
-
-/**
- * @since 3.4
- */
-public class StatusLineCLabelContribution extends ContributionItem {
-
- public final static int DEFAULT_CHAR_WIDTH = 40;
-
- private int charWidth;
- private CLabel label;
- private Image image;
- private String text = ""; //$NON-NLS-1$
- private int widthHint = -1;
- private int heightHint = -1;
-
- private Listener listener;
- private int eventType;
- private String tooltip;
-
- public StatusLineCLabelContribution(String id, int charWidth) {
- super(id);
- this.charWidth = charWidth;
- setVisible(false); // no text to start with
- }
-
- public void fill(Composite parent) {
- label = new CLabel(parent, SWT.DEFAULT);
- StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData();
-
- if (widthHint < 0) {
- GC gc = new GC(parent);
- gc.setFont(parent.getFont());
- FontMetrics fm = gc.getFontMetrics();
- widthHint = fm.getAverageCharWidth() * charWidth;
- heightHint = fm.getHeight();
- gc.dispose();
- }
-
- statusLineLayoutData.widthHint = widthHint;
- label.setLayoutData(statusLineLayoutData);
- label.setText(text);
- label.setImage(image);
- if (listener != null) {
- label.addListener(eventType, listener);
- }
- if (tooltip != null) {
- label.setToolTipText(tooltip);
- }
-
- statusLineLayoutData = new StatusLineLayoutData();
- statusLineLayoutData.heightHint = heightHint;
- }
-
- public void addListener(int type, Listener labelListener) {
- this.eventType = type;
- this.listener = labelListener;
- }
-
- public void setText(String text) {
- if (text == null)
- throw new NullPointerException();
-
- this.text = text;
-
- if (label != null && !label.isDisposed())
- label.setText(this.text);
-
- if (this.text.length() == 0) {
- if (isVisible()) {
- setVisible(false);
- IContributionManager contributionManager = getParent();
-
- if (contributionManager != null)
- contributionManager.update(true);
- }
- } else {
- if (!isVisible()) {
- setVisible(true);
- IContributionManager contributionManager = getParent();
-
- if (contributionManager != null)
- contributionManager.update(true);
- }
- }
- }
-
- public void setTooltip(String tooltip) {
- if (tooltip == null)
- throw new NullPointerException();
-
- this.tooltip = tooltip;
-
- if (label != null && !label.isDisposed()) {
- label.setToolTipText(this.tooltip);
- }
- }
-
- public void setImage(Image image) {
- if (image == null)
- throw new NullPointerException();
-
- this.image = image;
-
- if (label != null && !label.isDisposed())
- label.setImage(this.image);
-
- if (!isVisible()) {
- setVisible(true);
- IContributionManager contributionManager = getParent();
-
- if (contributionManager != null)
- contributionManager.update(true);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
deleted file mode 100644
index 497a0e695..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/messages.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-
-
-SchedulerStartup_day=Every day
-SchedulerStartup_Monday=Every Monday
-SchedulerStartup_Tuesday=Every Tuesday
-SchedulerStartup_Wednesday=Every Wednesday
-SchedulerStartup_Thursday=Every Thursday
-SchedulerStartup_Friday=Every Friday
-SchedulerStartup_Saturday=Every Saturday
-SchedulerStartup_Sunday=Every Sunday
-SchedulerStartup_1AM=1:00 AM
-SchedulerStartup_2AM=2:00 AM
-SchedulerStartup_3AM=3:00 AM
-SchedulerStartup_4AM=4:00 AM
-SchedulerStartup_5AM=5:00 AM
-SchedulerStartup_6AM=6:00 AM
-SchedulerStartup_7AM=7:00 AM
-SchedulerStartup_8AM=8:00 AM
-SchedulerStartup_9AM=9:00 AM
-SchedulerStartup_10AM=10:00 AM
-SchedulerStartup_11AM=11:00 AM
-SchedulerStartup_12PM=12:00 PM
-SchedulerStartup_1PM=1:00 PM
-SchedulerStartup_2PM=2:00 PM
-SchedulerStartup_3PM=3:00 PM
-SchedulerStartup_4PM=4:00 PM
-SchedulerStartup_5PM=5:00 PM
-SchedulerStartup_6PM=6:00 PM
-SchedulerStartup_7PM=7:00 PM
-SchedulerStartup_8PM=8:00 PM
-SchedulerStartup_9PM=9:00 PM
-SchedulerStartup_10PM=10:00 PM
-SchedulerStartup_11PM=11:00 PM
-SchedulerStartup_12AM=12:00 AM
-AutomaticUpdatesPopup_PrefLinkOnly=Set up <a>Reminder options</a>
-AutomaticUpdatesPopup_RemindAndPrefLink=You will be reminded in {0}.\nSet reminder <a href="{1}">preferences</a>
-AutomaticUpdatesPopup_ReminderJobTitle=Update reminder job
-AutomaticUpdatesPreferencePage_findUpdates=Automatically &find new updates and notify me
-AutomaticUpdateScheduler_30Minutes=30 minutes
-AutomaticUpdateScheduler_60Minutes=Hour
-AutomaticUpdateScheduler_240Minutes= 4 Hours
-AutomaticUpdateScheduler_UpdateNotInitialized=The update checker service is not initialized
-AutomaticUpdatesPopup_UpdatesAvailableTitle=Updates Available
-AutomaticUpdater_AutomaticDownloadOperationName=Automatic updates download
-AutomaticUpdater_ClickToReviewUpdates=Updates are available. Click here to review and install them.
-AutomaticUpdater_ClickToReviewUpdatesWithProblems=Updates are available, but there may be some compatibility problems. Click here to review them.
-AutomaticUpdatesPreferencePage_UpdateSchedule=&Update schedule
-AutomaticUpdatesPreferencePage_findOnStart=Look for u&pdates each time {0} is started
-AutomaticUpdatesPreferencePage_findOnSchedule=Look for updates on the following &schedule:
-AutomaticUpdatesPreferencePage_downloadOptions=&Download options
-AutomaticUpdatesPreferencePage_searchAndNotify=Search for updates and &notify me when they are available
-AutomaticUpdatesPreferencePage_downloadAndNotify=Down&load new updates automatically and notify me when ready to install them
-AutomaticUpdatesPopup_ClickToReviewDownloaded=Software updates have been downloaded.\nClick to review and install updates.
-AutomaticUpdatesPopup_ClickToReviewNotDownloaded=Updates are available for your software.\nClick to review and install updates.
-AutomaticUpdatesPreferencePage_at=at
-AutomaticUpdatesPreferencePage_GenericProductName=the application
-AutomaticUpdatesPreferencePage_RemindGroup=&When updates are found
-AutomaticUpdatesPreferencePage_RemindSchedule=&Remind me about updates every:
-AutomaticUpdatesPreferencePage_RemindOnce=Notify me &once about updates
-ErrorSavingPreferences=Error saving update preferences
-ErrorSavingClassicPreferences=Error saving classic update preferences
-ErrorLoadingPreferenceKeys=Error loading preference keys \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.classpath b/bundles/org.eclipse.equinox.p2.ui.sdk/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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/.cvsignore b/bundles/org.eclipse.equinox.p2.ui.sdk/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.project b/bundles/org.eclipse.equinox.p2.ui.sdk/.project
deleted file mode 100644
index e28ff32f6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ui.sdk</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters b/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters
deleted file mode 100644
index 69033c6c2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/.api_filters
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<component id="org.eclipse.equinox.p2.ui.sdk" version="2">
- <resource path="src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java" type="org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler">
- <filter id="571519004">
- <message_arguments>
- <message_argument value="org.eclipse.equinox.internal.p2.ui.sdk.PreloadingRepositoryHandler.doExecuteAndLoad()"/>
- <message_argument value="LoadMetadataRepositoryJob"/>
- </message_arguments>
- </filter>
- </resource>
- <resource path="src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java" type="org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePageWithCompare">
- <filter id="571473929">
- <message_arguments>
- <message_argument value="RevertProfilePage"/>
- <message_argument value="RevertProfilePageWithCompare"/>
- </message_arguments>
- </filter>
- </resource>
-</component>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 19b78b9fd..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Dec 22 23:22:15 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index dbe72f165..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:14 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
deleted file mode 100644
index 1a358c4d7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui.sdk;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.ui.sdk;x-internal:=true,
- org.eclipse.equinox.internal.p2.ui.sdk.prefs;x-internal:=true
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui,
- org.eclipse.compare
-Import-Package: javax.xml.parsers,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.6.0",
- org.w3c.dom,
- org.xml.sax
-Service-Component: OSGI-INF/policy_component.xml, OSGI-INF/licenseManager_component.xml
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml
deleted file mode 100644
index bdaeb067d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/licenseManager_component.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.sdk.licenseManager">
- <implementation class="org.eclipse.equinox.internal.p2.ui.sdk.SimpleLicenseManager"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.ui.LicenseManager"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml
deleted file mode 100644
index c02500765..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/OSGI-INF/policy_component.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.sdk">
- <implementation class="org.eclipse.equinox.internal.p2.ui.sdk.SDKPolicy"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.ui.Policy"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/about.html b/bundles/org.eclipse.equinox.p2.ui.sdk/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/build.properties b/bundles/org.eclipse.equinox.p2.ui.sdk/build.properties
deleted file mode 100644
index 8be3e849c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-bin.includes = plugin.properties,\
- .,\
- about.html,\
- META-INF/,\
- plugin.xml,\
- OSGI-INF/
-src.includes = about.html
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties b/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties
deleted file mode 100644
index c25e1e6cc..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.properties
+++ /dev/null
@@ -1,29 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-#
-# Provisioning UI plugin resources
-#
-providerName = Eclipse.org - Equinox
-bundleName=Equinox Provisioning Platform Update Support
-Update.command=Check for Updates
-Update.command.mnemonic=U
-Install.command=Install New Software...
-Install.command.mnemonic=S
-TempInstallView.command=Installation Information
-TempInstallView.mnemonic=I
-provisioningPrefPage = Install/Update
-sitesPrefPage = Available Software Sites
-installedSoftwarePage = Installed Software
-installHistoryPage = Installation History
-preferenceKeywords.general=automatic update schedule download site software install import bundle
-preferences=Update and Install Preferences
-classicCategoryName=Classic Update
-classicCategoryDesc=Enables classic update functionality \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml
deleted file mode 100644
index 8722ca97c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/plugin.xml
+++ /dev/null
@@ -1,124 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
- <initializer class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%provisioningPrefPage"
- class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.ProvisioningPreferencePage"
- id="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
-
- <page
- name="%sitesPrefPage"
- category="org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"
- class="org.eclipse.equinox.p2.ui.RepositoryManipulationPage"
- id="org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
-
- </extension>
-
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- label="%preferenceKeywords.general"
- id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </extension>
-
-
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%Update.command"
- id="org.eclipse.equinox.p2.ui.sdk.update">
- </command>
- <command
- name="%Install.command"
- id="org.eclipse.equinox.p2.ui.sdk.install">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.equinox.p2.ui.sdk.update"
- class="org.eclipse.equinox.internal.p2.ui.sdk.UpdateHandler">
- </handler>
- <handler
- commandId="org.eclipse.equinox.p2.ui.sdk.install"
- class="org.eclipse.equinox.internal.p2.ui.sdk.InstallNewSoftwareHandler">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:help?after=additions">
- <command
- commandId="org.eclipse.equinox.p2.ui.sdk.update"
- mnemonic="%Update.command.mnemonic"
- id="org.eclipse.equinox.p2.ui.sdk.update">
- </command>
-
- </menuContribution>
- <menuContribution
- locationURI="menu:help?after=org.eclipse.equinox.p2.ui.sdk.update">
- <command
- commandId="org.eclipse.equinox.p2.ui.sdk.install"
- mnemonic="%Install.command.mnemonic"
- id="org.eclipse.equinox.p2.ui.sdk.install">
- </command>
-
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.ui.activities">
- <activity
- description="%classicCategoryDesc"
- id="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
- name="%classicCategoryName">
- </activity>
- <activityPatternBinding
- activityId="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
- isEqualityPattern="false"
- pattern=".*org\.eclipse\.update\.internal.*">
- </activityPatternBinding>
- <activityPatternBinding
- activityId="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
- isEqualityPattern="false"
- pattern=".*org\.eclipse\.ui\.update.*">
- </activityPatternBinding>
- <category
- description="%classicCategoryDesc"
- id="org.eclipse.equinox.p2.ui.sdk.category.classicUpdate"
- name="%classicCategoryName">
- </category>
- <categoryActivityBinding
- activityId="org.eclipse.equinox.p2.ui.sdk.classicUpdate"
- categoryId="org.eclipse.equinox.p2.ui.sdk.category.classicUpdate">
- </categoryActivityBinding>
- </extension>
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
- <initializer class="org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.ui.installationPages">
- <page
- name="%installedSoftwarePage"
- class="org.eclipse.equinox.p2.ui.InstalledSoftwarePage"
- id="10.org.eclipse.equinox.internal.p2.ui.sdk.InstalledSoftwarePage">
- </page>
- <page
- name="%installHistoryPage"
- class="org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePageWithCompare"
- id="11.org.eclipse.equinox.internal.p2.ui.sdk.RevertProfilePage">
- </page>
-
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml b/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml
deleted file mode 100644
index b57ed505e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui.sdk</artifactId>
- <version>1.0.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java
deleted file mode 100644
index c89ab61a5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/IProvSDKHelpContextIds.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-/**
- * Help context ids for the P2 SDK
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- * @since 3.4
- */
-
-public interface IProvSDKHelpContextIds {
- public static final String PREFIX = ProvSDKUIActivator.PLUGIN_ID + "."; //$NON-NLS-1$
-
- public static final String PROVISIONING_PREFERENCE_PAGE = PREFIX + "provisioning_preference_page_context"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
deleted file mode 100644
index 5c6da40e6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/InstallNewSoftwareHandler.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(null, null, job);
- }
-
- protected boolean waitForPreload() {
- // If the user cannot see repositories, then we may as well wait
- // for existing repos to load so that content is available.
- // If the user can manipulate the repositories, then we don't wait,
- // because we don't know which ones they want to work with.
- return !getProvisioningUI().getPolicy().getRepositoriesVisible();
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- super.setLoadJobProperties(loadJob);
- // If we are doing a background load, we do not wish to authenticate, as the
- // user is unaware that loading was needed
- if (!waitForPreload()) {
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- }
- }
-
- @Override
- protected String getProgressTaskName() {
- return ProvSDKMessages.InstallNewSoftwareHandler_ProgressTaskName;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
deleted file mode 100644
index e1f89a97a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/PreloadingRepositoryHandler.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-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.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * PreloadingRepositoryHandler provides background loading of
- * repositories before executing the provisioning handler.
- *
- * @since 3.5
- */
-abstract class PreloadingRepositoryHandler extends AbstractHandler {
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- // Look for a profile. We may not immediately need it in the
- // handler, but if we don't have one, whatever we are trying to do
- // will ultimately fail in a more subtle/low-level way. So determine
- // up front if the system is configured properly.
- String profileId = getProvisioningUI().getProfileId();
- IProvisioningAgent agent = getProvisioningUI().getSession().getProvisioningAgent();
- IProfile profile = null;
- if (agent != null) {
- IProfileRegistry registry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (registry != null) {
- profile = registry.getProfile(profileId);
- }
- }
- if (profile == null) {
- // Inform the user nicely
- MessageDialog.openInformation(null, ProvSDKMessages.Handler_SDKUpdateUIMessageTitle, ProvSDKMessages.Handler_CannotLaunchUI);
- // Log the detailed message
- StatusManager.getManager().handle(ProvSDKUIActivator.getNoSelfProfileStatus());
- } else {
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- doExecuteAndLoad();
- }
- });
- }
- return null;
- }
-
- void doExecuteAndLoad() {
- if (preloadRepositories()) {
- //cancel any load that is already running
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI()) {
- public IStatus runModal(IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, getProgressTaskName(), 1000);
- IStatus status = super.runModal(sub.newChild(500));
- if (status.getSeverity() == IStatus.CANCEL)
- return status;
- try {
- doPostLoadBackgroundWork(sub.newChild(500));
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- }
- return status;
- }
- };
- setLoadJobProperties(loadJob);
- if (waitForPreload()) {
- loadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if (PlatformUI.isWorkbenchRunning())
- if (event.getResult().isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- doExecute(loadJob);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(null);
- }
- } else {
- doExecute(null);
- }
- }
-
- protected abstract String getProgressTaskName();
-
- protected abstract void doExecute(LoadMetadataRepositoryJob job);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected void doPostLoadBackgroundWork(IProgressMonitor monitor) throws OperationCanceledException {
- // default is to do nothing more.
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- * @return a Shell
- */
- protected Shell getShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
deleted file mode 100644
index 01d537adf..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKMessages.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message class for provisioning UI messages.
- *
- * @since 3.4
- */
-public class ProvSDKMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.sdk.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ProvSDKMessages.class);
- }
- public static String Handler_CannotLaunchUI;
- public static String Handler_SDKUpdateUIMessageTitle;
- public static String InstallNewSoftwareHandler_ProgressTaskName;
- public static String PreferenceInitializer_Error;
- public static String ProvisioningPreferencePage_AlwaysOpenWizard;
- public static String ProvisioningPreferencePage_BrowsingPrefsGroup;
- public static String ProvisioningPreferencePage_ShowLatestVersions;
- public static String ProvisioningPreferencePage_ShowAllVersions;
- public static String ProvisioningPreferencePage_NeverOpenWizard;
- public static String ProvisioningPreferencePage_OpenWizardIfInvalid;
- public static String ProvisioningPreferencePage_PromptToOpenWizard;
- public static String ProvisioningPreferencePage_UninstallUpdateLink;
- public static String ProvSDKUIActivator_ErrorSavingPrefs;
- public static String ProvSDKUIActivator_NoSelfProfile;
- public static String ProvSDKUIActivator_OpenWizardAnyway;
- public static String ProvSDKUIActivator_Question;
- public static String SDKPolicy_PrefPageName;
- public static String UpdateHandler_NoSitesMessage;
- public static String UpdateHandler_NoSitesTitle;
- public static String UpdateHandler_ProgressTaskName;
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
deleted file mode 100644
index 61ea6c7df..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/ProvSDKUIActivator.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import java.io.IOException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceInitializer;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * Activator class for the p2 UI.
- */
-public class ProvSDKUIActivator extends AbstractUIPlugin {
-
- private static ProvSDKUIActivator plugin;
- private static BundleContext context;
- private ScopedPreferenceStore preferenceStore;
-
- private IPropertyChangeListener preferenceListener;
-
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui.sdk"; //$NON-NLS-1$
-
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the singleton plugin instance
- *
- * @return the instance
- */
- public static ProvSDKUIActivator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in
- * relative path
- *
- * @param path
- * the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public ProvSDKUIActivator() {
- // constructor
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- super.start(bundleContext);
- plugin = this;
- ProvSDKUIActivator.context = bundleContext;
- PreferenceInitializer.migratePreferences();
- getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
- }
-
- private IPropertyChangeListener getPreferenceListener() {
- if (preferenceListener == null) {
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- updateWithPreferences(getPolicy());
- }
- };
- }
- return preferenceListener;
- }
-
- public ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- Policy getPolicy() {
- return getProvisioningUI().getPolicy();
- }
-
- public IProvisioningAgent getProvisioningAgent() {
- return getProvisioningUI().getSession().getProvisioningAgent();
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- plugin = null;
- getPreferenceStore().removePropertyChangeListener(preferenceListener);
- super.stop(bundleContext);
- }
-
- static IStatus getNoSelfProfileStatus() {
- return new Status(IStatus.WARNING, PLUGIN_ID, ProvSDKMessages.ProvSDKUIActivator_NoSelfProfile);
- }
-
- void updateWithPreferences(Policy policy) {
- policy.setShowLatestVersionsOnly(getPreferenceStore().getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- }
-
- /*
- * Overridden to use a profile scoped preference store.
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#getPreferenceStore()
- */
- public IPreferenceStore getPreferenceStore() {
- // Create the preference store lazily.
- if (preferenceStore == null) {
- final IAgentLocation agentLocation = getAgentLocation();
- if (agentLocation == null)
- return super.getPreferenceStore();
- preferenceStore = new ScopedPreferenceStore(new ProfileScope(agentLocation, IProfileRegistry.SELF), PLUGIN_ID);
- }
- return preferenceStore;
- }
-
- private IAgentLocation getAgentLocation() {
- ServiceReference<?> ref = getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
- if (ref == null)
- return null;
- IAgentLocation location = (IAgentLocation) getContext().getService(ref);
- getContext().ungetService(ref);
- return location;
- }
-
- public void savePreferences() {
- if (preferenceStore != null)
- try {
- preferenceStore.save();
- } catch (IOException e) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, PLUGIN_ID, 0, ProvSDKMessages.ProvSDKUIActivator_ErrorSavingPrefs, e), StatusManager.LOG | StatusManager.SHOW);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java
deleted file mode 100644
index 9a1f7776a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/RevertProfilePageWithCompare.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.compare.*;
-import org.eclipse.compare.structuremergeviewer.Differencer;
-import org.eclipse.compare.structuremergeviewer.IStructureComparator;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.equinox.p2.ui.RevertProfilePage;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Same as {@link RevertProfilePage} but adds a compare button to compare profiles.
- *
- * @see RevertProfilePage
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since 2.0
- */
-public class RevertProfilePageWithCompare extends RevertProfilePage {
-
- private static final int COMPARE_ID = IDialogConstants.CLIENT_ID + 2;
- Button compareButton;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.about.InstallationPage#createPageButtons(org.eclipse.swt.widgets.Composite)
- */
- public void createPageButtons(Composite parent) {
- if (ProvisioningUI.getDefaultUI().getProfileId() == null)
- return;
- compareButton = createButton(parent, COMPARE_ID, ProvUIMessages.RevertProfilePage_CompareLabel);
- compareButton.setToolTipText(ProvUIMessages.RevertProfilePage_CompareTooltip);
- compareButton.setEnabled(computeCompareEnablement(getSelection()));
- super.createPageButtons(parent);
- }
-
- protected void buttonPressed(int buttonId) {
- switch (buttonId) {
- case COMPARE_ID :
- compare();
- break;
- default :
- super.buttonPressed(buttonId);
- break;
- }
- }
-
- boolean computeCompareEnablement(IStructuredSelection structuredSelection) {
- // compare is enabled if there are two elements selected
- Object[] selection = structuredSelection.toArray();
- if (selection.length == 2) {
- for (int i = 0; i < selection.length; i++) {
- if (!(selection[i] instanceof RollbackProfileElement))
- return false;
- }
- return true;
- }
- return false;
- }
-
- protected void handleSelectionChanged(IStructuredSelection selection) {
- super.handleSelectionChanged(selection);
- if (!selection.isEmpty()) {
- if (selection.size() == 1) {
- if (compareButton != null)
- compareButton.setEnabled(false);
- } else {
- // multiple selections, we can compare
- if (compareButton != null)
- compareButton.setEnabled(computeCompareEnablement(selection));
- }
- } else {
- // Nothing is selected
- if (compareButton != null)
- compareButton.setEnabled(false);
- }
- }
-
- private RollbackProfileElement[] getRollbackProfileElementsToCompare() {
- // expecting two items selected
- RollbackProfileElement[] result = new RollbackProfileElement[2];
- IStructuredSelection selection = getSelection();
- int i = 0;
- for (Object selected : selection.toList()) {
- if (selected != null && selected instanceof RollbackProfileElement) {
- result[i++] = (RollbackProfileElement) selected;
- }
- if (i == 2)
- break;
- }
- return result;
- }
-
- void compare() {
- final RollbackProfileElement[] rpe = getRollbackProfileElementsToCompare();
- CompareUI.openCompareDialog(new ProfileCompareEditorInput(rpe));
- }
-
- private class ProfileCompareEditorInput extends CompareEditorInput {
- private Object root;
- private ProvElementNode l;
- private ProvElementNode r;
-
- public ProfileCompareEditorInput(RollbackProfileElement[] rpe) {
- super(new CompareConfiguration());
- Assert.isTrue(rpe.length == 2);
- l = new ProvElementNode(rpe[0]);
- r = new ProvElementNode(rpe[1]);
- }
-
- protected Object prepareInput(IProgressMonitor monitor) {
- initLabels();
- Differencer d = new Differencer();
- root = d.findDifferences(false, monitor, null, null, l, r);
- return root;
- }
-
- private void initLabels() {
- CompareConfiguration cc = getCompareConfiguration();
- cc.setLeftEditable(false);
- cc.setRightEditable(false);
- cc.setLeftLabel(l.getName());
- cc.setLeftImage(l.getImage());
- cc.setRightLabel(r.getName());
- cc.setRightImage(r.getImage());
- }
-
- public String getOKButtonLabel() {
- return IDialogConstants.OK_LABEL;
- }
- }
-
- private class ProvElementNode implements IStructureComparator, ITypedElement, IStreamContentAccessor {
- private ProvElement pe;
- private IInstallableUnit iu;
- final static String BLANK = ""; //$NON-NLS-1$
- private String id = BLANK;
-
- public ProvElementNode(Object input) {
- pe = (ProvElement) input;
- iu = ProvUI.getAdapter(pe, IInstallableUnit.class);
- if (iu != null) {
- id = iu.getId();
- }
- }
-
- public Object[] getChildren() {
- Set<ProvElementNode> children = new HashSet<ProvElementNode>();
- if (pe instanceof RollbackProfileElement) {
- Object[] c = ((RollbackProfileElement) pe).getChildren(null);
- for (int i = 0; i < c.length; i++) {
- children.add(new ProvElementNode(c[i]));
- }
- } else if (pe instanceof InstalledIUElement) {
- Object[] c = ((InstalledIUElement) pe).getChildren(null);
- for (int i = 0; i < c.length; i++) {
- children.add(new ProvElementNode(c[i]));
- }
- }
- return children.toArray();
- }
-
- /**
- * Implementation based on <code>id</code>.
- * @param other the object to compare this <code>ProvElementNode</code> against.
- * @return <code>true</code> if the <code>ProvElementNodes</code>are equal; <code>false</code> otherwise.
- */
- public boolean equals(Object other) {
- if (other instanceof ProvElementNode)
- return id.equals(((ProvElementNode) other).id);
- return super.equals(other);
- }
-
- /**
- * Implementation based on <code>id</code>.
- * @return a hash code for this object.
- */
- public int hashCode() {
- return id.hashCode();
- }
-
- public Image getImage() {
- return pe.getImage(null);
- }
-
- public String getName() {
- if (iu != null) {
- return iu.getProperty(IInstallableUnit.PROP_NAME, null);
- }
- return pe.getLabel(null);
- }
-
- public String getType() {
- return ITypedElement.UNKNOWN_TYPE;
- }
-
- public InputStream getContents() {
- String contents = BLANK;
- if (iu != null) {
- contents = iu.getVersion().toString();
- }
- return new ByteArrayInputStream(contents.getBytes());
- }
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java
deleted file mode 100644
index c6149bc17..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SDKPolicy.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * SDKPolicy defines the Eclipse SDK UI policies for the
- * p2 UI. The policy is declared as an OSGi service in
- * the policy_component.xml file.
- *
- * @since 3.6
- */
-public class SDKPolicy extends Policy {
-
- public SDKPolicy() {
- // initialize for our values
- setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
- // If this ever changes, we must change AutomaticUpdateSchedule.getProfileQuery()
- setVisibleInstalledIUQuery(new UserVisibleRootQuery());
- setRepositoryPreferencePageId("org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage"); //$NON-NLS-1$
- setRepositoryPreferencePageName(ProvSDKMessages.SDKPolicy_PrefPageName);
- ProvSDKUIActivator.getDefault().updateWithPreferences(this);
- }
-
- public IStatus getNoProfileChosenStatus() {
- return ProvSDKUIActivator.getNoSelfProfileStatus();
- }
-
- public boolean continueWorkingOperation(ProfileChangeOperation operation, Shell shell) {
- // don't continue if superclass has already identified problem scenarios
- boolean ok = super.continueWorkingWithOperation(operation, shell);
- if (!ok)
- return false;
-
- IProvisioningPlan plan = operation.getProvisioningPlan();
- if (plan == null)
- return false;
-
- // Check the preference to see whether to continue.
- IPreferenceStore prefs = ProvSDKUIActivator.getDefault().getPreferenceStore();
- String openPlan = prefs.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- if (MessageDialogWithToggle.ALWAYS.equals(openPlan)) {
- return true;
- }
- if (MessageDialogWithToggle.NEVER.equals(openPlan)) {
- StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
- return false;
- }
- MessageDialogWithToggle dialog = MessageDialogWithToggle.openYesNoCancelQuestion(shell, ProvSDKMessages.ProvSDKUIActivator_Question, ProvSDKMessages.ProvSDKUIActivator_OpenWizardAnyway, null, false, prefs, PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
-
- // Any answer but yes will stop the performance of the plan, but NO is interpreted to mean, show me the error.
- if (dialog.getReturnCode() == IDialogConstants.NO_ID)
- StatusManager.getManager().handle(plan.getStatus(), StatusManager.SHOW | StatusManager.LOG);
- return dialog.getReturnCode() == IDialogConstants.YES_ID;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
deleted file mode 100644
index 166b2ef4e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/SimpleLicenseManager.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * 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
- * Genuitec, LLC - added license support
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import java.util.HashSet;
-import java.util.StringTokenizer;
-import org.eclipse.equinox.internal.p2.ui.sdk.prefs.PreferenceConstants;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.equinox.p2.metadata.ILicense;
-import org.eclipse.equinox.p2.ui.LicenseManager;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * SimpleLicenseManager is a license manager that keeps track of
- * IInstallableUnit licenses using their UUID. The licenses ids
- * are stored in the profile's preferences.
- *
- * @since 3.6
- */
-public class SimpleLicenseManager extends LicenseManager {
- java.util.Set<String> accepted = new HashSet<String>();
- String profileId;
-
- public SimpleLicenseManager(String profileId) {
- super();
- this.profileId = profileId;
- initializeFromPreferences();
- }
-
- public SimpleLicenseManager() {
- this(IProfileRegistry.SELF);
- }
-
- public boolean accept(ILicense license) {
- accepted.add(license.getUUID());
- updatePreferences();
- return true;
- }
-
- public boolean reject(ILicense license) {
- accepted.remove(license.getUUID());
- updatePreferences();
- return true;
- }
-
- public boolean isAccepted(ILicense license) {
- return accepted.contains(license.getUUID());
- }
-
- public boolean hasAcceptedLicenses() {
- return !accepted.isEmpty();
- }
-
- private Preferences getPreferences() {
- IAgentLocation location = (IAgentLocation) ProvSDKUIActivator.getDefault().getProvisioningAgent().getService(IAgentLocation.SERVICE_NAME);
- return new ProfileScope(location, profileId).getNode(ProvSDKUIActivator.PLUGIN_ID);
- }
-
- private void initializeFromPreferences() {
- Preferences pref = getPreferences();
- if (pref != null) {
- String digestList = pref.get(PreferenceConstants.PREF_LICENSE_DIGESTS, ""); //$NON-NLS-1$
- StringTokenizer tokenizer = new StringTokenizer(digestList, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- accepted.add(tokenizer.nextToken().trim());
- }
- }
- }
-
- private void updatePreferences() {
- Preferences pref = getPreferences();
- StringBuffer result = new StringBuffer();
- Object[] indexedList = accepted.toArray();
- for (int i = 0; i < indexedList.length; i++) {
- if (i != 0)
- result.append(","); //$NON-NLS-1$
- result.append((String) indexedList[i]);
- }
- pref.put(PreferenceConstants.PREF_LICENSE_DIGESTS, result.toString());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
deleted file mode 100644
index f2ce43ad5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/UpdateHandler.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
- UpdateOperation operation;
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- if (hasNoRepos) {
- if (getProvisioningUI().getPolicy().getRepositoriesVisible()) {
- boolean goToSites = MessageDialog.openQuestion(getShell(), ProvSDKMessages.UpdateHandler_NoSitesTitle, ProvSDKMessages.UpdateHandler_NoSitesMessage);
- if (goToSites) {
- getProvisioningUI().manipulateRepositories(getShell());
- }
- }
- return;
- }
- // Report any missing repositories.
- job.reportAccumulatedStatus();
- if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- getProvisioningUI().openUpdateWizard(false, operation, job);
- }
- }
-
- protected void doPostLoadBackgroundWork(IProgressMonitor monitor) throws OperationCanceledException {
- operation = getProvisioningUI().getUpdateOperation(null, null);
- // check for updates
- IStatus resolveStatus = operation.resolveModal(monitor);
- if (resolveStatus.getSeverity() == IStatus.CANCEL)
- throw new OperationCanceledException();
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
- if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-
- @Override
- protected String getProgressTaskName() {
- return ProvSDKMessages.UpdateHandler_ProgressTaskName;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
deleted file mode 100644
index 19395ce46..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/messages.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-
-Handler_CannotLaunchUI=Cannot complete the request. This installation has not been configured properly for Software Updates. See the error log for details.
-Handler_SDKUpdateUIMessageTitle=Software Updates
-InstallNewSoftwareHandler_ProgressTaskName=Searching for available software...
-PreferenceInitializer_Error=Error accessing preferences.
-ProvSDKUIActivator_ErrorSavingPrefs=Error saving update preferences
-ProvSDKUIActivator_NoSelfProfile=Could not locate the running profile instance. The eclipse.p2.data.area and eclipse.p2.profile properties may not be set correctly in this application's config.ini file.
-ProvSDKUIActivator_OpenWizardAnyway=The software items you selected may not be valid with your current installation. Do you want to open the wizard anyway to review the selections?
-ProvSDKUIActivator_Question=Question
-ProvisioningPreferencePage_AlwaysOpenWizard=&Open the wizard anyway to review or change selections
-ProvisioningPreferencePage_BrowsingPrefsGroup=Browsing for updates
-ProvisioningPreferencePage_ShowLatestVersions=Show only the &latest versions of available software
-ProvisioningPreferencePage_ShowAllVersions=Show all &versions of available software
-ProvisioningPreferencePage_NeverOpenWizard=&Report the problems and do not open the wizard
-ProvisioningPreferencePage_OpenWizardIfInvalid=When software selected for an install wizard may not be compatible
-ProvisioningPreferencePage_PromptToOpenWizard=As&k me what to do when it happens
-ProvisioningPreferencePage_UninstallUpdateLink=<a>Uninstall or update</a> software that is already installed
-SDKPolicy_PrefPageName=Available Software Sites
-UpdateHandler_NoSitesMessage=There are no update sites to search. Do you wish to open the "Available Software Sites" preferences?
-UpdateHandler_NoSitesTitle=No Updates Found
-UpdateHandler_ProgressTaskName=Checking for updates...
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java
deleted file mode 100644
index 144ac50eb..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
-
-/**
- * @since 3.4
- */
-public class PreferenceConstants {
- public static final String PREF_PAGE_PROVISIONING = "org.eclipse.equinox.internal.p2.ui.sdk.ProvisioningPreferencePage"; //$NON-NLS-1$
- public static final String PREF_PAGE_SITES = "org.eclipse.equinox.internal.p2.ui.sdk.SitesPreferencePage"; //$NON-NLS-1$
- public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$
- public static final String PREF_OPEN_WIZARD_ON_ERROR_PLAN = "allowNonOKPlan"; //$NON-NLS-1$
- public static final String PREF_LICENSE_DIGESTS = "licenseDigestList"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
deleted file mode 100644
index d1bfc9b15..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/PreferenceInitializer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKMessages;
-import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * @since 3.4
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- public static void migratePreferences() {
- Preferences pref = new ProfileScope(getDefaultAgentLocation(), IProfileRegistry.SELF).getNode(ProvSDKUIActivator.PLUGIN_ID);
- try {
- if (pref.keys().length == 0) {
- // migrate preferences from instance scope to profile scope
- Preferences oldPref = new InstanceScope().getNode(ProvSDKUIActivator.PLUGIN_ID);
- // don't migrate everything. Some of the preferences moved to
- // another bundle.
- pref.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, oldPref.get(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT));
- pref.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, oldPref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true));
- pref.flush();
- }
- } catch (BackingStoreException e) {
- StatusManager.getManager().handle(new Status(IStatus.ERROR, ProvSDKUIActivator.PLUGIN_ID, 0, ProvSDKMessages.PreferenceInitializer_Error, e), StatusManager.LOG);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- Preferences node = new DefaultScope().getNode("org.eclipse.equinox.p2.ui.sdk"); //$NON-NLS-1$
- // default values
- node.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true);
- node.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
- }
-
- private static IAgentLocation getDefaultAgentLocation() {
- ServiceReference<?> reference = ProvSDKUIActivator.getContext().getServiceReference(IAgentLocation.SERVICE_NAME);
- if (reference == null)
- return null;
- IAgentLocation result = (IAgentLocation) ProvSDKUIActivator.getContext().getService(reference);
- ProvSDKUIActivator.getContext().ungetService(reference);
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java b/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
deleted file mode 100644
index 7a49f117f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui.sdk/src/org/eclipse/equinox/internal/p2/ui/sdk/prefs/ProvisioningPreferencePage.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.sdk.prefs;
-
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.sdk.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Preference page for general provisioning preferences.
- *
- * @since 3.4
- */
-
-public class ProvisioningPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Group browsingGroup, validateGroup;
- private Button showLatestRadio, showAllRadio;
- private Button alwaysShowFailedPlan, neverShowFailedPlan, promptOnFailedPlan;
-
- protected Control createContents(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvSDKHelpContextIds.PROVISIONING_PREFERENCE_PAGE);
-
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- container.setLayout(layout);
-
- // Group for show all versions vs. show latest
- browsingGroup = new Group(container, SWT.NONE);
- browsingGroup.setText(ProvSDKMessages.ProvisioningPreferencePage_BrowsingPrefsGroup);
- layout = new GridLayout();
- layout.numColumns = 3;
- browsingGroup.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- browsingGroup.setLayoutData(gd);
-
- showLatestRadio = new Button(browsingGroup, SWT.RADIO);
- showLatestRadio.setText(ProvSDKMessages.ProvisioningPreferencePage_ShowLatestVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showLatestRadio.setLayoutData(gd);
-
- showAllRadio = new Button(browsingGroup, SWT.RADIO);
- showAllRadio.setText(ProvSDKMessages.ProvisioningPreferencePage_ShowAllVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showAllRadio.setLayoutData(gd);
-
- //Group for validating a failed plan
- validateGroup = new Group(container, SWT.NONE);
- validateGroup.setText(ProvSDKMessages.ProvisioningPreferencePage_OpenWizardIfInvalid);
- layout = new GridLayout();
- layout.numColumns = 3;
- validateGroup.setLayout(layout);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- validateGroup.setLayoutData(gd);
-
- alwaysShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- alwaysShowFailedPlan.setText(ProvSDKMessages.ProvisioningPreferencePage_AlwaysOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- alwaysShowFailedPlan.setLayoutData(gd);
-
- neverShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- neverShowFailedPlan.setText(ProvSDKMessages.ProvisioningPreferencePage_NeverOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- neverShowFailedPlan.setLayoutData(gd);
-
- promptOnFailedPlan = new Button(validateGroup, SWT.RADIO);
- promptOnFailedPlan.setText(ProvSDKMessages.ProvisioningPreferencePage_PromptToOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- promptOnFailedPlan.setLayoutData(gd);
-
- //Link to installed software page
- //See https://bugs.eclipse.org/bugs/show_bug.cgi?id=313242
- Link link = new Link(container, SWT.PUSH);
- link.setText(ProvSDKMessages.ProvisioningPreferencePage_UninstallUpdateLink);
- link.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- ProvUI.openInstallationDialog(event);
- }
- });
-
- initialize();
-
- Dialog.applyDialogFont(container);
- return container;
-
- }
-
- private void initialize() {
- IPreferenceStore pref = ProvSDKUIActivator.getDefault().getPreferenceStore();
- showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- String openWizard = pref.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- protected void performDefaults() {
- super.performDefaults();
- Preferences pref = new DefaultScope().getNode(ProvSDKUIActivator.PLUGIN_ID);
- showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, false));
- showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, false));
- String openWizard = pref.get(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, ""); //$NON-NLS-1$
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- public boolean performOk() {
- IPreferenceStore pref = ProvSDKUIActivator.getDefault().getPreferenceStore();
- pref.setValue(PreferenceConstants.PREF_SHOW_LATEST_VERSION, showLatestRadio.getSelection());
- if (alwaysShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.ALWAYS);
- else if (neverShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.NEVER);
- else
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
-
- ProvSDKUIActivator.getDefault().savePreferences();
- return true;
- }
-
- public void init(IWorkbench workbench) {
- // Nothing to do
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/.classpath b/bundles/org.eclipse.equinox.p2.ui/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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/.cvsignore b/bundles/org.eclipse.equinox.p2.ui/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.ui/.project b/bundles/org.eclipse.equinox.p2.ui/.project
deleted file mode 100644
index 1b62af1af..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 19b78b9fd..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Tue Dec 22 23:22:15 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index dbe72f165..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:14 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index a6d0681c8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,56 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.p2.ui;singleton:=true
-Bundle-Version: 2.1.0.qualifier
-Bundle-Activator: org.eclipse.equinox.internal.p2.ui.ProvUIActivator
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.ui;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.pde.ui,org.eclipse.equinox.p2.ui.sdk",
- org.eclipse.equinox.internal.p2.ui.actions;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.sdk.scheduler",
- org.eclipse.equinox.internal.p2.ui.dialogs;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.sdk.scheduler,org.eclipse.pde.ui",
- org.eclipse.equinox.internal.p2.ui.model;
- x-friends:="org.eclipse.equinox.internal.p2.ui.analysis,
- org.eclipse.equinox.p2.ui.admin,
- org.eclipse.equinox.p2.ui.sdk.scheduler,
- org.eclipse.equinox.p2.ui.sdk",
- org.eclipse.equinox.internal.p2.ui.query;x-friends:="org.eclipse.equinox.internal.p2.ui.analysis,org.eclipse.equinox.p2.ui.admin",
- org.eclipse.equinox.internal.p2.ui.viewers;x-friends:="org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.sdk.scheduler",
- org.eclipse.equinox.p2.ui;version="2.0.0"
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime,
- org.eclipse.core.expressions,
- org.eclipse.equinox.security.ui;bundle-version="[1.0.0,2.0.0)"
-Import-Package: com.ibm.icu.text,
- javax.xml.parsers,
- org.eclipse.equinox.internal.p2.artifact.repository,
- org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.internal.p2.director,
- org.eclipse.equinox.internal.p2.metadata,
- org.eclipse.equinox.internal.p2.metadata.repository,
- org.eclipse.equinox.internal.p2.repository.helpers,
- org.eclipse.equinox.internal.provisional.configurator,
- org.eclipse.equinox.internal.provisional.p2.core.eventbus,
- org.eclipse.equinox.internal.provisional.p2.repository,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.expression;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.operations;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.artifact;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.osgi.util;version="1.1.0",
- org.osgi.framework;version="1.6.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.w3c.dom,
- org.xml.sax
-Service-Component: OSGI-INF/repositoryTracker_component.xml, OSGI-INF/serviceui.xml
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
diff --git a/bundles/org.eclipse.equinox.p2.ui/OSGI-INF/repositoryTracker_component.xml b/bundles/org.eclipse.equinox.p2.ui/OSGI-INF/repositoryTracker_component.xml
deleted file mode 100644
index f4c2c7386..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/OSGI-INF/repositoryTracker_component.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.repositoryTracker">
- <implementation class="org.eclipse.equinox.internal.p2.ui.ColocatedRepositoryTracker"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.operations.RepositoryTracker"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.p2.ui/OSGI-INF/serviceui.xml b/bundles/org.eclipse.equinox.p2.ui/OSGI-INF/serviceui.xml
deleted file mode 100644
index c3f94d915..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/OSGI-INF/serviceui.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.ui.serviceuifactory">
- <implementation class="org.eclipse.equinox.internal.p2.ui.ServiceUIComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.p2.core.UIServices"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/about.html b/bundles/org.eclipse.equinox.p2.ui/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/build.properties b/bundles/org.eclipse.equinox.p2.ui/build.properties
deleted file mode 100644
index fb8111b06..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 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
-###############################################################################
-bin.includes = plugin.properties,\
- icons/,\
- .,\
- about.html,\
- META-INF/,\
- plugin.xml,\
- OSGI-INF/
-src.includes = about.html
-source.. = src/
-javacTarget=jsr14
-javacSource=1.5
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/obj/artifact_repo_obj.gif b/bundles/org.eclipse.equinox.p2.ui/icons/obj/artifact_repo_obj.gif
deleted file mode 100644
index 0470e1588..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/obj/artifact_repo_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/obj/category_obj.gif b/bundles/org.eclipse.equinox.p2.ui/icons/obj/category_obj.gif
deleted file mode 100644
index b487d071d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/obj/category_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_obj.gif b/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_obj.gif
deleted file mode 100644
index f192b8486..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_disabled_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_obj.gif b/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_obj.gif
deleted file mode 100644
index 8706680c7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_update_obj.gif b/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_update_obj.gif
deleted file mode 100644
index 16f4f7c4e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/obj/iu_update_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/obj/metadata_repo_obj.gif b/bundles/org.eclipse.equinox.p2.ui/icons/obj/metadata_repo_obj.gif
deleted file mode 100644
index b8568f4f8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/obj/metadata_repo_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/obj/profile_obj.gif b/bundles/org.eclipse.equinox.p2.ui/icons/obj/profile_obj.gif
deleted file mode 100644
index c984fba70..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/obj/profile_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/def_wizban.jpg b/bundles/org.eclipse.equinox.p2.ui/icons/wizban/def_wizban.jpg
deleted file mode 100644
index 4d7eba683..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/def_wizban.jpg
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/install_wiz.gif b/bundles/org.eclipse.equinox.p2.ui/icons/wizban/install_wiz.gif
deleted file mode 100644
index 7eee7c3a7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/install_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/revert_wiz.gif b/bundles/org.eclipse.equinox.p2.ui/icons/wizban/revert_wiz.gif
deleted file mode 100644
index 6a19fbfed..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/revert_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/uninstall_wiz.gif b/bundles/org.eclipse.equinox.p2.ui/icons/wizban/uninstall_wiz.gif
deleted file mode 100644
index 1223378d1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/uninstall_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/update_wiz.gif b/bundles/org.eclipse.equinox.p2.ui/icons/wizban/update_wiz.gif
deleted file mode 100644
index 3b364875f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/icons/wizban/update_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.equinox.p2.ui/plugin.properties b/bundles/org.eclipse.equinox.p2.ui/plugin.properties
deleted file mode 100644
index f8416d6a1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-#
-# Provisioning UI plugin resources
-#
-providerName = Eclipse.org - Equinox
-bundleName=Equinox Provisioning UI Support
-IU.general=General Information
-IU.license=License Agreement
-IU.copyright=Copyright
-
diff --git a/bundles/org.eclipse.equinox.p2.ui/plugin.xml b/bundles/org.eclipse.equinox.p2.ui/plugin.xml
deleted file mode 100644
index 6f6031e2e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/plugin.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension
- point="org.eclipse.core.runtime.adapters">
- <factory
- adaptableType="org.eclipse.equinox.internal.p2.ui.model.ProvElement"
- class="org.eclipse.equinox.internal.p2.ui.ProvUIAdapterFactory">
- <adapter type="org.eclipse.equinox.p2.metadata.IInstallableUnit"/>
- <adapter type="org.eclipse.equinox.p2.engine.IProfile"/>
- <adapter type="org.eclipse.equinox.p2.repository.IRepository"/>
- <adapter type="org.eclipse.equinox.p2.repository.metadata.IMetadataRepository"/>
- <adapter type="org.eclipse.equinox.p2.repository.artifact.IArtifactRepository"/>
- </factory>
- </extension>
-
- <extension
- point="org.eclipse.ui.propertyPages">
- <page
- name="%IU.copyright"
- class="org.eclipse.equinox.internal.p2.ui.dialogs.IUCopyrightPropertyPage"
- id="org.eclipse.equinox.p2.ui.IUCopyrightPropertyPage">
- <enabledWhen>
- <adapt
- type="org.eclipse.equinox.p2.metadata.IInstallableUnit">
- </adapt>
- </enabledWhen>
- </page>
- <page
- name="%IU.general"
- class="org.eclipse.equinox.internal.p2.ui.dialogs.IUGeneralInfoPropertyPage"
- id="org.eclipse.equinox.p2.ui.IUGeneralInfoPropertyPage">
- <enabledWhen>
- <adapt
- type="org.eclipse.equinox.p2.metadata.IInstallableUnit">
- </adapt>
- </enabledWhen>
- </page>
- <page
- name="%IU.license"
- class="org.eclipse.equinox.internal.p2.ui.dialogs.IULicensePropertyPage"
- id="org.eclipse.equinox.p2.ui.IULicensePropertyPage">
- <enabledWhen>
- <adapt
- type="org.eclipse.equinox.p2.metadata.IInstallableUnit">
- </adapt>
- </enabledWhen>
- </page>
- </extension>
- </plugin>
diff --git a/bundles/org.eclipse.equinox.p2.ui/pom.xml b/bundles/org.eclipse.equinox.p2.ui/pom.xml
deleted file mode 100644
index f0b782eb6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.ui</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
deleted file mode 100644
index 0c21b3a84..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.dialogs.RepositoryNameAndLocationDialog;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Provides a repository tracker that interprets URLs as colocated
- * artifact and metadata repositories.
- *
- * @since 2.0
- */
-
-public class ColocatedRepositoryTracker extends RepositoryTracker {
-
- ProvisioningUI ui;
- String parsedNickname;
- URI parsedLocation;
-
- public ColocatedRepositoryTracker() {
- this(ProvisioningUI.getDefaultUI());
- }
-
- public ColocatedRepositoryTracker(ProvisioningUI ui) {
- this.ui = ui;
- setArtifactRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- setMetadataRepositoryFlags(IRepositoryManager.REPOSITORIES_NON_SYSTEM);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.policy.RepositoryManipulator#getKnownRepositories()
- */
- public URI[] getKnownRepositories(ProvisioningSession session) {
- return getMetadataRepositoryManager().getKnownRepositories(getMetadataRepositoryFlags());
- }
-
- public void addRepository(URI repoLocation, String nickname, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- getMetadataRepositoryManager().addRepository(repoLocation);
- getArtifactRepositoryManager().addRepository(repoLocation);
- if (nickname != null) {
- getMetadataRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
- getArtifactRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
-
- }
- } finally {
- // We know that the UI only responds to metadata repo events so we cheat...
- ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true), true);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#removeRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession)
- */
- public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
- ui.signalRepositoryOperationStart();
- try {
- for (int i = 0; i < repoLocations.length; i++) {
- getMetadataRepositoryManager().removeRepository(repoLocations[i]);
- getArtifactRepositoryManager().removeRepository(repoLocations[i]);
- }
- } finally {
- ui.signalRepositoryOperationComplete(null, true);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
- ui.signalRepositoryOperationStart();
- SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
- for (int i = 0; i < locations.length; i++) {
- try {
- getArtifactRepositoryManager().refreshRepository(locations[i], mon.newChild(50));
- getMetadataRepositoryManager().refreshRepository(locations[i], mon.newChild(50));
- } catch (ProvisionException e) {
- //ignore problematic repositories when refreshing
- }
- }
- // We have no idea how many repos may have been added/removed as a result of
- // refreshing these, this one, so we do not use a specific repository event to represent it.
- ui.signalRepositoryOperationComplete(null, true);
- }
-
- public void reportLoadFailure(final URI location, ProvisionException e) {
- int code = e.getStatus().getCode();
- // If the user doesn't have a way to manage repositories, then don't report failures.
- if (!ui.getPolicy().getRepositoriesVisible()) {
- super.reportLoadFailure(location, e);
- return;
- }
-
- // Special handling when the location is bad (not found, etc.) vs. a failure
- // associated with a known repo.
- if (code == ProvisionException.REPOSITORY_NOT_FOUND || code == ProvisionException.REPOSITORY_INVALID_LOCATION) {
- if (!hasNotFoundStatusBeenReported(location)) {
- addNotFound(location);
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench.isClosing())
- return;
- Shell shell = ProvUI.getDefaultParentShell();
- if (MessageDialog.openQuestion(shell, ProvUIMessages.ColocatedRepositoryTracker_SiteNotFoundTitle, NLS.bind(ProvUIMessages.ColocatedRepositoryTracker_PromptForSiteLocationEdit, URIUtil.toUnencodedString(location)))) {
- RepositoryNameAndLocationDialog dialog = new RepositoryNameAndLocationDialog(shell, ui) {
- protected String getInitialLocationText() {
- return URIUtil.toUnencodedString(location);
- }
-
- protected String getInitialNameText() {
- String nickname = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
- return nickname == null ? "" : nickname; //$NON-NLS-1$
- }
- };
- int ret = dialog.open();
- if (ret == Window.OK) {
- URI correctedLocation = dialog.getLocation();
- if (correctedLocation != null) {
- ui.signalRepositoryOperationStart();
- try {
- removeRepositories(new URI[] {location}, ui.getSession());
- addRepository(correctedLocation, dialog.getName(), ui.getSession());
- } finally {
- ui.signalRepositoryOperationComplete(null, true);
- }
- }
- }
- }
- }
- });
- }
- } else {
- ProvUI.handleException(e, null, StatusManager.SHOW | StatusManager.LOG);
- }
- }
-
- IMetadataRepositoryManager getMetadataRepositoryManager() {
- return ProvUI.getMetadataRepositoryManager(ui.getSession());
- }
-
- IArtifactRepositoryManager getArtifactRepositoryManager() {
- return ProvUI.getArtifactRepositoryManager(ui.getSession());
- }
-
- /*
- * Overridden to support "Name - Location" parsing
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#locationFromString(java.lang.String)
- */
- public URI locationFromString(String locationString) {
- URI uri = super.locationFromString(locationString);
- if (uri != null)
- return uri;
- // Look for the "Name - Location" pattern
- // There could be a hyphen in the name or URI, so we have to visit all combinations
- int start = 0;
- int index = 0;
- String locationSubset;
- String pattern = ProvUIMessages.RepositorySelectionGroup_NameAndLocationSeparator;
- while (index >= 0) {
- index = locationString.indexOf(pattern, start);
- if (index >= 0) {
- start = index + pattern.length();
- locationSubset = locationString.substring(start);
- uri = super.locationFromString(locationSubset);
- if (uri != null) {
- parsedLocation = uri;
- parsedNickname = locationString.substring(0, index);
- return uri;
- }
- }
- }
- return null;
- }
-
- /*
- * Used by the UI to get a name that might have been supplied when the
- * location was originally parsed.
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=293068
- */
- public String getParsedNickname(URI location) {
- if (parsedNickname == null || parsedLocation == null)
- return null;
- if (location.toString().equals(parsedLocation.toString()))
- return parsedNickname;
- return null;
- }
-
- @Override
- protected boolean contains(URI location, ProvisioningSession session) {
- return ProvUI.getMetadataRepositoryManager(session).contains(location);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementQueryDescriptor.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementQueryDescriptor.java
deleted file mode 100644
index 986578d3e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementQueryDescriptor.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.util.Collection;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * ElementQueryDescriptor represents everything needed to run a query, including
- * the object to be queried, the query to use, and the query result. It can optionally
- * wrap the query results in a UI element.
- *
- * @since 3.4
- */
-public class ElementQueryDescriptor {
-
- private IQuery<Object> query;
- private Collector<Object> collector;
- private IQueryable<Object> queryable;
- private ElementWrapper wrapper;
-
- /**
- * Creates an ElementQueryDescriptor to represent a Query, its collector the queryable
- * on which it will run.
- */
- public ElementQueryDescriptor(IQueryable<?> queryable, IQuery<?> query, Collector<?> collector) {
- this(queryable, query, collector, null);
- }
-
- /**
- * Creates an ElementQueryDescriptor to represent a Query, its collector the queryable
- * on which it will run, and the transformer used to transform the results.
- */
- @SuppressWarnings("unchecked")
- public ElementQueryDescriptor(IQueryable<?> queryable, IQuery<?> query, Collector<?> collector, ElementWrapper wrapper) {
- this.query = (IQuery<Object>) query;
- this.collector = (Collector<Object>) collector;
- this.queryable = (IQueryable<Object>) queryable;
- this.wrapper = wrapper;
- }
-
- /**
- * Performs the query returning a collection of results.
- * @param monitor
- */
- public Collection<?> performQuery(IProgressMonitor monitor) {
- Collector<Object> results = this.collector;
- // If the query is completely described, perform it
- if (query != null && collector != null && queryable != null)
- results.addAll(this.queryable.query(this.query, monitor));
- else if (results == null)
- results = new Collector<Object>();
- // Let the wrapper analyze the results, even if we didn't perform the query.
- // This allows the wrapper to modify the results with explanations.
- if (wrapper != null)
- return wrapper.getElements(results);
- return results.toUnmodifiableSet();
- }
-
- public boolean hasCollector() {
- return this.collector != null;
- }
-
- public boolean hasQueryable() {
- return this.queryable != null;
- }
-
- public boolean hasQuery() {
- return this.query != null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementWrapper.java
deleted file mode 100644
index df4ebf7ca..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ElementWrapper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-* IBM Corporation - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.p2.query.Collector;
-
-/**
- * Wraps query results inside corresponding UI elements
- */
-public abstract class ElementWrapper {
-
- private Collection<Object> collection = null;
-
- /**
- * Transforms a collector returned by a query to a collection
- * of UI elements
- */
- public Collection<?> getElements(Collector<?> collector) {
- collection = new ArrayList<Object>(collector.size());
- Iterator<?> iter = collector.iterator();
- while (iter.hasNext()) {
- Object o = iter.next();
- if (shouldWrap(o))
- collection.add(wrap(o));
- }
- return getCollection();
- }
-
- /**
- * Gets the collection where the elements are being stored.
- */
- protected Collection<?> getCollection() {
- return collection == null ? CollectionUtils.emptyList() : collection;
- }
-
- /**
- * Determines if this object should be accepted and wrapped
- * by a UI element.
- */
- protected boolean shouldWrap(Object o) {
- return true;
- }
-
- /**
- * Wraps a single element of the query result inside a UI element.
- */
- protected abstract Object wrap(Object item);
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/IProvHelpContextIds.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/IProvHelpContextIds.java
deleted file mode 100644
index 4a11ad1e3..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/IProvHelpContextIds.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-
-/**
- * Help context ids for the P2 UI
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- * @since 3.4
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients.
- */
-
-public interface IProvHelpContextIds {
- public static final String PREFIX = ProvUIActivator.PLUGIN_ID + "."; //$NON-NLS-1$
-
- public static final String REVERT_CONFIGURATION_WIZARD = PREFIX + "revert_configuration_wizard_context"; //$NON-NLS-1$
-
- public static final String UNINSTALL_WIZARD = PREFIX + "uinstall_wizard_context"; //$NON-NLS-1$
-
- public static final String UPDATE_WIZARD = PREFIX + "update_wizard_context"; //$NON-NLS-1$
-
- public static final String ADD_REPOSITORY_DIALOG = PREFIX + "add_repository_dialog_context"; //$NON-NLS-1$
-
- public static final String INSTALL_WIZARD = PREFIX + "install_wizard_context"; //$NON-NLS-1$
-
- public static final String REPOSITORY_MANIPULATION_DIALOG = PREFIX + "repository_manipulation_dialog_context"; //$NON-NLS-1$
-
- public static final String INSTALLED_SOFTWARE = PREFIX + "installed_software_context"; //$NON-NLS-1$
-
- public static final String AVAILABLE_SOFTWARE = PREFIX + "available_software_context"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java
deleted file mode 100644
index 54b6f131b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUI.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.dialogs.ILayoutConstants;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Generic provisioning UI utility and policy methods.
- *
- * @since 3.4
- */
-public class ProvUI {
-
- // Public constants for common command and tooltip names
- public static final String INSTALL_COMMAND_LABEL = ProvUIMessages.InstallIUCommandLabel;
- public static final String INSTALL_COMMAND_TOOLTIP = ProvUIMessages.InstallIUCommandTooltip;
- public static final String UNINSTALL_COMMAND_LABEL = ProvUIMessages.UninstallIUCommandLabel;
- public static final String UNINSTALL_COMMAND_TOOLTIP = ProvUIMessages.UninstallIUCommandTooltip;
- public static final String UPDATE_COMMAND_LABEL = ProvUIMessages.UpdateIUCommandLabel;
- public static final String UPDATE_COMMAND_TOOLTIP = ProvUIMessages.UpdateIUCommandTooltip;
- public static final String REVERT_COMMAND_LABEL = ProvUIMessages.RevertIUCommandLabel;
- public static final String REVERT_COMMAND_TOOLTIP = ProvUIMessages.RevertIUCommandTooltip;
-
- /**
- * A constant indicating that there was nothing to size (there
- * was no valid plan that could be used to compute
- * size).
- */
- public static final long SIZE_NOTAPPLICABLE = -3L;
- /**
- * Indicates that the size is unavailable (an
- * attempt was made to compute size but it failed)
- */
- public static final long SIZE_UNAVAILABLE = -2L;
- /**
- * Indicates that the size is currently unknown
- */
- public static final long SIZE_UNKNOWN = -1L;
-
- private static IUColumnConfig[] columnConfig;
- private static QueryProvider queryProvider;
-
- // These values rely on the command markup in org.eclipse.ui.ide that defines the update commands
- private static final String UPDATE_MANAGER_FIND_AND_INSTALL = "org.eclipse.ui.update.findAndInstallUpdates"; //$NON-NLS-1$
- private static final String UPDATE_MANAGER_MANAGE_CONFIGURATION = "org.eclipse.ui.update.manageConfiguration"; //$NON-NLS-1$
- // This value relies on the command markup in org.eclipse.ui
- private static final String INSTALLATION_DIALOG = "org.eclipse.ui.help.installationDialog"; //$NON-NLS-1$
-
- public static IStatus handleException(Throwable t, String message, int style) {
- if (message == null && t != null) {
- message = t.getMessage();
- }
- IStatus status = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, message, t);
- StatusManager.getManager().handle(status, style);
- return status;
- }
-
- public static void reportStatus(IStatus status, int style) {
- // workaround for
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=211933
- // Note we'd rather have a proper looking dialog than get the
- // blocking right.
- if ((style & StatusManager.BLOCK) == StatusManager.BLOCK || (style & StatusManager.SHOW) == StatusManager.SHOW) {
- if (status.getSeverity() == IStatus.INFO) {
- MessageDialog.openInformation(ProvUI.getDefaultParentShell(), ProvUIMessages.ProvUI_InformationTitle, status.getMessage());
- // unset the dialog bits
- style = style & ~StatusManager.BLOCK;
- style = style & ~StatusManager.SHOW;
- // unset logging for statuses that should never be logged.
- // Ideally the caller would do this but this bug keeps coming back.
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=274074
- if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE)
- style = 0;
- } else if (status.getSeverity() == IStatus.WARNING) {
- MessageDialog.openWarning(ProvUI.getDefaultParentShell(), ProvUIMessages.ProvUI_WarningTitle, status.getMessage());
- // unset the dialog bits
- style = style & ~StatusManager.BLOCK;
- style = style & ~StatusManager.SHOW;
- }
- }
- if (style != 0)
- StatusManager.getManager().handle(status, style);
- }
-
- public static IUColumnConfig[] getIUColumnConfig() {
- if (columnConfig == null)
- columnConfig = new IUColumnConfig[] {new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH), new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_COLUMN_WIDTH)};
- return columnConfig;
-
- }
-
- public static IUViewQueryContext getQueryContext(Policy policy) {
- IUViewQueryContext queryContext = new IUViewQueryContext(policy.getGroupByCategory() ? IUViewQueryContext.AVAILABLE_VIEW_BY_CATEGORY : IUViewQueryContext.AVAILABLE_VIEW_FLAT);
- queryContext.setShowLatestVersionsOnly(policy.getShowLatestVersionsOnly());
- queryContext.setShowInstallChildren(policy.getShowDrilldownRequirements());
- queryContext.setShowProvisioningPlanChildren(policy.getShowDrilldownRequirements());
- queryContext.setUseCategories(policy.getGroupByCategory());
- queryContext.setFilterOnEnv(policy.getFilterOnEnv());
- return queryContext;
- }
-
- @SuppressWarnings("unchecked")
- public static <T> T getAdapter(Object object, Class<T> adapterType) {
- if (object == null)
- return null;
- if (adapterType.isInstance(object))
- // Ideally, we would use Class.cast here but it was introduced in Java 1.5
- return (T) object;
- if (object instanceof IAdaptable)
- // Ideally, we would use Class.cast here but it was introduced in Java 1.5
- return (T) ((IAdaptable) object).getAdapter(adapterType);
- return null;
- }
-
- /**
- * Returns a shell that is appropriate to use as the parent
- * for a modal dialog.
- */
- public static Shell getDefaultParentShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-
- public static void addProvisioningListener(ProvUIProvisioningListener listener) {
- ProvUIActivator.getDefault().addProvisioningListener(listener);
- }
-
- public static void removeProvisioningListener(ProvUIProvisioningListener listener) {
- ProvUIActivator.getDefault().removeProvisioningListener(listener);
- }
-
- public static void openUpdateManagerInstaller(Event event) {
- runCommand(UPDATE_MANAGER_FIND_AND_INSTALL, ProvUIMessages.UpdateManagerCompatibility_UnableToOpenFindAndInstall, event);
- }
-
- public static void openUpdateManagerConfigurationManager(Event event) {
- runCommand(UPDATE_MANAGER_MANAGE_CONFIGURATION, ProvUIMessages.UpdateManagerCompatibility_UnableToOpenManageConfiguration, event);
- }
-
- public static void openInstallationDialog(Event event) {
- runCommand(INSTALLATION_DIALOG, ProvUIMessages.ProvUI_InstallDialogError, event);
- }
-
- public static boolean isUpdateManagerInstallerPresent() {
- ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
- Command command = commandService.getCommand(UPDATE_MANAGER_FIND_AND_INSTALL);
- return command.isDefined();
- }
-
- public static QueryProvider getQueryProvider() {
- if (queryProvider == null)
- queryProvider = new QueryProvider(ProvUIActivator.getDefault().getProvisioningUI());
- return queryProvider;
- }
-
- private static void runCommand(String commandId, String errorMessage, Event event) {
- ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
- Command command = commandService.getCommand(commandId);
- if (!command.isDefined()) {
- return;
- }
- IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
- try {
- handlerService.executeCommand(commandId, event);
- } catch (ExecutionException e) {
- reportFail(errorMessage, e);
- } catch (NotDefinedException e) {
- reportFail(errorMessage, e);
- } catch (NotEnabledException e) {
- reportFail(errorMessage, e);
- } catch (NotHandledException e) {
- reportFail(errorMessage, e);
- }
- }
-
- public static boolean isCategory(IInstallableUnit iu) {
- return QueryUtil.isCategory(iu);
- }
-
- private static void reportFail(String message, Throwable t) {
- Status failStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, message, t);
- reportStatus(failStatus, StatusManager.BLOCK | StatusManager.LOG);
- }
-
- /**
- * For testing only
- * @noreference
- * @param provider
- */
- public static void setQueryProvider(QueryProvider provider) {
- queryProvider = provider;
- }
-
- /**
- * Get sizing information about the specified plan.
- *
- * @param engine the engine
- * @param plan the provisioning plan
- * @param context the provisioning context to be used for the sizing
- * @param monitor the progress monitor
- *
- * @return a long integer describing the disk size required for the provisioning plan.
- *
- * @see #SIZE_UNKNOWN
- * @see #SIZE_UNAVAILABLE
- * @see #SIZE_NOTAPPLICABLE
- */
- public static long getSize(IEngine engine, IProvisioningPlan plan, ProvisioningContext context, IProgressMonitor monitor) {
- // If there is nothing to size, return 0
- if (plan == null)
- return SIZE_NOTAPPLICABLE;
- if (countPlanElements(plan) == 0)
- return 0;
- long installPlanSize = 0;
- SubMonitor mon = SubMonitor.convert(monitor, 300);
- if (plan.getInstallerPlan() != null) {
- ISizingPhaseSet sizingPhaseSet = PhaseSetFactory.createSizingPhaseSet();
- IStatus status = engine.perform(plan.getInstallerPlan(), sizingPhaseSet, mon.newChild(100));
- if (status.isOK())
- installPlanSize = sizingPhaseSet.getDiskSize();
- } else {
- mon.worked(100);
- }
- ISizingPhaseSet sizingPhaseSet = PhaseSetFactory.createSizingPhaseSet();
- IStatus status = engine.perform(plan, sizingPhaseSet, mon.newChild(200));
- if (status.isOK())
- return installPlanSize + sizingPhaseSet.getDiskSize();
- return SIZE_UNAVAILABLE;
- }
-
- private static int countPlanElements(IProvisioningPlan plan) {
- return QueryUtil.compoundQueryable(plan.getAdditions(), plan.getRemovals()).query(QueryUtil.createIUAnyQuery(), null).toUnmodifiableSet().size();
- }
-
- /**
- * Return the artifact repository manager for the given session
- * @return the repository manager
- */
- public static IArtifactRepositoryManager getArtifactRepositoryManager(ProvisioningSession session) {
- return (IArtifactRepositoryManager) session.getProvisioningAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
- }
-
- /**
- * Return the metadata repository manager for the given session
- * @return the repository manager
- */
- public static IMetadataRepositoryManager getMetadataRepositoryManager(ProvisioningSession session) {
- return (IMetadataRepositoryManager) session.getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME);
- }
-
- /**
- * Return the profile registry for the given session
- * @return the profile registry
- */
- public static IProfileRegistry getProfileRegistry(ProvisioningSession session) {
- return (IProfileRegistry) session.getProvisioningAgent().getService(IProfileRegistry.SERVICE_NAME);
- }
-
- /**
- * Return the provisioning engine for the given session
- * @return the provisioning engine
- */
- public static IEngine getEngine(ProvisioningSession session) {
- return (IEngine) session.getProvisioningAgent().getService(IEngine.SERVICE_NAME);
- }
-
- /**
- * Return the provisioning event bus used for dispatching events.
- * @return the event bus
- */
- public static IProvisioningEventBus getProvisioningEventBus(ProvisioningSession session) {
- return (IProvisioningEventBus) session.getProvisioningAgent().getService(IProvisioningEventBus.SERVICE_NAME);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java
deleted file mode 100644
index f51d4dec0..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIActivator.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.net.URL;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.IProvisioningEventBus;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.ui.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * Controls the lifecycle of the provisioning UI bundle
- *
- * @since 3.4
- */
-public class ProvUIActivator extends AbstractUIPlugin {
- private static BundleContext context;
- private static PackageAdmin packageAdmin = null;
- private static ServiceReference<?> packageAdminRef = null;
- private static ProvUIActivator plugin;
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.ui"; //$NON-NLS-1$
-
- private ProvisioningSession session;
- private ProvisioningUI ui;
-
- public static BundleContext getContext() {
- return context;
- }
-
- /**
- * Returns the singleton plugin instance
- *
- * @return the instance
- */
- public static ProvUIActivator getDefault() {
- return plugin;
- }
-
- public static Bundle getBundle(String symbolicName) {
- if (packageAdmin == null)
- return null;
- Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
- if (bundles == null)
- return null;
- // Return the first bundle that is not installed or uninstalled
- for (int i = 0; i < bundles.length; i++) {
- if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
- return bundles[i];
- }
- }
- return null;
- }
-
- public ProvUIActivator() {
- // do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext bundleContext) throws Exception {
- super.start(bundleContext);
-
- plugin = this;
- ProvUIActivator.context = bundleContext;
- packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
- packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminRef);
- }
-
- public void stop(BundleContext bundleContext) throws Exception {
- try {
- // cancel any repository load jobs started in the UI
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=305163
- // join the jobs so that this bundle does not stop until the jobs are
- // actually cancelled.
- Job.getJobManager().join(LoadMetadataRepositoryJob.LOAD_FAMILY, new NullProgressMonitor());
- plugin = null;
- ProvUIActivator.context = null;
- ui = null;
- } finally {
- super.stop(bundleContext);
- }
- }
-
- public void addProvisioningListener(ProvUIProvisioningListener listener) {
- getProvisioningEventBus().addListener(listener);
- }
-
- public IProvisioningEventBus getProvisioningEventBus() {
- return ProvUI.getProvisioningEventBus(getSession());
- }
-
- public void removeProvisioningListener(ProvUIProvisioningListener listener) {
- getProvisioningEventBus().removeListener(listener);
- }
-
- protected void initializeImageRegistry(ImageRegistry reg) {
- createImageDescriptor(ProvUIImages.IMG_METADATA_REPOSITORY, reg);
- createImageDescriptor(ProvUIImages.IMG_ARTIFACT_REPOSITORY, reg);
- createImageDescriptor(ProvUIImages.IMG_IU, reg);
- createImageDescriptor(ProvUIImages.IMG_DISABLED_IU, reg);
- createImageDescriptor(ProvUIImages.IMG_UPDATED_IU, reg);
- createImageDescriptor(ProvUIImages.IMG_CATEGORY, reg);
- createImageDescriptor(ProvUIImages.IMG_PROFILE, reg);
- createImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL, reg);
- createImageDescriptor(ProvUIImages.WIZARD_BANNER_REVERT, reg);
- createImageDescriptor(ProvUIImages.WIZARD_BANNER_UNINSTALL, reg);
- createImageDescriptor(ProvUIImages.WIZARD_BANNER_UPDATE, reg);
- }
-
- /**
- * Creates the specified image descriptor and registers it
- */
- private void createImageDescriptor(String id, ImageRegistry reg) {
- URL url = FileLocator.find(getBundle(), new Path(ProvUIImages.ICON_PATH + id), null);
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- reg.put(id, desc);
- }
-
- public ProvisioningUI getProvisioningUI() {
- if (ui == null) {
- IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper.getService(getContext(), IProvisioningAgent.SERVICE_NAME);
- session = new ProvisioningSession(agent);
- Policy policy = (Policy) ServiceHelper.getService(ProvUIActivator.getContext(), Policy.class.getName());
- if (policy == null)
- policy = new Policy();
- ui = new ProvisioningUI(session, IProfileRegistry.SELF, policy);
- }
- return ui;
- }
-
- public ProvisioningSession getSession() {
- return session;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
deleted file mode 100644
index 922e7390d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-
-/**
- * Adapter factory for provisioning elements
- *
- * @since 3.4
- *
- */
-
-public class ProvUIAdapterFactory implements IAdapterFactory {
- private static final Class<?>[] CLASSES = new Class[] {IInstallableUnit.class, IProfile.class, IRepository.class, IMetadataRepository.class, IArtifactRepository.class};
-
- @SuppressWarnings({"rawtypes", "unchecked"})
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- return ProvUI.getAdapter(adaptableObject, adapterType);
- }
-
- public Class<?>[] getAdapterList() {
- return CLASSES;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIImages.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIImages.java
deleted file mode 100644
index 40ab3feb6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIImages.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * ProvUIImages provides convenience methods for accessing shared images
- * provided by the <i>org.eclipse.equinox.internal.provisional.p2.ui</i> plug-in.
- * <p>
- * This class provides <code>ImageDescriptor</code>s for each named image in
- * {@link ProvUIImages}. All <code>Image</code> objects created from the
- * provided descriptors are managed the caller and must be disposed
- * appropriately.
- * </p>
- * <p>
- * This class is not intended to be subclassed or instantiated by clients
- *
- * @since 3.4
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- */
-public class ProvUIImages {
-
- // bundle-relative icon path
- public final static String ICON_PATH = "$nl$/icons/"; //$NON-NLS-1$
- //objects
- public final static String IMG_ARTIFACT_REPOSITORY = "obj/artifact_repo_obj.gif"; //$NON-NLS-1$
- public final static String IMG_METADATA_REPOSITORY = "obj/metadata_repo_obj.gif"; //$NON-NLS-1$
- public final static String IMG_IU = "obj/iu_obj.gif"; //$NON-NLS-1$
- public final static String IMG_DISABLED_IU = "obj/iu_disabled_obj.gif"; //$NON-NLS-1$
- public final static String IMG_UPDATED_IU = "obj/iu_update_obj.gif"; //$NON-NLS-1$
- public final static String IMG_PROFILE = "obj/profile_obj.gif"; //$NON-NLS-1$
- public final static String IMG_CATEGORY = "obj/category_obj.gif"; //$NON-NLS-1$
-
- // wizard graphics
- public final static String WIZARD_BANNER_INSTALL = "wizban/install_wiz.gif"; //$NON-NLS-1$
- public final static String WIZARD_BANNER_UNINSTALL = "wizban/uninstall_wiz.gif"; //$NON-NLS-1$
- public final static String WIZARD_BANNER_UPDATE = "wizban/update_wiz.gif"; //$NON-NLS-1$
- public final static String WIZARD_BANNER_REVERT = "wizban/revert_wiz.gif"; //$NON-NLS-1$
-
- /**
- * Returns the image descriptor for the given image ID. Returns
- * <code>null</code> if there is no such image.
- *
- * @param id
- * the identifier for the image to retrieve
- * @return the image descriptor associated with the given ID
- */
- public static ImageDescriptor getImageDescriptor(String id) {
- return ProvUIActivator.getDefault().getImageRegistry().getDescriptor(id);
- }
-
- /**
- * Returns the image for the given image ID. Returns <code>null</code> if
- * there is no such image.
- *
- * @param id
- * the identifier for the image to retrieve
- * @return the image associated with the given ID. This image is managed in
- * an image registry and should not be freed by the client.
- */
- public static Image getImage(String id) {
- return ProvUIActivator.getDefault().getImageRegistry().get(id);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
deleted file mode 100644
index cd4dbc20c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message class for provisioning UI messages.
- *
- * @since 3.4
- */
-public class ProvUIMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.ui.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, ProvUIMessages.class);
- }
-
- public static String AcceptLicensesWizardPage_AcceptMultiple;
- public static String AcceptLicensesWizardPage_AcceptSingle;
- public static String AcceptLicensesWizardPage_ItemsLabel;
- public static String AcceptLicensesWizardPage_LicenseTextLabel;
- public static String AcceptLicensesWizardPage_NoLicensesDescription;
- public static String AcceptLicensesWizardPage_RejectMultiple;
- public static String AcceptLicensesWizardPage_RejectSingle;
- public static String AcceptLicensesWizardPage_ReviewExtraLicensesDescription;
- public static String AcceptLicensesWizardPage_ReviewLicensesDescription;
- public static String AcceptLicensesWizardPage_SingleLicenseTextLabel;
- public static String AcceptLicensesWizardPage_Title;
- public static String ApplicationInRestartDialog;
- public static String ApplyProfileChangesDialog_ApplyChanges;
- public static String ApplyProfileChangesDialog_Restart;
- public static String ApplyProfileChangesDialog_NotYet;
- public static String ColocatedRepositoryManipulator_AddSiteOperationLabel;
- public static String ColocatedRepositoryTracker_PromptForSiteLocationEdit;
- public static String ColocatedRepositoryTracker_SiteNotFoundTitle;
- public static String RevertProfilePage_ConfirmDeleteMultipleConfigs;
- public static String RevertProfilePage_ConfirmDeleteSingleConfig;
- public static String RevertProfilePage_Delete;
- public static String RevertProfilePage_DeleteMultipleConfigurationsTitle;
- public static String RevertProfilePage_DeleteSingleConfigurationTitle;
- public static String RevertProfilePage_DeleteTooltip;
- public static String RevertProfilePage_NoProfile;
- public static String RevertProfilePage_RevertLabel;
- public static String RevertProfilePage_RevertTooltip;
- public static String RevertProfilePage_CompareLabel;
- public static String RevertProfilePage_CompareTooltip;
- public static String IUCopyrightPropertyPage_NoCopyright;
- public static String IUCopyrightPropertyPage_ViewLinkLabel;
- public static String IUDetailsLabelProvider_KB;
- public static String IUDetailsLabelProvider_Bytes;
- public static String IUDetailsLabelProvider_ComputingSize;
- public static String IUDetailsLabelProvider_Unknown;
- public static String IUGeneralInfoPropertyPage_ContactLabel;
- public static String IUGeneralInfoPropertyPage_CouldNotOpenBrowser;
- public static String IUGeneralInfoPropertyPage_DescriptionLabel;
- public static String IUGeneralInfoPropertyPage_DocumentationLink;
- public static String IUGeneralInfoPropertyPage_IdentifierLabel;
- public static String IUGeneralInfoPropertyPage_NameLabel;
- public static String IUGeneralInfoPropertyPage_ProviderLabel;
- public static String IUGeneralInfoPropertyPage_VersionLabel;
- public static String IULicensePropertyPage_NoLicense;
- public static String IULicensePropertyPage_ViewLicenseLabel;
- public static String ProfileModificationAction_InvalidSelections;
- public static String ProfileModificationWizardPage_DetailsLabel;
- public static String ProfileSnapshots_Label;
-
- // viewer support
- public static String ProvDropAdapter_InvalidDropTarget;
- public static String ProvDropAdapter_NoIUsToDrop;
- public static String ProvDropAdapter_UnsupportedDropOperation;
- public static String ProvElementContentProvider_FetchJobTitle;
-
- // Provisioning operations
- public static String ProvisioningOperationRunner_CannotApplyChanges;
- public static String ProvisioningOperationWizard_UnexpectedFailureToResolve;
- public static String InstalledSoftwarePage_NoProfile;
- public static String InstallIUOperationLabel;
- public static String InstallIUOperationTask;
- public static String InstallIUCommandLabel;
- public static String InstallIUCommandTooltip;
- public static String InstallWizardPage_NoCheckboxDescription;
- public static String InstallWizardPage_Title;
- public static String PreselectedIUInstallWizard_Title;
- public static String PreselectedIUInstallWizard_Description;
- public static String UninstallDialog_UninstallMessage;
- public static String UninstallIUOperationLabel;
- public static String UninstallIUOperationTask;
- public static String UninstallIUCommandLabel;
- public static String UninstallIUCommandTooltip;
- public static String UninstallIUProgress;
- public static String UninstallWizardPage_Description;
- public static String UninstallWizardPage_Title;
- public static String UpdateIUOperationLabel;
- public static String UpdateIUOperationTask;
- public static String UpdateIUCommandLabel;
- public static String UpdateIUCommandTooltip;
- public static String UpdateIUProgress;
- public static String RefreshAction_Label;
- public static String RefreshAction_Tooltip;
- public static String RemoveColocatedRepositoryAction_Label;
- public static String RemoveColocatedRepositoryAction_Tooltip;
- public static String RevertIUCommandLabel;
- public static String RevertIUCommandTooltip;
-
- // Property pages
- public static String IUPropertyPage_NoIUSelected;
-
- public static String RepositoryDetailsLabelProvider_Disabled;
- public static String RepositoryDetailsLabelProvider_Enabled;
- // Dialog groups
- public static String RepositoryGroup_LocalRepoBrowseButton;
- public static String RepositoryGroup_ArchivedRepoBrowseButton;
- public static String RepositoryGroup_RepositoryFile;
- public static String RepositoryGroup_SelectRepositoryDirectory;
- public static String RepositoryGroup_URLRequired;
- public static String RepositoryManipulationPage_Add;
- public static String RepositoryManipulationPage_ContactingSiteMessage;
- public static String RepositoryManipulationPage_DefaultFilterString;
- public static String RepositoryManipulationPage_Description;
- public static String RepositoryManipulationPage_DisableButton;
- public static String RepositoryManipulationPage_EnableButton;
- public static String RepositoryManipulationPage_EnabledColumnTitle;
- public static String RepositoryManipulationPage_Export;
- public static String RepositoryManipulationPage_Import;
- public static String RepositoryManipulationPage_LocationColumnTitle;
- public static String RepositoryManipulationPage_NameColumnTitle;
- public static String RepositoryManipulationPage_Edit;
- public static String RepositoryManipulationPage_RefreshConnection;
- public static String RepositoryManipulationPage_RefreshOperationCanceled;
- public static String RepositoryManipulationPage_Remove;
- public static String RepositoryManipulationPage_RemoveConfirmMessage;
- public static String RepositoryManipulationPage_RemoveConfirmSingleMessage;
- public static String RepositoryManipulationPage_RemoveConfirmTitle;
- public static String RepositoryManipulationPage_TestConnectionSuccess;
- public static String RepositoryManipulationPage_TestConnectionTitle;
- public static String RepositoryManipulationPage_Title;
- public static String RepositoryManipulatorDropTarget_DragAndDropJobLabel;
- public static String RepositoryManipulatorDropTarget_DragSourceNotValid;
- public static String RepositoryNameAndLocationDialog_Title;
-
- public static String RepositorySelectionGroup_GenericSiteLinkTitle;
- public static String RepositorySelectionGroup_NameAndLocationSeparator;
- public static String RepositorySelectionGroup_PrefPageLink;
- public static String RepositorySelectionGroup_PrefPageName;
- public static String ResolutionWizardPage_Canceled;
- public static String ResolutionWizardPage_ErrorStatus;
- public static String ResolutionWizardPage_NoSelections;
- public static String ResolutionWizardPage_WarningInfoStatus;
-
- // Dialogs
- public static String AddRepositoryDialog_InvalidURL;
- public static String AddRepositoryDialog_LocationLabel;
- public static String AddRepositoryDialog_NameLabel;
- public static String AddRepositoryDialog_Title;
- public static String AvailableIUGroup_LoadingRepository;
- public static String AvailableIUGroup_NoSitesConfiguredDescription;
- public static String AvailableIUGroup_NoSitesConfiguredExplanation;
- public static String ColocatedRepositoryManipulator_NoContentExplanation;
- public static String AvailableIUGroup_NoSitesExplanation;
- public static String AvailableIUsPage_AddButton;
- public static String AvailableIUsPage_AllSites;
- public static String AvailableIUsPage_Description;
- public static String AvailableIUsPage_FilterOnEnvCheckBox;
- public static String AvailableIUsPage_GotoInstallInfo;
- public static String AvailableIUsPage_GotoProperties;
- public static String AvailableIUsPage_GroupByCategory;
- public static String AvailableIUsPage_HideInstalledItems;
- public static String AvailableIUsPage_LocalSites;
- public static String AvailableIUsPage_MultipleSelectionCount;
- public static String AvailableIUsPage_NameWithLocation;
- public static String AvailableIUsPage_NoSites;
- public static String AvailableIUsPage_RepoFilterInstructions;
- public static String AvailableIUsPage_RepoFilterLabel;
- public static String AvailableIUsPage_ResolveAllCheckbox;
- public static String AvailableIUsPage_SelectASite;
- public static String AvailableIUsPage_ShowLatestVersions;
- public static String AvailableIUsPage_SingleSelectionCount;
- public static String AvailableIUsPage_Title;
- public static String AvailableIUWrapper_AllAreInstalled;
- public static String IUViewQueryContext_AllAreInstalledDescription;
- public static String Label_Profiles;
- public static String Label_Repositories;
- public static String LaunchUpdateManagerButton;
- public static String LoadMetadataRepositoryJob_ContactSitesProgress;
- public static String LoadMetadataRepositoryJob_SitesMissingError;
- public static String RepositoryElement_NotFound;
- public static String RepositoryTracker_DuplicateLocation;
- public static String MetadataRepositoryElement_RepositoryLoadError;
- public static String UpdateAction_UpdatesAvailableMessage;
- public static String UpdateAction_UpdatesAvailableTitle;
- public static String PlatformUpdateTitle;
- public static String PlatformRestartMessage;
- public static String Policy_RequiresUpdateManagerMessage;
- public static String Policy_RequiresUpdateManagerTitle;
- public static String ProvUI_ErrorDuringApplyConfig;
- public static String ProvUI_InformationTitle;
- public static String ProvUI_InstallDialogError;
- public static String ProvUI_NameColumnTitle;
- public static String ProvUI_IdColumnTitle;
- public static String ProvUI_VersionColumnTitle;
- public static String ProvUI_WarningTitle;
- public static String ProvUIMessages_NotAccepted_EnterFor_0;
- public static String ProvUIMessages_SavedNotAccepted_EnterFor_0;
- public static String OptionalPlatformRestartMessage;
- public static String IUViewQueryContext_NoCategorizedItemsDescription;
- public static String QueriedElementWrapper_NoCategorizedItemsExplanation;
- public static String QueriedElementWrapper_NoItemsExplanation;
- public static String QueriedElementWrapper_SiteNotFound;
- public static String QueryableMetadataRepositoryManager_LoadRepositoryProgress;
- public static String QueryableProfileRegistry_QueryProfileProgress;
- public static String QueryableUpdates_UpdateListProgress;
- public static String SizeComputingWizardPage_SizeJobTitle;
- public static String RevertDialog_ConfigContentsLabel;
- public static String RevertDialog_ConfigsLabel;
- public static String RevertDialog_ConfirmRestartMessage;
- public static String RevertDialog_RevertOperationLabel;
- public static String RevertDialog_Title;
- public static String RollbackProfileElement_CurrentInstallation;
- public static String SelectableIUsPage_Select_All;
- public static String SelectableIUsPage_Deselect_All;
-
- public static String TrustCertificateDialog_Details;
- public static String TrustCertificateDialog_Title;
- // Operations
- public static String UpdateManagerCompatibility_ExportSitesTitle;
- public static String UpdateManagerCompatibility_ImportSitesTitle;
- public static String UpdateManagerCompatibility_InvalidSiteFileMessage;
- public static String UpdateManagerCompatibility_InvalidSitesTitle;
- public static String UpdateManagerCompatibility_ItemRequiresUpdateManager;
- public static String UpdateManagerCompatibility_UnableToOpenFindAndInstall;
- public static String UpdateManagerCompatibility_UnableToOpenManageConfiguration;
- public static String ServiceUI_LoginDetails;
- public static String ServiceUI_LoginRequired;
- public static String ServiceUI_unsigned_message;
- public static String ServiceUI_warning_title;
- public static String UpdateOrInstallWizardPage_Size;
- public static String Updates_Label;
- public static String UpdateSingleIUPage_SingleUpdateDescription;
- public static String UpdateWizardPage_Description;
- public static String UpdateWizardPage_Title;
- public static String UserValidationDialog_PasswordLabel;
- public static String UserValidationDialog_SavePasswordButton;
- public static String UserValidationDialog_UsernameLabel;
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java
deleted file mode 100644
index 05972f6db..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIProvisioningListener.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.util.EventObject;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.provisional.p2.core.eventbus.SynchronousProvisioningListener;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.engine.IProfileEvent;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * ProvisioningListener which handles event batching and other
- * extensions to the provisioning event framework that are used by
- * the UI.
- *
- * @since 3.5
- */
-public abstract class ProvUIProvisioningListener implements SynchronousProvisioningListener {
-
- public static final int PROV_EVENT_METADATA_REPOSITORY = 0x0001;
- public static final int PROV_EVENT_IU = 0x0002;
- public static final int PROV_EVENT_PROFILE = 0x0004;
- public static final int PROV_EVENT_ARTIFACT_REPOSITORY = 0x0008;
-
- int eventTypes = 0;
- String name;
-
- public ProvUIProvisioningListener(String name, int eventTypes) {
- this.name = name;
- this.eventTypes = eventTypes;
- }
-
- public void notify(EventObject o) {
- if (o instanceof RepositoryOperationBeginningEvent) {
- if (Tracing.DEBUG_EVENTS_CLIENT)
- Tracing.debug("Batch Eventing: Ignore Following Events. " + getReceiverString()); //$NON-NLS-1$
- } else if (o instanceof RepositoryOperationEndingEvent) {
- RepositoryOperationEndingEvent event = (RepositoryOperationEndingEvent) o;
-
- if (Tracing.DEBUG_EVENTS_CLIENT)
- Tracing.debug("Batch Eventing: Batch Ended. " + getReceiverString()); //$NON-NLS-1$
- // A batch operation completed. Refresh.
- if (ProvisioningUI.getDefaultUI().getOperationRunner().eventBatchCount <= 0) {
- if (Tracing.DEBUG_EVENTS_CLIENT)
- Tracing.debug("Batch Eventing Complete." + getReceiverString()); //$NON-NLS-1$
- if (event.getEvent() == null && event.update()) {
- if (Tracing.DEBUG_EVENTS_CLIENT) {
- Tracing.debug("Refreshing After Batch." + getReceiverString()); //$NON-NLS-1$
- }
- refreshAll();
- } else if (event.update()) {
- if (Tracing.DEBUG_EVENTS_CLIENT)
- Tracing.debug("Dispatching Last Event in Batch." + getReceiverString()); //$NON-NLS-1$
- notify(event.getEvent());
- } else if (Tracing.DEBUG_EVENTS_CLIENT) {
- Tracing.debug("No Refresh on Batch Complete."); //$NON-NLS-1$
- }
- } else {
- // We are still in the middle of a batch operation, but we've been notified
- // about a nested batch that ended. See if it ended with a specific event.
- // If it did, this means there was a user action involving a repository
- // (rather than side-effect events). For example, the user might add a repo while a full
- // background load is running. We want to honor that
- // event. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=305478
- RepositoryEvent innerEvent = event.getEvent();
- if (innerEvent != null) {
- handleRepositoryEvent(innerEvent);
- }
- }
- } else if (ProvisioningUI.getDefaultUI().getOperationRunner().eventBatchCount > 0) {
- // ignore raw events during a batch
- if (Tracing.DEBUG_EVENTS_CLIENT)
- Tracing.debug(name + " Ignoring: " + o.toString()); //$NON-NLS-1$
- return;
- } else if (o instanceof IProfileEvent && (((eventTypes & PROV_EVENT_IU) == PROV_EVENT_IU) || ((eventTypes & PROV_EVENT_PROFILE) == PROV_EVENT_PROFILE))) {
- if (Tracing.DEBUG_EVENTS_CLIENT)
- Tracing.debug(o.toString() + getReceiverString());
- IProfileEvent event = (IProfileEvent) o;
- if (event.getReason() == IProfileEvent.CHANGED) {
- profileChanged(event.getProfileId());
- } else if (event.getReason() == IProfileEvent.ADDED) {
- profileAdded(event.getProfileId());
- } else if (event.getReason() == IProfileEvent.REMOVED) {
- profileRemoved(event.getProfileId());
- }
- } else if (o instanceof RepositoryEvent) {
- if (Tracing.DEBUG_EVENTS_CLIENT)
- Tracing.debug(o.toString() + getReceiverString());
- handleRepositoryEvent((RepositoryEvent) o);
- }
- }
-
- private String getReceiverString() {
- return " -- <" + name + "> "; //$NON-NLS-1$//$NON-NLS-2$
- }
-
- private void handleRepositoryEvent(RepositoryEvent event) {
- // Do not handle unless this is the type of repo that we are interested in
- if ((event.getRepositoryType() == IRepository.TYPE_METADATA && (eventTypes & PROV_EVENT_METADATA_REPOSITORY) == PROV_EVENT_METADATA_REPOSITORY) || (event.getRepositoryType() == IRepository.TYPE_ARTIFACT && (eventTypes & PROV_EVENT_ARTIFACT_REPOSITORY) == PROV_EVENT_ARTIFACT_REPOSITORY)) {
- if (event.getKind() == RepositoryEvent.ADDED && event.isRepositoryEnabled()) {
- repositoryAdded(event);
- } else if (event.getKind() == RepositoryEvent.REMOVED && event.isRepositoryEnabled()) {
- repositoryRemoved(event);
- } else if (event.getKind() == RepositoryEvent.DISCOVERED) {
- repositoryDiscovered(event);
- } else if (event.getKind() == RepositoryEvent.CHANGED) {
- repositoryChanged(event);
- } else if (event.getKind() == RepositoryEvent.ENABLEMENT) {
- repositoryEnablement(event);
- }
- }
- }
-
- /**
- * A repository has been added. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param event the RepositoryEvent describing the details
- */
- protected void repositoryAdded(RepositoryEvent event) {
- // Do nothing. This method is not abstract because subclasses
- // may not be interested in repository events at all and should
- // not have to implement it.
- }
-
- /**
- * A repository has been removed. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param event the RepositoryEvent describing the details
- */
- protected void repositoryRemoved(RepositoryEvent event) {
- // Do nothing. This method is not abstract because subclasses
- // may not be interested in repository events at all and should
- // not have to implement it.
- }
-
- /**
- * A repository has been discovered. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param event the RepositoryEvent describing the details
- */
- protected void repositoryDiscovered(RepositoryEvent event) {
- // Do nothing. This method is not abstract because subclasses
- // may not be interested in repository events at all and should
- // not have to implement it.
- }
-
- /**
- * A repository has changed. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param event the RepositoryEvent describing the details
- */
- protected void repositoryChanged(RepositoryEvent event) {
- // Do nothing. This method is not abstract because subclasses
- // may not be interested in repository events at all and should
- // not have to implement it.
- }
-
- /**
- * A repository's enablement state has changed. This is treated
- * as repository addition or removal by default. Subclasses may
- * override. May be called from a non-UI thread.
- * @param event
- */
- protected void repositoryEnablement(RepositoryEvent event) {
- // We treat enablement of a repository as if one were added.
- if (event.isRepositoryEnabled())
- repositoryAdded(event);
- else
- repositoryRemoved(event);
- }
-
- /**
- * The specified profile has changed. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param profileId the id of the profile that changed.
- */
- protected void profileChanged(final String profileId) {
- // Do nothing. This method is not abstract because subclasses
- // may not be interested in profile events at all and should
- // not have to implement it.
- }
-
- /**
- * The specified profile has been added. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param profileId the id of the profile that has been added.
- */
- protected void profileAdded(final String profileId) {
- // Do nothing. This method is not abstract because subclasses
- // may not be interested in profile events at all and should
- // not have to implement it.
- }
-
- /**
- * The specified profile has been removed. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param profileId the id of the profile that has been removed.
- */
- protected void profileRemoved(final String profileId) {
- // Do nothing. This method is not abstract because subclasses
- // may not be interested in profile events at all and should
- // not have to implement it.
- }
-
- /**
- * An event requiring a complete refresh of the listener's state has
- * been received. This is used, for example, when a batch change has
- * completed. Subclasses may override. May be called from a non-UI
- * thread.
- */
- protected void refreshAll() {
- // Do nothing by default.
- }
-
- public int getEventTypes() {
- return eventTypes;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java
deleted file mode 100644
index 3ae621ebc..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvisioningOperationRunner.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.io.IOException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.core.helpers.ServiceHelper;
-import org.eclipse.equinox.internal.p2.ui.dialogs.ApplyProfileChangesDialog;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.ui.progress.IProgressConstants2;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Utility methods for running provisioning operations. Operations can either
- * be run synchronously or in a job. When scheduled as a job, the operation
- * determines whether the job is run in
- * the background or in the UI.
- *
- * @since 3.4
- */
-public class ProvisioningOperationRunner {
-
- boolean suppressRestart = false;
- ProvisioningUI ui;
- public int eventBatchCount = 0;
-
- public ProvisioningOperationRunner(ProvisioningUI ui) {
- this.ui = ui;
- }
-
- /**
- * Schedule a job to execute the supplied ProvisioningOperation.
- *
- * @param job The operation to execute
- * @param errorStyle the flags passed to the StatusManager for error reporting
- */
- public void schedule(final ProvisioningJob job, final int errorStyle) {
- final boolean noPrompt = (errorStyle & (StatusManager.BLOCK | StatusManager.SHOW)) == 0;
- if (noPrompt) {
- job.setProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);
- job.setProperty(IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.TRUE);
- }
- job.setProperty(IProgressConstants.ICON_PROPERTY, ProvUIImages.getImageDescriptor(ProvUIImages.IMG_PROFILE));
- job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, Boolean.TRUE);
- manageJob(job, job.getRestartPolicy());
- job.schedule();
- }
-
- /**
- * Request a restart of the platform according to the specified
- * restart policy.
- *
- * @param restartPolicy
- */
- void requestRestart(final int restartPolicy) {
- // Global override of restart (used in test cases).
- if (suppressRestart)
- return;
- if (restartPolicy == Policy.RESTART_POLICY_FORCE) {
- PlatformUI.getWorkbench().restart();
- return;
- }
- if (restartPolicy == Policy.RESTART_POLICY_FORCE_APPLY) {
- applyProfileChanges();
- return;
- }
-
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (PlatformUI.getWorkbench().isClosing())
- return;
- int retCode = ApplyProfileChangesDialog.promptForRestart(ProvUI.getDefaultParentShell(), restartPolicy == Policy.RESTART_POLICY_PROMPT);
- if (retCode == ApplyProfileChangesDialog.PROFILE_APPLYCHANGES) {
- applyProfileChanges();
- } else if (retCode == ApplyProfileChangesDialog.PROFILE_RESTART) {
- PlatformUI.getWorkbench().restart();
- }
- }
- });
- }
-
- void applyProfileChanges() {
- Configurator configurator = (Configurator) ServiceHelper.getService(ProvUIActivator.getContext(), Configurator.class.getName());
- try {
- configurator.applyConfiguration();
- } catch (IOException e) {
- ProvUI.handleException(e, ProvUIMessages.ProvUI_ErrorDuringApplyConfig, StatusManager.LOG | StatusManager.BLOCK);
- } catch (IllegalStateException e) {
- IStatus illegalApplyStatus = new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, 0, ProvUIMessages.ProvisioningOperationRunner_CannotApplyChanges, e);
- ProvUI.reportStatus(illegalApplyStatus, StatusManager.LOG | StatusManager.BLOCK);
- }
- }
-
- public void manageJob(Job job, final int jobRestartPolicy) {
- ui.getSession().rememberJob(job);
- job.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- int severity = event.getResult().getSeverity();
- // If the job finished without error, see if restart is needed
- if (severity != IStatus.CANCEL && severity != IStatus.ERROR) {
- if (jobRestartPolicy == ProvisioningJob.RESTART_NONE) {
- return;
- }
- int globalRestartPolicy = ui.getPolicy().getRestartPolicy();
- // If the global policy allows apply changes, check the job policy to see if it supports it.
- if (globalRestartPolicy == Policy.RESTART_POLICY_PROMPT_RESTART_OR_APPLY) {
- if (jobRestartPolicy == ProvisioningJob.RESTART_OR_APPLY)
- requestRestart(Policy.RESTART_POLICY_PROMPT_RESTART_OR_APPLY);
- else
- requestRestart(Policy.RESTART_POLICY_PROMPT);
- } else
- requestRestart(globalRestartPolicy);
- }
- }
- });
- }
-
- /**
- * This method is provided for use in automated test case. It should
- * no longer be needed to be used by clients.
- *
- * @param suppress <code>true</code> to suppress all restarts and <code>false</code>
- * to stop suppressing restarts.
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public void suppressRestart(boolean suppress) {
- suppressRestart = suppress;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java
deleted file mode 100644
index 3bee4d934..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.internal.p2.ui.query.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-import org.eclipse.equinox.p2.metadata.expression.*;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.artifact.ArtifactKeyQuery;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Provides a default set of queries to drive the provisioning UI.
- *
- * @since 3.5
- */
-
-public class QueryProvider {
-
- private ProvisioningUI ui;
-
- public static final int METADATA_REPOS = 1;
- public static final int ARTIFACT_REPOS = 2;
- public static final int PROFILES = 3;
- public static final int AVAILABLE_IUS = 4;
- public static final int AVAILABLE_UPDATES = 5;
- public static final int INSTALLED_IUS = 6;
- public static final int AVAILABLE_ARTIFACTS = 7;
-
- public QueryProvider(ProvisioningUI ui) {
- this.ui = ui;
- }
-
- /*
- * Return a map of key/value pairs which are set to the environment settings
- * for the given profile. May return <code>null</code> or an empty <code>Map</code>
- * if the settings cannot be obtained.
- */
- private static Map<String, String> getEnvFromProfile(IProfile profile) {
- String environments = profile.getProperty(IProfile.PROP_ENVIRONMENTS);
- if (environments == null)
- return null;
- Map<String, String> result = new HashMap<String, String>();
- for (StringTokenizer tokenizer = new StringTokenizer(environments, ","); tokenizer.hasMoreElements();) { //$NON-NLS-1$
- String entry = tokenizer.nextToken();
- int i = entry.indexOf('=');
- String key = entry.substring(0, i).trim();
- String value = entry.substring(i + 1).trim();
- result.put(key, value);
- }
- return result;
- }
-
- // If we are supposed to filter out the results based on the environment settings in
- // the target profile then create a compound query otherwise just return the given query
- private IQuery<IInstallableUnit> createEnvironmentFilterQuery(IUViewQueryContext context, IProfile profile, IQuery<IInstallableUnit> query) {
- if (!context.getFilterOnEnv())
- return query;
- Map<String, String> environment = getEnvFromProfile(profile);
- if (environment == null)
- return query;
- IInstallableUnit envIU = InstallableUnit.contextIU(environment);
- IQuery<IInstallableUnit> filterQuery = QueryUtil.createMatchQuery("filter == null || $0 ~= filter", envIU); //$NON-NLS-1$
- return QueryUtil.createCompoundQuery(query, filterQuery, true);
- }
-
- public ElementQueryDescriptor getQueryDescriptor(final QueriedElement element) {
- // Initialize queryable, queryContext, and queryType from the element.
- // In some cases we override this.
- Policy policy = ui.getPolicy();
- IQueryable<?> queryable = element.getQueryable();
- int queryType = element.getQueryType();
- IUViewQueryContext context = element.getQueryContext();
- if (context == null) {
- context = ProvUI.getQueryContext(policy);
- }
- switch (queryType) {
- case ARTIFACT_REPOS :
- queryable = new QueryableArtifactRepositoryManager(ui, false).locationsQueriable();
- return new ElementQueryDescriptor(queryable, new RepositoryLocationQuery(), new Collector<URI>(), new ArtifactRepositoryElementWrapper(null, element));
-
- case AVAILABLE_IUS :
- // Things get more complicated if the user wants to filter out installed items.
- // This involves setting up a secondary query for installed content that the various
- // collectors will use to reject content. We can't use a compound query because the
- // queryables are different (profile for installed content, repo for available content)
- AvailableIUWrapper availableIUWrapper;
- boolean showLatest = context.getShowLatestVersionsOnly();
- boolean hideInstalled = context.getHideAlreadyInstalled();
- IProfile targetProfile = null;
- String profileId = context.getInstalledProfileId();
- if (profileId != null) {
- targetProfile = ProvUI.getProfileRegistry(ui.getSession()).getProfile(profileId);
- }
-
- IQuery<IInstallableUnit> topLevelQuery = policy.getVisibleAvailableIUQuery();
- IQuery<IInstallableUnit> categoryQuery = QueryUtil.createIUCategoryQuery();
-
- topLevelQuery = createEnvironmentFilterQuery(context, targetProfile, topLevelQuery);
- categoryQuery = createEnvironmentFilterQuery(context, targetProfile, categoryQuery);
-
- // Showing child IU's of a group of repositories, or of a single repository
- if (element instanceof MetadataRepositories || element instanceof MetadataRepositoryElement) {
- if (context.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_FLAT || !context.getUseCategories()) {
- AvailableIUWrapper wrapper = new AvailableIUWrapper(queryable, element, false, context.getShowAvailableChildren());
- if (showLatest)
- topLevelQuery = QueryUtil.createLatestQuery(topLevelQuery);
- if (targetProfile != null)
- wrapper.markInstalledIUs(targetProfile, hideInstalled);
- return new ElementQueryDescriptor(queryable, topLevelQuery, new Collector<Object>(), wrapper);
- }
- // Installed content not a concern for collecting categories
- return new ElementQueryDescriptor(queryable, categoryQuery, new Collector<Object>(), new CategoryElementWrapper(queryable, element));
- }
-
- // If it's a category or some other IUElement to drill down in, we get the requirements and show all requirements
- // that are also visible in the available list.
- if (element instanceof CategoryElement || (element instanceof IIUElement && ((IIUElement) element).shouldShowChildren())) {
- // children of a category should drill down according to the context. If we aren't in a category, we are already drilling down and
- // continue to do so.
- boolean drillDownTheChildren = element instanceof CategoryElement ? context.getShowAvailableChildren() : true;
- IQuery<IInstallableUnit> memberOfCategoryQuery;
- if (element instanceof CategoryElement) {
- // We need an expression that uses the requirements of the element's requirements, which could be merged
- // from multiple category IUs shown as one in the UI.
- IExpression matchesRequirementsExpression = ExpressionUtil.parse("$0.exists(r | this ~= r)"); //$NON-NLS-1$
- memberOfCategoryQuery = QueryUtil.createMatchQuery(matchesRequirementsExpression, ((CategoryElement) element).getRequirements());
- } else {
- memberOfCategoryQuery = QueryUtil.createIUCategoryMemberQuery(((IIUElement) element).getIU());
- }
- memberOfCategoryQuery = createEnvironmentFilterQuery(context, targetProfile, memberOfCategoryQuery);
- availableIUWrapper = new AvailableIUWrapper(queryable, element, true, drillDownTheChildren);
- if (targetProfile != null)
- availableIUWrapper.markInstalledIUs(targetProfile, hideInstalled);
- // if it's a category, there is a special query.
- if (element instanceof CategoryElement) {
- if (showLatest)
- memberOfCategoryQuery = QueryUtil.createLatestQuery(memberOfCategoryQuery);
- return new ElementQueryDescriptor(queryable, memberOfCategoryQuery, new Collector<Object>(), availableIUWrapper);
- }
- // It is not a category, we want to traverse the requirements that are groups.
- IQuery<IInstallableUnit> query = QueryUtil.createCompoundQuery(topLevelQuery, new RequiredIUsQuery(((IIUElement) element).getIU()), true);
- if (showLatest)
- query = QueryUtil.createLatestQuery(query);
- // If it's not a category, these are generic requirements and should be filtered by the visibility property (topLevelQuery)
- return new ElementQueryDescriptor(queryable, query, new Collector<Object>(), availableIUWrapper);
- }
- return null;
-
- case AVAILABLE_UPDATES :
- // This query can be used by the automatic updater in headless cases (checking for updates).
- // We traffic in IU's rather than wrapped elements
- IProfile profile;
- IInstallableUnit[] toUpdate = null;
- if (element instanceof Updates) {
- profile = ProvUI.getProfileRegistry(ui.getSession()).getProfile(((Updates) element).getProfileId());
- toUpdate = ((Updates) element).getIUs();
- } else {
- profile = ProvUI.getAdapter(element, IProfile.class);
- }
- if (profile == null)
- return null;
- if (toUpdate == null) {
- IQueryResult<IInstallableUnit> queryResult = profile.query(policy.getVisibleInstalledIUQuery(), null);
- toUpdate = queryResult.toArray(IInstallableUnit.class);
- }
- QueryableUpdates updateQueryable = new QueryableUpdates(ui, toUpdate);
- return new ElementQueryDescriptor(updateQueryable, context.getShowLatestVersionsOnly() ? QueryUtil.createLatestIUQuery() : QueryUtil.createIUAnyQuery(), new Collector<Object>());
-
- case INSTALLED_IUS :
- // Querying of IU's. We are drilling down into the requirements.
- if (element instanceof IIUElement && context.getShowInstallChildren()) {
- Collection<IRequirement> reqs = ((IIUElement) element).getRequirements();
- IExpression[] requirementExpressions = new IExpression[reqs.size()];
- int i = 0;
- for (IRequirement req : reqs) {
- requirementExpressions[i++] = req.getMatches();
- }
- IExpressionFactory factory = ExpressionUtil.getFactory();
- IQuery<IInstallableUnit> meetsAnyRequirementQuery = QueryUtil.createMatchQuery(factory.or(requirementExpressions));
- IQuery<IInstallableUnit> visibleAsAvailableQuery = policy.getVisibleAvailableIUQuery();
- IQuery<IInstallableUnit> createCompoundQuery = QueryUtil.createCompoundQuery(visibleAsAvailableQuery, meetsAnyRequirementQuery, true);
- return new ElementQueryDescriptor(queryable, createCompoundQuery, new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(queryable, element));
- }
- profile = ProvUI.getAdapter(element, IProfile.class);
- if (profile == null)
- return null;
- return new ElementQueryDescriptor(profile, policy.getVisibleInstalledIUQuery(), new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(profile, element));
-
- case METADATA_REPOS :
- if (element instanceof MetadataRepositories) {
- if (queryable == null) {
- queryable = new QueryableMetadataRepositoryManager(ui, ((MetadataRepositories) element).getIncludeDisabledRepositories()).locationsQueriable();
- element.setQueryable(queryable);
- }
- return new ElementQueryDescriptor(element.getQueryable(), new RepositoryLocationQuery(), new Collector<URI>(), new MetadataRepositoryElementWrapper(null, element));
- }
- return null;
-
- case PROFILES :
- queryable = new QueryableProfileRegistry(ui);
- return new ElementQueryDescriptor(queryable, QueryUtil.createMatchQuery(IProfile.class, ExpressionUtil.TRUE_EXPRESSION), new Collector<Object>(), new ProfileElementWrapper(null, element));
-
- case AVAILABLE_ARTIFACTS :
- if (!(queryable instanceof IArtifactRepository))
- return null;
- return new ElementQueryDescriptor(queryable, ArtifactKeyQuery.ALL_KEYS, new Collector<Object>(), new ArtifactKeyWrapper((IArtifactRepository) queryable, element));
-
- default :
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
deleted file mode 100644
index a2e5087da..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * An object that queries a particular set of artifact repositories.
- */
-public class QueryableArtifactRepositoryManager extends QueryableRepositoryManager<IArtifactKey> {
-
- public QueryableArtifactRepositoryManager(ProvisioningUI ui, boolean includeDisabledRepos) {
- super(ui, includeDisabledRepos);
- }
-
- protected IArtifactRepositoryManager getRepositoryManager() {
- return ProvUI.getArtifactRepositoryManager(getSession());
- }
-
- protected IArtifactRepository doLoadRepository(IRepositoryManager<IArtifactKey> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
- return ui.loadArtifactRepository(location, false, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.QueryableRepositoryManager#getRepositoryFlags(org.eclipse.equinox.p2.ui.RepositoryManipulator)
- */
- protected int getRepositoryFlags(RepositoryTracker repositoryManipulator) {
- return repositoryManipulator.getArtifactRepositoryFlags();
- }
-
- protected IArtifactRepository getRepository(IRepositoryManager<IArtifactKey> manager, URI location) {
- // note the use of ArtifactRepositoryManager (the concrete implementation).
- if (manager instanceof ArtifactRepositoryManager) {
- return ((ArtifactRepositoryManager) manager).getRepository(location);
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
deleted file mode 100644
index bdfef684c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * An object that queries a particular set of metadata repositories.
- */
-public class QueryableMetadataRepositoryManager extends QueryableRepositoryManager<IInstallableUnit> {
-
- public QueryableMetadataRepositoryManager(ProvisioningUI ui, boolean includeDisabledRepos) {
- super(ui, includeDisabledRepos);
- }
-
- protected IMetadataRepository getRepository(IRepositoryManager<IInstallableUnit> manager, URI location) {
- // note the use of MetadataRepositoryManager (the concrete implementation).
- if (manager instanceof MetadataRepositoryManager) {
- return ((MetadataRepositoryManager) manager).getRepository(location);
- }
- return null;
- }
-
- protected IMetadataRepositoryManager getRepositoryManager() {
- return ProvUI.getMetadataRepositoryManager(getSession());
- }
-
- protected IMetadataRepository doLoadRepository(IRepositoryManager<IInstallableUnit> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
- return ui.loadMetadataRepository(location, false, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.QueryableRepositoryManager#getRepositoryFlags(org.eclipse.equinox.p2.ui.RepositoryManipulator)
- */
- protected int getRepositoryFlags(RepositoryTracker repositoryManipulator) {
- return repositoryManipulator.getMetadataRepositoryFlags();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java
deleted file mode 100644
index 5b1d675a1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableRepositoryManager.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * An object that provides query support for a specified
- * set of repositories. The repository tracker flags determine which repositories
- * are included in the query. Callers interested in only the resulting repository URIs
- * should specify a {@link RepositoryLocationQuery}, in which case the
- * query is performed over the URI's. Otherwise the repositories are loaded and
- * the query is performed over the repositories themselves.
- */
-public abstract class QueryableRepositoryManager<T> implements IQueryable<T> {
- private ProvisioningSession session;
- protected boolean includeDisabledRepos;
- protected RepositoryTracker tracker;
- protected int repositoryFlags;
- protected ProvisioningUI ui;
-
- public QueryableRepositoryManager(ProvisioningUI ui, boolean includeDisabledRepos) {
- this.includeDisabledRepos = includeDisabledRepos;
- this.ui = ui;
- this.tracker = ui.getRepositoryTracker();
- this.session = ui.getSession();
- repositoryFlags = getRepositoryFlags(tracker);
- }
-
- protected ProvisioningSession getSession() {
- return session;
- }
-
- /**
- * Iterates over the repositories configured in this queryable.
- * For most queries, the query is run on each repository, passing any objects that satisfy the
- * query.
- * <p>
- * This method is long-running; progress and cancellation are provided
- * by the given progress monitor.
- * </p>
- *
- * @param query The query to perform..
- * @param monitor a progress monitor, or <code>null</code> if progress
- * reporting is not desired
- * @return The QueryResult argument
- */
- public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) {
- IRepositoryManager<T> manager = getRepositoryManager();
- if (monitor == null)
- monitor = new NullProgressMonitor();
- return query(getRepoLocations(manager), query, monitor);
- }
-
- public IQueryable<URI> locationsQueriable() {
- return new IQueryable<URI>() {
-
- public IQueryResult<URI> query(IQuery<URI> query, IProgressMonitor monitor) {
- return query.perform(getRepoLocations(getRepositoryManager()).iterator());
- }
- };
- }
-
- protected Collection<URI> getRepoLocations(IRepositoryManager<T> manager) {
- Set<URI> locations = new HashSet<URI>();
- locations.addAll(Arrays.asList(manager.getKnownRepositories(repositoryFlags)));
- if (includeDisabledRepos) {
- locations.addAll(Arrays.asList(manager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED | repositoryFlags)));
- }
- return locations;
- }
-
- /**
- * Return a boolean indicating whether all the repositories that
- * can be queried by the receiver are already loaded. If a repository
- * is not loaded because it was not found, this will not return false,
- * because this repository cannot be queried.
- *
- * @return <code>true</code> if all repositories to be queried by the
- * receiver are loaded, <code>false</code> if they
- * are not.
- */
- public boolean areRepositoriesLoaded() {
- IRepositoryManager<T> mgr = getRepositoryManager();
- if (mgr == null)
- return false;
- for (URI repoURI : getRepoLocations(mgr)) {
- IRepository<T> repo = getRepository(mgr, repoURI);
- // A not-loaded repo doesn't count if it's considered missing (not found)
- if (repo == null && !tracker.hasNotFoundStatusBeenReported(repoURI))
- return false;
- }
- return true;
- }
-
- protected abstract IRepository<T> getRepository(IRepositoryManager<T> manager, URI location);
-
- protected IRepository<T> loadRepository(IRepositoryManager<T> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
- monitor.setTaskName(NLS.bind(ProvUIMessages.QueryableMetadataRepositoryManager_LoadRepositoryProgress, URIUtil.toUnencodedString(location)));
- IRepository<T> repo = doLoadRepository(manager, location, monitor);
- return repo;
- }
-
- /**
- * Return the appropriate repository manager, or <code>null</code> if none could be found.
- * @return the repository manager
- */
- protected abstract IRepositoryManager<T> getRepositoryManager();
-
- /**
- * Return the flags that should be used to access repositories given the
- * manipulator.
- */
- protected abstract int getRepositoryFlags(RepositoryTracker repositoryManipulator);
-
- /**
- * Load the repository located at the specified location.
- *
- * @param manager the manager
- * @param location the repository location
- * @param monitor the progress monitor
- * @return the repository that was loaded, or <code>null</code> if no repository could
- * be found at that location.
- */
- protected abstract IRepository<T> doLoadRepository(IRepositoryManager<T> manager, URI location, IProgressMonitor monitor) throws ProvisionException;
-
- @SuppressWarnings("unchecked")
- protected IQueryResult<T> query(Collection<URI> uris, IQuery<T> query, IProgressMonitor monitor) {
- if (query instanceof RepositoryLocationQuery) {
- return (IQueryResult<T>) locationsQueriable().query((IQuery<URI>) query, monitor);
- }
- SubMonitor sub = SubMonitor.convert(monitor, (uris.size() + 1) * 100);
- ArrayList<IRepository<T>> loadedRepos = new ArrayList<IRepository<T>>(uris.size());
- for (URI uri : uris) {
- IRepository<T> repo = null;
- try {
- repo = loadRepository(getRepositoryManager(), uri, sub.newChild(100));
- } catch (ProvisionException e) {
- tracker.reportLoadFailure(uri, e);
- } catch (OperationCanceledException e) {
- // user has canceled
- repo = null;
- }
- if (repo != null)
- loadedRepos.add(repo);
- }
- if (loadedRepos.size() > 0) {
- return QueryUtil.compoundQueryable(loadedRepos).query(query, sub.newChild(100));
- }
- return Collector.emptyCollector();
- }
-
- public void setRespositoryFlags(int flags) {
- this.repositoryFlags = flags;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryLocationQuery.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryLocationQuery.java
deleted file mode 100644
index 43f016b97..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryLocationQuery.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
-import java.net.URI;
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-
-/**
- * RepositoryLocationQuery yields true for all URI elements.
- *
- * @since 3.5
- */
-public class RepositoryLocationQuery extends ExpressionMatchQuery<URI> {
-
- public RepositoryLocationQuery() {
- super(URI.class, ExpressionUtil.TRUE_EXPRESSION);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationBeginningEvent.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationBeginningEvent.java
deleted file mode 100644
index 66aca16db..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationBeginningEvent.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.util.EventObject;
-
-/**
- * Event used to signal that a repository operation is about
- * to begin. This event can be used to ignore lower-level repository events
- * until the operation is complete.
- *
- * @since 2.0
- */
-public class RepositoryOperationBeginningEvent extends EventObject {
-
- private static final long serialVersionUID = -7529156836242774280L;
-
- /**
- * Construct a new instance of this event.
- * @param source the source of the event
- */
- public RepositoryOperationBeginningEvent(Object source) {
- super(source);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationEndingEvent.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationEndingEvent.java
deleted file mode 100644
index ec3b13a91..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/RepositoryOperationEndingEvent.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.util.EventObject;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-
-/**
- * Event used to signal that a repository operation has completed.
- *
- * @since 2.0
- */
-public class RepositoryOperationEndingEvent extends EventObject {
-
- private static final long serialVersionUID = -4513769756968621852L;
-
- /**
- * A repository event describing the nature of the operation.
- */
- private RepositoryEvent event;
-
- /**
- * A boolean indicating whether the UI should be updated in response
- * to this event.
- */
- private boolean update;
-
- /**
- * Construct a new instance of this event.
- *
- * @param source the source of the event
- * @param update a boolean indicating whether the UI should be updated in response
- * to this event.
- * @param event a {@link RepositoryEvent} describing the underlying event, or <code>null</code>
- * if no single event can describe the operation. This event may be used by clients to determine
- * what should be updated after an operation completes.
- */
- public RepositoryOperationEndingEvent(Object source, boolean update, RepositoryEvent event) {
- super(source);
- this.update = update;
- this.event = event;
- }
-
- /**
- * Return a {@link RepositoryEvent} that reflects the operation that
- * occurred. A <code>null</code> return value indicates that there
- * was not a single underlying repository operation.
- *
- * @return the {@link RepositoryEvent} that was involved in the operation. May be
- * <code>null</code>. This event may be used by clients to determine
- * what should be updated after an operation completes.
-
- */
- public RepositoryEvent getEvent() {
- return event;
- }
-
- /**
- * Return a boolean that indicates whether the client should update the UI in response
- * to this event.
- * event.
- *
- * @return <code>true</code> if clients should update to reflect to this event, <code>false</code>
- * if the client should ignore the entire operation.
- */
- public boolean update() {
- return update;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java
deleted file mode 100644
index 4bc5cdc43..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ServiceUIComponent.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import org.eclipse.equinox.p2.core.UIServices;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-
-/**
- * Component that provides a factory that can create and initialize
- * {@link UIServices} instances.
- */
-public class ServiceUIComponent implements IAgentServiceFactory {
-
- public Object createService(IProvisioningAgent agent) {
- return new ValidationDialogServiceUI();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java
deleted file mode 100644
index 1effbe36b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/UpdateManagerCompatibility.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Iterator;
-import java.util.Vector;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQueryResult;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-/**
- * Utility methods involving compatibility with the Eclipse Update Manager.
- *
- * @since 3.4
- *
- */
-public class UpdateManagerCompatibility {
-
- // This value was copied from MetadataGeneratorHelper. Must be the same.
- private static final String ECLIPSE_INSTALL_HANDLER_PROP = "org.eclipse.update.installHandler"; //$NON-NLS-1$
- private static final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
-
- private static void parse(String fileName, Vector<MetadataRepositoryElement> bookmarks) {
- File file = new File(fileName);
- if (!file.exists())
- return;
-
- try {
- documentBuilderFactory.setNamespaceAware(true);
- DocumentBuilder parser = documentBuilderFactory.newDocumentBuilder();
- Document doc = parser.parse(file);
- Node root = doc.getDocumentElement();
- processRoot(root, bookmarks);
- } catch (ParserConfigurationException e) {
- logFail(e);
- } catch (SAXException e) {
- logFail(e);
- } catch (IOException e) {
- logFail(e);
- }
- }
-
- private static MetadataRepositoryElement[] getSites(Vector<MetadataRepositoryElement> bookmarks) {
- return bookmarks.toArray(new MetadataRepositoryElement[bookmarks.size()]);
- }
-
- private static void processRoot(Node root, Vector<MetadataRepositoryElement> bookmarks) {
- if (root.getNodeName().equals("bookmarks")) { //$NON-NLS-1$
- NodeList children = root.getChildNodes();
- processChildren(children, bookmarks);
- }
- }
-
- private static void processChildren(NodeList children, Vector<MetadataRepositoryElement> bookmarks) {
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- if (child.getNodeName().equals("site")) { //$NON-NLS-1$
- createSite(child, bookmarks);
- } else if (child.getNodeName().equals("folder")) { //$NON-NLS-1$
- createFolder(child, bookmarks);
- }
- }
- }
- }
-
- private static void createSite(Node child, Vector<MetadataRepositoryElement> bookmarks) {
- URI uri = null;
- try {
- uri = URIUtil.fromString((getAttribute(child, "url"))); //$NON-NLS-1$
- } catch (URISyntaxException e) {
- logFail(e);
- return;
- }
-
- String sel = getAttribute(child, "selected"); //$NON-NLS-1$
- boolean selected = (sel != null && sel.equals("true")); //$NON-NLS-1$
-
- MetadataRepositoryElement element = new MetadataRepositoryElement(null, uri, selected);
- String nickname = getAttribute(child, "name"); //$NON-NLS-1$
- if (nickname != null && nickname.length() > 0)
- element.setNickname(nickname);
- bookmarks.add(element);
- }
-
- private static void createFolder(Node child, Vector<MetadataRepositoryElement> bookmarks) {
- if (child.hasChildNodes())
- processChildren(child.getChildNodes(), bookmarks);
- }
-
- private static String getAttribute(Node node, String name) {
- NamedNodeMap atts = node.getAttributes();
- Node att = atts.getNamedItem(name);
- if (att != null) {
- return att.getNodeValue();
- }
- return ""; //$NON-NLS-1$
- }
-
- private static void store(String fileName, Vector<MetadataRepositoryElement> bookmarks) {
- FileOutputStream fos = null;
- OutputStreamWriter osw = null;
- PrintWriter writer = null;
- try {
- fos = new FileOutputStream(fileName);
- osw = new OutputStreamWriter(fos, "UTF8"); //$NON-NLS-1$
- writer = new PrintWriter(osw);
- writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
- writer.println("<bookmarks>"); //$NON-NLS-1$
- for (int i = 0; i < bookmarks.size(); i++) {
- Object obj = bookmarks.get(i);
- writeObject(" ", obj, writer); //$NON-NLS-1$
- }
- } catch (IOException e) {
- logFail(e);
- } finally {
- if (writer != null) {
- writer.println("</bookmarks>"); //$NON-NLS-1$
- writer.flush();
- writer.close();
- }
- try {
- if (osw != null)
- osw.close();
- } catch (IOException e1) {
- logFail(e1);
- }
- try {
- if (fos != null)
- fos.close();
- } catch (IOException e2) {
- logFail(e2);
- }
- }
- }
-
- private static void writeObject(String indent, Object obj, PrintWriter writer) {
- if (obj instanceof MetadataRepositoryElement) {
- MetadataRepositoryElement element = (MetadataRepositoryElement) obj;
- String sel = element.isEnabled() ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
- String name = element.getName();
- writer.print(indent + "<site url=\"" + URIUtil.toUnencodedString(element.getLocation()) + "\" selected=\"" + sel + "\" name=\"" + getWritableXMLString(name) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- writer.println("/>"); //$NON-NLS-1$
- }
- }
-
- public static IStatus getInstallHandlerStatus(IProvisioningPlan plan) {
- IQueryResult<IInstallableUnit> result = plan.getAdditions().query(QueryUtil.createIUAnyQuery(), null);
- for (Iterator<IInstallableUnit> iterator = result.iterator(); iterator.hasNext();) {
- IInstallableUnit iu = iterator.next();
- if (iu != null && iu.getProperty(ECLIPSE_INSTALL_HANDLER_PROP) != null)
- return new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, NLS.bind(ProvUIMessages.UpdateManagerCompatibility_ItemRequiresUpdateManager, iu.getId()));
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Prompt the user for a file and import the sites specified in that
- * file. Return the collection of repo elements in the import.
- * @param shell the shell used to parent any dialogs used.
- */
- public static MetadataRepositoryElement[] importSites(Shell shell) {
- FileDialog dialog = new FileDialog(shell);
- dialog.setText(ProvUIMessages.UpdateManagerCompatibility_ImportSitesTitle);
- dialog.setFilterExtensions(new String[] {"*.xml", "*"}); //$NON-NLS-1$ //$NON-NLS-2$
-
- MetadataRepositoryElement[] sites = null;
-
- String bookmarksFile = dialog.open();
- while (bookmarksFile != null && sites == null) {
- File file = new File(bookmarksFile);
- sites = readBookmarkFile(file);
- if (sites == null || sites.length == 0) {
- MessageDialog.openInformation(shell, ProvUIMessages.UpdateManagerCompatibility_InvalidSitesTitle, ProvUIMessages.UpdateManagerCompatibility_InvalidSiteFileMessage);
- bookmarksFile = dialog.open();
- }
- }
- return sites == null ? new MetadataRepositoryElement[0] : sites;
- }
-
- public static MetadataRepositoryElement[] readBookmarkFile(File file) {
- Vector<MetadataRepositoryElement> bookmarks = new Vector<MetadataRepositoryElement>();
- parse(file.getAbsolutePath(), bookmarks);
- return getSites(bookmarks);
- }
-
- public static void writeBookmarkFile(String filename, MetadataRepositoryElement[] sites) {
- Vector<MetadataRepositoryElement> bookmarks = new Vector<MetadataRepositoryElement>(sites.length);
- for (int i = 0; i < sites.length; i++)
- bookmarks.add(sites[i]);
- store(filename, bookmarks);
-
- }
-
- /**
- * Export the specified list of sites to a bookmarks file that
- * can be read later.
- *
- * @param shell the shell used to parent the export dialog
- * @param sites the sites to export
- */
-
- public static void exportSites(Shell shell, MetadataRepositoryElement[] sites) {
- FileDialog dialog = new FileDialog(shell, SWT.SAVE);
- dialog.setText(ProvUIMessages.UpdateManagerCompatibility_ExportSitesTitle);
- dialog.setFileName("bookmarks.xml"); //$NON-NLS-1$
- dialog.setFilterExtensions(new String[] {"*.xml", "*"}); //$NON-NLS-1$ //$NON-NLS-2$
- dialog.setOverwrite(true);
-
- String bookmarksFile = dialog.open();
- if (bookmarksFile == null)
- return;
-
- writeBookmarkFile(bookmarksFile, sites);
- }
-
- /**
- * Open the old UpdateManager installer UI using the specified shell.
- * We do not call the UpdateManagerUI class directly because we want to be able to be configured
- * without requiring those plug-ins. Instead, we invoke a known command.
- */
- public static void openInstaller() {
- ProvUI.openUpdateManagerInstaller(null);
- }
-
- /**
- * Open the old UpdateManager configuration manager UI using the specified shell.
- * We do not call the UpdateManagerUI class directly because we want to be able to be configured
- * without requiring those plug-ins. Instead, we invoke a known command.
- */
- public static void openConfigurationManager() {
- ProvUI.openUpdateManagerConfigurationManager(null);
- }
-
- private static void logFail(Throwable t) {
- Status failStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, t.getLocalizedMessage(), t);
- ProvUI.reportStatus(failStatus, StatusManager.LOG);
- }
-
- private static String getWritableXMLString(String value) {
- StringBuffer buf = new StringBuffer();
- if (value == null)
- return buf.toString();
- for (int i = 0; i < value.length(); i++) {
- char c = value.charAt(i);
- switch (c) {
- case '&' :
- buf.append("&amp;"); //$NON-NLS-1$
- break;
- case '<' :
- buf.append("&lt;"); //$NON-NLS-1$
- break;
- case '>' :
- buf.append("&gt;"); //$NON-NLS-1$
- break;
- case '\'' :
- buf.append("&apos;"); //$NON-NLS-1$
- break;
- case '\"' :
- buf.append("&quot;"); //$NON-NLS-1$
- break;
- default :
- buf.append(c);
- break;
- }
- }
- return buf.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java
deleted file mode 100644
index fe2d060d6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ValidationDialogServiceUI.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui;
-
-import java.security.cert.Certificate;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.ui.dialogs.TrustCertificateDialog;
-import org.eclipse.equinox.internal.p2.ui.dialogs.UserValidationDialog;
-import org.eclipse.equinox.internal.p2.ui.viewers.CertificateLabelProvider;
-import org.eclipse.equinox.p2.core.UIServices;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The default GUI-based implementation of {@link UIServices}.
- * The service declaration is made in the serviceui_component.xml file.
-
- */
-public class ValidationDialogServiceUI extends UIServices {
- /**
- * Subclassed to add a cancel button to the error dialog.
- */
- static class OkCancelErrorDialog extends ErrorDialog {
-
- public OkCancelErrorDialog(Shell parentShell, String dialogTitle, String message, IStatus status, int displayMask) {
- super(parentShell, dialogTitle, message, status, displayMask);
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- // create OK and Details buttons
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
- createDetailsButton(parent);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.IServiceUI#getUsernamePassword(java.lang.String)
- */
- public AuthenticationInfo getUsernamePassword(final String location) {
-
- final AuthenticationInfo[] result = new AuthenticationInfo[1];
- if (!suppressAuthentication() && !isHeadless()) {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- Shell shell = ProvUI.getDefaultParentShell();
- String message = NLS.bind(ProvUIMessages.ServiceUI_LoginDetails, location);
- UserValidationDialog dialog = new UserValidationDialog(shell, ProvUIMessages.ServiceUI_LoginRequired, null, message);
- if (dialog.open() == Window.OK) {
- result[0] = dialog.getResult();
- }
- }
-
- });
- }
- return result[0];
- }
-
- private boolean suppressAuthentication() {
- Job job = Job.getJobManager().currentJob();
- if (job != null) {
- return job.getProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER) != null;
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.IServiceUI#showCertificates(java.lang.Object)
- */
- public TrustInfo getTrustInfo(Certificate[][] untrustedChains, final String[] unsignedDetail) {
- boolean trustUnsigned = true;
- boolean persistTrust = false;
- Certificate[] trusted = new Certificate[0];
- // Some day we may summarize all of this in one UI, or perhaps we'll have a preference to honor regarding
- // unsigned content. For now we prompt separately first as to whether unsigned detail should be trusted
- if (!isHeadless() && unsignedDetail != null && unsignedDetail.length > 0) {
- final boolean[] result = new boolean[] {false};
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- Shell shell = ProvUI.getDefaultParentShell();
- OkCancelErrorDialog dialog = new OkCancelErrorDialog(shell, ProvUIMessages.ServiceUI_warning_title, null, createStatus(), IStatus.WARNING);
- result[0] = dialog.open() == IDialogConstants.OK_ID;
- }
-
- private IStatus createStatus() {
- MultiStatus parent = new MultiStatus(ProvUIActivator.PLUGIN_ID, 0, ProvUIMessages.ServiceUI_unsigned_message, null);
- for (int i = 0; i < unsignedDetail.length; i++) {
- parent.add(new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, unsignedDetail[i]));
- }
- return parent;
- }
- });
- trustUnsigned = result[0];
- }
- // For now, there is no need to show certificates if there was unsigned content and we don't trust it.
- if (!trustUnsigned)
- return new TrustInfo(trusted, persistTrust, trustUnsigned);
-
- // We've established trust for unsigned content, now examine the untrusted chains
- if (!isHeadless() && untrustedChains != null && untrustedChains.length > 0) {
-
- final Object[] result = new Object[1];
- final TreeNode[] input = createTreeNodes(untrustedChains);
-
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- Shell shell = ProvUI.getDefaultParentShell();
- ILabelProvider labelProvider = new CertificateLabelProvider();
- TreeNodeContentProvider contentProvider = new TreeNodeContentProvider();
- TrustCertificateDialog trustCertificateDialog = new TrustCertificateDialog(shell, input, labelProvider, contentProvider);
- trustCertificateDialog.open();
- Certificate[] values = new Certificate[trustCertificateDialog.getResult() == null ? 0 : trustCertificateDialog.getResult().length];
- for (int i = 0; i < values.length; i++) {
- values[i] = (Certificate) ((TreeNode) trustCertificateDialog.getResult()[i]).getValue();
- }
- result[0] = values;
- }
- });
- persistTrust = true;
- trusted = (Certificate[]) result[0];
- }
- return new TrustInfo(trusted, persistTrust, trustUnsigned);
- }
-
- private TreeNode[] createTreeNodes(Certificate[][] certificates) {
- TreeNode[] children = new TreeNode[certificates.length];
- for (int i = 0; i < certificates.length; i++) {
- TreeNode head = new TreeNode(certificates[i][0]);
- TreeNode parent = head;
- children[i] = head;
- for (int j = 0; j < certificates[i].length; j++) {
- TreeNode node = new TreeNode(certificates[i][j]);
- node.setParent(parent);
- parent.setChildren(new TreeNode[] {node});
- parent = node;
- }
- }
- return children;
- }
-
- public AuthenticationInfo getUsernamePassword(final String location, final AuthenticationInfo previousInfo) {
-
- final AuthenticationInfo[] result = new AuthenticationInfo[1];
- if (!suppressAuthentication() && !isHeadless()) {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
- public void run() {
- Shell shell = ProvUI.getDefaultParentShell();
- String message = null;
- if (previousInfo.saveResult())
- message = NLS.bind(ProvUIMessages.ProvUIMessages_SavedNotAccepted_EnterFor_0, location);
- else
- message = NLS.bind(ProvUIMessages.ProvUIMessages_NotAccepted_EnterFor_0, location);
-
- UserValidationDialog dialog = new UserValidationDialog(previousInfo, shell, ProvUIMessages.ServiceUI_LoginRequired, null, message);
- if (dialog.open() == Window.OK) {
- result[0] = dialog.getResult();
- }
- }
-
- });
- }
- return result[0];
- }
-
- private boolean isHeadless() {
- // If there is no UI available and we are still the IServiceUI,
- // assume that the operation should proceed. See
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=291049
- return !PlatformUI.isWorkbenchRunning();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java
deleted file mode 100644
index 2bbcacca5..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ColocatedRepositoryAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.actions;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-public abstract class ColocatedRepositoryAction extends ProvisioningAction {
-
- public ColocatedRepositoryAction(ProvisioningUI ui, String label, String tooltipText, ISelectionProvider selectionProvider) {
- super(ui, label, selectionProvider);
- setToolTipText(tooltipText);
- init();
- }
-
- protected URI[] getSelectedLocations(Object[] selectionArray) {
- List<URI> urls = new ArrayList<URI>();
- for (int i = 0; i < selectionArray.length; i++) {
- if (selectionArray[i] instanceof MetadataRepositoryElement)
- urls.add(((MetadataRepositoryElement) selectionArray[i]).getLocation());
- }
- return urls.toArray(new URI[urls.size()]);
- }
-
- protected void checkEnablement(Object[] selectionArray) {
- setEnabled(getSelectedLocations(selectionArray).length > 0);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java
deleted file mode 100644
index 2fd597018..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ExistingIUInProfileAction.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.actions;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-/**
- *
- * Abstract class that implements the enablement rules for actions that
- * affect IU's already in a profile. The action only enables when all of the
- * IU's involved are top level IU's from the same profile.
- *
- * @since 3.5
- *
- */
-public abstract class ExistingIUInProfileAction extends ProfileModificationAction {
-
- public ExistingIUInProfileAction(ProvisioningUI ui, String label, ISelectionProvider selectionProvider, String profileId) {
- super(ui, label, selectionProvider, profileId);
- }
-
- protected boolean isEnabledFor(Object[] selectionArray) {
- Object parent = null;
- // We don't want to prompt for a profile during validation,
- // so we only consider the profile id that was set, or the profile
- // referred to by the element itself..
- IProfile profile = getProfile();
- if (selectionArray.length > 0) {
- for (int i = 0; i < selectionArray.length; i++) {
- if (selectionArray[i] instanceof InstalledIUElement) {
- InstalledIUElement element = (InstalledIUElement) selectionArray[i];
- // If the parents are different, then they are either from
- // different profiles or are nested in different parts of the tree.
- // Either way, this makes the selection invalid.
- if (parent == null) {
- parent = element.getParent(element);
- } else if (parent != element.getParent(element)) {
- return false;
- }
- // Now consider the validity of the element on its own
- if (!isSelectable(element.getIU(), profile))
- return false;
- } else {
- IInstallableUnit iu = ProvUI.getAdapter(selectionArray[i], IInstallableUnit.class);
- if (iu == null || !isSelectable(iu))
- return false;
- }
- }
- return true;
- }
- return false;
- }
-
- protected boolean isSelectable(IIUElement element) {
- if (!super.isSelectable(element))
- return false;
- Object parent = element.getParent(element);
- if (parent != null) {
- IProfile profile = ProvUI.getAdapter(parent, IProfile.class);
- if (profile != null)
- return isSelectable(element.getIU(), profile);
- }
- return false;
- }
-
- protected boolean isSelectable(IInstallableUnit iu) {
- if (!super.isSelectable(iu))
- return false;
- return isSelectable(iu, getProfile());
- }
-
- private boolean isSelectable(IInstallableUnit iu, IProfile profile) {
- int lock = getLock(profile, iu);
- if ((lock & getLockConstant()) == getLockConstant())
- return false;
- return !profile.query(QueryUtil.createPipeQuery(QueryUtil.createIUQuery(iu), getPolicy().getVisibleInstalledIUQuery()), null).isEmpty();
- }
-
- protected abstract int getLockConstant();
-}
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
deleted file mode 100644
index 7ff6ad328..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProfileModificationAction.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.actions;
-
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-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;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-public abstract class ProfileModificationAction extends ProvisioningAction {
- public static final int ACTION_NOT_RUN = -1;
- String profileId;
- int result = ACTION_NOT_RUN;
-
- protected ProfileModificationAction(ProvisioningUI ui, String text, ISelectionProvider selectionProvider, String profileId) {
- super(ui, text, selectionProvider);
- this.ui = ui;
- this.profileId = profileId;
- init();
- }
-
- public void run() {
- Collection<IInstallableUnit> ius = getSelectedIUs();
- // No ius or no profile?
- if (isInvalidProfileId() || ius.size() == 0) {
- ProvUI.reportStatus(getNoProfileOrSelectionStatus(profileId, ius), StatusManager.BLOCK);
- runCanceled();
- return;
- }
- run(ius, profileId);
- }
-
- protected boolean isInvalidProfileId() {
- return profileId == null;
- }
-
- public IProfile getProfile() {
- String id = profileId == null ? ui.getProfileId() : profileId;
- return ProvUI.getProfileRegistry(ui.getSession()).getProfile(id);
- }
-
- 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(Collection<IInstallableUnit> ius);
-
- protected void run(final Collection<IInstallableUnit> ius, final String id) {
- final ProfileChangeOperation operation = getProfileChangeOperation(ius);
- ProvisioningJob job = operation.getResolveJob(null);
- if (job == null) {
- ProvUI.reportStatus(operation.getResolutionResult(), StatusManager.SHOW);
- } else {
- job.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
-
- if (PlatformUI.isWorkbenchRunning()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (validateOperation(operation))
- performAction(operation, ius);
- }
- });
- }
-
- }
-
- });
- getProvisioningUI().schedule(job, StatusManager.SHOW | StatusManager.LOG);
- }
- // Since we are resolving asynchronously, our job is done. Setting this allows
- // callers to decide to close the launching window.
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=236495
- result = Window.OK;
- }
-
- /**
- * Get the integer return code returned by any wizards launched by this
- * action. If the action has not been run, return ACTION_NOT_RUN. If the
- * action does not open a wizard, return Window.OK if the operation was performed,
- * and Window.CANCEL if it was canceled.
- *
- * @return integer return code
- */
- public int getReturnCode() {
- return result;
- }
-
- /**
- * Validate the operation and return true if the operation should
- * be performed with plan. Report any errors to the user before returning false.
- * @param operation
- * @return a boolean indicating whether the operation should be used in a
- * provisioning operation.
- */
- protected boolean validateOperation(ProfileChangeOperation operation) {
- if (operation != null) {
- return getPolicy().continueWorkingWithOperation(operation, getShell());
- }
- return false;
- }
-
- protected abstract int performAction(ProfileChangeOperation operation, Collection<IInstallableUnit> ius);
-
- protected IInstallableUnit getIU(Object element) {
- return ProvUI.getAdapter(element, IInstallableUnit.class);
-
- }
-
- /**
- * Return an array of the selected and valid installable units.
- * The number of IInstallableUnits in the array may be different than
- * the actual number of selections in the action's selection provider.
- * That is, if the action is disabled due to invalid selections,
- * this method will return those selections that were valid.
- *
- * @return an array of selected IInstallableUnit that meet the
- * enablement criteria for the action.
- */
- protected List<IInstallableUnit> getSelectedIUs() {
- List<?> elements = getStructuredSelection().toList();
- List<IInstallableUnit> iusList = new ArrayList<IInstallableUnit>(elements.size());
-
- for (int i = 0; i < elements.size(); i++) {
- if (elements.get(i) instanceof IIUElement) {
- IIUElement element = (IIUElement) elements.get(i);
- if (isSelectable(element))
- iusList.add(getIU(element));
- } else {
- IInstallableUnit iu = ProvUI.getAdapter(elements.get(i), IInstallableUnit.class);
- if (iu != null && isSelectable(iu))
- iusList.add(iu);
- }
- }
- return iusList;
- }
-
- protected boolean isSelectable(IIUElement element) {
- return !(element instanceof CategoryElement);
- }
-
- protected boolean isSelectable(IInstallableUnit iu) {
- return !ProvUI.isCategory(iu);
- }
-
- protected LicenseManager getLicenseManager() {
- return getProvisioningUI().getLicenseManager();
- }
-
- protected QueryProvider getQueryProvider() {
- return ProvUI.getQueryProvider();
- }
-
- protected final void checkEnablement(Object[] selections) {
- if (isEnabledFor(selections)) {
- setEnabled(!getProvisioningUI().hasScheduledOperations());
- } else
- setEnabled(false);
- }
-
- protected abstract boolean isEnabledFor(Object[] selections);
-
- protected int getLock(IProfile profile, IInstallableUnit iu) {
- if (profile == null)
- return IProfile.LOCK_NONE;
- try {
- String value = profile.getInstallableUnitProperty(iu, IProfile.PROP_PROFILE_LOCKED_IU);
- if (value != null)
- return Integer.parseInt(value);
- } catch (NumberFormatException e) {
- // ignore and assume no lock
- }
- return IProfile.LOCK_NONE;
- }
-
- protected String getProfileProperty(IProfile profile, IInstallableUnit iu, String propertyName) {
- if (profile == null || iu == null)
- return null;
- return profile.getInstallableUnitProperty(iu, propertyName);
- }
-
- protected void runCanceled() {
- // The action was canceled, do any cleanup needed before
- // it is run again.
- result = Window.CANCEL;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/PropertyDialogAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/PropertyDialogAction.java
deleted file mode 100644
index b521e1796..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/PropertyDialogAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.actions;
-
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.IShellProvider;
-
-/**
- * PropertyDialogAction which sets its enablement on construction.
- *
- * @since 3.4
- *
- */
-
-public class PropertyDialogAction extends org.eclipse.ui.dialogs.PropertyDialogAction {
- public PropertyDialogAction(IShellProvider shell, ISelectionProvider provider) {
- super(shell, provider);
- // prime the selection validation
- ISelection selection = provider.getSelection();
- if (selection instanceof IStructuredSelection) {
- selectionChanged((IStructuredSelection) selection);
- } else {
- selectionChanged(selection);
- }
-
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
deleted file mode 100644
index 00a40e2d9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/ProvisioningAction.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.SelectionProviderAction;
-
-public abstract class ProvisioningAction extends SelectionProviderAction {
- ProvisioningUI ui;
-
- protected ProvisioningAction(ProvisioningUI ui, String text, ISelectionProvider selectionProvider) {
- super(selectionProvider, text);
- this.ui = ui;
- }
-
- /*
- * perform initialization that should be done after creation.
- */
- protected void init() {
- // prime the selection validation
- ISelection selection = getSelection();
- if (selection instanceof IStructuredSelection) {
- selectionChanged((IStructuredSelection) selection);
- } else {
- selectionChanged(selection);
- }
- }
-
- protected Shell getShell() {
- return ProvUI.getDefaultParentShell();
- }
-
- /*
- * Overridden to use the selection from the selection provider, not the one
- * from the triggering event. Some selection providers reinterpret the raw selections
- * (non-Javadoc)
- * @see org.eclipse.ui.actions.SelectionProviderAction#selectionChanged(org.eclipse.jface.viewers.IStructuredSelection)
- */
- public final void selectionChanged(IStructuredSelection selection) {
- ISelection providerSelection = getSelectionProvider().getSelection();
- if (providerSelection instanceof IStructuredSelection) {
- checkEnablement(((IStructuredSelection) providerSelection).toArray());
- } else {
- // shouldn't really happen, but a provider could decide to de-structure the selection
- selectionChanged(providerSelection);
- }
- }
-
- protected void checkEnablement(Object[] selections) {
- // Default is to nothing
- }
-
- /**
- * Recheck the enablement. Called by clients when some condition outside of
- * the action that may effect its enablement should be changed.
- */
- public final void checkEnablement() {
- ISelection selection = getSelection();
- if (selection instanceof IStructuredSelection) {
- checkEnablement(((IStructuredSelection) selection).toArray());
- } else {
- selectionChanged(selection);
- }
- }
-
- protected ProvisioningSession getSession() {
- return ui.getSession();
- }
-
- protected Policy getPolicy() {
- return ui.getPolicy();
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ui;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java
deleted file mode 100644
index d3061acaf..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RefreshAction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @since 3.4
- *
- */
-public abstract class RefreshAction extends ProvisioningAction {
-
- /**
- */
- public RefreshAction(ProvisioningUI ui, ISelectionProvider selectionProvider, Control control) {
- super(ui, ProvUIMessages.RefreshAction_Label, selectionProvider);
- setToolTipText(ProvUIMessages.RefreshAction_Tooltip);
- hookKeyListener(control);
- init();
- }
-
- private void hookKeyListener(Control control) {
- control.addKeyListener(new KeyAdapter() {
- public void keyReleased(KeyEvent e) {
- handleKeyReleased(e);
- }
- });
- }
-
- public void run() {
- refresh();
- }
-
- protected abstract void refresh();
-
- /**
- * Handle a key released event. Used internally and also
- * made available so that clients can watch key events from
- * any other controls and dispatch to this action.
- *
- * @param event the key event
- */
- public void handleKeyReleased(KeyEvent event) {
- if (event.keyCode == SWT.F5 && event.stateMask == 0) {
- refresh();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java
deleted file mode 100644
index f794bb9a6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/RemoveColocatedRepositoryAction.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.actions;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-public class RemoveColocatedRepositoryAction extends ColocatedRepositoryAction {
-
- public RemoveColocatedRepositoryAction(ProvisioningUI ui, ISelectionProvider selectionProvider) {
- super(ui, ProvUIMessages.RemoveColocatedRepositoryAction_Label, ProvUIMessages.RemoveColocatedRepositoryAction_Tooltip, selectionProvider);
-
- }
-
- public void run() {
- ui.getRepositoryTracker().removeRepositories(getSelectedLocations(getStructuredSelection().toArray()), ui.getSession());
- }
-}
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
deleted file mode 100644
index 5bb281f35..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UninstallAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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
- * 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;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.operations.UninstallOperation;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-public class UninstallAction extends ExistingIUInProfileAction {
-
- public UninstallAction(ProvisioningUI ui, ISelectionProvider selectionProvider, String profileId) {
- super(ui, ProvUI.UNINSTALL_COMMAND_LABEL, selectionProvider, profileId);
- setToolTipText(ProvUI.UNINSTALL_COMMAND_TOOLTIP);
- }
-
- protected String getTaskName() {
- return ProvUIMessages.UninstallIUProgress;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.AlterExistingProfileIUAction#getLockConstant()
- */
- protected int getLockConstant() {
- return IProfile.LOCK_UNINSTALL;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#getProfileChangeOperation(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
- */
- 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, Collection<IInstallableUnit> ius) {
- return ui.openUninstallWizard(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
deleted file mode 100644
index 289c52375..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/actions/UpdateAction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * 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
- * 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;
-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.UpdateOperation;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.ISelectionProvider;
-
-public class UpdateAction extends ExistingIUInProfileAction {
-
- protected IUElementListRoot root; // root that will be used to seed the wizard
- protected ArrayList<?> initialSelections; // the elements that should be selected in the wizard
- boolean resolveIsVisible = true;
- boolean skipSelectionPage = false;
-
- public UpdateAction(ProvisioningUI ui, ISelectionProvider selectionProvider, String profileId, boolean resolveIsVisible) {
- super(ui, ProvUI.UPDATE_COMMAND_LABEL, selectionProvider, profileId);
- setToolTipText(ProvUI.UPDATE_COMMAND_TOOLTIP);
- this.resolveIsVisible = resolveIsVisible;
- }
-
- public void setSkipSelectionPage(boolean skipSelectionPage) {
- this.skipSelectionPage = skipSelectionPage;
- }
-
- protected String getTaskName() {
- return ProvUIMessages.UpdateIUProgress;
- }
-
- protected boolean isResolveUserVisible() {
- return resolveIsVisible;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.actions.AlterExistingProfileIUAction#getLockConstant()
- */
- protected int getLockConstant() {
- return IProfile.LOCK_UPDATE;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.actions.ProfileModificationAction#getProfileChangeOperation(org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit[])
- */
- 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, Collection<IInstallableUnit> ius) {
- return ui.openUpdateWizard(skipSelectionPage, (UpdateOperation) operation, null);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java
deleted file mode 100644
index 4f3fc876d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AddRepositoryDialog.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.equinox.internal.p2.ui.IProvHelpContextIds;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Abstract dialog class for adding repositories of different types. This class
- * assumes the user view of a repository is a name and URI. Individual subclasses
- * will dictate what kind of repository and how it's created.
- *
- * @since 3.4
- *
- */
-public abstract class AddRepositoryDialog extends RepositoryNameAndLocationDialog {
-
- URI addedLocation;
- static final String[] ARCHIVE_EXTENSIONS = new String[] {"*.jar;*.zip"}; //$NON-NLS-1$
- static String lastLocalLocation = null;
- static String lastArchiveLocation = null;
- Policy policy;
-
- public AddRepositoryDialog(Shell parentShell, ProvisioningUI ui) {
- super(parentShell, ui);
- setTitle(ProvUIMessages.AddRepositoryDialog_Title);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parentShell, IProvHelpContextIds.ADD_REPOSITORY_DIALOG);
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite comp = new Composite(parent, SWT.NONE);
- initializeDialogUnits(comp);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.marginTop = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-
- comp.setLayout(layout);
- GridData data = new GridData();
- comp.setLayoutData(data);
-
- // Name: []
- nickname = createNameField(comp);
-
- Button localButton = new Button(comp, SWT.PUSH);
- localButton.setText(ProvUIMessages.RepositoryGroup_LocalRepoBrowseButton);
- localButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- DirectoryDialog dialog = new DirectoryDialog(getShell(), SWT.APPLICATION_MODAL);
- dialog.setMessage(ProvUIMessages.RepositoryGroup_SelectRepositoryDirectory);
- dialog.setFilterPath(lastLocalLocation);
- String path = dialog.open();
- if (path != null) {
- lastLocalLocation = path;
- url.setText(makeLocalURIString(path));
- validateRepositoryURL(false);
- }
- }
- });
- setButtonLayoutData(localButton);
-
- // Location: []
- url = createLocationField(comp);
-
- Button archiveButton = new Button(comp, SWT.PUSH);
- archiveButton.setText(ProvUIMessages.RepositoryGroup_ArchivedRepoBrowseButton);
- archiveButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- FileDialog dialog = new FileDialog(getShell(), SWT.APPLICATION_MODAL);
- dialog.setText(ProvUIMessages.RepositoryGroup_RepositoryFile);
- dialog.setFilterExtensions(ARCHIVE_EXTENSIONS);
- dialog.setFileName(lastArchiveLocation);
- String path = dialog.open();
- if (path != null) {
- lastArchiveLocation = path;
- url.setText(makeLocalURIString(path));
- validateRepositoryURL(false);
- }
- }
- });
- setButtonLayoutData(archiveButton);
- comp.setTabList(new Control[] {nickname, url, localButton, archiveButton});
- Dialog.applyDialogFont(comp);
- return comp;
- }
-
- String makeLocalURIString(String path) {
- try {
- URI localURI = URIUtil.fromString(path);
- return URIUtil.toUnencodedString(RepositoryHelper.localRepoURIHelper(localURI));
- } catch (URISyntaxException e) {
- return path;
- }
- }
-
- protected boolean handleOk() {
- IStatus status = addRepository();
- return status.isOK();
- }
-
- /**
- * Get the location of the repository that was added by this dialog. Return <code>null</code>
- * if the dialog has not yet added a repository location.
- *
- * @return the location of the repository that has been added by this dialog, or <code>null</code>
- * if no repository has been added.
- */
- public URI getAddedLocation() {
- return addedLocation;
- }
-
- protected IStatus addRepository() {
- IStatus status = validateRepositoryURL(false);
- if (status.isOK()) {
- addedLocation = getUserLocation();
- String nick = nickname.getText().trim();
- if (nick.length() == 0)
- nick = null;
- getRepositoryTracker().addRepository(addedLocation, nick, getProvisioningUI().getSession());
- }
- return status;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java
deleted file mode 100644
index 57cd024cf..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ApplyProfileChangesDialog.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.core.runtime.IProduct;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A dialog which prompts the user to restart.
- *
- * @since 3.4
- */
-public class ApplyProfileChangesDialog extends MessageDialog {
- public static final int PROFILE_IGNORE = 0;
- public static final int PROFILE_APPLYCHANGES = 1;
- public static final int PROFILE_RESTART = 2;
- private final static String[] yesNo = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL};
- private final static String[] yesNoApply = new String[] {ProvUIMessages.ApplyProfileChangesDialog_Restart, ProvUIMessages.ApplyProfileChangesDialog_NotYet, ProvUIMessages.ApplyProfileChangesDialog_ApplyChanges};
-
- private int returnCode = PROFILE_IGNORE;
-
- private ApplyProfileChangesDialog(Shell parent, String title, String message, boolean mustRestart) {
- super(parent, title, null, // accept the default window icon
- message, QUESTION, mustRestart ? yesNo : yesNoApply, 0); // yes is the default
- }
-
- /**
- * Prompt the user for restart or apply profile changes.
- *
- * @param parent the parent shell of the dialog, or <code>null</code> if none
- * @param mustRestart indicates whether the user must restart to get the
- * changes. If <code>false</code>, then the user may choose to apply
- * the changes to the running profile rather than restarting.
- * @return one of PROFILE_IGNORE (do nothing), PROFILE_APPLYCHANGES
- * (attempt to apply the changes), or PROFILE_RESTART (restart the system).
- */
- public static int promptForRestart(Shell parent, boolean mustRestart) {
- String title = ProvUIMessages.PlatformUpdateTitle;
- IProduct product = Platform.getProduct();
- String productName = product != null && product.getName() != null ? product.getName() : ProvUIMessages.ApplicationInRestartDialog;
- String message = NLS.bind(mustRestart ? ProvUIMessages.PlatformRestartMessage : ProvUIMessages.OptionalPlatformRestartMessage, productName);
- ApplyProfileChangesDialog dialog = new ApplyProfileChangesDialog(parent, title, message, mustRestart);
- if (dialog.open() == Window.CANCEL)
- return PROFILE_IGNORE;
- return dialog.returnCode;
- }
-
- /**
- * When a button is pressed, store the return code.
- *
- * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
- */
- protected void buttonPressed(int id) {
- if (id == 0) { // YES
- returnCode = PROFILE_RESTART;
- } else if (id == 1) { // NO
- returnCode = PROFILE_IGNORE;
- } else {
- returnCode = PROFILE_APPLYCHANGES;
- }
-
- super.buttonPressed(id);
- }
-}
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
deleted file mode 100644
index aab30eb38..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUGroup.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.URI;
-import java.util.ArrayList;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.internal.p2.ui.viewers.*;
-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.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * An AvailableIUGroup is a reusable UI component that displays the
- * IU's available for installation. By default, content from all available
- * repositories is shown.
- *
- * @since 3.4
- */
-public class AvailableIUGroup extends StructuredIUGroup {
-
- /**
- * Show contents from all repositories
- */
- public static final int AVAILABLE_ALL = 1;
-
- /**
- * Don't show any repository content
- */
- public static final int AVAILABLE_NONE = 2;
-
- /**
- * Show local repository content
- */
- public static final int AVAILABLE_LOCAL = 3;
-
- /**
- * Show content for a specific repository
- */
- public static final int AVAILABLE_SPECIFIED = 4;
-
- IUViewQueryContext queryContext;
- int filterConstant = AVAILABLE_ALL;
- URI repositoryFilter;
- QueryableMetadataRepositoryManager queryableManager;
- // We restrict the type of the filter used because PatternFilter does
- // unnecessary accesses of children that cause problems with the deferred
- // tree.
- AvailableIUPatternFilter filter;
- private boolean useBold = false;
- private IUDetailsLabelProvider labelProvider;
- private int repoFlags;
- Display display;
- DelayedFilterCheckboxTree filteredTree;
- Job lastRequestedLoadJob;
-
- /**
- * Create a group that represents the available IU's from all available
- * repositories. The default policy controls the visibility flags for
- * repositories and IU's.
- *
- * @param parent the parent composite for the group
- */
- public AvailableIUGroup(ProvisioningUI ui, final Composite parent) {
- this(ui, parent, parent.getFont(), null, getDefaultColumnConfig(), AVAILABLE_ALL);
- }
-
- private static IUColumnConfig[] getDefaultColumnConfig() {
- // increase primary column width because we might be nesting names under categories and require more space than a flat list
- IUColumnConfig nameColumn = new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH + 15);
- IUColumnConfig versionColumn = new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_COLUMN_WIDTH);
- return new IUColumnConfig[] {nameColumn, versionColumn};
- }
-
- /**
- * Create a group that represents the available IU's.
- *
- * @param ui the policy to use for deciding what should be shown
- * @param parent the parent composite for the group
- * @param font The font to use for calculating pixel sizes. This font is
- * not managed by the receiver.
- * @param queryContext the IUViewQueryContext that determines additional
- * information about what is shown, such as the visible repositories
- * @param columnConfig the description of the columns that should be shown. If <code>null</code>, a default
- * will be used.
- * @param filterConstant a constant specifying which repositories are used when showing content
- */
- public AvailableIUGroup(ProvisioningUI ui, final Composite parent, Font font, IUViewQueryContext queryContext, IUColumnConfig[] columnConfig, int filterConstant) {
- super(ui, parent, font, columnConfig);
- this.display = parent.getDisplay();
- if (queryContext == null)
- this.queryContext = ProvUI.getQueryContext(getPolicy());
- else
- this.queryContext = queryContext;
- repoFlags = ui.getRepositoryTracker().getMetadataRepositoryFlags();
- this.queryableManager = new QueryableMetadataRepositoryManager(ui, false);
- this.filterConstant = filterConstant;
- this.filter = new AvailableIUPatternFilter(getColumnConfig());
- this.filter.setIncludeLeadingWildcard(true);
- createGroupComposite(parent);
- }
-
- protected StructuredViewer createViewer(Composite parent) {
- // Table of available IU's
- filteredTree = new DelayedFilterCheckboxTree(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, filter, getPreFilterJobProvider());
- final TreeViewer availableIUViewer = filteredTree.getViewer();
-
- // If the user expanded or collapsed anything while we were loading a repo
- // in the background, we would not want to disrupt their work by making
- // a newly loaded visible and expanding it. Setting the load job to null
- // will take care of this.
- availableIUViewer.getTree().addTreeListener(new TreeListener() {
- public void treeCollapsed(TreeEvent e) {
- lastRequestedLoadJob = null;
- }
-
- public void treeExpanded(TreeEvent e) {
- lastRequestedLoadJob = null;
- }
- });
-
- labelProvider = new IUDetailsLabelProvider(filteredTree, getColumnConfig(), getShell());
- labelProvider.setUseBoldFontForFilteredItems(useBold);
- labelProvider.setToolTipProperty(IInstallableUnit.PROP_DESCRIPTION);
-
- // Filters and sorters before establishing content, so we don't refresh unnecessarily.
- IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
- comparator.useColumnConfig(getColumnConfig());
- availableIUViewer.setComparator(comparator);
- availableIUViewer.setComparer(new ProvElementComparer());
-
- // Now the content provider.
- DeferredQueryContentProvider contentProvider = new DeferredQueryContentProvider();
- availableIUViewer.setContentProvider(contentProvider);
-
- // Now the presentation, columns before label provider.
- setTreeColumns(availableIUViewer.getTree());
- availableIUViewer.setLabelProvider(labelProvider);
-
- // Notify the filtered tree so that it can hook listeners on the
- // content provider. This is needed so that filtering is only allowed
- // after content has been retrieved.
- filteredTree.contentProviderSet(contentProvider);
-
- final StructuredViewerProvisioningListener listener = new StructuredViewerProvisioningListener(getClass().getName(), availableIUViewer, ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY) {
- protected void repositoryAdded(final RepositoryEvent event) {
- makeRepositoryVisible(event.getRepositoryLocation());
- }
-
- protected void refreshViewer() {
- final TreeViewer treeViewer = filteredTree.getViewer();
- final Tree tree = treeViewer.getTree();
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench.isClosing())
- return;
- if (tree != null && !tree.isDisposed()) {
- updateAvailableViewState();
- }
-
- }
- };
- ProvUIActivator.getDefault().addProvisioningListener(listener);
-
- availableIUViewer.getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- ProvUIActivator.getDefault().removeProvisioningListener(listener);
- }
- });
- updateAvailableViewState();
- return availableIUViewer;
- }
-
- private void setTreeColumns(Tree tree) {
- tree.setHeaderVisible(true);
-
- IUColumnConfig[] cols = getColumnConfig();
- for (int i = 0; i < cols.length; i++) {
- TreeColumn tc = new TreeColumn(tree, SWT.NONE, i);
- tc.setResizable(true);
- tc.setText(cols[i].getColumnTitle());
- tc.setWidth(cols[i].getWidthInPixels(tree));
- }
- }
-
- Object getNewInput() {
- if (repositoryFilter != null) {
- return new MetadataRepositoryElement(queryContext, getProvisioningUI(), repositoryFilter, true);
- } else if (filterConstant == AVAILABLE_NONE) {
- // Dummy object that explains empty site list
- return new ProvElement(null) {
- public Object[] getChildren(Object o) {
- String description;
- String name;
- int severity;
- if (!getPolicy().getRepositoriesVisible()) {
- // shouldn't get here ideally. No sites and no way to add any.
- severity = IStatus.ERROR;
- name = ProvUIMessages.AvailableIUGroup_NoSitesConfiguredExplanation;
- description = ProvUIMessages.AvailableIUGroup_NoSitesConfiguredDescription;
- } else {
- severity = IStatus.INFO;
- name = ProvUIMessages.AvailableIUGroup_NoSitesExplanation;
- description = ProvUIMessages.ColocatedRepositoryManipulator_NoContentExplanation;
- }
- return new Object[] {new EmptyElementExplanation(null, severity, name, description)};
- }
-
- public String getLabel(Object o) {
- // Label not needed for input
- return null;
- }
- };
- } else {
- queryableManager.setRespositoryFlags(repoFlags);
- return new MetadataRepositories(queryContext, getProvisioningUI(), queryableManager);
- }
- }
-
- /**
- * Set a boolean indicating whether a bold font should be used when
- * showing filtered items. This method does not refresh the tree or
- * labels, so that must be done explicitly by the caller.
- * @param useBoldFont
- */
- public void setUseBoldFontForFilteredItems(boolean useBoldFont) {
- if (labelProvider != null)
- labelProvider.setUseBoldFontForFilteredItems(useBoldFont);
- }
-
- /**
- * Return the composite that contains the controls in this group.
- * @return the composite
- */
- public Composite getComposite() {
- return super.getComposite();
- }
-
- /**
- * Get the viewer used to represent the available IU's
- * @return the viewer
- */
- public StructuredViewer getStructuredViewer() {
- return super.getStructuredViewer();
- }
-
- /**
- * Get the selected IU's
- * @return the array of selected IU's
- */
- // overridden for visibility in the public package
- public java.util.List<IInstallableUnit> getSelectedIUs() {
- return super.getSelectedIUs();
- }
-
- // overridden to weed out non-IU elements, such as repositories or empty explanations
- public Object[] getSelectedIUElements() {
- Object[] elements = ((IStructuredSelection) viewer.getSelection()).toArray();
- ArrayList<Object> list = new ArrayList<Object>(elements.length);
- for (int i = 0; i < elements.length; i++)
- if (ElementUtils.getIU(elements[i]) != null)
- list.add(elements[i]);
- return list.toArray();
- }
-
- public CheckboxTreeViewer getCheckboxTreeViewer() {
- return filteredTree.getCheckboxTreeViewer();
- }
-
- /**
- * Get the selected IU's
- * @return the array of checked IU's
- */
- public IInstallableUnit[] getCheckedLeafIUs() {
- Object[] selections = filteredTree.getCheckboxTreeViewer().getCheckedElements();
- if (selections.length == 0)
- return new IInstallableUnit[0];
- ArrayList<IInstallableUnit> leaves = new ArrayList<IInstallableUnit>(selections.length);
- for (int i = 0; i < selections.length; i++) {
- if (!getCheckboxTreeViewer().getGrayed(selections[i])) {
- IInstallableUnit iu = ProvUI.getAdapter(selections[i], IInstallableUnit.class);
- if (iu != null && !ProvUI.isCategory(iu) && !leaves.contains(iu))
- leaves.add(iu);
- }
- }
- return leaves.toArray(new IInstallableUnit[leaves.size()]);
- }
-
- public Tree getTree() {
- if (viewer == null)
- return null;
- return ((TreeViewer) viewer).getTree();
- }
-
- /*
- * Make the repository with the specified location visible in the viewer.
- */
- void makeRepositoryVisible(final URI location) {
- // If we are viewing by anything other than site, there is no specific way
- // to make a repo visible.
- if (!(queryContext.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_BY_REPO)) {
- if (Display.getCurrent() == null)
- display.asyncExec(new Runnable() {
- public void run() {
- updateAvailableViewState();
- }
- });
- else
- updateAvailableViewState();
- return;
- }
- // First reset the input so that the new repo shows up
- Runnable runnable = new Runnable() {
- public void run() {
- final TreeViewer treeViewer = filteredTree.getViewer();
- final Tree tree = treeViewer.getTree();
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench.isClosing())
- return;
- if (tree != null && !tree.isDisposed()) {
- updateAvailableViewState();
- }
- }
- };
- if (Display.getCurrent() == null)
- display.asyncExec(runnable);
- else
- runnable.run();
- // We don't know if loading will be a fast or slow operation.
- // We do it in a job to be safe, and when it's done, we update
- // the UI.
- Job job = new Job(NLS.bind(ProvUIMessages.AvailableIUGroup_LoadingRepository, URIUtil.toUnencodedString(location))) {
- protected IStatus run(IProgressMonitor monitor) {
- try {
- getProvisioningUI().loadMetadataRepository(location, true, monitor);
- return Status.OK_STATUS;
- } catch (ProvisionException e) {
- return e.getStatus();
- } catch (OperationCanceledException e) {
- return Status.CANCEL_STATUS;
- }
- }
- };
- job.setPriority(Job.LONG);
- job.setSystem(true);
- job.setUser(false);
- job.addJobChangeListener(new JobChangeAdapter() {
- public void done(final IJobChangeEvent event) {
- if (event.getResult().isOK())
- display.asyncExec(new Runnable() {
- @SuppressWarnings("rawtypes")
- public void run() {
- final TreeViewer treeViewer = filteredTree.getViewer();
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench.isClosing())
- return;
- // Expand only if there have been no other jobs started for other repos.
- if (event.getJob() == lastRequestedLoadJob) {
- final Tree tree = treeViewer.getTree();
- if (tree != null && !tree.isDisposed()) {
- TreeItem[] items = tree.getItems();
- for (int i = 0; i < items.length; i++) {
- if (items[i].getData() instanceof IRepositoryElement) {
- URI url = ((IRepositoryElement) items[i].getData()).getLocation();
- if (url.equals(location)) {
- treeViewer.expandToLevel(items[i].getData(), AbstractTreeViewer.ALL_LEVELS);
- tree.select(items[i]);
- return;
- }
- }
- }
- }
- }
- }
- });
- }
- });
- lastRequestedLoadJob = job;
- job.schedule();
- }
-
- public void updateAvailableViewState() {
- if (getTree() == null || getTree().isDisposed())
- return;
- final Composite parent = getComposite().getParent();
- setUseBoldFontForFilteredItems(queryContext.getViewType() != IUViewQueryContext.AVAILABLE_VIEW_FLAT);
-
- BusyIndicator.showWhile(display, new Runnable() {
- public void run() {
- parent.setRedraw(false);
- getCheckboxTreeViewer().setInput(getNewInput());
- parent.layout(true);
- parent.setRedraw(true);
- }
- });
- }
-
- public Control getDefaultFocusControl() {
- if (filteredTree != null)
- return filteredTree.getFilterControl();
- return null;
- }
-
- protected GridData getViewerGridData() {
- GridData data = super.getViewerGridData();
- data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
- return data;
- }
-
- /**
- * Set the checked elements to the specified selections. This method
- * does not force visibility/expansion of the checked elements. If they are not
- * visible, they will not be checked.
- * @param selections
- */
- public void setChecked(Object[] selections) {
- filteredTree.getCheckboxTreeViewer().setCheckedElements(selections);
- // TODO HACK ALERT!
- // Since We don't have API for setAllChecked(boolean), clients have to use this method.
- // We need to signal DelayedFilterCheckboxTree when everything needs to be deselected since
- // we aren't firing an event for each item.
- Object element = selections.length == 0 ? DelayedFilterCheckboxTree.ALL_ITEMS_HACK : selections[0];
- filteredTree.getCheckboxTreeViewer().fireCheckStateChanged(element, selections.length > 0);
- }
-
- public void setRepositoryFilter(int filterFlag, URI repoLocation) {
- // If there has been no change, don't do anything. We will be
- // clearing out selection caches in this method and should not do
- // so if there's really no change.
- if (filterConstant == filterFlag) {
- if (filterConstant != AVAILABLE_SPECIFIED)
- return;
- if (repoLocation != null && repoLocation.equals(repositoryFilter))
- return;
- }
- filterConstant = filterFlag;
-
- switch (filterFlag) {
- case AVAILABLE_ALL :
- case AVAILABLE_NONE :
- repositoryFilter = null;
- repoFlags &= ~IRepositoryManager.REPOSITORIES_LOCAL;
- break;
- case AVAILABLE_LOCAL :
- repositoryFilter = null;
- repoFlags |= IRepositoryManager.REPOSITORIES_LOCAL;
- break;
- default :
- repositoryFilter = repoLocation;
- break;
- }
- updateAvailableViewState();
- filteredTree.clearCheckStateCache();
- }
-
- private IPreFilterJobProvider getPreFilterJobProvider() {
- return new IPreFilterJobProvider() {
-
- public Job getPreFilterJob() {
- switch (filterConstant) {
- case AVAILABLE_ALL :
- Job preFilterJob = new LoadMetadataRepositoryJob(getProvisioningUI());
- preFilterJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- return preFilterJob;
- case AVAILABLE_NONE :
- case AVAILABLE_LOCAL :
- return null;
- default :
- if (repositoryFilter == null)
- return null;
- Job job = new Job("Repository Load Job") { //$NON-NLS-1$
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- getProvisioningUI().loadMetadataRepository(repositoryFilter, false, monitor);
- return Status.OK_STATUS;
- } catch (ProvisionException e) {
- return e.getStatus();
- }
- }
-
- };
- job.setPriority(Job.SHORT);
- return job;
- }
- }
-
- };
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
deleted file mode 100644
index 502f86aeb..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.ui.dialogs.PatternFilter;
-
-/**
- * A class that handles filtering IU's based on a supplied
- * matching string.
- *
- * @since 3.4
- *
- */
-public class AvailableIUPatternFilter extends PatternFilter {
-
- boolean checkName, checkVersion, checkId = false;
- String patternString;
-
- /**
- * Create a new instance of a AvailableIUPatternFilter
- */
- public AvailableIUPatternFilter(IUColumnConfig[] columnConfig) {
- super();
- for (int i = 0; i < columnConfig.length; i++) {
- int field = columnConfig[i].getColumnType();
- if (field == IUColumnConfig.COLUMN_ID)
- checkId = true;
- else if (field == IUColumnConfig.COLUMN_NAME)
- checkName = true;
- else if (field == IUColumnConfig.COLUMN_VERSION)
- checkVersion = true;
- }
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.internal.dialogs.PatternFilter#isElementSelectable(java.lang.Object)
- */
- public boolean isElementSelectable(Object element) {
- return element instanceof IIUElement && !(element instanceof CategoryElement);
- }
-
- /*
- * Overridden to remember the pattern string for an optimization
- * in isParentMatch
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.PatternFilter#setPattern(java.lang.String)
- */
- public void setPattern(String patternString) {
- super.setPattern(patternString);
- this.patternString = patternString;
- }
-
- /*
- * Overridden to avoid getting children unless there is actually
- * a filter.
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.PatternFilter#isParentMatch(org.eclipse.jface.viewers.Viewer, java.lang.Object)
- */
- protected boolean isParentMatch(Viewer viewer, Object element) {
- if (patternString == null || patternString.length() == 0)
- return true;
- return super.isParentMatch(viewer, element);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.dialogs.PatternFilter#isElementMatch(org.eclipse.jface.viewers.Viewer, java.lang.Object)
- */
- protected boolean isLeafMatch(Viewer viewer, Object element) {
- if (element instanceof CategoryElement) {
- return false;
- }
-
- String text = null;
- if (element instanceof IIUElement) {
- IInstallableUnit iu = ((IIUElement) element).getIU();
- if (checkName) {
- // Get the iu name in the default locale
- text = iu.getProperty(IInstallableUnit.PROP_NAME, null);
- if (text != null && wordMatches(text))
- return true;
- }
- if (checkId || (checkName && text == null)) {
- text = iu.getId();
- if (wordMatches(text)) {
- return true;
- }
- }
- if (checkVersion) {
- text = iu.getVersion().toString();
- if (wordMatches(text))
- return true;
- }
- }
- return false;
- }
-}
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
deleted file mode 100644
index 65ade48b4..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
+++ /dev/null
@@ -1,681 +0,0 @@
-/*******************************************************************************
- * 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
- * EclipseSource - ongoing development
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.EmptyElementExplanation;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.internal.p2.ui.viewers.*;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-public class AvailableIUsPage extends ProvisioningWizardPage implements ISelectableIUsPage {
-
- private static final String DIALOG_SETTINGS_SECTION = "AvailableIUsPage"; //$NON-NLS-1$
- private static final String AVAILABLE_VIEW_TYPE = "AvailableViewType"; //$NON-NLS-1$
- private static final String SHOW_LATEST_VERSIONS_ONLY = "ShowLatestVersionsOnly"; //$NON-NLS-1$
- private static final String HIDE_INSTALLED_IUS = "HideInstalledContent"; //$NON-NLS-1$
- private static final String RESOLVE_ALL = "ResolveInstallWithAllSites"; //$NON-NLS-1$
- private static final String NAME_COLUMN_WIDTH = "AvailableNameColumnWidth"; //$NON-NLS-1$
- private static final String VERSION_COLUMN_WIDTH = "AvailableVersionColumnWidth"; //$NON-NLS-1$
- private static final String LIST_WEIGHT = "AvailableListSashWeight"; //$NON-NLS-1$
- private static final String DETAILS_WEIGHT = "AvailableDetailsSashWeight"; //$NON-NLS-1$
- private static final String LINKACTION = "linkAction"; //$NON-NLS-1$
-
- Object[] initialSelections;
- IUViewQueryContext queryContext;
- AvailableIUGroup availableIUGroup;
- Composite availableIUButtonBar;
- Link installLink;
- Button useCategoriesCheckbox, hideInstalledCheckbox, showLatestVersionsCheckbox, resolveAllCheckbox, filterOnEnvCheckBox;
- SashForm sashForm;
- IUColumnConfig nameColumn, versionColumn;
- StructuredViewerProvisioningListener profileListener;
- Display display;
- int batchCount = 0;
- RepositorySelectionGroup repoSelector;
- IUDetailsGroup iuDetailsGroup;
- Label selectionCount;
-
- public AvailableIUsPage(ProvisioningUI ui, ProvisioningOperationWizard wizard) {
- super("AvailableSoftwarePage", ui, wizard); //$NON-NLS-1$
- makeQueryContext();
- setTitle(ProvUIMessages.AvailableIUsPage_Title);
- setDescription(ProvUIMessages.AvailableIUsPage_Description);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
- this.display = parent.getDisplay();
-
- Composite composite = new Composite(parent, SWT.NONE);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- composite.setLayoutData(gd);
- setDropTarget(composite);
-
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
-
- composite.setLayout(layout);
- // Repo manipulation
- createRepoArea(composite);
-
- sashForm = new SashForm(composite, SWT.VERTICAL);
- FillLayout fill = new FillLayout();
- sashForm.setLayout(fill);
- GridData data = new GridData(GridData.FILL_BOTH);
- sashForm.setLayoutData(data);
-
- Composite aboveSash = new Composite(sashForm, SWT.NONE);
- GridLayout grid = new GridLayout();
- grid.marginWidth = 0;
- grid.marginHeight = 0;
- aboveSash.setLayout(grid);
-
- // Now the available group
- // If repositories are visible, we want to default to showing no repos. Otherwise all.
- int filterConstant = AvailableIUGroup.AVAILABLE_NONE;
- if (!getPolicy().getRepositoriesVisible())
- filterConstant = AvailableIUGroup.AVAILABLE_ALL;
- nameColumn = new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH + 15);
- versionColumn = new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_COLUMN_WIDTH);
-
- getColumnWidthsFromSettings();
- availableIUGroup = new AvailableIUGroup(getProvisioningUI(), aboveSash, JFaceResources.getDialogFont(), queryContext, new IUColumnConfig[] {nameColumn, versionColumn}, filterConstant);
-
- // Selection listeners must be registered on both the normal selection
- // events and the check mark events. Must be done after buttons
- // are created so that the buttons can register and receive their selection notifications before us.
- availableIUGroup.getStructuredViewer().addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateDetails();
- iuDetailsGroup.enablePropertyLink(availableIUGroup.getSelectedIUElements().length == 1);
- }
- });
-
- availableIUGroup.getCheckboxTreeViewer().addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- updateSelection();
- }
- });
-
- addViewerProvisioningListeners();
-
- availableIUGroup.setUseBoldFontForFilteredItems(queryContext.getViewType() != IUViewQueryContext.AVAILABLE_VIEW_FLAT);
- setDropTarget(availableIUGroup.getStructuredViewer().getControl());
- activateCopy(availableIUGroup.getStructuredViewer().getControl());
-
- // select buttons
- createSelectButtons(aboveSash);
-
- // Details area
- iuDetailsGroup = new IUDetailsGroup(sashForm, availableIUGroup.getStructuredViewer(), SWT.DEFAULT, true);
-
- sashForm.setWeights(getSashWeights());
-
- // Controls for filtering/presentation/site selection
- Composite controlsComposite = new Composite(composite, SWT.NONE);
- layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = true;
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- controlsComposite.setLayout(layout);
- gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- controlsComposite.setLayoutData(gd);
-
- createViewControlsArea(controlsComposite);
-
- initializeWidgetState();
- setControl(composite);
- composite.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- removeProvisioningListeners();
- }
-
- });
- Dialog.applyDialogFont(composite);
- }
-
- private void createSelectButtons(Composite parent) {
- Composite buttonParent = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- gridLayout.marginWidth = 0;
- gridLayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- buttonParent.setLayout(gridLayout);
-
- GridData data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
- buttonParent.setLayoutData(data);
-
- Button selectAll = new Button(buttonParent, SWT.PUSH);
- selectAll.setText(ProvUIMessages.SelectableIUsPage_Select_All);
- setButtonLayoutData(selectAll);
- selectAll.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- setAllChecked(true);
- }
- });
-
- Button deselectAll = new Button(buttonParent, SWT.PUSH);
- deselectAll.setText(ProvUIMessages.SelectableIUsPage_Deselect_All);
- setButtonLayoutData(deselectAll);
- deselectAll.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- setAllChecked(false);
- }
- });
-
- // dummy to take extra space
- selectionCount = new Label(buttonParent, SWT.NONE);
- data = new GridData(SWT.FILL, SWT.CENTER, true, true);
- data.horizontalIndent = 20; // breathing room
- selectionCount.setLayoutData(data);
-
- // separator underneath
- Label sep = new Label(buttonParent, SWT.HORIZONTAL | SWT.SEPARATOR);
- data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
- data.horizontalSpan = 3;
- sep.setLayoutData(data);
- }
-
- // The viewer method is deprecated because it only applies to visible items,
- // but this is exactly the behavior we want.
- @SuppressWarnings("deprecation")
- void setAllChecked(boolean checked) {
- if (checked) {
- // TODO ideally there should be API on AvailableIUGroup to do this.
- // This is reachy and too knowledgeable of the group's implementation.
- availableIUGroup.getCheckboxTreeViewer().setAllChecked(checked);
- // to ensure that the listeners get processed.
- availableIUGroup.setChecked(availableIUGroup.getCheckboxTreeViewer().getCheckedElements());
-
- } else {
- availableIUGroup.setChecked(new Object[0]);
- }
- updateSelection();
- }
-
- private void createViewControlsArea(Composite parent) {
- showLatestVersionsCheckbox = new Button(parent, SWT.CHECK);
- showLatestVersionsCheckbox.setText(ProvUIMessages.AvailableIUsPage_ShowLatestVersions);
- showLatestVersionsCheckbox.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- updateQueryContext();
- availableIUGroup.updateAvailableViewState();
- }
-
- public void widgetSelected(SelectionEvent e) {
- updateQueryContext();
- availableIUGroup.updateAvailableViewState();
- }
- });
-
- hideInstalledCheckbox = new Button(parent, SWT.CHECK);
- hideInstalledCheckbox.setText(ProvUIMessages.AvailableIUsPage_HideInstalledItems);
- hideInstalledCheckbox.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- updateQueryContext();
- availableIUGroup.updateAvailableViewState();
- }
-
- public void widgetSelected(SelectionEvent e) {
- updateQueryContext();
- availableIUGroup.updateAvailableViewState();
- }
- });
-
- useCategoriesCheckbox = new Button(parent, SWT.CHECK);
- useCategoriesCheckbox.setText(ProvUIMessages.AvailableIUsPage_GroupByCategory);
- useCategoriesCheckbox.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- updateQueryContext();
- availableIUGroup.updateAvailableViewState();
- }
-
- public void widgetSelected(SelectionEvent e) {
- updateQueryContext();
- availableIUGroup.updateAvailableViewState();
- }
- });
-
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- gd.horizontalIndent = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- installLink = createLink(parent, new Action() {
- public void runWithEvent(Event event) {
- ProvUI.openInstallationDialog(event);
- }
- }, ProvUIMessages.AvailableIUsPage_GotoInstallInfo);
- installLink.setLayoutData(gd);
-
- filterOnEnvCheckBox = new Button(parent, SWT.CHECK);
- filterOnEnvCheckBox.setText(ProvUIMessages.AvailableIUsPage_FilterOnEnvCheckBox);
- filterOnEnvCheckBox.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- updateQueryContext();
- availableIUGroup.updateAvailableViewState();
- }
-
- public void widgetSelected(SelectionEvent e) {
- updateQueryContext();
- availableIUGroup.updateAvailableViewState();
- }
- });
-
- if (getPolicy().getRepositoriesVisible()) {
- // Checkbox
- resolveAllCheckbox = new Button(parent, SWT.CHECK);
- resolveAllCheckbox.setText(ProvUIMessages.AvailableIUsPage_ResolveAllCheckbox);
- gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- gd.horizontalSpan = 2;
- resolveAllCheckbox.setLayoutData(gd);
- }
- }
-
- private void createRepoArea(Composite parent) {
- // Site controls are only available if a repository manipulator
- // is specified.
- if (getPolicy().getRepositoriesVisible()) {
- repoSelector = new RepositorySelectionGroup(getProvisioningUI(), getContainer(), parent, queryContext);
- repoSelector.addRepositorySelectionListener(new IRepositorySelectionListener() {
- public void repositorySelectionChanged(int repoChoice, URI repoLocation) {
- repoComboSelectionChanged(repoChoice, repoLocation);
- }
- });
- // The ProvisioningOperationWizard signals the start of a repository operation as a way
- // to keep side-effect events from changing the selections or state of the wizard.
- // This is the one case where we want to respond to repo events, because we are
- // launching the repo manipulation page from the wizard. So we signal the wizard's
- // operation as complete and then resignal the start when done.
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=277265#c38
- repoSelector.setRepositoryManipulationHook(new IRepositoryManipulationHook() {
- public void preManipulateRepositories() {
- getProvisioningUI().signalRepositoryOperationComplete(null, false);
- }
-
- public void postManipulateRepositories() {
- getProvisioningUI().signalRepositoryOperationStart();
- }
- });
- }
- }
-
- void repoComboSelectionChanged(int repoChoice, URI repoLocation) {
- if (repoChoice == AvailableIUGroup.AVAILABLE_NONE) {
- setDescription(ProvUIMessages.AvailableIUsPage_SelectASite);
- } else {
- setDescription(ProvUIMessages.AvailableIUsPage_Description);
- }
- availableIUGroup.setRepositoryFilter(repoChoice, repoLocation);
- updateSelection();
- }
-
- void updateSelection() {
- int count = availableIUGroup.getCheckedLeafIUs().length;
- setPageComplete(count > 0);
- if (count == 0)
- selectionCount.setText(""); //$NON-NLS-1$
- else {
- String message = count == 1 ? ProvUIMessages.AvailableIUsPage_SingleSelectionCount : ProvUIMessages.AvailableIUsPage_MultipleSelectionCount;
- selectionCount.setText(NLS.bind(message, Integer.toString(count)));
- }
- getProvisioningWizard().operationSelectionsChanged(this);
- }
-
- void updateQueryContext() {
- queryContext.setShowLatestVersionsOnly(showLatestVersionsCheckbox.getSelection());
- if (hideInstalledCheckbox.getSelection())
- queryContext.hideAlreadyInstalled(getProfileId());
- else {
- queryContext.showAlreadyInstalled();
- queryContext.setInstalledProfileId(getProfileId());
- }
- if (useCategoriesCheckbox.getSelection())
- queryContext.setViewType(IUViewQueryContext.AVAILABLE_VIEW_BY_CATEGORY);
- else
- queryContext.setViewType(IUViewQueryContext.AVAILABLE_VIEW_FLAT);
- queryContext.setFilterOnEnv(filterOnEnvCheckBox.getSelection());
- }
-
- private Link createLink(Composite parent, IAction action, String text) {
- Link link = new Link(parent, SWT.PUSH);
- link.setText(text);
-
- link.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- IAction linkAction = getLinkAction(event.widget);
- if (linkAction != null) {
- linkAction.runWithEvent(event);
- }
- }
- });
- link.setToolTipText(action.getToolTipText());
- link.setData(LINKACTION, action);
- return link;
- }
-
- IAction getLinkAction(Widget widget) {
- Object data = widget.getData(LINKACTION);
- if (data == null || !(data instanceof IAction)) {
- return null;
- }
- return (IAction) data;
- }
-
- private void setDropTarget(Control control) {
- if (getPolicy().getRepositoriesVisible()) {
- DropTarget target = new DropTarget(control, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
- target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
- target.addDropListener(new RepositoryManipulatorDropTarget(getProvisioningUI(), control));
- }
- }
-
- private void initializeWidgetState() {
- // Set widgets according to query context
- hideInstalledCheckbox.setSelection(queryContext.getHideAlreadyInstalled());
- showLatestVersionsCheckbox.setSelection(queryContext.getShowLatestVersionsOnly());
- useCategoriesCheckbox.setSelection(queryContext.shouldGroupByCategories());
- filterOnEnvCheckBox.setSelection(queryContext.getFilterOnEnv());
- availableIUGroup.updateAvailableViewState();
- if (initialSelections != null)
- availableIUGroup.setChecked(initialSelections);
-
- // Focus should go on site combo unless it's not there. In that case, go to the filter text.
- Control focusControl = null;
- if (repoSelector != null)
- focusControl = repoSelector.getDefaultFocusControl();
- else
- focusControl = availableIUGroup.getDefaultFocusControl();
- if (focusControl != null)
- focusControl.setFocus();
- updateDetails();
- iuDetailsGroup.enablePropertyLink(availableIUGroup.getSelectedIUElements().length == 1);
- updateSelection();
-
- if (repoSelector != null) {
- repoSelector.setRepositorySelection(AvailableIUGroup.AVAILABLE_NONE, null);
- setDescription(ProvUIMessages.AvailableIUsPage_SelectASite);
- }
-
- if (resolveAllCheckbox != null) {
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION);
- String value = null;
- if (section != null)
- value = section.get(RESOLVE_ALL);
- // no section or no value in the section
- if (value == null)
- resolveAllCheckbox.setSelection(true);
- else
- resolveAllCheckbox.setSelection(section.getBoolean(RESOLVE_ALL));
- }
- }
-
- private void makeQueryContext() {
- // Make a local query context that is based on the default.
- IUViewQueryContext defaultQueryContext = ProvUI.getQueryContext(getPolicy());
- queryContext = new IUViewQueryContext(defaultQueryContext.getViewType());
- if (defaultQueryContext.getHideAlreadyInstalled()) {
- queryContext.hideAlreadyInstalled(getProfileId());
- } else {
- queryContext.setInstalledProfileId(getProfileId());
- }
- queryContext.setShowLatestVersionsOnly(defaultQueryContext.getShowLatestVersionsOnly());
- // Now check for saved away dialog settings
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION);
- if (section != null) {
- // View by...
- try {
- if (section.get(AVAILABLE_VIEW_TYPE) != null)
- queryContext.setViewType(section.getInt(AVAILABLE_VIEW_TYPE));
- } catch (NumberFormatException e) {
- // Ignore if there actually was a value that didn't parse.
- }
- // We no longer (in 3.5) show a view by site, so ignore any older dialog setting that
- // instructs us to do this.
- if (queryContext.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_BY_REPO)
- queryContext.setViewType(IUViewQueryContext.AVAILABLE_VIEW_BY_CATEGORY);
-
- // Show latest versions
- if (section.get(SHOW_LATEST_VERSIONS_ONLY) != null)
- queryContext.setShowLatestVersionsOnly(section.getBoolean(SHOW_LATEST_VERSIONS_ONLY));
-
- // Hide installed content
- boolean hideContent = section.getBoolean(HIDE_INSTALLED_IUS);
- if (hideContent)
- queryContext.hideAlreadyInstalled(getProfileId());
- else {
- queryContext.setInstalledProfileId(getProfileId());
- queryContext.showAlreadyInstalled();
- }
- }
- }
-
- private void getColumnWidthsFromSettings() {
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION);
- if (section != null) {
- try {
- if (section.get(NAME_COLUMN_WIDTH) != null)
- nameColumn.setWidthInPixels(section.getInt(NAME_COLUMN_WIDTH));
- if (section.get(VERSION_COLUMN_WIDTH) != null)
- versionColumn.setWidthInPixels(section.getInt(VERSION_COLUMN_WIDTH));
- } catch (NumberFormatException e) {
- // Ignore if there actually was a value that didn't parse.
- }
- }
- }
-
- private int[] getSashWeights() {
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION);
- if (section != null) {
- try {
- int[] weights = new int[2];
- if (section.get(LIST_WEIGHT) != null) {
- weights[0] = section.getInt(LIST_WEIGHT);
- if (section.get(DETAILS_WEIGHT) != null) {
- weights[1] = section.getInt(DETAILS_WEIGHT);
- return weights;
- }
- }
- } catch (NumberFormatException e) {
- // Ignore if there actually was a value that didn't parse.
- }
- }
- return ILayoutConstants.IUS_TO_DETAILS_WEIGHTS;
- }
-
- public void saveBoundsRelatedSettings() {
- if (getShell().isDisposed())
- return;
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION);
- if (section == null) {
- section = settings.addNewSection(DIALOG_SETTINGS_SECTION);
- }
- section.put(AVAILABLE_VIEW_TYPE, queryContext.getViewType());
- section.put(SHOW_LATEST_VERSIONS_ONLY, showLatestVersionsCheckbox.getSelection());
- section.put(HIDE_INSTALLED_IUS, hideInstalledCheckbox.getSelection());
- if (resolveAllCheckbox != null)
- section.put(RESOLVE_ALL, resolveAllCheckbox.getSelection());
-
- TreeColumn col = availableIUGroup.getCheckboxTreeViewer().getTree().getColumn(0);
- section.put(NAME_COLUMN_WIDTH, col.getWidth());
- col = availableIUGroup.getCheckboxTreeViewer().getTree().getColumn(1);
- section.put(VERSION_COLUMN_WIDTH, col.getWidth());
-
- int[] weights = sashForm.getWeights();
- section.put(LIST_WEIGHT, weights[0]);
- section.put(DETAILS_WEIGHT, weights[1]);
- }
-
- void updateDetails() {
- // First look for an empty explanation.
- Object[] elements = ((IStructuredSelection) availableIUGroup.getStructuredViewer().getSelection()).toArray();
- if (elements.length == 1 && elements[0] instanceof EmptyElementExplanation) {
- String description = ((EmptyElementExplanation) elements[0]).getDescription();
- if (description != null) {
- iuDetailsGroup.setDetailText(description);
- return;
- }
- }
-
- // Now look for IU's
- java.util.List<IInstallableUnit> selected = getSelectedIUs();
- if (selected.size() == 1) {
- StringBuffer result = new StringBuffer();
- String description = selected.get(0).getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
- if (description != null) {
- result.append(description);
- } else {
- String name = selected.get(0).getProperty(IInstallableUnit.PROP_NAME, null);
- if (name != null)
- result.append(name);
- else
- result.append(selected.get(0).getId());
- result.append(" "); //$NON-NLS-1$
- result.append(selected.get(0).getVersion().toString());
- }
-
- iuDetailsGroup.setDetailText(result.toString());
- return;
- }
- iuDetailsGroup.setDetailText(""); //$NON-NLS-1$
- }
-
- public java.util.List<IInstallableUnit> getSelectedIUs() {
- return availableIUGroup.getSelectedIUs();
- }
-
- /*
- * This method is provided only for automated testing.
- */
- public AvailableIUGroup testGetAvailableIUGroup() {
- return availableIUGroup;
- }
-
- public IInstallableUnit[] getCheckedIUs() {
- return availableIUGroup.getCheckedLeafIUs();
- }
-
- /*
- * Overridden so that we don't call getNextPage().
- * We use getNextPage() to start resolving the install so
- * we only want to do that when the next button is pressed.
- *
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- return isPageComplete();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage#getCheckedIUElements()
- */
- public Object[] getCheckedIUElements() {
- return availableIUGroup.getCheckedLeafIUs();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage#getSelectedIUElements()
- */
- public Object[] getSelectedIUElements() {
- return availableIUGroup.getSelectedIUElements();
- }
-
- /**
- * Set the selections to be used in this page. This method only changes the
- * selections of items that are already visible. It does not expand items
- * or change the repository elements in order to make the selections valid.
- *
- * @param elements
- */
- public void setCheckedElements(Object[] elements) {
- if (availableIUGroup == null)
- initialSelections = elements;
- else
- availableIUGroup.setChecked(elements);
- }
-
- void addViewerProvisioningListeners() {
- // We might need to adjust the content of the available IU group's viewer
- // according to installation changes. We want to be very selective about refreshing,
- // because the viewer has its own listeners installed.
- profileListener = new StructuredViewerProvisioningListener(getClass().getName(), availableIUGroup.getStructuredViewer(), ProvUIProvisioningListener.PROV_EVENT_PROFILE) {
- protected void profileAdded(String id) {
- // do nothing
- }
-
- protected void profileRemoved(String id) {
- // do nothing
- }
-
- protected void profileChanged(String id) {
- if (id.equals(getProfileId())) {
- safeRefresh();
- }
- }
- };
-
- ProvUI.addProvisioningListener(profileListener);
- }
-
- void removeProvisioningListeners() {
- if (profileListener != null) {
- ProvUI.removeProvisioningListener(profileListener);
- profileListener = null;
- }
- }
-
- protected String getClipboardText(Control control) {
- // The default label provider constructor uses the default column config.
- // since we passed the default column config to the available iu group,
- // we know that this label provider matches the one used there.
- return CopyUtils.getIndentedClipboardText(getSelectedIUElements(), new IUDetailsLabelProvider());
- }
-
- public ProvisioningContext getProvisioningContext() {
- // If the user can't manipulate repos, always resolve against everything
- if (!getPolicy().getRepositoriesVisible() || repoSelector == null) {
- return new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent());
- }
- // Consult the checkbox to see if we should resolve against everything,
- // or use the combo to determine what to do.
- if (resolveAllCheckbox.getSelection())
- return new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent());
- // Use the contents of the combo to determine the context
- return repoSelector.getProvisioningContext();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java
deleted file mode 100644
index 62d1124ee..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ComboAutoCompleteField.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.Vector;
-import org.eclipse.jface.fieldassist.*;
-import org.eclipse.swt.widgets.Combo;
-
-/**
- * ComboAutoCompleteField is an auto complete field appropriate for
- * pattern matching the text in a combo to the contents of the combo.
- * If the proposals should include items outside of the combo, then
- * clients can set their own proposal strings.
- *
- * @since 3.5
- */
-public class ComboAutoCompleteField {
-
- ContentProposalAdapter adapter;
- Combo combo;
- String[] proposalStrings = null;
-
- public ComboAutoCompleteField(Combo c) {
- this.combo = c;
- adapter = new ContentProposalAdapter(combo, new ComboContentAdapter(), getProposalProvider(), null, null);
- adapter.setPropagateKeys(true);
- adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
- }
-
- public void setProposalStrings(String[] proposals) {
- proposalStrings = proposals;
- }
-
- String[] getStringItems() {
- if (proposalStrings == null)
- return combo.getItems();
- return proposalStrings;
- }
-
- IContentProposalProvider getProposalProvider() {
- return new IContentProposalProvider() {
- public IContentProposal[] getProposals(String contents, int position) {
- String[] items = getStringItems();
- if (contents.length() == 0 || items.length == 0)
- return new IContentProposal[0];
- StringMatcher matcher = new StringMatcher("*" + contents + "*", true, false); //$NON-NLS-1$ //$NON-NLS-2$
- ArrayList<String> matches = new ArrayList<String>();
- for (int i = 0; i < items.length; i++)
- if (matcher.match(items[i]))
- matches.add(items[i]);
-
- // We don't want to autoactivate if the only proposal exactly matches
- // what is in the combo. This prevents the popup from
- // opening when the user is merely scrolling through the combo values or
- // has accepted a combo value.
- if (matches.size() == 1 && matches.get(0).equals(combo.getText()))
- return new IContentProposal[0];
-
- if (matches.isEmpty())
- return new IContentProposal[0];
-
- // Make the proposals
- IContentProposal[] proposals = new IContentProposal[matches.size()];
- for (int i = 0; i < matches.size(); i++) {
- final String proposal = matches.get(i);
- proposals[i] = new IContentProposal() {
-
- public String getContent() {
- return proposal;
- }
-
- public int getCursorPosition() {
- return proposal.length();
- }
-
- public String getDescription() {
- return null;
- }
-
- public String getLabel() {
- return null;
- }
- };
- }
- return proposals;
- }
- };
- }
-
- /**
- * A string pattern matcher, suppporting "*" and "?" wildcards.
- * Copied from the 1.14 CVS Revision of org.eclipse.ui.internal.misc.StringMatcher
- * The only changes made were to fix javadoc warnings, so any future fixes should
- * be able to be directly copied over.
- */
- static class StringMatcher {
- protected String fPattern;
-
- protected int fLength; // pattern length
-
- protected boolean fIgnoreWildCards;
-
- protected boolean fIgnoreCase;
-
- protected boolean fHasLeadingStar;
-
- protected boolean fHasTrailingStar;
-
- protected String fSegments[]; //the given pattern is split into * separated segments
-
- /* boundary value beyond which we don't need to search in the text */
- protected int fBound = 0;
-
- protected static final char fSingleWildCard = '\u0000';
-
- static class Position {
- int start; //inclusive
-
- int end; //exclusive
-
- public Position(int start, int end) {
- this.start = start;
- this.end = end;
- }
-
- public int getStart() {
- return start;
- }
-
- public int getEnd() {
- return end;
- }
- }
-
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain '*' for 0 and many characters and
- * '?' for exactly one character.
- *
- * Literal '*' and '?' characters must be escaped in the pattern
- * e.g., "\*" means literal "*", etc.
- *
- * Escaping any other character (including the escape character itself),
- * just results in that character in the pattern.
- * e.g., "\a" means "a" and "\\" means "\"
- *
- * If invoking the StringMatcher with string literals in Java, don't forget
- * escape characters are represented by "\\".
- *
- * @param pattern the pattern to match text against
- * @param ignoreCase if true, case is ignored
- * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
- * (everything is taken literally).
- */
- public StringMatcher(String pattern, boolean ignoreCase, boolean ignoreWildCards) {
- if (pattern == null) {
- throw new IllegalArgumentException();
- }
- fIgnoreCase = ignoreCase;
- fIgnoreWildCards = ignoreWildCards;
- fPattern = pattern;
- fLength = pattern.length();
-
- if (fIgnoreWildCards) {
- parseNoWildCards();
- } else {
- parseWildCards();
- }
- }
-
- /**
- * Find the first occurrence of the pattern between <code>start</code)(inclusive)
- * and <code>end</code>(exclusive).
- * @param text the String object to search in
- * @param start the starting index of the search range, inclusive
- * @param end the ending index of the search range, exclusive
- * @return an <code>StringMatcher.Position</code> object that keeps the starting
- * (inclusive) and ending positions (exclusive) of the first occurrence of the
- * pattern in the specified range of the text; return null if not found or subtext
- * is empty (start==end). A pair of zeros is returned if pattern is empty string
- * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
- * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
- */
- public StringMatcher.Position find(String text, int start, int end) {
- if (text == null) {
- throw new IllegalArgumentException();
- }
-
- int tlen = text.length();
- if (start < 0) {
- start = 0;
- }
- if (end > tlen) {
- end = tlen;
- }
- if (end < 0 || start >= end) {
- return null;
- }
- if (fLength == 0) {
- return new Position(start, start);
- }
- if (fIgnoreWildCards) {
- int x = posIn(text, start, end);
- if (x < 0) {
- return null;
- }
- return new Position(x, x + fLength);
- }
-
- int segCount = fSegments.length;
- if (segCount == 0) {
- return new Position(start, end);
- }
-
- int curPos = start;
- int matchStart = -1;
- int i;
- for (i = 0; i < segCount && curPos < end; ++i) {
- String current = fSegments[i];
- int nextMatch = regExpPosIn(text, curPos, end, current);
- if (nextMatch < 0) {
- return null;
- }
- if (i == 0) {
- matchStart = nextMatch;
- }
- curPos = nextMatch + current.length();
- }
- if (i < segCount) {
- return null;
- }
- return new Position(matchStart, curPos);
- }
-
- /**
- * match the given <code>text</code> with the pattern
- * @return true if matched otherwise false
- * @param text a String object
- */
- public boolean match(String text) {
- if (text == null) {
- return false;
- }
- return match(text, 0, text.length());
- }
-
- /**
- * Given the starting (inclusive) and the ending (exclusive) positions in the
- * <code>text</code>, determine if the given substring matches with aPattern
- * @return true if the specified portion of the text matches the pattern
- * @param text a String object that contains the substring to match
- * @param start marks the starting position (inclusive) of the substring
- * @param end marks the ending index (exclusive) of the substring
- */
- public boolean match(String text, int start, int end) {
- if (null == text) {
- throw new IllegalArgumentException();
- }
-
- if (start > end) {
- return false;
- }
-
- if (fIgnoreWildCards) {
- return (end - start == fLength) && fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength);
- }
- int segCount = fSegments.length;
- if (segCount == 0 && (fHasLeadingStar || fHasTrailingStar)) {
- return true;
- }
- if (start == end) {
- return fLength == 0;
- }
- if (fLength == 0) {
- return start == end;
- }
-
- int tlen = text.length();
- if (start < 0) {
- start = 0;
- }
- if (end > tlen) {
- end = tlen;
- }
-
- int tCurPos = start;
- int bound = end - fBound;
- if (bound < 0) {
- return false;
- }
- int i = 0;
- String current = fSegments[i];
- int segLength = current.length();
-
- /* process first segment */
- if (!fHasLeadingStar) {
- if (!regExpRegionMatches(text, start, current, 0, segLength)) {
- return false;
- } else {
- ++i;
- tCurPos = tCurPos + segLength;
- }
- }
- if ((fSegments.length == 1) && (!fHasLeadingStar) && (!fHasTrailingStar)) {
- // only one segment to match, no wildcards specified
- return tCurPos == end;
- }
- /* process middle segments */
- while (i < segCount) {
- current = fSegments[i];
- int currentMatch;
- int k = current.indexOf(fSingleWildCard);
- if (k < 0) {
- currentMatch = textPosIn(text, tCurPos, end, current);
- if (currentMatch < 0) {
- return false;
- }
- } else {
- currentMatch = regExpPosIn(text, tCurPos, end, current);
- if (currentMatch < 0) {
- return false;
- }
- }
- tCurPos = currentMatch + current.length();
- i++;
- }
-
- /* process final segment */
- if (!fHasTrailingStar && tCurPos != end) {
- int clen = current.length();
- return regExpRegionMatches(text, end - clen, current, 0, clen);
- }
- return i == segCount;
- }
-
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * Since wildcards are not being used in this case, the pattern consists of a single segment.
- */
- private void parseNoWildCards() {
- fSegments = new String[1];
- fSegments[0] = fPattern;
- fBound = fLength;
- }
-
- /**
- * Parses the given pattern into segments seperated by wildcard '*' characters.
- */
- private void parseWildCards() {
- if (fPattern.startsWith("*")) { //$NON-NLS-1$
- fHasLeadingStar = true;
- }
- if (fPattern.endsWith("*")) {//$NON-NLS-1$
- /* make sure it's not an escaped wildcard */
- if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
- fHasTrailingStar = true;
- }
- }
-
- Vector<String> temp = new Vector<String>();
-
- int pos = 0;
- StringBuffer buf = new StringBuffer();
- while (pos < fLength) {
- char c = fPattern.charAt(pos++);
- switch (c) {
- case '\\' :
- if (pos >= fLength) {
- buf.append(c);
- } else {
- char next = fPattern.charAt(pos++);
- /* if it's an escape sequence */
- if (next == '*' || next == '?' || next == '\\') {
- buf.append(next);
- } else {
- /* not an escape sequence, just insert literally */
- buf.append(c);
- buf.append(next);
- }
- }
- break;
- case '*' :
- if (buf.length() > 0) {
- /* new segment */
- temp.addElement(buf.toString());
- fBound += buf.length();
- buf.setLength(0);
- }
- break;
- case '?' :
- /* append special character representing single match wildcard */
- buf.append(fSingleWildCard);
- break;
- default :
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.addElement(buf.toString());
- fBound += buf.length();
- }
-
- fSegments = new String[temp.size()];
- temp.copyInto(fSegments);
- }
-
- /**
- * @param text a string which contains no wildcard
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int posIn(String text, int start, int end) {//no wild card in pattern
- int max = end - fLength;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(fPattern, start);
- if (i == -1 || i > max) {
- return -1;
- }
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, fPattern, 0, fLength)) {
- return i;
- }
- }
-
- return -1;
- }
-
- /**
- * @param text a simple regular expression that may only contain '?'(s)
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a simple regular expression that may contains '?'
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int regExpPosIn(String text, int start, int end, String p) {
- int plen = p.length();
-
- int max = end - plen;
- for (int i = start; i <= max; ++i) {
- if (regExpRegionMatches(text, i, p, 0, plen)) {
- return i;
- }
- }
- return -1;
- }
-
- /**
- *
- * @return boolean
- * @param text a String to match
- * @param tStart int that indicates the starting index of match, inclusive
- * @param p String, String, a simple regular expression that may contain '?'
- * @param plen length of string
- */
- protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
- while (plen-- > 0) {
- char tchar = text.charAt(tStart++);
- char pchar = p.charAt(pStart++);
-
- /* process wild cards */
- if (!fIgnoreWildCards) {
- /* skip single wild cards */
- if (pchar == fSingleWildCard) {
- continue;
- }
- }
- if (pchar == tchar) {
- continue;
- }
- if (fIgnoreCase) {
- if (Character.toUpperCase(tchar) == Character.toUpperCase(pchar)) {
- continue;
- }
- // comparing after converting to upper case doesn't handle all cases;
- // also compare after converting to lower case
- if (Character.toLowerCase(tchar) == Character.toLowerCase(pchar)) {
- continue;
- }
- }
- return false;
- }
- return true;
- }
-
- /**
- * @param text the string to match
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a pattern string that has no wildcard
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int textPosIn(String text, int start, int end, String p) {
-
- int plen = p.length();
- int max = end - plen;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(p, start);
- if (i == -1 || i > max) {
- return -1;
- }
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, p, 0, plen)) {
- return i;
- }
- }
-
- return -1;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
deleted file mode 100644
index fef8274d3..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ContainerCheckedTreeViewer.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElement;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Copy of ContainerCheckedTreeViewer which is specialized for use
- * with DeferredFetchFilteredTree. Originally copied from
- * org.eclipse.ui.dialogs and altered to achieve the following:
- *
- * (1)checking a parent will expand it when we know it's a long
- * running operation that involves a placeholder.
-* The modified method is doCheckStateChanged().
-*
- * (2)when preserving selection, we do not want the check state
- * to be rippled through the child and parent nodes.
- * Since we know that preservingSelection(Runnable) isn't working
- * properly, no need to do a bunch of work here.
- * The added methods is preservingSelection(Runnable).
- * Modified methods are updateChildrenItems(TreeItem parent) and
- * updateParentItems(TreeItem parent).
- *
- * (3)we correct the problem with preservingSelection(Runnable) by
- * remembering the check state and restoring it after a refresh. We
- * fire a check state event so clients monitoring the selection will know
- * what's going on. Added methods are internalRefresh(Object, boolean),
- * saveCheckedState(), restoreCheckedState(), and
- * fireCheckStateChanged(Object, boolean). That last method is public
- * so that DeferredFetchFilteredTree can do the same thing when it
- * remembers selections.
- *
- * This class does not correct the general problem reported in
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=170521
- * That is handled by preserving selections additively in
- * DeferredFetchFilteredTree. This class simply provides the API
- * needed by that class and manages the parent state according to the
- * children.
- */
-public class ContainerCheckedTreeViewer extends CheckboxTreeViewer {
-
- private boolean rippleCheckMarks = true;
- private ArrayList<Object> savedCheckState;
-
- /**
- * Constructor for ContainerCheckedTreeViewer.
- * @see CheckboxTreeViewer#CheckboxTreeViewer(Composite)
- */
- public ContainerCheckedTreeViewer(Composite parent) {
- super(parent);
- initViewer();
- }
-
- /**
- * Constructor for ContainerCheckedTreeViewer.
- * @see CheckboxTreeViewer#CheckboxTreeViewer(Composite,int)
- */
- public ContainerCheckedTreeViewer(Composite parent, int style) {
- super(parent, style);
- initViewer();
- }
-
- /**
- * Constructor for ContainerCheckedTreeViewer.
- * @see CheckboxTreeViewer#CheckboxTreeViewer(Tree)
- */
- public ContainerCheckedTreeViewer(Tree tree) {
- super(tree);
- initViewer();
- }
-
- private void initViewer() {
- setUseHashlookup(true);
- addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- doCheckStateChanged(event.getElement());
- }
- });
- addTreeListener(new ITreeViewerListener() {
- public void treeCollapsed(TreeExpansionEvent event) {
- }
-
- public void treeExpanded(TreeExpansionEvent event) {
- Widget item = findItem(event.getElement());
- if (item instanceof TreeItem) {
- initializeItem((TreeItem) item);
- }
- }
- });
- }
-
- /**
- * Update element after a checkstate change.
- * @param element
- */
- protected void doCheckStateChanged(Object element) {
- Widget item = findItem(element);
- if (item instanceof TreeItem) {
- TreeItem treeItem = (TreeItem) item;
- treeItem.setGrayed(false);
- // BEGIN MODIFICATION OF COPIED CLASS
- if (element instanceof QueriedElement && treeItem.getChecked()) {
- if (!((QueriedElement) element).hasQueryable()) {
- // We have checked an element that will take some time
- // to get its children. Use this opportunity to auto-expand
- // the tree so that the check mark is not misleading. Don't
- // update the check state because it will just be a pending
- // placeholder.
- expandToLevel(element, 1);
- return;
- }
- }
- // END MODIFICATION OF COPIED CLASS
- updateChildrenItems(treeItem);
- updateParentItems(treeItem.getParentItem());
- }
- }
-
- /**
- * The item has expanded. Updates the checked state of its children.
- */
- private void initializeItem(TreeItem item) {
- if (item.getChecked() && !item.getGrayed()) {
- updateChildrenItems(item);
- }
- }
-
- /**
- * Updates the check state of all created children
- */
- // MODIFIED to ignore parent state when in the middle of a
- // selection preserving refresh.
- private void updateChildrenItems(TreeItem parent) {
- // We are in the middle of preserving selections, don't
- // update any children according to parent
- if (!rippleCheckMarks)
- return;
- Item[] children = getChildren(parent);
- boolean state = parent.getChecked();
- for (int i = 0; i < children.length; i++) {
- TreeItem curr = (TreeItem) children[i];
- if (curr.getData() != null && ((curr.getChecked() != state) || curr.getGrayed())) {
- curr.setChecked(state);
- curr.setGrayed(false);
- updateChildrenItems(curr);
- }
- }
- }
-
- /**
- * Updates the check / gray state of all parent items
- */
- private void updateParentItems(TreeItem item) {
- // We are in the middle of preserving selections, don't
- // update any parents according to children
- if (!rippleCheckMarks)
- return;
- if (item != null) {
- Item[] children = getChildren(item);
- boolean containsChecked = false;
- boolean containsUnchecked = false;
- for (int i = 0; i < children.length; i++) {
- TreeItem curr = (TreeItem) children[i];
- containsChecked |= curr.getChecked();
- containsUnchecked |= (!curr.getChecked() || curr.getGrayed());
- }
- item.setChecked(containsChecked);
- item.setGrayed(containsChecked && containsUnchecked);
- updateParentItems(item.getParentItem());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ICheckable#setChecked(java.lang.Object, boolean)
- */
- public boolean setChecked(Object element, boolean state) {
- if (super.setChecked(element, state)) {
- doCheckStateChanged(element);
- return true;
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.CheckboxTreeViewer#setCheckedElements(java.lang.Object[])
- */
- public void setCheckedElements(Object[] elements) {
- super.setCheckedElements(elements);
- for (int i = 0; i < elements.length; i++) {
- doCheckStateChanged(elements[i]);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#setExpanded(org.eclipse.swt.widgets.Item, boolean)
- */
- protected void setExpanded(Item item, boolean expand) {
- super.setExpanded(item, expand);
- if (expand && item instanceof TreeItem) {
- initializeItem((TreeItem) item);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.CheckboxTreeViewer#getCheckedElements()
- */
- public Object[] getCheckedElements() {
- Object[] checked = super.getCheckedElements();
- // add all items that are children of a checked node but not created yet
- ArrayList<Object> result = new ArrayList<Object>();
- for (int i = 0; i < checked.length; i++) {
- Object curr = checked[i];
- result.add(curr);
- Widget item = findItem(curr);
- if (item != null) {
- Item[] children = getChildren(item);
- // check if contains the dummy node
- if (children.length == 1 && children[0].getData() == null) {
- // not yet created
- collectChildren(curr, result);
- }
- }
- }
- return result.toArray();
- }
-
- /**
- * Recursively add the filtered children of element to the result.
- * @param element
- * @param result
- */
- private void collectChildren(Object element, ArrayList<Object> result) {
- Object[] filteredChildren = getFilteredChildren(element);
- for (int i = 0; i < filteredChildren.length; i++) {
- Object curr = filteredChildren[i];
- result.add(curr);
- collectChildren(curr, result);
- }
- }
-
- // The super implementation doesn't really work because the
- // non-expanded items are not holding their real elements yet.
- // Yet the code that records the checked state uses the
- // elements to remember what checkmarks should be restored.
- // The result is that non-expanded elements are not up to date
- // and if anything in there should have been checked, it
- // won't be. The best we can do is at least turn off all the
- // rippling checks that happen during this method since we are going
- // to reset all the checkmarks anyway.
- protected void preservingSelection(Runnable updateCode) {
- rippleCheckMarks = false;
- super.preservingSelection(updateCode);
- rippleCheckMarks = true;
- }
-
- protected void internalRefresh(Object element, boolean updateLabels) {
- saveCheckedState();
- super.internalRefresh(element, updateLabels);
- restoreCheckedState();
- }
-
- // We only remember the leaves. This is specific to our
- // use case, not necessarily a good idea for fixing the general
- // problem.
- private void saveCheckedState() {
- Object[] checked = getCheckedElements();
- savedCheckState = new ArrayList<Object>(checked.length);
- for (int i = 0; i < checked.length; i++)
- if (!isExpandable(checked[i]) && !getGrayed(checked[i]))
- savedCheckState.add(checked[i]);
- }
-
- // Now we restore checked state.
- private void restoreCheckedState() {
- setCheckedElements(new Object[0]);
- setGrayedElements(new Object[0]);
- Object element = null;
- // We are assuming that once a leaf, always a leaf.
- Iterator<Object> iter = savedCheckState.iterator();
- while (iter.hasNext()) {
- element = iter.next();
- setChecked(element, true);
- }
- // Listeners need to know something changed.
- if (element != null)
- fireCheckStateChanged(element, true);
- }
-
- // This method is public so that the DeferredFetchFilteredTree can also
- // call it.
- public void fireCheckStateChanged(Object element, boolean state) {
- fireCheckStateChanged(new CheckStateChangedEvent(this, element, state));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
deleted file mode 100644
index 65025680f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.equinox.p2.ui.ICopyable;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.ISources;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class CopyHandler extends AbstractHandler {
-
- public static final String ID = "org.eclipse.ui.edit.copy"; //$NON-NLS-1$
- ICopyable copySource;
-
- public CopyHandler(ICopyable copyable) {
- this.copySource = copyable;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- public Object execute(ExecutionEvent event) {
- Object control = HandlerUtil.getVariable(event, ISources.ACTIVE_FOCUS_CONTROL_NAME);
- if (control instanceof Control)
- copySource.copyToClipboard((Control) control);
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java
deleted file mode 100644
index daa80f769..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyPopup.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.p2.ui.ICopyable;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.*;
-
-public class CopyPopup {
-
- ICopyable copySource;
- Control control;
-
- public CopyPopup(ICopyable copyable, final Control control) {
- this.copySource = copyable;
- this.control = control;
- Menu copyMenu = new Menu(control);
- MenuItem copyItem = new MenuItem(copyMenu, SWT.NONE);
- copyItem.addSelectionListener(new SelectionListener() {
- /*
- * @see SelectionListener.widgetSelected (SelectionEvent)
- */
- public void widgetSelected(SelectionEvent e) {
- copySource.copyToClipboard(control);
- }
-
- /*
- * @see SelectionListener.widgetDefaultSelected(SelectionEvent)
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- copySource.copyToClipboard(control);
- }
- });
- copyItem.setText(JFaceResources.getString("copy")); //$NON-NLS-1$
- control.setMenu(copyMenu);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java
deleted file mode 100644
index d3e03e5e9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/CopyUtils.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.core.expressions.*;
-import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.p2.ui.ICopyable;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.ISources;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.ui.swt.IFocusService;
-
-public class CopyUtils {
- public static final String NEWLINE = System.getProperty("line.separator"); //$NON-NLS-1$
- public static final String DELIMITER = "\t"; //$NON-NLS-1$
- private static final String NESTING_INDENT = " "; //$NON-NLS-1$
-
- // We never test the control ID so we can use the same ID for all controls
- private static final String CONTROL_ID = "org.eclipse.equinox.p2.ui.CopyControlId"; //$NON-NLS-1$
-
- public static String getIndentedClipboardText(Object[] elements, IUDetailsLabelProvider labelProvider) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < elements.length; i++) {
- if (i > 0)
- buffer.append(NEWLINE);
- appendIndention(buffer, elements[i]);
- buffer.append(labelProvider.getClipboardText(elements[i], DELIMITER));
- }
- return buffer.toString();
- }
-
- /**
- * Install a copy popup menu on the specified control and activate the copy handler for the control when
- * the control has focus. The handler will be deactivated when the control is disposed.
- *
- * @param copyable the copyable that will perform the copy
- * @param control the control on which to install the menu and handler
- */
- public static void activateCopy(ICopyable copyable, final Control control) {
- IFocusService fs = (IFocusService) PlatformUI.getWorkbench().getService(IFocusService.class);
- final IHandlerService hs = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
- new CopyPopup(copyable, control);
- if (fs != null && hs != null) {
- fs.addFocusTracker(control, CONTROL_ID);
- final IHandlerActivation handlerActivation = hs.activateHandler(CopyHandler.ID, new CopyHandler(copyable), new Expression() {
- public EvaluationResult evaluate(IEvaluationContext context) {
- return context.getVariable(ISources.ACTIVE_FOCUS_CONTROL_NAME) == control ? EvaluationResult.TRUE : EvaluationResult.FALSE;
- }
-
- public void collectExpressionInfo(final ExpressionInfo info) {
- info.addVariableNameAccess(ISources.ACTIVE_FOCUS_CONTROL_NAME);
- }
-
- });
- control.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- hs.deactivateHandler(handlerActivation);
- }
- });
- }
- }
-
- private static void appendIndention(StringBuffer buffer, Object element) {
- Object parent;
- while (element instanceof ProvElement && (parent = ((ProvElement) element).getParent(element)) != null) {
- buffer.append(NESTING_INDENT);
- element = parent;
- }
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java
deleted file mode 100644
index 296faa04d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/DelayedFilterCheckboxTree.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.util.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.ui.viewers.DeferredQueryContentProvider;
-import org.eclipse.equinox.internal.p2.ui.viewers.IInputChangeListener;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-/**
- * FilteredTree extension that creates a ContainerCheckedTreeViewer, manages the
- * check state across filtering (working around bugs in ContainerCheckedTreeViewer),
- * and preloads all metadata repositories before allowing filtering, in order to
- * coordinate background fetch and filtering. It also manages a cache of expanded
- * elements that can survive a change of input.
- *
- * @since 3.4
- *
- */
-public class DelayedFilterCheckboxTree extends FilteredTree {
-
- private static final long FILTER_DELAY = 400;
-
- public static final Object ALL_ITEMS_HACK = new Object();
-
- ToolBar toolBar;
- Display display;
- PatternFilter patternFilter;
- IPreFilterJobProvider jobProvider;
- DeferredQueryContentProvider contentProvider;
- String savedFilterText;
- Job preFilterJob;
- WorkbenchJob filterJob;
- boolean ignoreFiltering = true;
- Object viewerInput;
- ArrayList<Object> checkState = new ArrayList<Object>();
- Set<Object> expanded = new HashSet<Object>();
- ContainerCheckedTreeViewer checkboxViewer;
-
- public DelayedFilterCheckboxTree(Composite parent, int treeStyle, PatternFilter filter, IPreFilterJobProvider jobProvider) {
- super(parent, true);
- this.display = parent.getDisplay();
- this.patternFilter = filter;
- init(treeStyle, filter);
- }
-
- protected TreeViewer doCreateTreeViewer(Composite composite, int style) {
- checkboxViewer = new ContainerCheckedTreeViewer(composite, style);
- checkboxViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- // We use an additive check state cache so we need to remove
- // previously checked items if the user unchecked them.
- if (!event.getChecked() && checkState != null) {
- if (event.getElement() == ALL_ITEMS_HACK)
- clearCheckStateCache();
- else {
- ArrayList<Object> toRemove = new ArrayList<Object>(1);
- // See bug 258117. Ideally we would get check state changes
- // for children when the parent state changed, but we aren't, so
- // we need to remove all children from the additive check state
- // cache.
- if (contentProvider.hasChildren(event.getElement())) {
- Set<Object> unchecked = new HashSet<Object>();
- Object[] children = contentProvider.getChildren(event.getElement());
- for (int i = 0; i < children.length; i++) {
- unchecked.add(children[i]);
- }
- Iterator<Object> iter = checkState.iterator();
- while (iter.hasNext()) {
- Object current = iter.next();
- if (current != null && unchecked.contains(current)) {
- toRemove.add(current);
- }
- }
- } else {
- for (Object element : checkState) {
- if (checkboxViewer.getComparer().equals(element, event.getElement())) {
- toRemove.add(element);
- // Do not break out of the loop. We may have duplicate equal
- // elements in the cache. Since the cache is additive, we want
- // to be sure we've gotten everything.
- }
- }
- }
- checkState.removeAll(toRemove);
- }
- } else if (event.getChecked()) {
- rememberLeafCheckState();
- }
- }
- });
- return checkboxViewer;
- }
-
- protected Composite createFilterControls(Composite filterParent) {
- super.createFilterControls(filterParent);
- filterParent.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- cancelPreFilterJob();
- }
- });
- return filterParent;
- }
-
- public void contentProviderSet(final DeferredQueryContentProvider deferredProvider) {
- this.contentProvider = deferredProvider;
- deferredProvider.addListener(new IInputChangeListener() {
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- if (newInput == null) {
- return;
- }
- // Store the input because it's not reset in the viewer until
- // after this listener is run.
- viewerInput = newInput;
-
- // If we were loading repos, we want to cancel because there may be more.
- cancelPreFilterJob();
- // Cancel any filtering
- cancelAndResetFilterJob();
- contentProvider.setSynchronous(false);
- // Remember any previous expansions
- rememberExpansions();
- // If there are remembered check states, try to restore them.
- // Must be done in an async because we are in the middle of a buggy
- // selection preserving viewer refresh.
- checkboxViewer.getTree().setRedraw(false);
- display.asyncExec(new Runnable() {
- public void run() {
- if (checkboxViewer.getTree().isDisposed())
- return;
- rememberExpansions();
- restoreLeafCheckState();
- rememberExpansions();
- restoreExpansions();
- checkboxViewer.getTree().setRedraw(true);
- }
- });
- }
- });
- }
-
- public void clearCheckStateCache() {
- checkState = null;
- }
-
- /*
- * Overridden to hook a listener on the job and set the deferred content provider
- * to synchronous mode before a filter is done.
- * @see org.eclipse.ui.dialogs.FilteredTree#doCreateRefreshJob()
- */
- protected WorkbenchJob doCreateRefreshJob() {
- filterJob = super.doCreateRefreshJob();
-
- filterJob.addJobChangeListener(new JobChangeAdapter() {
- public void aboutToRun(final IJobChangeEvent event) {
- // If we know we've already filtered and loaded repos, nothing more to do
- if (!ignoreFiltering)
- return;
- final boolean[] shouldPreFilter = new boolean[1];
- shouldPreFilter[0] = false;
- display.syncExec(new Runnable() {
- public void run() {
- if (filterText != null && !filterText.isDisposed()) {
- String text = getFilterString();
- // If we are about to filter and there is
- // actually filtering to do, check for a prefilter
- // job and the content provider to synchronous mode.
- // We want the prefilter job to complete before continuing with filtering.
- if (text == null || (initialText != null && initialText.equals(text)))
- return;
- if (!contentProvider.getSynchronous() && preFilterJob == null) {
- if (filterText != null && !filterText.isDisposed()) {
- shouldPreFilter[0] = true;
- }
- }
- }
- }
- });
- if (shouldPreFilter[0]) {
- event.getJob().sleep();
- schedulePreFilterJob();
- } else if (ignoreFiltering) {
- event.getJob().sleep();
- } else {
- // shouldn't get here unless the prefilter job finished
- // and ignoreFiltering became false since we entered this listener.
- rememberLeafCheckState();
- }
- }
-
- public void running(IJobChangeEvent event) {
- display.syncExec(new Runnable() {
- public void run() {
- rememberLeafCheckState();
- }
- });
- }
-
- public void done(IJobChangeEvent event) {
- if (event.getResult().isOK()) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (checkboxViewer.getTree().isDisposed())
- return;
-
- checkboxViewer.getTree().setRedraw(false);
- // remember things expanded by the filter
- rememberExpansions();
- restoreLeafCheckState();
- // now restore expansions because we may have
- // had others
- restoreExpansions();
- checkboxViewer.getTree().setRedraw(true);
- }
- });
- }
- }
- });
- return filterJob;
- }
-
- void schedulePreFilterJob() {
- // cancel any existing jobs
- cancelPreFilterJob();
- ignoreFiltering = false;
- preFilterJob = jobProvider == null ? null : jobProvider.getPreFilterJob();
- if (preFilterJob == null) {
- if (filterJob != null)
- filterJob.wakeUp();
- return;
- }
- ignoreFiltering = true;
- preFilterJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- ignoreFiltering = false;
- contentProvider.setSynchronous(true);
- if (filterJob != null)
- filterJob.wakeUp();
- preFilterJob = null;
- }
- });
- preFilterJob.setSystem(true);
- preFilterJob.setUser(false);
- preFilterJob.schedule();
- }
-
- void cancelPreFilterJob() {
- if (preFilterJob != null) {
- preFilterJob.cancel();
- preFilterJob = null;
- }
- }
-
- void cancelAndResetFilterJob() {
- if (filterJob != null) {
- filterJob.cancel();
- }
- }
-
- void rememberLeafCheckState() {
- ContainerCheckedTreeViewer v = (ContainerCheckedTreeViewer) getViewer();
- Object[] checked = v.getCheckedElements();
- if (checkState == null)
- checkState = new ArrayList<Object>(checked.length);
- for (int i = 0; i < checked.length; i++)
- if (!v.getGrayed(checked[i]) && contentProvider.getChildren(checked[i]).length == 0)
- if (!checkState.contains(checked[i]))
- checkState.add(checked[i]);
- }
-
- void restoreLeafCheckState() {
- if (checkboxViewer == null || checkboxViewer.getTree().isDisposed())
- return;
- if (checkState == null)
- return;
-
- checkboxViewer.setCheckedElements(new Object[0]);
- checkboxViewer.setGrayedElements(new Object[0]);
- // Now we are only going to set the check state of the leaf nodes
- // and rely on our container checked code to update the parents properly.
- Iterator<Object> iter = checkState.iterator();
- Object element = null;
- if (iter.hasNext())
- checkboxViewer.expandAll();
- while (iter.hasNext()) {
- element = iter.next();
- checkboxViewer.setChecked(element, true);
- }
- // We are only firing one event, knowing that this is enough for our listeners.
- if (element != null)
- checkboxViewer.fireCheckStateChanged(element, true);
- }
-
- void rememberExpansions() {
- // The expansions are additive, but we are using a set to keep out
- // duplicates. In practice, this means expanded items from different
- // inputs will remain expanded, such as categories with the same name
- // in different repos.
- expanded.addAll(Arrays.asList(getViewer().getExpandedElements()));
- }
-
- void restoreExpansions() {
- getViewer().setExpandedElements(expanded.toArray());
- }
-
- public ContainerCheckedTreeViewer getCheckboxTreeViewer() {
- return checkboxViewer;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.dialogs.FilteredTree#getRefreshJobDelay()
- */
- protected long getRefreshJobDelay() {
- return FILTER_DELAY;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ILayoutConstants.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ILayoutConstants.java
deleted file mode 100644
index 78676248d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ILayoutConstants.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-/**
- * ILayoutConstants defines common dialog constants used when laying
- * out dialogs. Units of measurement are character widths and heights
- * unless otherwise specified.
- *
- * This interface is not intended to be implemented
- *
- * @noimplement This interface is not intended to be implemented by clients.
- * @noextend This interface is not intended to be extended by clients.
- * @since 3.5
- */
-public interface ILayoutConstants {
- public static final int DEFAULT_DESCRIPTION_HEIGHT = 4;
- public static final int MINIMUM_DESCRIPTION_HEIGHT = 1;
- public static final int DEFAULT_SITEDETAILS_HEIGHT = 2;
- public static final int DEFAULT_PRIMARY_COLUMN_WIDTH = 60;
- public static final int DEFAULT_COLUMN_WIDTH = 40;
- public static final int DEFAULT_SMALL_COLUMN_WIDTH = 20;
- public static final int DEFAULT_TABLE_HEIGHT = 10;
- public static final int DEFAULT_TABLE_WIDTH = 80;
- public static final int[] IUS_TO_DETAILS_WEIGHTS = new int[] {80, 20};
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java
deleted file mode 100644
index b4e72b88c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IPreFilterJobProvider.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.core.runtime.jobs.Job;
-
-/**
- * IPreFilterJobProvider provides an optional job that must be run before
- * filtering can be allowed to occur in a filtered tree. The client is assumed
- * to have set the expected job priority.
- *
- */
-public interface IPreFilterJobProvider {
- public Job getPreFilterJob();
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java
deleted file mode 100644
index fe9e1676b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositoryManipulationHook.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-
-/**
- * IRepositoryManipulationHood defines callbacks that are called when the
- * UI is manipulating repositories.
- */
-public interface IRepositoryManipulationHook {
- public void preManipulateRepositories();
-
- public void postManipulateRepositories();
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositorySelectionListener.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositorySelectionListener.java
deleted file mode 100644
index fdbdd1925..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IRepositorySelectionListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.URI;
-
-/**
- * Listener for the repository selection combo. Whenever the selected repository changes (menu selection,
- * text modified, new repo added) this listener will be notified.
- *
- * @since 3.5
- */
-public interface IRepositorySelectionListener {
- /**
- * Called whenever the selected repository in the combo changes.
- *
- * @param repoChoice one of AvailableIUGroup.AVAILABLE_NONE, AvailableIUGroup.AVAILABLE_ALL, AvailableIUGroup.AVAILABLE_LOCAL, AvailableIUGroup.AVAILABLE_SPECIFIED
- * @param repoLocation if the repoChoice is set to AvailableIUGroup.AVAILABLE_SPECIFIED, this field will contain the URI of the selected repo, otherwise <code>null</code>
- */
- public void repositorySelectionChanged(int repoChoice, URI repoLocation);
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java
deleted file mode 100644
index 9b62a6c30..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IResolutionErrorReportingPage.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-
-/**
- *
- * IErrorReportingPage is used to report resolution
- * errors on a wizard page.
- *
- * @since 3.5
- *
- */
-public interface IResolutionErrorReportingPage extends ISelectableIUsPage {
- public void updateStatus(IUElementListRoot root, ProfileChangeOperation operation);
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ISelectableIUsPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ISelectableIUsPage.java
deleted file mode 100644
index a5fe8c3be..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ISelectableIUsPage.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.jface.wizard.IWizardPage;
-
-/**
- *
- * ISelectableIUsPage is used to get the selected or checked IUs in a
- * wizard page.
- *
- * @since 3.5
- *
- */
-public interface ISelectableIUsPage extends IWizardPage {
- public Object[] getCheckedIUElements();
-
- public Object[] getSelectedIUElements();
-
- public void setCheckedElements(Object[] elements);
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java
deleted file mode 100644
index 6eebf3e56..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUCopyrightPropertyPage.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.MalformedURLException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.metadata.ICopyright;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * PropertyPage that shows an IU's copyright
- *
- * @since 3.4
- */
-public class IUCopyrightPropertyPage extends IUPropertyPage {
-
- protected Control createIUPage(Composite parent, IInstallableUnit iu) {
- // Get the copyright in the current locale
- final ICopyright copyright = iu.getCopyright(null);
- if (copyright != null && copyright.getBody().length() > 0) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
-
- Text text = new Text(composite, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.WRAP);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, false, true);
- gd.widthHint = computeWidthLimit(text, 80);
- gd.grabExcessVerticalSpace = true;
- text.setLayoutData(gd);
- text.setText(copyright.getBody());
- text.setEditable(false);
-
- // If an URL was specified, provide a link to it
- String filename = (copyright.getLocation() != null) ? copyright.getLocation().getPath() : null;
- if (filename != null && (filename.endsWith(".htm") || filename.endsWith(".html"))) { //$NON-NLS-1$ //$NON-NLS-2$
- Label label = new Label(composite, SWT.NONE);
- label.setText(ProvUIMessages.IUCopyrightPropertyPage_ViewLinkLabel);
- // Create a link to the copyright URL
- Link link = new Link(composite, SWT.LEFT | SWT.WRAP);
- link.setText(NLS.bind("<a>{0}</a>", URIUtil.toUnencodedString(copyright.getLocation()))); //$NON-NLS-1$
- gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- gd.widthHint = computeWidthLimit(link, 80);
- link.setLayoutData(gd);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- try {
- showURL(copyright.getLocation().toURL());
- } catch (MalformedURLException e1) {
- //cannot show this URL
- }
- }
- });
- }
-
- return composite;
- }
- Label label = new Label(parent, SWT.NULL);
- label.setText(ProvUIMessages.IUCopyrightPropertyPage_NoCopyright);
- return label;
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java
deleted file mode 100644
index 8ae5ffefb..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUDetailsGroup.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource 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:
-* EclipseSource - initial API and implementation
-* IBM Corporation - ongoing development
-******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.actions.PropertyDialogAction;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.window.SameShellProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Creates a details group for a list of IUs.
- */
-public class IUDetailsGroup {
-
- private static final String LINKACTION = "linkAction"; //$NON-NLS-1$
-
- private GridLayout layout;
- private Text detailsArea;
- private GridData gd;
- private Link propLink;
- private ISelectionProvider selectionProvider;
- private int widthHint;
- private boolean scrollable;
- private String lastText;
-
- /**
- *
- */
- public IUDetailsGroup(Composite parent, ISelectionProvider selectionProvider, int widthHint, boolean scrollable) {
- this.selectionProvider = selectionProvider;
- this.widthHint = widthHint;
- this.scrollable = scrollable;
- createGroupComposite(parent);
- }
-
- /**
- * Creates the group composite that holds the details area
- * @param parent The parent composite
- */
- void createGroupComposite(Composite parent) {
- Group detailsComposite = new Group(parent, SWT.NONE);
- GC gc = new GC(parent);
- gc.setFont(JFaceResources.getDialogFont());
- FontMetrics fontMetrics = gc.getFontMetrics();
- gc.dispose();
-
- detailsComposite.setText(ProvUIMessages.ProfileModificationWizardPage_DetailsLabel);
- layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- detailsComposite.setLayout(layout);
- gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- detailsComposite.setLayoutData(gd);
-
- gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.verticalIndent = Dialog.convertVerticalDLUsToPixels(fontMetrics, IDialogConstants.VERTICAL_SPACING);
- gd.heightHint = Dialog.convertHeightInCharsToPixels(fontMetrics, ILayoutConstants.DEFAULT_DESCRIPTION_HEIGHT);
- gd.minimumHeight = Dialog.convertHeightInCharsToPixels(fontMetrics, ILayoutConstants.MINIMUM_DESCRIPTION_HEIGHT);
- gd.widthHint = widthHint;
- if (scrollable)
- detailsArea = new Text(detailsComposite, SWT.WRAP | SWT.READ_ONLY | SWT.V_SCROLL);
- else
- detailsArea = new Text(detailsComposite, SWT.WRAP | SWT.READ_ONLY);
- detailsArea.setLayoutData(gd);
-
- gd = new GridData(SWT.END, SWT.BOTTOM, true, false);
- gd.horizontalIndent = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.HORIZONTAL_MARGIN);
- propLink = createLink(detailsComposite, new PropertyDialogAction(new SameShellProvider(parent.getShell()), selectionProvider), ProvUIMessages.AvailableIUsPage_GotoProperties);
- propLink.setLayoutData(gd);
-
- // set the initial state based on selection
- propLink.setVisible(!selectionProvider.getSelection().isEmpty());
-
- }
-
- /**
- * Set the detail text
- */
- public void setDetailText(String text) {
- // If the string is the same but the user has scrolled, the text
- // widget will reset the selection. This makes it look like the text
- // has changed when it hasn't. For this reason, we check equality first.
- if (lastText == null || !lastText.equals(text))
- detailsArea.setText(text);
- lastText = text;
- }
-
- /**
- * Toggles the property link for the details area.
- */
- public void enablePropertyLink(boolean enable) {
- propLink.setVisible(enable);
- }
-
- private Link createLink(Composite parent, IAction action, String text) {
- Link link = new Link(parent, SWT.PUSH);
- link.setText(text);
-
- link.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- IAction linkAction = getLinkAction(event.widget);
- if (linkAction != null) {
- linkAction.runWithEvent(event);
- }
- }
- });
- link.setToolTipText(action.getToolTipText());
- link.setData(LINKACTION, action);
- return link;
- }
-
- IAction getLinkAction(Widget widget) {
- Object data = widget.getData(LINKACTION);
- if (data == null || !(data instanceof IAction)) {
- return null;
- }
- return (IAction) data;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java
deleted file mode 100644
index cca891543..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * PropertyPage that shows an IU's properties
- *
- * @since 3.4
- */
-public class IUGeneralInfoPropertyPage extends IUPropertyPage {
-
- protected Control createIUPage(Composite parent, IInstallableUnit iu) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
-
- createGeneralSection(composite, iu);
- createDescriptionSection(composite, iu);
- createDocumentationSection(composite, iu);
-
- return composite;
- }
-
- private void createGeneralSection(Composite parent, IInstallableUnit iu) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- // Get general info in the default locale
- addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_NameLabel, iu.getProperty(IInstallableUnit.PROP_NAME, null));
- addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_IdentifierLabel, iu.getId());
- addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_VersionLabel, iu.getVersion().toString());
- addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_ProviderLabel, iu.getProperty(IInstallableUnit.PROP_PROVIDER, null));
- addField(composite, ProvUIMessages.IUGeneralInfoPropertyPage_ContactLabel, iu.getProperty(IInstallableUnit.PROP_CONTACT, null));
-
- }
-
- private void createDescriptionSection(Composite parent, IInstallableUnit iu) {
- // Get the iu description in the default locale
- String description = iu.getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
- if (description != null && description.length() > 0) {
- Group group = new Group(parent, SWT.NONE);
- group.setText(ProvUIMessages.IUGeneralInfoPropertyPage_DescriptionLabel);
- group.setLayout(new GridLayout());
- group.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Text text = new Text(group, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY | SWT.V_SCROLL);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.widthHint = computeWidthLimit(text, 80);
- gd.heightHint = 200;
- text.setEditable(false);
- text.setText(description);
- text.setLayoutData(gd);
- }
-
- }
-
- private void createDocumentationSection(Composite parent, IInstallableUnit iu) {
- String docURL = iu.getProperty(IInstallableUnit.PROP_DOC_URL);
- if (docURL != null && docURL.length() > 0) {
- final URL url;
- try {
- url = new URL(docURL);
- } catch (MalformedURLException e) {
- return;
- }
- String filename = (url != null) ? url.getFile() : null;
- if (filename != null && (filename.endsWith(".htm") || filename.endsWith(".html"))) { //$NON-NLS-1$ //$NON-NLS-2$
- // create some space
- new Label(parent, SWT.NONE);
- // Now create a link to the documentation
- Label label = new Label(parent, SWT.NONE);
- label.setText(ProvUIMessages.IUGeneralInfoPropertyPage_DocumentationLink);
- Link link = new Link(parent, SWT.LEFT | SWT.WRAP);
- link.setText(NLS.bind("<a>{0}</a>", url.toExternalForm())); //$NON-NLS-1$
- GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- gd.widthHint = computeWidthLimit(link, 80);
- link.setLayoutData(gd);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- showURL(url);
- }
- });
- }
- }
- }
-
- private void addField(Composite parent, String property, String value) {
-
- if (value != null && value.length() > 0) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(property);
-
- Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
- text.setText(getEscapedString(value));
- // Needed to get the right color on the Mac.
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=258112
- text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- text.setLayoutData(gd);
- }
- }
-
- private String getEscapedString(String value) {
- StringBuffer result = new StringBuffer(value.length() + 10);
- for (int i = 0; i < value.length(); ++i) {
- char c = value.charAt(i);
- if ('&' == c) {
- result.append("&&"); //$NON-NLS-1$
- } else {
- result.append(c);
- }
- }
- return result.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java
deleted file mode 100644
index 2f773c767..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IULicensePropertyPage.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.util.Iterator;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.ILicense;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * PropertyPage that shows an IU's license
- *
- * @since 3.4
- */
-public class IULicensePropertyPage extends IUPropertyPage {
-
- protected Control createIUPage(Composite parent, IInstallableUnit iu) {
- // Get the license in the default locale
- Iterator<ILicense> licenses = iu.getLicenses(null).iterator();
- final ILicense license = licenses.hasNext() ? licenses.next() : null;
- //FIXME
- if (license != null && license.getBody().length() > 0) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
-
- Text text = new Text(composite, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER | SWT.WRAP);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.widthHint = computeWidthLimit(text, 80);
- gd.heightHint = computeHeightLimit(text, 20);
- text.setLayoutData(gd);
- text.setText(license.getBody());
- text.setEditable(false);
-
- // If an URL was specified, provide a link to it
- String filename = (license.getLocation() != null) ? license.getLocation().getPath() : null;
- if (filename != null && (filename.endsWith(".htm") || filename.endsWith(".html"))) { //$NON-NLS-1$ //$NON-NLS-2$
- Label label = new Label(composite, SWT.NONE);
- label.setText(ProvUIMessages.IULicensePropertyPage_ViewLicenseLabel);
- // Create a link to the license URL
- Link link = new Link(composite, SWT.LEFT | SWT.WRAP);
- link.setText(NLS.bind("<a>{0}</a>", URIUtil.toUnencodedString(license.getLocation()))); //$NON-NLS-1$
- gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- gd.widthHint = computeWidthLimit(link, 80);
- link.setLayoutData(gd);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- try {
- showURL(license.getLocation().toURL());
- } catch (Exception e1) {
- //can't browse invalid location
- }
- }
- });
- }
-
- return composite;
- }
- Label label = new Label(parent, SWT.NULL);
- label.setText(ProvUIMessages.IULicensePropertyPage_NoLicense);
- return label;
-
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
deleted file mode 100644
index 5109868fd..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUPropertyPage.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.URL;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.browser.IWebBrowser;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * PropertyPage that shows an IU's properties
- *
- * @since 3.4
- */
-public abstract class IUPropertyPage extends PropertyPage {
-
- protected Control createContents(Composite parent) {
- noDefaultAndApplyButton();
- IInstallableUnit iu = ProvUI.getAdapter(getElement(), IInstallableUnit.class);
- Control control;
- if (iu == null) {
- Label label = new Label(parent, SWT.DEFAULT);
- label.setText(ProvUIMessages.IUPropertyPage_NoIUSelected);
- control = label;
- }
- control = createIUPage(parent, iu);
- Dialog.applyDialogFont(parent);
- return control;
- }
-
- protected int computeWidthLimit(Control control, int nchars) {
- GC gc = new GC(control);
- gc.setFont(control.getFont());
- FontMetrics fontMetrics = gc.getFontMetrics();
- gc.dispose();
- return Dialog.convertWidthInCharsToPixels(fontMetrics, nchars);
- }
-
- protected int computeHeightLimit(Control control, int nchars) {
- GC gc = new GC(control);
- gc.setFont(control.getFont());
- FontMetrics fontMetrics = gc.getFontMetrics();
- gc.dispose();
- return Dialog.convertHeightInCharsToPixels(fontMetrics, nchars);
- }
-
- protected abstract Control createIUPage(Composite parent, IInstallableUnit iu);
-
- protected void showURL(URL url) {
- IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
- try {
- IWebBrowser browser = support.getExternalBrowser();
- browser.openURL(url);
- } catch (PartInitException e) {
- ProvUI.handleException(e, ProvUIMessages.IUGeneralInfoPropertyPage_CouldNotOpenBrowser, StatusManager.LOG | StatusManager.BLOCK);
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IViewMenuProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IViewMenuProvider.java
deleted file mode 100644
index a954bc8f3..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IViewMenuProvider.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.jface.action.IMenuManager;
-
-/**
- *
- * IViewMenuProvider is used to fill a view menu in dialog groups that support them.
- * @since 3.4
- *
- */
-public interface IViewMenuProvider {
- public void fillViewMenu(IMenuManager viewMenu);
-}
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
deleted file mode 100644
index 142b78875..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizard.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.InstallOperation;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * An install wizard that allows the users to browse all of the repositories
- * and search/select for items to install.
- *
- * @since 3.6
- */
-public class InstallWizard extends WizardWithLicenses {
-
- SelectableIUsPage errorReportingPage;
- boolean ignoreSelectionChanges = false;
- IStatus installHandlerStatus;
-
- public InstallWizard(ProvisioningUI ui, InstallOperation operation, Collection<IInstallableUnit> initialSelections, LoadMetadataRepositoryJob preloadJob) {
- super(ui, operation, initialSelections == null ? null : initialSelections.toArray(), preloadJob);
- setWindowTitle(ProvUIMessages.InstallIUOperationLabel);
- setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_INSTALL));
- }
-
- protected ResolutionResultsWizardPage createResolutionPage() {
- return new InstallWizardPage(ui, this, root, (InstallOperation) operation);
- }
-
- protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
- mainPage = new AvailableIUsPage(ui, this);
- if (selections != null && selections.length > 0)
- mainPage.setCheckedElements(selections);
- return mainPage;
-
- }
-
- protected void initializeResolutionModelElements(Object[] selectedElements) {
- if (selectedElements == null)
- return;
- root = new IUElementListRoot();
- ArrayList<AvailableIUElement> list = new ArrayList<AvailableIUElement>(selectedElements.length);
- ArrayList<AvailableIUElement> selections = new ArrayList<AvailableIUElement>(selectedElements.length);
- for (int i = 0; i < selectedElements.length; i++) {
- IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
- if (iu != null) {
- AvailableIUElement element = new AvailableIUElement(root, iu, getProfileId(), shouldShowProvisioningPlanChildren());
- list.add(element);
- selections.add(element);
- }
- }
- root.setChildren(list.toArray());
- planSelections = selections.toArray();
- }
-
- /*
- * Overridden to dynamically determine which page to get
- * selections from. (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getOperationSelections()
- */
- protected Object[] getOperationSelections() {
- return getOperationSelectionsPage().getCheckedIUElements();
- }
-
- /*
- * Get the page that is driving operation selections. This is
- * usually the main page, but it could be error page if there
- * was a resolution error and the user decides to change selections
- * and try again without going back.
- */
- protected ISelectableIUsPage getOperationSelectionsPage() {
- IWizardPage page = getContainer().getCurrentPage();
- if (page instanceof ISelectableIUsPage)
- return (ISelectableIUsPage) page;
- // return the main page if we weren't on main or error page
- return mainPage;
- }
-
- protected ProvisioningContext getProvisioningContext() {
- return ((AvailableIUsPage) mainPage).getProvisioningContext();
- }
-
- protected IResolutionErrorReportingPage createErrorReportingPage() {
- if (root == null)
- errorReportingPage = new SelectableIUsPage(ui, this, null, null);
- else
- errorReportingPage = new SelectableIUsPage(ui, this, root, root.getChildren(root));
- errorReportingPage.setTitle(ProvUIMessages.InstallWizardPage_Title);
- errorReportingPage.setDescription(ProvUIMessages.PreselectedIUInstallWizard_Description);
- errorReportingPage.updateStatus(root, operation);
- return errorReportingPage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
- */
- protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
- InstallOperation op = new InstallOperation(ui.getSession(), ElementUtils.elementsToIUs(elements));
- op.setProfileId(getProfileId());
- // op.setRootMarkerKey(getRootMarkerKey());
- return op;
- }
-
- protected boolean shouldUpdateErrorPageModelOnPlanChange() {
- // We don't want the root of the error page to change unless we are on the
- // main page. For example, if we are on the error page, change checkmarks, and
- // resolve again with an error, we wouldn't want the root items to change in the
- // error page.
- return getContainer().getCurrentPage() == mainPage && super.shouldUpdateErrorPageModelOnPlanChange();
- }
-
- protected void planChanged() {
- super.planChanged();
- synchSelections(getOperationSelectionsPage());
- }
-
- /*
- * overridden to ensure that the main page selections stay in synch
- * with changes to the error page.
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#operationSelectionsChanged(org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage)
- */
- public void operationSelectionsChanged(ISelectableIUsPage page) {
- if (ignoreSelectionChanges)
- return;
- super.operationSelectionsChanged(page);
- // If we are on the error page, resolution has failed.
- // Our ability to move on depends on whether the selections have changed.
- // If they are the same selections, then we are not complete until selections are changed.
- if (getOperationSelectionsPage() == errorPage)
- ((WizardPage) errorPage).setPageComplete(pageSelectionsHaveChanged(errorPage) && errorPage.getCheckedIUElements().length > 0);
- synchSelections(page);
- }
-
- private void synchSelections(ISelectableIUsPage triggeringPage) {
- // We don't want our programmatic changes to cause all this to happen again
- ignoreSelectionChanges = true;
- try {
- if (triggeringPage == errorReportingPage) {
- mainPage.setCheckedElements(triggeringPage.getCheckedIUElements());
- } else if (triggeringPage == mainPage) {
- errorReportingPage.setCheckedElements(triggeringPage.getCheckedIUElements());
- }
- } finally {
- ignoreSelectionChanges = false;
- }
- }
-
- /*
- * Overridden to check whether there are UpdateManager install handlers in the item
- * to be installed. Operations don't know about this compatibility issue.
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getCurrentStatus()
- */
- public IStatus getCurrentStatus() {
- IStatus originalStatus = super.getCurrentStatus();
- int sev = originalStatus.getSeverity();
- // Use the previously computed status if the user cancelled or if we were already in error.
- // If we don't have an operation or a plan, we can't check this condition either, so just
- // use the normal status.
- if (sev == IStatus.CANCEL || sev == IStatus.ERROR || operation == null || operation.getProvisioningPlan() == null) {
- return originalStatus;
- }
- // Does the plan require install handler support?
- installHandlerStatus = UpdateManagerCompatibility.getInstallHandlerStatus(operation.getProvisioningPlan());
- if (!installHandlerStatus.isOK()) {
- // Set the status into the wizard. This ensures future calls to this method won't
- // repeat the work (and prompting).
- couldNotResolveStatus = installHandlerStatus;
-
- // Is the update manager installer present? If so, offer to open it.
- // In either case, the failure will be reported in this wizard.
- if (ProvUI.isUpdateManagerInstallerPresent()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- Shell shell = ProvUI.getDefaultParentShell();
- MessageDialog dialog = new MessageDialog(shell, ProvUIMessages.Policy_RequiresUpdateManagerTitle, null, ProvUIMessages.Policy_RequiresUpdateManagerMessage, MessageDialog.WARNING, new String[] {ProvUIMessages.LaunchUpdateManagerButton, IDialogConstants.CANCEL_LABEL}, 0);
- if (dialog.open() == 0)
- BusyIndicator.showWhile(shell.getDisplay(), new Runnable() {
- public void run() {
- UpdateManagerCompatibility.openInstaller();
- }
- });
- }
- });
- }
- return installHandlerStatus;
- }
- return originalStatus;
- }
-
- /*
- * When we've found an install handler, that status trumps anything that the operation might have
- * determined. We are relying here on the knowledge that the wizard's couldNotResolveStatus is
- * reset on every new resolution, so that status only holds the installHandler status when it is
- * the current status. The installHandlerStatus must be non-OK for it to matter at all.
- *
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#statusOverridesOperation()
- */
- public boolean statusOverridesOperation() {
- return installHandlerStatus != null && !installHandlerStatus.isOK() && couldNotResolveStatus == installHandlerStatus;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
deleted file mode 100644
index 8c260697f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstallWizardPage.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.p2.operations.InstallOperation;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-public class InstallWizardPage extends SizeComputingWizardPage {
-
- public InstallWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, InstallOperation operation) {
- super(ui, wizard, root, operation);
- setTitle(ProvUIMessages.InstallWizardPage_Title);
- setDescription(ProvUIMessages.InstallWizardPage_NoCheckboxDescription);
- }
-
- protected String getOperationLabel() {
- return ProvUIMessages.InstallIUOperationLabel;
- }
-
- protected String getOperationTaskName() {
- return ProvUIMessages.InstallIUOperationTask;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java
deleted file mode 100644
index d944f93b9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/InstalledIUGroup.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.p2.ui.model.ProfileElement;
-import org.eclipse.equinox.internal.p2.ui.viewers.*;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.widgets.*;
-
-/**
- * An InstalledIUGroup is a reusable UI component that displays the
- * IU's in a given profile.
- *
- * @since 3.4
- */
-public class InstalledIUGroup extends StructuredIUGroup {
-
- private String profileId;
-
- /**
- * Create a group that represents the installed IU's.
- *
- * @param parent the parent composite for the group
- * @param font The font to use for calculating pixel sizes. This font is
- * not managed by the receiver.
- * @param profileId the id of the profile whose content is being shown.
- * @param columnConfig the columns to be shown
- */
- public InstalledIUGroup(ProvisioningUI ui, final Composite parent, Font font, String profileId, IUColumnConfig[] columnConfig) {
- super(ui, parent, font, columnConfig);
- if (profileId == null)
- this.profileId = ProvisioningUI.getDefaultUI().getProfileId();
- else
- this.profileId = profileId;
- createGroupComposite(parent);
- }
-
- protected StructuredViewer createViewer(Composite parent) {
- // Table of installed IU's
- TreeViewer installedIUViewer = new TreeViewer(parent, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
-
- // Filters and sorters before establishing content, so we don't refresh unnecessarily.
- IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
- comparator.useColumnConfig(getColumnConfig());
- installedIUViewer.setComparator(comparator);
- installedIUViewer.setComparer(new ProvElementComparer());
-
- // Now the content.
- installedIUViewer.setContentProvider(new DeferredQueryContentProvider());
-
- // Now the visuals, columns before labels.
- setTreeColumns(installedIUViewer.getTree());
- installedIUViewer.setLabelProvider(new IUDetailsLabelProvider(null, getColumnConfig(), null));
-
- // Input last.
- installedIUViewer.setInput(getInput());
-
- final StructuredViewerProvisioningListener listener = new StructuredViewerProvisioningListener(getClass().getName(), installedIUViewer, ProvUIProvisioningListener.PROV_EVENT_IU | ProvUIProvisioningListener.PROV_EVENT_PROFILE);
- ProvUIActivator.getDefault().addProvisioningListener(listener);
- installedIUViewer.getControl().addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- ProvUIActivator.getDefault().removeProvisioningListener(listener);
- }
- });
- return installedIUViewer;
- }
-
- private void setTreeColumns(Tree tree) {
- IUColumnConfig[] columns = getColumnConfig();
- tree.setHeaderVisible(true);
-
- for (int i = 0; i < columns.length; i++) {
- TreeColumn tc = new TreeColumn(tree, SWT.NONE, i);
- tc.setResizable(true);
- tc.setText(columns[i].getColumnTitle());
- tc.setWidth(columns[i].getWidthInPixels(tree));
- }
- }
-
- Object getInput() {
- ProfileElement element = new ProfileElement(null, profileId);
- return element;
- }
-
- /**
- * Get the viewer used to represent the installed IU's
- */
- public StructuredViewer getStructuredViewer() {
- return super.getStructuredViewer();
- }
-
- public Control getDefaultFocusControl() {
- return super.getDefaultFocusControl();
- }
-}
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
deleted file mode 100644
index e1789864a..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/PreselectedIUInstallWizard.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- * 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.*;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.InstallOperation;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * An Install wizard that is invoked when the user has already selected which
- * IUs should be installed and does not need to browse the available software.
- *
- * @since 3.5
- */
-public class PreselectedIUInstallWizard extends WizardWithLicenses {
-
- QueryableMetadataRepositoryManager manager;
-
- 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));
- }
-
- protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
- mainPage = new SelectableIUsPage(ui, this, input, selections);
- mainPage.setTitle(ProvUIMessages.PreselectedIUInstallWizard_Title);
- mainPage.setDescription(ProvUIMessages.PreselectedIUInstallWizard_Description);
- ((SelectableIUsPage) mainPage).updateStatus(input, operation);
- return mainPage;
- }
-
- protected ResolutionResultsWizardPage createResolutionPage() {
- return new InstallWizardPage(ui, this, root, (InstallOperation) operation);
- }
-
- protected void initializeResolutionModelElements(Object[] selectedElements) {
- root = new IUElementListRoot();
- ArrayList<AvailableIUElement> list = new ArrayList<AvailableIUElement>(selectedElements.length);
- ArrayList<AvailableIUElement> selected = new ArrayList<AvailableIUElement>(selectedElements.length);
- for (int i = 0; i < selectedElements.length; i++) {
- IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
- if (iu != null) {
- AvailableIUElement element = new AvailableIUElement(root, iu, getProfileId(), shouldShowProvisioningPlanChildren());
- list.add(element);
- selected.add(element);
- }
- }
- root.setChildren(list.toArray());
- planSelections = selected.toArray();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getErrorReportingPage()
- */
- protected IResolutionErrorReportingPage createErrorReportingPage() {
- return (IResolutionErrorReportingPage) mainPage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
- */
- protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
- InstallOperation op = new InstallOperation(ui.getSession(), ElementUtils.elementsToIUs(elements));
- op.setProfileId(getProfileId());
- // op.setRootMarkerKey(getRootMarkerKey());
- op.setProvisioningContext(getProvisioningContext());
- return op;
- }
-}
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
deleted file mode 100644
index 3175aa5ac..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningOperationWizard.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashSet;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.ui.*;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.wizard.*;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Common superclass for a wizard that performs a provisioning
- * operation.
- *
- * @since 3.5
- */
-public abstract class ProvisioningOperationWizard extends Wizard {
-
- private static final String WIZARD_SETTINGS_SECTION = "WizardSettings"; //$NON-NLS-1$
-
- protected ProvisioningUI ui;
- protected IUElementListRoot root;
- protected ProfileChangeOperation operation;
- protected Object[] planSelections;
- protected ISelectableIUsPage mainPage;
- protected IResolutionErrorReportingPage errorPage;
- protected ResolutionResultsWizardPage resolutionPage;
- private ProvisioningContext provisioningContext;
- protected LoadMetadataRepositoryJob repoPreloadJob;
- IStatus couldNotResolveStatus = Status.OK_STATUS; // we haven't tried and failed
-
- boolean waitingForOtherJobs = false;
-
- public ProvisioningOperationWizard(ProvisioningUI ui, ProfileChangeOperation operation, Object[] initialSelections, LoadMetadataRepositoryJob job) {
- super();
- this.ui = ui;
- initializeResolutionModelElements(initialSelections);
- this.operation = operation;
- this.repoPreloadJob = job;
- setForcePreviousAndNextButtons(true);
- setNeedsProgressMonitor(true);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- mainPage = createMainPage(root, planSelections);
- addPage(mainPage);
- errorPage = createErrorReportingPage();
- if (errorPage != mainPage)
- addPage(errorPage);
- resolutionPage = createResolutionPage();
- addPage(resolutionPage);
- }
-
- protected abstract IResolutionErrorReportingPage createErrorReportingPage();
-
- protected abstract ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections);
-
- protected abstract ResolutionResultsWizardPage createResolutionPage();
-
- public boolean performFinish() {
- return resolutionPage.performFinish();
- }
-
- protected LoadMetadataRepositoryJob getRepositoryPreloadJob() {
- return repoPreloadJob;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
- // If we are moving from the main page or error page, we may need to resolve before
- // advancing.
- if (page == mainPage || page == errorPage) {
- ISelectableIUsPage currentPage = (ISelectableIUsPage) page;
- // Do we need to resolve?
- if (operation == null || (operation != null && shouldRecomputePlan(currentPage))) {
- recomputePlan(getContainer());
- } else {
- // the selections have not changed from an IU point of view, but we want
- // to reinitialize the resolution model elements to ensure they are up to
- // date.
- initializeResolutionModelElements(planSelections);
- }
- IStatus status = operation.getResolutionResult();
- if (status == null || status.getSeverity() == IStatus.ERROR) {
- return errorPage;
- } else if (status.getSeverity() == IStatus.CANCEL) {
- return page;
- } else {
- return resolutionPage;
- }
- }
- return super.getNextPage(page);
- }
-
- /**
- * The selections that drive the provisioning operation have changed. We might need to
- * change the completion state of the resolution page.
- */
- public void operationSelectionsChanged(ISelectableIUsPage page) {
- if (resolutionPage != null) {
- // If the page selections are different than what we may have resolved
- // against, then this page is not complete.
- boolean old = resolutionPage.isPageComplete();
- if (pageSelectionsHaveChanged(page))
- resolutionPage.setPageComplete(false);
- // If the state has truly changed, update the buttons.
- if (old != resolutionPage.isPageComplete()) {
- IWizardContainer container = getContainer();
- if (container != null && container.getCurrentPage() != null)
- getContainer().updateButtons();
- }
- }
- }
-
- private boolean shouldRecomputePlan(ISelectableIUsPage page) {
- boolean previouslyWaiting = waitingForOtherJobs;
- boolean previouslyCanceled = getCurrentStatus().getSeverity() == IStatus.CANCEL;
- waitingForOtherJobs = ui.hasScheduledOperations();
- return waitingForOtherJobs || previouslyWaiting || previouslyCanceled || pageSelectionsHaveChanged(page) || provisioningContextChanged();
- }
-
- protected boolean pageSelectionsHaveChanged(ISelectableIUsPage page) {
- HashSet<IInstallableUnit> selectedIUs = new HashSet<IInstallableUnit>();
- Object[] currentSelections = page.getCheckedIUElements();
- selectedIUs.addAll(ElementUtils.elementsToIUs(currentSelections));
- HashSet<IInstallableUnit> lastIUSelections = new HashSet<IInstallableUnit>();
- if (planSelections != null)
- lastIUSelections.addAll(ElementUtils.elementsToIUs(planSelections));
- return !(selectedIUs.equals(lastIUSelections));
- }
-
- private boolean provisioningContextChanged() {
- ProvisioningContext currentProvisioningContext = getProvisioningContext();
- if (currentProvisioningContext == null && provisioningContext == null)
- return false;
- if (currentProvisioningContext != null && provisioningContext != null)
- return !currentProvisioningContext.equals(provisioningContext);
- // One is null and the other is not
- return true;
- }
-
- protected void planChanged() {
- resolutionPage.updateStatus(root, operation);
- if (errorPage != resolutionPage) {
- IUElementListRoot newRoot = shouldUpdateErrorPageModelOnPlanChange() ? root : null;
- errorPage.updateStatus(newRoot, operation);
- }
- }
-
- protected boolean shouldUpdateErrorPageModelOnPlanChange() {
- return errorPage != mainPage;
- }
-
- protected abstract void initializeResolutionModelElements(Object[] selectedElements);
-
- protected ProvisioningContext getProvisioningContext() {
- return new ProvisioningContext(ui.getSession().getProvisioningAgent());
- }
-
- /**
- * Recompute the provisioning plan based on the items in the IUElementListRoot and the given provisioning context.
- * Report progress using the specified runnable context. This method may be called before the page is created.
- *
- * @param runnableContext
- */
- public void recomputePlan(IRunnableContext runnableContext) {
- couldNotResolveStatus = Status.OK_STATUS;
- provisioningContext = getProvisioningContext();
- initializeResolutionModelElements(getOperationSelections());
- if (planSelections.length == 0) {
- operation = null;
- couldNotResolve(ProvUIMessages.ResolutionWizardPage_NoSelections);
- } else {
- operation = getProfileChangeOperation(planSelections);
- operation.setProvisioningContext(provisioningContext);
- try {
- runnableContext.run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- operation.resolveModal(monitor);
- }
- });
-
- } catch (InterruptedException e) {
- // Nothing to report if thread was interrupted
- } catch (InvocationTargetException e) {
- ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
- couldNotResolve(null);
- }
- }
- planChanged();
- }
-
- /*
- * Get the selections that drive the provisioning operation.
- */
- protected Object[] getOperationSelections() {
- return mainPage.getCheckedIUElements();
- }
-
- protected abstract ProfileChangeOperation getProfileChangeOperation(Object[] elements);
-
- void couldNotResolve(String message) {
- if (message != null) {
- couldNotResolveStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, message, null);
- } else {
- couldNotResolveStatus = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, ProvUIMessages.ProvisioningOperationWizard_UnexpectedFailureToResolve, null);
- }
- StatusManager.getManager().handle(couldNotResolveStatus, StatusManager.LOG);
- }
-
- public IStatus getCurrentStatus() {
- if (statusOverridesOperation())
- return couldNotResolveStatus;
- if (operation != null && operation.getResolutionResult() != null)
- return operation.getResolutionResult();
- return couldNotResolveStatus;
- }
-
- public String getDialogSettingsSectionName() {
- return getClass().getName() + "." + WIZARD_SETTINGS_SECTION; //$NON-NLS-1$
- }
-
- public void saveBoundsRelatedSettings() {
- IWizardPage[] pages = getPages();
- for (int i = 0; i < pages.length; i++) {
- if (pages[i] instanceof ProvisioningWizardPage)
- ((ProvisioningWizardPage) pages[i]).saveBoundsRelatedSettings();
- }
- }
-
- protected Policy getPolicy() {
- return ui.getPolicy();
- }
-
- protected String getProfileId() {
- return ui.getProfileId();
- }
-
- protected boolean shouldShowProvisioningPlanChildren() {
- return ProvUI.getQueryContext(getPolicy()).getShowProvisioningPlanChildren();
- }
-
- /*
- * Overridden to start the preload job after page control creation.
- * This allows any listeners on repo events to be set up before a
- * batch load occurs. The job creator uses a property to indicate if
- * the job needs scheduling (the client may have already completed the job
- * before the UI was opened).
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#createPageControls(org.eclipse.swt.widgets.Composite)
- */
- public void createPageControls(Composite pageContainer) {
- // We call this so that wizards ignore all repository eventing that occurs while the wizard is
- // open. Otherwise, we can get an add event when a repository loads its references that we
- // don't want to respond to. Since repo discovery events can be received asynchronously by the
- // manager, the subsequent add events generated by the manager aren't guaranteed to be synchronous,
- // even if our listener is synchronous. Thus, we can't fine-tune
- // the "ignore" window to a specific operation.
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=277265#c38
- ui.signalRepositoryOperationStart();
- super.createPageControls(pageContainer);
- if (repoPreloadJob != null) {
- if (repoPreloadJob.getProperty(LoadMetadataRepositoryJob.WIZARD_CLIENT_SHOULD_SCHEDULE) != null) {
- // job has not been scheduled. Set a listener so we can report accumulated errors and
- // schedule it.
- repoPreloadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent e) {
- asyncReportLoadFailures();
- }
- });
- repoPreloadJob.schedule();
- } else {
- // job has been scheduled, might already be done.
- if (repoPreloadJob.getState() == Job.NONE) {
- // job is done, report failures found so far
- // do it asynchronously since we are in the middle of creation
- asyncReportLoadFailures();
- } else {
- // job is waiting, sleeping, running, report failures when
- // it's done
- repoPreloadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent e) {
- asyncReportLoadFailures();
- }
- });
- }
-
- }
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#dispose()
- */
- public void dispose() {
- ui.signalRepositoryOperationComplete(null, false);
- super.dispose();
- }
-
- void asyncReportLoadFailures() {
- if (repoPreloadJob != null && getShell() != null && !getShell().isDisposed()) {
- getShell().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (PlatformUI.isWorkbenchRunning() && getShell() != null && !getShell().isDisposed())
- repoPreloadJob.reportAccumulatedStatus();
- }
- });
- }
- }
-
- /*
- * Return a boolean indicating whether the wizard's current status should override any detail
- * reported by the operation.
- */
- public boolean statusOverridesOperation() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java
deleted file mode 100644
index 4f650b656..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardDialog.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Subclass of WizardDialog that provides bounds saving behavior.
- * @since 3.5
- *
- */
-public class ProvisioningWizardDialog extends WizardDialog {
- private ProvisioningOperationWizard wizard;
-
- public ProvisioningWizardDialog(Shell parent, ProvisioningOperationWizard wizard) {
- super(parent, wizard);
- this.wizard = wizard;
- setShellStyle(getShellStyle() | SWT.RESIZE);
- }
-
- protected IDialogSettings getDialogBoundsSettings() {
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(wizard.getDialogSettingsSectionName());
- if (section == null) {
- section = settings.addNewSection(wizard.getDialogSettingsSectionName());
- }
- return section;
- }
-
- /**
- * @see org.eclipse.jface.window.Window#close()
- */
- public boolean close() {
- if (getShell() != null && !getShell().isDisposed()) {
- wizard.saveBoundsRelatedSettings();
- }
- return super.close();
- }
-
- /**
- * This method is provided only for automated testing.
- *
- * @noreference This method is not intended to be referenced by clients.
- */
- public Button testGetButton(int id) {
- return getButton(id);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java
deleted file mode 100644
index 4418a01e8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ProvisioningWizardPage.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.p2.ui.*;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.PlatformUI;
-
-abstract class ProvisioningWizardPage extends WizardPage implements ICopyable {
-
- private ProvisioningUI ui;
- private ProvisioningOperationWizard wizard;
-
- protected ProvisioningWizardPage(String pageName, ProvisioningUI ui, ProvisioningOperationWizard wizard) {
- super(pageName);
- this.wizard = wizard;
- this.ui = ui;
- }
-
- protected void activateCopy(Control control) {
- CopyUtils.activateCopy(this, control);
-
- }
-
- protected ProvisioningOperationWizard getProvisioningWizard() {
- return wizard;
- }
-
- public void copyToClipboard(Control activeControl) {
- String text = getClipboardText(activeControl);
- if (text.length() == 0)
- return;
- Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
- clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
- clipboard.dispose();
- }
-
- protected abstract String getClipboardText(Control control);
-
- /**
- * Save any settings that are related to the bounds of the wizard.
- * This method is called when the wizard is about to close.
- */
- public void saveBoundsRelatedSettings() {
- // Default is to do nothing
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ui;
- }
-
- protected Policy getPolicy() {
- return ui.getPolicy();
- }
-
- String getProfileId() {
- return ui.getProfileId();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java
deleted file mode 100644
index a44ee11d4..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryManipulatorDropTarget.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.progress.WorkbenchJob;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * RepositoryManipulatorDropTarget recognizes both URLTransfer and
- * FileTransfer data types. Files are converted to URL's with the file
- * protocol. Any dropped URLs (or Files) are interpreted to mean that the
- * user wishes to add these files as repositories.
- *
- * @since 3.4
- *
- */
-public class RepositoryManipulatorDropTarget extends URLDropAdapter {
- ProvisioningUI ui;
- RepositoryTracker tracker;
- Control control;
-
- public RepositoryManipulatorDropTarget(ProvisioningUI ui, Control control) {
- super(true); // convert file drops to URL
- Assert.isNotNull(ui);
- this.ui = ui;
- this.tracker = ui.getRepositoryTracker();
- this.control = control;
- }
-
- protected void handleDrop(String urlText, final DropTargetEvent event) {
- event.detail = DND.DROP_NONE;
- final URI[] location = new URI[1];
- try {
- location[0] = URIUtil.fromString(urlText);
- } catch (URISyntaxException e) {
- ProvUI.reportStatus(tracker.getInvalidLocationStatus(urlText), StatusManager.SHOW | StatusManager.LOG);
- return;
- }
- if (location[0] == null)
- return;
-
- Job job = new WorkbenchJob(ProvUIMessages.RepositoryManipulatorDropTarget_DragAndDropJobLabel) {
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- IStatus status = tracker.validateRepositoryLocation(ui.getSession(), location[0], false, monitor);
- if (status.isOK()) {
- tracker.addRepository(location[0], null, ui.getSession());
- event.detail = DND.DROP_LINK;
- } else if (status.getSeverity() == IStatus.CANCEL) {
- event.detail = DND.DROP_NONE;
- } else {
- status = new MultiStatus(ProvUIActivator.PLUGIN_ID, 0, new IStatus[] {status}, NLS.bind(ProvUIMessages.RepositoryManipulatorDropTarget_DragSourceNotValid, URIUtil.toUnencodedString(location[0])), null);
- event.detail = DND.DROP_NONE;
- }
- return status;
- }
- };
- job.setPriority(Job.SHORT);
- job.setUser(true);
- job.schedule();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java
deleted file mode 100644
index d1f31d688..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositoryNameAndLocationDialog.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * Class for showing a repository name and location
- *
- * @since 3.4
- *
- */
-public class RepositoryNameAndLocationDialog extends StatusDialog {
-
- Button okButton;
- Text url, nickname;
- ProvisioningUI ui;
- URI location;
- String name;
-
- public RepositoryNameAndLocationDialog(Shell parentShell, ProvisioningUI ui) {
- super(parentShell);
- this.ui = ui;
- setTitle(ProvUIMessages.RepositoryNameAndLocationDialog_Title);
- }
-
- protected void createButtonsForButtonBar(Composite parent) {
- okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite comp = new Composite(parent, SWT.NONE);
- initializeDialogUnits(comp);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginTop = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
-
- nickname = createNameField(comp);
- url = createLocationField(comp);
-
- comp.setLayout(layout);
- GridData data = new GridData();
- comp.setLayoutData(data);
-
- Dialog.applyDialogFont(comp);
- return comp;
- }
-
- /**
- * Return a RepositoryTracker appropriate for validating and adding the
- * repository.
- *
- * @return the Repository Tracker
- */
- protected RepositoryTracker getRepositoryTracker() {
- return ui.getRepositoryTracker();
- }
-
- protected void okPressed() {
- if (handleOk())
- super.okPressed();
- }
-
- protected boolean handleOk() {
- IStatus status = validateRepositoryURL(false);
- location = getUserLocation();
- name = nickname.getText().trim();
- return status.isOK();
- }
-
- /**
- * Get the repository location as currently typed in by the user. Return null if there
- * is a problem with the URL.
- *
- * @return the URL currently typed in by the user.
- */
- protected URI getUserLocation() {
- return getRepositoryTracker().locationFromString(url.getText().trim());
- }
-
- /**
- * Get the location of the repository that was entered by the user.
- * Return <code>null</code> if no location was provided.
- *
- * @return the location of the repository that has been provided by the user.
- */
- public URI getLocation() {
- return location;
- }
-
- /**
- * Get the name of the repository that was entered by the user.
- * Return <code>null</code> if no name was provided.
- *
- * @return the name of the repository that has been provided by the user.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Validate the repository URL, returning a status that is appropriate
- * for showing the user. The boolean indicates whether the repositories
- * should be consulted for validating the URL. For example, it is not
- * appropriate to contact the repositories on every keystroke.
- */
- protected IStatus validateRepositoryURL(final boolean contactRepositories) {
- if (url == null || url.isDisposed())
- return Status.OK_STATUS;
- final IStatus[] status = new IStatus[1];
- status[0] = getRepositoryTracker().getInvalidLocationStatus(url.getText().trim());
- final URI userLocation = getUserLocation();
- if (url.getText().length() == 0)
- status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, RepositoryTracker.STATUS_INVALID_REPOSITORY_LOCATION, ProvUIMessages.RepositoryGroup_URLRequired, null);
- else if (userLocation == null)
- status[0] = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, RepositoryTracker.STATUS_INVALID_REPOSITORY_LOCATION, ProvUIMessages.AddRepositoryDialog_InvalidURL, null);
- else {
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- status[0] = getRepositoryTracker().validateRepositoryLocation(ui.getSession(), userLocation, contactRepositories, null);
- }
- });
- }
- // At this point the subclasses may have decided to opt out of
- // this dialog.
- if (status[0].getSeverity() == IStatus.CANCEL) {
- cancelPressed();
- }
-
- setOkEnablement(status[0].isOK());
- updateStatus(status[0]);
- return status[0];
-
- }
-
- protected void updateButtonsEnableState(IStatus status) {
- setOkEnablement(!status.matches(IStatus.ERROR));
- }
-
- protected void setOkEnablement(boolean enable) {
- if (okButton != null && !okButton.isDisposed())
- okButton.setEnabled(enable);
- }
-
- protected String getInitialLocationText() {
- return "http://"; //$NON-NLS-1$
- }
-
- protected String getInitialNameText() {
- return ""; //$NON-NLS-1$
- }
-
- protected Text createNameField(Composite parent) {
- // Name: []
- Label nameLabel = new Label(parent, SWT.NONE);
- nameLabel.setText(ProvUIMessages.AddRepositoryDialog_NameLabel);
- nickname = new Text(parent, SWT.BORDER);
- nickname.setText(getInitialNameText());
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
-
- nickname.setLayoutData(data);
- return nickname;
- }
-
- protected Text createLocationField(Composite parent) {
- // Location: []
- Label urlLabel = new Label(parent, SWT.NONE);
- urlLabel.setText(ProvUIMessages.AddRepositoryDialog_LocationLabel);
- url = new Text(parent, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.ENTRY_FIELD_WIDTH);
- url.setLayoutData(data);
- DropTarget target = new DropTarget(url, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
- target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
- target.addDropListener(new TextURLDropAdapter(url, true));
- url.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validateRepositoryURL(false);
- }
- });
- url.setText(getInitialLocationText());
- url.setSelection(0, url.getText().length());
- return url;
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ui;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
deleted file mode 100644
index 80616b185..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
+++ /dev/null
@@ -1,654 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Yury Chernikov <Yury.Chernikov@borland.com> - Bug 271447 [ui] Bad layout in 'Install available software' dialog
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import com.ibm.icu.text.Collator;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.*;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.fieldassist.ControlDecoration;
-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.wizard.IWizardContainer;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A RepositorySelectionGroup is a reusable UI component that displays
- * available repositories and allows the user to select them.
- *
- * @since 3.5
- */
-public class RepositorySelectionGroup {
-
- private static final String SITE_NONE = ProvUIMessages.AvailableIUsPage_NoSites;
- private static final String SITE_ALL = ProvUIMessages.AvailableIUsPage_AllSites;
- private static final String SITE_LOCAL = ProvUIMessages.AvailableIUsPage_LocalSites;
- private static final int INDEX_SITE_NONE = 0;
- private static final int INDEX_SITE_ALL = 1;
- private static final int DEC_MARGIN_WIDTH = 2;
- private static final String LINKACTION = "linkAction"; //$NON-NLS-1$
-
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=245569
- private static final int COUNT_VISIBLE_ITEMS = 20;
- IWizardContainer container;
- ProvisioningUI ui;
- IUViewQueryContext queryContext;
-
- ListenerList listeners = new ListenerList();
-
- Combo repoCombo;
- Link repoManipulatorLink;
- ControlDecoration repoDec;
- ComboAutoCompleteField repoAutoComplete;
- ProvUIProvisioningListener comboRepoListener;
- IRepositoryManipulationHook repositoryManipulationHook;
-
- Image info, warning, error;
- URI[] comboRepos; // the URIs shown in the combo, kept in sync with combo items
- HashMap<String, URI> disabledRepoProposals = new HashMap<String, URI>(); // proposal string -> disabled URI
-
- public RepositorySelectionGroup(ProvisioningUI ui, IWizardContainer container, Composite parent, IUViewQueryContext queryContext) {
- this.container = container;
- this.queryContext = queryContext;
- this.ui = ui;
- createControl(parent);
- }
-
- public Control getDefaultFocusControl() {
- return repoCombo;
- }
-
- public void addRepositorySelectionListener(IRepositorySelectionListener listener) {
- listeners.add(listener);
- }
-
- protected void createControl(Composite parent) {
- final RepositoryTracker tracker = ProvisioningUI.getDefaultUI().getRepositoryTracker();
- // Get the possible field error indicators
- info = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION).getImage();
- warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING).getImage();
- error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR).getImage();
-
- // Combo that filters sites
- Composite comboComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginTop = 0;
- layout.marginBottom = IDialogConstants.VERTICAL_SPACING;
- layout.numColumns = 3;
- comboComposite.setLayout(layout);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- comboComposite.setLayoutData(gd);
-
- Label label = new Label(comboComposite, SWT.NONE);
- label.setText(ProvUIMessages.AvailableIUsPage_RepoFilterLabel);
-
- repoCombo = new Combo(comboComposite, SWT.DROP_DOWN);
- repoCombo.addSelectionListener(new SelectionListener() {
-
- public void widgetDefaultSelected(SelectionEvent e) {
- repoComboSelectionChanged();
- }
-
- public void widgetSelected(SelectionEvent e) {
- repoComboSelectionChanged();
- }
-
- });
- // Auto complete - install before our own key listeners, so that auto complete gets first shot.
- repoAutoComplete = new ComboAutoCompleteField(repoCombo);
- repoCombo.setVisibleItemCount(COUNT_VISIBLE_ITEMS);
- repoCombo.addKeyListener(new KeyAdapter() {
-
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR)
- addRepository(false);
- }
- });
-
- // We don't ever want this to be interpreted as a default
- // button event
- repoCombo.addTraverseListener(new TraverseListener() {
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- e.doit = false;
- }
- }
- });
-
- gd = new GridData(SWT.FILL, SWT.CENTER, true, false);
- // breathing room for info dec
- gd.horizontalIndent = DEC_MARGIN_WIDTH * 2;
- repoCombo.setLayoutData(gd);
- repoCombo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent event) {
- URI location = null;
- IStatus status = null;
- String text = repoCombo.getText().trim();
- int index = getComboIndex(text);
- // only validate text that doesn't match existing text in combo
- if (index < 0) {
- location = tracker.locationFromString(repoCombo.getText());
- if (location == null) {
- status = tracker.getInvalidLocationStatus(repoCombo.getText());
- } else {
- status = tracker.validateRepositoryLocation(ui.getSession(), location, false, new NullProgressMonitor());
- }
- } else {
- // user typed or pasted an existing location. Select it.
- repoComboSelectionChanged();
- }
- setRepoComboDecoration(status);
- }
- });
-
- repoDec = new ControlDecoration(repoCombo, SWT.LEFT | SWT.TOP);
- repoDec.setMarginWidth(DEC_MARGIN_WIDTH);
-
- DropTarget target = new DropTarget(repoCombo, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
- target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
- target.addDropListener(new URLDropAdapter(true) {
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLDropAdapter#handleURLString(java.lang.String, org.eclipse.swt.dnd.DropTargetEvent)
- */
- protected void handleDrop(String urlText, DropTargetEvent event) {
- repoCombo.setText(urlText);
- event.detail = DND.DROP_LINK;
- addRepository(false);
- }
- });
-
- Button button = new Button(comboComposite, SWT.PUSH);
- button.setText(ProvUIMessages.AvailableIUsPage_AddButton);
- button.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- addRepository(true);
- }
-
- public void widgetSelected(SelectionEvent e) {
- addRepository(true);
- }
- });
- setButtonLayoutData(button);
-
- // Link to repository manipulator
- repoManipulatorLink = createLink(comboComposite, new Action() {
- public void runWithEvent(Event event) {
- if (repositoryManipulationHook != null)
- repositoryManipulationHook.preManipulateRepositories();
- ui.manipulateRepositories(repoCombo.getShell());
- if (repositoryManipulationHook != null)
- repositoryManipulationHook.postManipulateRepositories();
- }
- }, getLinkLabel());
- gd = new GridData(SWT.END, SWT.FILL, true, false);
- gd.horizontalSpan = 3;
- repoManipulatorLink.setLayoutData(gd);
-
- addComboProvisioningListeners();
- parent.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- removeProvisioningListeners();
- }
-
- });
- }
-
- private String getLinkLabel() {
- if (ui.getPolicy().getRepositoryPreferencePageId() != null) {
- String pageName = ui.getPolicy().getRepositoryPreferencePageName();
- if (pageName == null)
- pageName = ProvUIMessages.RepositorySelectionGroup_PrefPageName;
- return NLS.bind(ProvUIMessages.RepositorySelectionGroup_PrefPageLink, pageName);
- }
- return ProvUIMessages.RepositorySelectionGroup_GenericSiteLinkTitle;
- }
-
- private void setButtonLayoutData(Button button) {
- GridData data = new GridData(SWT.FILL, SWT.CENTER, false, false);
- GC gc = new GC(button);
- gc.setFont(JFaceResources.getDialogFont());
- FontMetrics fm = gc.getFontMetrics();
- gc.dispose();
- int widthHint = Dialog.convertHorizontalDLUsToPixels(fm, IDialogConstants.BUTTON_WIDTH);
- Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- data.widthHint = Math.max(widthHint, minSize.x);
- button.setLayoutData(data);
- }
-
- public void setRepositorySelection(int scope, URI location) {
- switch (scope) {
- case AvailableIUGroup.AVAILABLE_ALL :
- fillRepoCombo(SITE_ALL);
- break;
- case AvailableIUGroup.AVAILABLE_LOCAL :
- fillRepoCombo(SITE_LOCAL);
- break;
- case AvailableIUGroup.AVAILABLE_SPECIFIED :
- fillRepoCombo(getSiteString(location));
- break;
- default :
- fillRepoCombo(SITE_NONE);
- }
- setRepoComboDecoration(null);
- }
-
- public void setRepositoryManipulationHook(IRepositoryManipulationHook hook) {
- this.repositoryManipulationHook = hook;
- }
-
- protected void setRepoComboDecoration(final IStatus status) {
- if (status == null || status.isOK() || status.getSeverity() == IStatus.CANCEL) {
- repoDec.setShowOnlyOnFocus(true);
- repoDec.setDescriptionText(ProvUIMessages.AvailableIUsPage_RepoFilterInstructions);
- repoDec.setImage(info);
- // We may have been previously showing an error or warning
- // hover. We will need to dismiss it, but if there is no text
- // typed, don't do this, so that the user gets the info cue
- if (repoCombo.getText().length() > 0)
- repoDec.showHoverText(null);
- return;
- }
- Image image;
- if (status.getSeverity() == IStatus.WARNING)
- image = warning;
- else if (status.getSeverity() == IStatus.ERROR)
- image = error;
- else
- image = info;
- repoDec.setImage(image);
- repoDec.setDescriptionText(status.getMessage());
- repoDec.setShowOnlyOnFocus(false);
- // use a delay to show the validation method because the very next
- // selection or keystroke might fix it
- repoCombo.getDisplay().timerExec(500, new Runnable() {
- public void run() {
- if (repoDec != null && repoDec.getImage() != info)
- repoDec.showHoverText(status.getMessage());
- }
- });
-
- }
-
- /*
- * Fill the repo combo and use the specified string
- * as the selection. If the selection is null, then the
- * current selection should be preserved if applicable.
- */
- void fillRepoCombo(final String selection) {
- RepositoryTracker tracker = ui.getRepositoryTracker();
- URI[] sites = tracker.getKnownRepositories(ui.getSession());
- boolean hasLocalSites = getLocalSites().length > 0;
- final String[] items;
- if (hasLocalSites) {
- // None, All, repo1, repo2....repo n, Local
- comboRepos = new URI[sites.length + 3];
- items = new String[sites.length + 3];
- } else {
- // None, All, repo1, repo2....repo n
- comboRepos = new URI[sites.length + 2];
- items = new String[sites.length + 2];
- }
- items[INDEX_SITE_NONE] = SITE_NONE;
- items[INDEX_SITE_ALL] = SITE_ALL;
- for (int i = 0; i < sites.length; i++) {
- items[i + 2] = getSiteString(sites[i]);
- comboRepos[i + 2] = sites[i];
- }
- if (hasLocalSites)
- items[items.length - 1] = SITE_LOCAL;
- if (sites.length > 0)
- sortRepoItems(items, comboRepos, hasLocalSites);
- Runnable runnable = new Runnable() {
- public void run() {
- if (repoCombo == null || repoCombo.isDisposed())
- return;
- String repoToSelect = selection;
- if (repoToSelect == null) {
- // If the combo is open and something is selected, use that index if we
- // weren't given a string to select.
- int selIndex = repoCombo.getSelectionIndex();
- if (selIndex >= 0)
- repoToSelect = repoCombo.getItem(selIndex);
- else
- repoToSelect = repoCombo.getText();
- }
- repoCombo.setItems(items);
- repoAutoComplete.setProposalStrings(getComboProposals());
- boolean selected = false;
- for (int i = 0; i < items.length; i++)
- if (items[i].equals(repoToSelect)) {
- selected = true;
- if (repoCombo.getListVisible())
- repoCombo.select(i);
- repoCombo.setText(repoToSelect);
- break;
- }
- if (!selected) {
- if (repoCombo.getListVisible())
- repoCombo.select(INDEX_SITE_NONE);
- repoCombo.setText(SITE_NONE);
- }
- repoComboSelectionChanged();
- }
- };
- if (Display.getCurrent() == null)
- repoCombo.getDisplay().asyncExec(runnable);
- else
- runnable.run();
- }
-
- String getSiteString(URI uri) {
- String nickname = getMetadataRepositoryManager().getRepositoryProperty(uri, IRepository.PROP_NICKNAME);
- if (nickname != null && nickname.length() > 0)
- return NLS.bind(ProvUIMessages.AvailableIUsPage_NameWithLocation, new Object[] {nickname, ProvUIMessages.RepositorySelectionGroup_NameAndLocationSeparator, URIUtil.toUnencodedString(uri)});
- return URIUtil.toUnencodedString(uri);
- }
-
- private Link createLink(Composite parent, IAction action, String text) {
- Link link = new Link(parent, SWT.PUSH);
- link.setText(text);
-
- link.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- IAction linkAction = getLinkAction(event.widget);
- if (linkAction != null) {
- linkAction.runWithEvent(event);
- }
- }
- });
- link.setToolTipText(action.getToolTipText());
- link.setData(LINKACTION, action);
- return link;
- }
-
- IAction getLinkAction(Widget widget) {
- Object data = widget.getData(LINKACTION);
- if (data == null || !(data instanceof IAction)) {
- return null;
- }
- return (IAction) data;
- }
-
- private void sortRepoItems(String[] strings, URI[] locations, boolean hasLocalSites) {
- int sortStart = 2;
- int sortEnd = hasLocalSites ? strings.length - 2 : strings.length - 1;
- if (sortStart >= sortEnd)
- return;
- final HashMap<URI, String> uriToString = new HashMap<URI, String>();
- for (int i = sortStart; i <= sortEnd; i++) {
- uriToString.put(locations[i], strings[i]);
- }
- final Collator collator = Collator.getInstance(Locale.getDefault());
- Comparator<String> stringComparator = new Comparator<String>() {
- public int compare(String a, String b) {
- return collator.compare(a, b);
- }
- };
- Comparator<URI> uriComparator = new Comparator<URI>() {
- public int compare(URI a, URI b) {
- return collator.compare(uriToString.get(a), uriToString.get(b));
- }
- };
-
- Arrays.sort(strings, sortStart, sortEnd, stringComparator);
- Arrays.sort(locations, sortStart, sortEnd, uriComparator);
- }
-
- private URI[] getLocalSites() {
- // use our current visibility flags plus the local filter
- int flags = ui.getRepositoryTracker().getMetadataRepositoryFlags() | IRepositoryManager.REPOSITORIES_LOCAL;
- return getMetadataRepositoryManager().getKnownRepositories(flags);
- }
-
- String[] getComboProposals() {
- int flags = ui.getRepositoryTracker().getMetadataRepositoryFlags() | IRepositoryManager.REPOSITORIES_DISABLED;
- String[] items = repoCombo.getItems();
- // Clear any previously remembered disabled repos
- disabledRepoProposals = new HashMap<String, URI>();
- URI[] disabled = getMetadataRepositoryManager().getKnownRepositories(flags);
- String[] disabledItems = new String[disabled.length];
- for (int i = 0; i < disabledItems.length; i++) {
- disabledItems[i] = getSiteString(disabled[i]);
- disabledRepoProposals.put(disabledItems[i], disabled[i]);
- }
- String[] both = new String[items.length + disabledItems.length];
- System.arraycopy(items, 0, both, 0, items.length);
- System.arraycopy(disabledItems, 0, both, items.length, disabledItems.length);
- return both;
- }
-
- int getComboIndex(String repoText) {
- // Callers have typically done this already, but just in case
- repoText = repoText.trim();
- // First look for exact match to the combo string.
- // This includes the name, etc.
- if (repoText.length() > 0) {
- String[] items = repoCombo.getItems();
- for (int i = 0; i < items.length; i++)
- if (repoText.equals(items[i])) {
- return i;
- }
- }
- // Look for URI match - the user may have pasted or dragged
- // in a location that matches one we already know about, even
- // if the text does not match completely. (slashes, no name, etc.)
- try {
- URI location = URIUtil.fromString(repoText);
- for (int i = 0; i < comboRepos.length; i++)
- if (URIUtil.sameURI(location, comboRepos[i])) {
- return i;
- }
- } catch (URISyntaxException e) {
- // never mind
- }
-
- // Special case. The user has typed a URI with a trailing slash.
- // Make a URI without the trailing slash and see if it matches
- // a location we know about.
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=268580
- int length = repoText.length();
- if (length > 0 && repoText.charAt(length - 1) == '/') {
- return getComboIndex(repoText.substring(0, length - 1));
- }
- return -1;
- }
-
- void addComboProvisioningListeners() {
- // We need to monitor repository events so that we can adjust the repo combo.
- comboRepoListener = new ProvUIProvisioningListener(getClass().getName(), ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY) {
- protected void repositoryAdded(RepositoryEvent e) {
- fillRepoCombo(getSiteString(e.getRepositoryLocation()));
- }
-
- protected void repositoryRemoved(RepositoryEvent e) {
- fillRepoCombo(null);
- }
-
- protected void refreshAll() {
- fillRepoCombo(null);
- }
- };
- ProvUI.addProvisioningListener(comboRepoListener);
- }
-
- void removeProvisioningListeners() {
- if (comboRepoListener != null) {
- ProvUI.removeProvisioningListener(comboRepoListener);
- comboRepoListener = null;
- }
-
- }
-
- /*
- * Add a repository using the text in the combo or launch a dialog if the text
- * represents an already known repo.
- */
- void addRepository(boolean alwaysPrompt) {
- final RepositoryTracker manipulator = ui.getRepositoryTracker();
- final String selectedRepo = repoCombo.getText().trim();
- int selectionIndex = getComboIndex(selectedRepo);
- final boolean isNewText = selectionIndex < 0;
- // If we are adding something already in the combo, just
- // select that item.
- if (!alwaysPrompt && !isNewText && selectionIndex != repoCombo.getSelectionIndex()) {
- repoComboSelectionChanged();
- } else if (alwaysPrompt) {
- AddRepositoryDialog dialog = new AddRepositoryDialog(repoCombo.getShell(), ui) {
-
- protected String getInitialLocationText() {
- if (isNewText) {
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=293068
- // we need to ensure any embedded nickname is stripped out
- URI loc = manipulator.locationFromString(selectedRepo);
- return loc.toString();
- }
- return super.getInitialLocationText();
- }
-
- @Override
- protected String getInitialNameText() {
- if (isNewText) {
- URI loc = manipulator.locationFromString(selectedRepo);
- // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=293068
- if (loc != null && manipulator instanceof ColocatedRepositoryTracker) {
- String parsedNickname = ((ColocatedRepositoryTracker) manipulator).getParsedNickname(loc);
- if (parsedNickname != null)
- return parsedNickname;
- }
- }
- return super.getInitialNameText();
- }
-
- };
- dialog.setTitle(ProvUIMessages.AddRepositoryDialog_Title);
- dialog.open();
- URI location = dialog.getAddedLocation();
- if (location != null)
- fillRepoCombo(getSiteString(location));
- } else if (isNewText) {
- try {
- container.run(false, false, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- URI location;
- IStatus status;
- // This might be a disabled repo. If so, no need to validate further.
- if (disabledRepoProposals.containsKey(selectedRepo)) {
- location = disabledRepoProposals.get(selectedRepo);
- status = Status.OK_STATUS;
- } else {
- location = manipulator.locationFromString(selectedRepo);
- if (location == null)
- status = manipulator.getInvalidLocationStatus(selectedRepo);
- else {
- status = manipulator.validateRepositoryLocation(ui.getSession(), location, false, monitor);
- }
- }
- if (status.isOK() && location != null) {
- String nick = null;
- if (manipulator instanceof ColocatedRepositoryTracker)
- nick = ((ColocatedRepositoryTracker) manipulator).getParsedNickname(location);
- manipulator.addRepository(location, nick, ui.getSession());
- fillRepoCombo(getSiteString(location));
- }
- setRepoComboDecoration(status);
- }
- });
- } catch (InvocationTargetException e) {
- // ignore
- } catch (InterruptedException e) {
- // ignore
- }
- }
- }
-
- public ProvisioningContext getProvisioningContext() {
- int siteSel = getComboIndex(repoCombo.getText().trim());
- if (siteSel < 0 || siteSel == INDEX_SITE_ALL || siteSel == INDEX_SITE_NONE)
- return new ProvisioningContext(ui.getSession().getProvisioningAgent());
- URI[] locals = getLocalSites();
- // If there are local sites, the last item in the combo is "Local Sites Only"
- // Use all local sites in this case
- // We have to set metadata repositories and artifact repositories in the
- // provisioning context because the artifact repositories are used for
- // sizing.
- if (locals.length > 0 && siteSel == repoCombo.getItemCount() - 1) {
- ProvisioningContext context = new ProvisioningContext(ui.getSession().getProvisioningAgent());
- context.setMetadataRepositories(locals);
- context.setArtifactRepositories(locals);
- return context;
- }
- // A single site is selected.
- ProvisioningContext context = new ProvisioningContext(ui.getSession().getProvisioningAgent());
- context.setMetadataRepositories(new URI[] {comboRepos[siteSel]});
- context.setArtifactRepositories(new URI[] {comboRepos[siteSel]});
- return context;
- }
-
- void repoComboSelectionChanged() {
- int repoChoice = -1;
- URI repoLocation = null;
-
- int selection = -1;
- if (repoCombo.getListVisible()) {
- selection = repoCombo.getSelectionIndex();
- } else {
- selection = getComboIndex(repoCombo.getText().trim());
- }
- int localIndex = getLocalSites().length == 0 ? repoCombo.getItemCount() : repoCombo.getItemCount() - 1;
- if (comboRepos == null || selection < 0) {
- selection = INDEX_SITE_NONE;
- }
-
- if (selection == INDEX_SITE_NONE) {
- repoChoice = AvailableIUGroup.AVAILABLE_NONE;
- } else if (selection == INDEX_SITE_ALL) {
- repoChoice = AvailableIUGroup.AVAILABLE_ALL;
- } else if (selection >= localIndex) {
- repoChoice = AvailableIUGroup.AVAILABLE_LOCAL;
- } else {
- repoChoice = AvailableIUGroup.AVAILABLE_SPECIFIED;
- repoLocation = comboRepos[selection];
- }
-
- Object[] selectionListeners = listeners.getListeners();
- for (int i = 0; i < selectionListeners.length; i++) {
- ((IRepositorySelectionListener) selectionListeners[i]).repositorySelectionChanged(repoChoice, repoLocation);
- }
- }
-
- IMetadataRepositoryManager getMetadataRepositoryManager() {
- return ProvUI.getMetadataRepositoryManager(ui.getSession());
- }
-}
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
deleted file mode 100644
index ffbb09b82..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionResultsWizardPage.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * 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.*;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-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.query.IQueryable;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * A wizard page that shows detailed information about a resolved install
- * operation. It allows drill down into the elements that will be installed.
- *
- * @since 3.4
- *
- */
-public abstract class ResolutionResultsWizardPage extends ResolutionStatusPage {
-
- private static final String DIALOG_SETTINGS_SECTION = "ResolutionResultsPage"; //$NON-NLS-1$
-
- protected IUElementListRoot input;
- ProfileChangeOperation resolvedOperation;
- TreeViewer treeViewer;
- ProvElementContentProvider contentProvider;
- IUDetailsLabelProvider labelProvider;
- protected Display display;
- private IUDetailsGroup iuDetailsGroup;
- SashForm sashForm;
-
- protected ResolutionResultsWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot input, ProfileChangeOperation operation) {
- super("ResolutionPage", ui, wizard); //$NON-NLS-1$
- // We can exist as an empty page, but if there is an operation, we need to know that it's resolved.
- if (operation != null && !operation.hasResolved()) {
- operation.resolveModal(null);
- }
- this.resolvedOperation = operation;
- if (input == null)
- this.input = new IUElementListRoot();
- else
- this.input = input;
- updateStatus(input, resolvedOperation);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- display = parent.getDisplay();
- sashForm = new SashForm(parent, SWT.VERTICAL);
- FillLayout layout = new FillLayout();
- sashForm.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- sashForm.setLayoutData(data);
- initializeDialogUnits(sashForm);
-
- Composite composite = new Composite(sashForm, SWT.NONE);
- GridLayout gridLayout = new GridLayout();
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- composite.setLayout(gridLayout);
-
- treeViewer = createTreeViewer(composite);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
- data.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH);
- Tree tree = treeViewer.getTree();
- tree.setLayoutData(data);
- tree.setHeaderVisible(true);
- activateCopy(tree);
- IUColumnConfig[] columns = getColumnConfig();
- for (int i = 0; i < columns.length; i++) {
- TreeColumn tc = new TreeColumn(tree, SWT.LEFT, i);
- tc.setResizable(true);
- tc.setText(columns[i].getColumnTitle());
- tc.setWidth(columns[i].getWidthInPixels(tree));
- }
-
- treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- setDetailText(resolvedOperation);
- }
- });
-
- // Filters and sorters before establishing content, so we don't refresh unnecessarily.
- IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
- comparator.useColumnConfig(getColumnConfig());
- treeViewer.setComparator(comparator);
- treeViewer.setComparer(new ProvElementComparer());
-
- contentProvider = new ProvElementContentProvider();
- treeViewer.setContentProvider(contentProvider);
- labelProvider = new IUDetailsLabelProvider(null, getColumnConfig(), getShell());
- treeViewer.setLabelProvider(labelProvider);
-
- setDrilldownElements(input, resolvedOperation);
- treeViewer.setInput(input);
-
- // Optional area to show the size
- createSizingInfo(composite);
-
- // The text area shows a description of the selected IU, or error detail if applicable.
- iuDetailsGroup = new IUDetailsGroup(sashForm, treeViewer, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH), true);
-
- updateStatus(input, resolvedOperation);
- setControl(sashForm);
- sashForm.setWeights(getSashWeights());
- Dialog.applyDialogFont(sashForm);
- }
-
- protected void createSizingInfo(Composite parent) {
- // Default is to do nothing
- }
-
- public boolean performFinish() {
- if (resolvedOperation.getResolutionResult().getSeverity() != IStatus.ERROR) {
- getProvisioningUI().schedule(resolvedOperation.getProvisioningJob(null), StatusManager.SHOW | StatusManager.LOG);
- return true;
- }
- return false;
- }
-
- protected TreeViewer getTreeViewer() {
- return treeViewer;
- }
-
- public IProvisioningPlan getCurrentPlan() {
- if (resolvedOperation != null)
- return resolvedOperation.getProvisioningPlan();
- return null;
- }
-
- protected Object[] getSelectedElements() {
- return ((IStructuredSelection) treeViewer.getSelection()).toArray();
- }
-
- protected IInstallableUnit getSelectedIU() {
- java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
- if (units.size() == 0)
- return null;
- return units.get(0);
- }
-
- protected boolean shouldCompleteOnCancel() {
- return false;
- }
-
- protected Collection<IInstallableUnit> getIUs() {
- return ElementUtils.elementsToIUs(input.getChildren(input));
- }
-
- void setDrilldownElements(IUElementListRoot root, ProfileChangeOperation operation) {
- if (operation == null || operation.getProvisioningPlan() == null)
- return;
- Object[] elements = root.getChildren(root);
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof QueriedElement) {
- ((QueriedElement) elements[i]).setQueryable(getQueryable(operation.getProvisioningPlan()));
- }
- }
- }
-
- protected abstract String getOperationLabel();
-
- /**
- * Returns the restart policy for this operation.
- *
- * @return an integer constant describing whether the running profile
- * needs to be restarted.
- *
- * @see ProvisioningJob#RESTART_NONE
- * @see ProvisioningJob#RESTART_ONLY
- * @see ProvisioningJob#RESTART_OR_APPLY
- *
- */
- protected int getRestartPolicy() {
- return ProvisioningJob.RESTART_OR_APPLY;
- }
-
- /**
- * Returns the task name for this operation, or <code>null</code> to display
- * a generic task name.
- */
- protected String getOperationTaskName() {
- return null;
- }
-
- protected TreeViewer createTreeViewer(Composite parent) {
- return new TreeViewer(parent, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
- }
-
- protected abstract IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan);
-
- protected String getClipboardText(Control control) {
- return CopyUtils.getIndentedClipboardText(getSelectedElements(), labelProvider);
- }
-
- protected IUDetailsGroup getDetailsGroup() {
- return iuDetailsGroup;
- }
-
- protected boolean isCreated() {
- return treeViewer != null;
- }
-
- protected void updateCaches(IUElementListRoot newRoot, ProfileChangeOperation op) {
- resolvedOperation = op;
- if (newRoot != null) {
- setDrilldownElements(newRoot, resolvedOperation);
- if (treeViewer != null) {
- if (input != newRoot)
- treeViewer.setInput(newRoot);
- else
- treeViewer.refresh();
- }
- input = newRoot;
- }
- }
-
- protected String getDialogSettingsName() {
- return getWizard().getClass().getName() + "." + DIALOG_SETTINGS_SECTION; //$NON-NLS-1$
- }
-
- protected int getColumnWidth(int index) {
- return treeViewer.getTree().getColumn(index).getWidth();
- }
-
- protected SashForm getSashForm() {
- return sashForm;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
deleted file mode 100644
index f1af3f817..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/ResolutionStatusPage.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * A wizard page that presents a check box list of IUs and allows the user
- * to select and deselect them. Typically the first page in a provisioning
- * operation wizard, and usually it is the page used to report resolution errors
- * before advancing to resolution detail.
- *
- * @since 3.5
- *
- */
-public abstract class ResolutionStatusPage extends ProvisioningWizardPage {
- private static final String LIST_WEIGHT = "ListSashWeight"; //$NON-NLS-1$
- private static final String DETAILS_WEIGHT = "DetailsSashWeight"; //$NON-NLS-1$
- private static final String NAME_COLUMN_WIDTH = "NameColumnWidth"; //$NON-NLS-1$
- private static final String VERSION_COLUMN_WIDTH = "VersionColumnWidth"; //$NON-NLS-1$
- private static final String ID_COLUMN_WIDTH = "IDColumnWidth"; //$NON-NLS-1$
- private IUColumnConfig nameColumn, versionColumn, idColumn;
-
- /**
- * @param pageName
- */
- protected ResolutionStatusPage(String pageName, ProvisioningUI ui, ProvisioningOperationWizard wizard) {
- super(pageName, ui, wizard);
- }
-
- /**
- * Update the caches associated with this page.
- * @param root the new root, or <code>null</code> if the root should not be updated.
- * @param resolvedOperation the new operation
- */
- protected abstract void updateCaches(IUElementListRoot root, ProfileChangeOperation resolvedOperation);
-
- protected abstract boolean isCreated();
-
- protected abstract IUDetailsGroup getDetailsGroup();
-
- protected abstract IInstallableUnit getSelectedIU();
-
- /**
- * Update the status area of the wizard to report the results of the operation.
- *
- * @param newRoot the root that describes the root IUs involved in creating the plan.
- * This can be <code>null</code> if the root should not be updated.
- *
- * @param op the ProfileChangeOperation that describes the operation
- */
- public void updateStatus(IUElementListRoot newRoot, ProfileChangeOperation op) {
- IStatus currentStatus = getProvisioningWizard().getCurrentStatus();
- updateCaches(newRoot, op);
-
- int messageType = IMessageProvider.NONE;
- boolean pageComplete = op != null;
- if (currentStatus != null && !currentStatus.isOK()) {
- messageType = IMessageProvider.INFORMATION;
- int severity = currentStatus.getSeverity();
- if (severity == IStatus.ERROR) {
- messageType = IMessageProvider.ERROR;
- pageComplete = false;
- // Log errors for later support
- ProvUI.reportStatus(currentStatus, StatusManager.LOG);
- } else if (severity == IStatus.WARNING) {
- messageType = IMessageProvider.WARNING;
- // Log warnings for later support
- ProvUI.reportStatus(currentStatus, StatusManager.LOG);
- } else if (severity == IStatus.CANCEL) {
- pageComplete = shouldCompleteOnCancel();
- }
- }
- setPageComplete(pageComplete);
- if (!isCreated())
- return;
-
- setMessage(getMessageText(currentStatus), messageType);
- setDetailText(op);
- }
-
- protected boolean shouldCompleteOnCancel() {
- return true;
- }
-
- protected String getIUDescription(IInstallableUnit iu) {
- // Get the iu description in the default locale
- String description = iu.getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
- if (description == null)
- description = ""; //$NON-NLS-1$
- return description;
- }
-
- String getMessageText(IStatus currentStatus) {
- if (currentStatus == null || currentStatus.isOK())
- return getDescription();
- if (currentStatus.getSeverity() == IStatus.CANCEL)
- return ProvUIMessages.ResolutionWizardPage_Canceled;
- if (currentStatus.getSeverity() == IStatus.ERROR)
- return ProvUIMessages.ResolutionWizardPage_ErrorStatus;
- return ProvUIMessages.ResolutionWizardPage_WarningInfoStatus;
- }
-
- void setDetailText(ProfileChangeOperation resolvedOperation) {
- String detail = null;
- IInstallableUnit selectedIU = getSelectedIU();
- IUDetailsGroup detailsGroup = getDetailsGroup();
-
- // We either haven't resolved, or we failed to resolve and reported some error
- // while doing so.
- if (resolvedOperation == null || !resolvedOperation.hasResolved() || getProvisioningWizard().statusOverridesOperation()) {
- // See if the wizard status knows something more about it.
- IStatus currentStatus = getProvisioningWizard().getCurrentStatus();
- if (!currentStatus.isOK()) {
- detail = currentStatus.getMessage();
- detailsGroup.enablePropertyLink(false);
- } else if (selectedIU != null) {
- detail = getIUDescription(selectedIU);
- detailsGroup.enablePropertyLink(true);
- } else {
- detail = ""; //$NON-NLS-1$
- detailsGroup.enablePropertyLink(false);
- }
- detailsGroup.setDetailText(detail);
- return;
- }
-
- // An IU is selected and we have resolved. Look for information about the specific IU.
- if (selectedIU != null) {
- detail = resolvedOperation.getResolutionDetails(selectedIU);
- if (detail != null) {
- detailsGroup.enablePropertyLink(false);
- detailsGroup.setDetailText(detail);
- return;
- }
- // No specific error about this IU. Show the overall error if it is in error.
- if (resolvedOperation.getResolutionResult().getSeverity() == IStatus.ERROR) {
- detail = resolvedOperation.getResolutionDetails();
- if (detail != null) {
- detailsGroup.enablePropertyLink(false);
- detailsGroup.setDetailText(detail);
- return;
- }
- }
-
- // The overall status is not an error, or else there was no explanatory text for an error.
- // We may as well just show info about this iu.
- detailsGroup.enablePropertyLink(true);
- detailsGroup.setDetailText(getIUDescription(selectedIU));
- return;
- }
-
- //No IU is selected, give the overall report
- detail = resolvedOperation.getResolutionDetails();
- detailsGroup.enablePropertyLink(false);
- if (detail == null)
- detail = ""; //$NON-NLS-1$
- detailsGroup.setDetailText(detail);
- }
-
- protected abstract String getDialogSettingsName();
-
- protected abstract SashForm getSashForm();
-
- private IUColumnConfig getNameColumn() {
- return nameColumn;
- }
-
- private IUColumnConfig getVersionColumn() {
- return versionColumn;
- }
-
- private IUColumnConfig getIdColumn() {
- return idColumn;
- }
-
- protected abstract int getColumnWidth(int index);
-
- private int getNameColumnWidth() {
- return getColumnWidth(0);
- }
-
- private int getVersionColumnWidth() {
- return getColumnWidth(1);
- }
-
- private int getIdColumnWidth() {
- return getColumnWidth(2);
- }
-
- protected int[] getSashWeights() {
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsName());
- if (section != null) {
- try {
- int[] weights = new int[2];
- if (section.get(LIST_WEIGHT) != null) {
- weights[0] = section.getInt(LIST_WEIGHT);
- if (section.get(DETAILS_WEIGHT) != null) {
- weights[1] = section.getInt(DETAILS_WEIGHT);
- return weights;
- }
- }
- } catch (NumberFormatException e) {
- // Ignore if there actually was a value that didn't parse.
- }
- }
- return ILayoutConstants.IUS_TO_DETAILS_WEIGHTS;
- }
-
- protected void getColumnWidthsFromSettings() {
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsName());
- if (section != null) {
- try {
- if (section.get(NAME_COLUMN_WIDTH) != null)
- getNameColumn().setWidthInPixels(section.getInt(NAME_COLUMN_WIDTH));
- if (section.get(VERSION_COLUMN_WIDTH) != null)
- getVersionColumn().setWidthInPixels(section.getInt(VERSION_COLUMN_WIDTH));
- if (section.get(ID_COLUMN_WIDTH) != null)
- getIdColumn().setWidthInPixels(section.getInt(ID_COLUMN_WIDTH));
- } catch (NumberFormatException e) {
- // Ignore if there actually was a value that didn't parse.
- }
- }
- }
-
- public void saveBoundsRelatedSettings() {
- if (!isCreated())
- return;
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsName());
- if (section == null) {
- section = settings.addNewSection(getDialogSettingsName());
- }
- section.put(NAME_COLUMN_WIDTH, getNameColumnWidth());
- section.put(VERSION_COLUMN_WIDTH, getVersionColumnWidth());
- section.put(ID_COLUMN_WIDTH, getIdColumnWidth());
- int[] weights = getSashForm().getWeights();
- section.put(LIST_WEIGHT, weights[0]);
- section.put(DETAILS_WEIGHT, weights[1]);
- }
-
- protected IUColumnConfig[] getColumnConfig() {
- // We intentionally use the IU's id as one of the columns, because
- // resolution errors are reported by ID.
- nameColumn = new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH);
- versionColumn = new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH);
- idColumn = new IUColumnConfig(ProvUIMessages.ProvUI_IdColumnTitle, IUColumnConfig.COLUMN_ID, ILayoutConstants.DEFAULT_COLUMN_WIDTH);
- getColumnWidthsFromSettings();
- return new IUColumnConfig[] {nameColumn, versionColumn, idColumn};
- }
-}
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
deleted file mode 100644
index 6817c764f..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SelectableIUsPage.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * EclipseSource - ongoing development
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.internal.p2.ui.viewers.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A wizard page that presents a check box list of IUs and allows the user
- * to select and deselect them. Typically the first page in a provisioning
- * operation wizard, and usually it is the page used to report resolution errors
- * before advancing to resolution detail.
- *
- * @since 3.5
- *
- */
-public class SelectableIUsPage extends ResolutionStatusPage implements IResolutionErrorReportingPage {
-
- private static final String DIALOG_SETTINGS_SECTION = "SelectableIUsPage"; //$NON-NLS-1$
-
- IUElementListRoot root;
- Object[] initialSelections;
- ProfileChangeOperation resolvedOperation;
- CheckboxTableViewer tableViewer;
- IUDetailsGroup iuDetailsGroup;
- ProvElementContentProvider contentProvider;
- IUDetailsLabelProvider labelProvider;
- protected Display display;
- protected Policy policy;
- SashForm sashForm;
-
- public SelectableIUsPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, Object[] initialSelections) {
- super("IUSelectionPage", ui, wizard); //$NON-NLS-1$
- this.root = root;
- if (root == null)
- root = new IUElementListRoot();
- if (initialSelections == null)
- this.initialSelections = new IInstallableUnit[0];
- else
- this.initialSelections = initialSelections;
-
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- display = parent.getDisplay();
- sashForm = new SashForm(parent, SWT.VERTICAL);
- FillLayout layout = new FillLayout();
- sashForm.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- sashForm.setLayoutData(data);
- initializeDialogUnits(sashForm);
-
- Composite composite = new Composite(sashForm, SWT.NONE);
- GridLayout gridLayout = new GridLayout();
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- composite.setLayout(gridLayout);
-
- tableViewer = createTableViewer(composite);
- data = new GridData(GridData.FILL_BOTH);
- data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
- data.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH);
- Table table = tableViewer.getTable();
- table.setLayoutData(data);
- table.setHeaderVisible(true);
- activateCopy(table);
- IUColumnConfig[] columns = getColumnConfig();
- for (int i = 0; i < columns.length; i++) {
- TableColumn tc = new TableColumn(table, SWT.LEFT, i);
- tc.setResizable(true);
- tc.setText(columns[i].getColumnTitle());
- tc.setWidth(columns[i].getWidthInPixels(table));
- }
-
- tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- setDetailText(resolvedOperation);
- }
- });
-
- tableViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- updateSelection();
- }
- });
-
- // Filters and sorters before establishing content, so we don't refresh unnecessarily.
- IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
- comparator.useColumnConfig(ProvUI.getIUColumnConfig());
- tableViewer.setComparator(comparator);
- tableViewer.setComparer(new ProvElementComparer());
-
- contentProvider = new ProvElementContentProvider();
- tableViewer.setContentProvider(contentProvider);
- labelProvider = new IUDetailsLabelProvider(null, ProvUI.getIUColumnConfig(), getShell());
- tableViewer.setLabelProvider(labelProvider);
- tableViewer.setInput(root);
- setInitialCheckState();
-
- // Select and Deselect All buttons
- createSelectButtons(composite);
-
- // The text area shows a description of the selected IU, or error detail if applicable.
- iuDetailsGroup = new IUDetailsGroup(sashForm, tableViewer, convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH), true);
-
- updateStatus(root, resolvedOperation);
- setControl(sashForm);
- sashForm.setWeights(getSashWeights());
- Dialog.applyDialogFont(sashForm);
- }
-
- private void createSelectButtons(Composite parent) {
- Composite buttonParent = new Composite(parent, SWT.NONE);
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- gridLayout.marginWidth = 0;
- gridLayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- buttonParent.setLayout(gridLayout);
- GridData data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
- buttonParent.setLayoutData(data);
-
- Button selectAll = new Button(buttonParent, SWT.PUSH);
- selectAll.setText(ProvUIMessages.SelectableIUsPage_Select_All);
- setButtonLayoutData(selectAll);
- selectAll.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- tableViewer.setAllChecked(true);
- updateSelection();
- }
- });
-
- Button deselectAll = new Button(buttonParent, SWT.PUSH);
- deselectAll.setText(ProvUIMessages.SelectableIUsPage_Deselect_All);
- setButtonLayoutData(deselectAll);
- deselectAll.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- tableViewer.setAllChecked(false);
- updateSelection();
- }
- });
-
- // dummy to take extra space
- Label dummy = new Label(buttonParent, SWT.NONE);
- data = new GridData(SWT.FILL, SWT.FILL, true, true);
- dummy.setLayoutData(data);
-
- // separator underneath
- Label sep = new Label(buttonParent, SWT.HORIZONTAL | SWT.SEPARATOR);
- data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
- data.horizontalSpan = 3;
- sep.setLayoutData(data);
- }
-
- protected CheckboxTableViewer createTableViewer(Composite parent) {
- // The viewer allows selection of IU's for browsing the details,
- // and checking to include in the provisioning operation.
- CheckboxTableViewer v = CheckboxTableViewer.newCheckList(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);
- return v;
- }
-
- public Object[] getCheckedIUElements() {
- if (tableViewer == null)
- return initialSelections;
- return tableViewer.getCheckedElements();
- }
-
- public Object[] getSelectedIUElements() {
- return ((IStructuredSelection) tableViewer.getSelection()).toArray();
- }
-
- protected Object[] getSelectedElements() {
- return ((IStructuredSelection) tableViewer.getSelection()).toArray();
- }
-
- protected IInstallableUnit[] elementsToIUs(Object[] elements) {
- IInstallableUnit[] theIUs = new IInstallableUnit[elements.length];
- for (int i = 0; i < elements.length; i++) {
- theIUs[i] = ProvUI.getAdapter(elements[i], IInstallableUnit.class);
- }
- return theIUs;
- }
-
- protected void setInitialCheckState() {
- if (initialSelections != null)
- tableViewer.setCheckedElements(initialSelections);
- }
-
- /*
- * Overridden so that we don't call getNextPage().
- * We use getNextPage() to start resolving the operation so
- * we only want to do that when the next button is pressed.
- *
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- return isPageComplete();
- }
-
- /*
- * Overridden to null out any cached page so that the wizard
- * is always consulted. This allows wizards to do things like
- * synchronize previous page selections with this page.
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.WizardPage#getPreviousPage()
- */
- public IWizardPage getPreviousPage() {
- setPreviousPage(null);
- return super.getPreviousPage();
- }
-
- protected String getClipboardText(Control control) {
- StringBuffer buffer = new StringBuffer();
- Object[] elements = getSelectedElements();
- for (int i = 0; i < elements.length; i++) {
- if (i > 0)
- buffer.append(CopyUtils.NEWLINE);
- buffer.append(labelProvider.getClipboardText(elements[i], CopyUtils.DELIMITER));
- }
- return buffer.toString();
- }
-
- protected IInstallableUnit getSelectedIU() {
- java.util.List<IInstallableUnit> units = ElementUtils.elementsToIUs(getSelectedElements());
- if (units.size() == 0)
- return null;
- return units.get(0);
- }
-
- protected IUDetailsGroup getDetailsGroup() {
- return iuDetailsGroup;
- }
-
- protected boolean isCreated() {
- return tableViewer != null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ResolutionStatusPage#updateCaches(org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot, org.eclipse.equinox.p2.operations.ProfileChangeOperation)
- */
- protected void updateCaches(IUElementListRoot newRoot, ProfileChangeOperation op) {
- resolvedOperation = op;
- if (newRoot != null && root != newRoot) {
- root = newRoot;
- if (tableViewer != null)
- tableViewer.setInput(newRoot);
- }
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ISelectableIUsPage#setCheckedElements(java.lang.Object[])
- */
- public void setCheckedElements(Object[] elements) {
- if (tableViewer == null)
- initialSelections = elements;
- else
- tableViewer.setCheckedElements(elements);
- }
-
- protected SashForm getSashForm() {
- return sashForm;
- }
-
- protected String getDialogSettingsName() {
- return getWizard().getClass().getName() + "." + DIALOG_SETTINGS_SECTION; //$NON-NLS-1$
- }
-
- protected int getColumnWidth(int index) {
- return tableViewer.getTable().getColumn(index).getWidth();
- }
-
- void updateSelection() {
- setPageComplete(tableViewer.getCheckedElements().length > 0);
- getProvisioningWizard().operationSelectionsChanged(this);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
deleted file mode 100644
index cffaa3299..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/SizeComputingWizardPage.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.text.NumberFormat;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-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;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.query.IQueryable;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-/**
- *
- * @since 3.5
- */
-public abstract class SizeComputingWizardPage extends ResolutionResultsWizardPage {
- protected Label sizeInfo;
- protected long size;
- Job sizingJob;
- private IProvisioningPlan lastComputedPlan = null;
-
- protected SizeComputingWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, ProfileChangeOperation initialResolution) {
- super(ui, wizard, root, initialResolution);
- // Compute size immediately if a plan is available. This may or may not finish before
- // the widgetry is created.
- if (initialResolution != null && initialResolution.hasResolved())
- computeSizing(initialResolution.getProvisioningPlan(), initialResolution.getProvisioningContext());
- else
- // Set the size to indicate there is no size yet.
- size = ProvUI.SIZE_NOTAPPLICABLE;
- }
-
- protected void computeSizing(final IProvisioningPlan plan, final ProvisioningContext provisioningContext) {
- if (plan == lastComputedPlan)
- return;
- lastComputedPlan = plan;
- size = ProvUI.SIZE_UNKNOWN;
- updateSizingInfo();
- if (sizingJob != null)
- sizingJob.cancel();
- sizingJob = new Job(ProvUIMessages.SizeComputingWizardPage_SizeJobTitle) {
- protected IStatus run(IProgressMonitor monitor) {
- size = ProvUI.getSize(ProvUI.getEngine(getProvisioningUI().getSession()), plan, provisioningContext, monitor);
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- if (display != null) {
- display.asyncExec(new Runnable() {
- public void run() {
- updateSizingInfo();
- }
- });
- }
- return Status.OK_STATUS;
- }
-
- };
- sizingJob.setUser(false);
- sizingJob.setSystem(true);
- sizingJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- sizingJob.schedule();
- }
-
- protected void createSizingInfo(Composite parent) {
- sizeInfo = new Label(parent, SWT.NONE);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- sizeInfo.setLayoutData(data);
- updateSizingInfo();
- }
-
- protected void updateSizingInfo() {
- if (sizeInfo != null && !sizeInfo.isDisposed()) {
- if (size == ProvUI.SIZE_NOTAPPLICABLE)
- sizeInfo.setVisible(false);
- else {
- sizeInfo.setText(NLS.bind(ProvUIMessages.UpdateOrInstallWizardPage_Size, getFormattedSize()));
- sizeInfo.setVisible(true);
- }
- }
- }
-
- protected String getFormattedSize() {
- if (size == ProvUI.SIZE_UNKNOWN || size == ProvUI.SIZE_UNAVAILABLE)
- return ProvUIMessages.IUDetailsLabelProvider_Unknown;
- if (size > 1000L) {
- long kb = size / 1000L;
- return NLS.bind(ProvUIMessages.IUDetailsLabelProvider_KB, NumberFormat.getInstance().format(new Long(kb)));
- }
- return NLS.bind(ProvUIMessages.IUDetailsLabelProvider_Bytes, NumberFormat.getInstance().format(new Long(size)));
- }
-
- public void dispose() {
- if (sizingJob != null) {
- sizingJob.cancel();
- sizingJob = null;
- }
- }
-
- public void updateStatus(IUElementListRoot root, ProfileChangeOperation op) {
- super.updateStatus(root, op);
- if (op != null && op.getProvisioningPlan() != null)
- computeSizing(op.getProvisioningPlan(), op.getProvisioningContext());
- }
-
- protected IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan) {
- return plan.getAdditions();
- }
-}
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
deleted file mode 100644
index c298a728b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/StructuredIUGroup.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * 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;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A StructuredIUGroup is a reusable UI component that displays a
- * structured view of IU's driven by some queries.
- *
- * @since 3.4
- */
-public abstract class StructuredIUGroup {
-
- private FontMetrics fm;
- protected StructuredViewer viewer;
- private Composite composite;
- private ProvisioningUI ui;
- private IUColumnConfig[] columnConfig;
- private QueryProvider queryProvider;
-
- /**
- * Create a group that represents the available IU's.
- *
- * @param ui The application policy to use in the group
- * @param parent the parent composite for the group
- * to retrieve elements in the viewer.
- * @param font The font to use for calculating pixel sizes. This font is
- * not managed by the receiver.
- * @param columnConfig the columns to be shown
- */
- protected StructuredIUGroup(ProvisioningUI ui, Composite parent, Font font, IUColumnConfig[] columnConfig) {
- this.ui = ui;
- if (columnConfig == null)
- this.columnConfig = ProvUI.getIUColumnConfig();
- else
- this.columnConfig = columnConfig;
-
- // Set up a fontmetrics for calculations
- GC gc = new GC(parent);
- gc.setFont(font);
- fm = gc.getFontMetrics();
- gc.dispose();
- }
-
- protected void createGroupComposite(Composite parent) {
- composite = new Composite(parent, SWT.NONE);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- composite.setLayoutData(gd);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
-
- viewer = createViewer(composite);
-
- viewer.getControl().setLayoutData(getViewerGridData());
- }
-
- protected GridData getViewerGridData() {
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- return data;
- }
-
- protected abstract StructuredViewer createViewer(Composite parent);
-
- protected Composite getComposite() {
- return composite;
- }
-
- protected Shell getShell() {
- return composite.getShell();
- }
-
- protected StructuredViewer getStructuredViewer() {
- return viewer;
- }
-
- protected IUColumnConfig[] getColumnConfig() {
- return columnConfig;
- }
-
- public List<IInstallableUnit> getSelectedIUs() {
- return ElementUtils.elementsToIUs(getSelectedIUElements());
- }
-
- public Object[] getSelectedIUElements() {
- return ((IStructuredSelection) viewer.getSelection()).toArray();
- }
-
- protected int convertHorizontalDLUsToPixels(int dlus) {
- return Dialog.convertHorizontalDLUsToPixels(fm, dlus);
- }
-
- protected int convertWidthInCharsToPixels(int dlus) {
- return Dialog.convertWidthInCharsToPixels(fm, dlus);
- }
-
- protected int convertVerticalDLUsToPixels(int dlus) {
- return Dialog.convertVerticalDLUsToPixels(fm, dlus);
- }
-
- protected int convertHeightInCharsToPixels(int dlus) {
- return Dialog.convertHeightInCharsToPixels(fm, dlus);
- }
-
- protected QueryProvider getQueryProvider() {
- if (queryProvider == null)
- queryProvider = new QueryProvider(ui);
- return queryProvider;
- }
-
- protected Policy getPolicy() {
- return ui.getPolicy();
- }
-
- protected ProvisioningSession getSession() {
- return ui.getSession();
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ui;
- }
-
- protected Control getDefaultFocusControl() {
- if (viewer != null)
- return viewer.getControl();
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java
deleted file mode 100644
index f3eafc2f0..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TextURLDropAdapter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @since 3.4
- *
- */
-public class TextURLDropAdapter extends URLDropAdapter {
-
- Text text;
-
- public TextURLDropAdapter(Text text, boolean convertFileToURL) {
- super(convertFileToURL);
- this.text = text;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.dialogs.URLDropAdapter#handleURLString(java.lang.String, org.eclipse.swt.dnd.DropTargetEvent)
- */
- protected void handleDrop(String urlText, DropTargetEvent event) {
- text.setText(urlText);
- event.detail = DND.DROP_LINK;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java
deleted file mode 100644
index fe2d68036..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/TrustCertificateDialog.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.security.cert.X509Certificate;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.viewers.CertificateLabelProvider;
-import org.eclipse.equinox.internal.provisional.security.ui.X509CertificateViewDialog;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.dialogs.ListSelectionDialog;
-
-/**
- * A dialog that displays a certificate chain and asks the user if they
- * trust the certificate providers.
- */
-public class TrustCertificateDialog extends ListSelectionDialog {
-
- private TreeViewer certificateChainViewer;
- private Button detailsButton;
- protected TreeNode parentElement;
- protected Object selectedCertificate;
-
- public TrustCertificateDialog(Shell parentShell, Object input, ILabelProvider labelProvider, ITreeContentProvider contentProvider) {
- super(parentShell, input, contentProvider, labelProvider, ProvUIMessages.TrustCertificateDialog_Title);
- setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE | getDefaultOrientation());
- }
-
- private void createButtons(Composite composite) {
- // Details button to view certificate chain
- detailsButton = new Button(composite, SWT.NONE);
- detailsButton.setText(ProvUIMessages.TrustCertificateDialog_Details);
- detailsButton.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- if (selectedCertificate != null) {
- X509Certificate cert = (X509Certificate) ((TreeNode) selectedCertificate).getValue();
- X509CertificateViewDialog certificateDialog = new X509CertificateViewDialog(getShell(), cert);
- certificateDialog.open();
- }
- }
-
- public void widgetSelected(SelectionEvent e) {
- widgetDefaultSelected(e);
- }
- });
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- certificateChainViewer = new TreeViewer(composite, SWT.BORDER);
- GridLayout layout = new GridLayout();
- certificateChainViewer.getTree().setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessHorizontalSpace = true;
- certificateChainViewer.getTree().setLayoutData(data);
- certificateChainViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
- certificateChainViewer.setContentProvider(new TreeNodeContentProvider());
- certificateChainViewer.setLabelProvider(new CertificateLabelProvider());
- certificateChainViewer.addSelectionChangedListener(getChainSelectionListener());
- Object input = getViewer().getInput();
- if (input instanceof Object[]) {
- ISelection selection = null;
- Object[] nodes = (Object[]) input;
- if (nodes.length > 0) {
- selection = new StructuredSelection(nodes[0]);
- certificateChainViewer.setInput(new TreeNode[] {(TreeNode) nodes[0]});
- selectedCertificate = nodes[0];
- }
- getViewer().setSelection(selection);
- }
- getViewer().addDoubleClickListener(getDoubleClickListener());
- getViewer().addSelectionChangedListener(getParentSelectionListener());
- createButtons(composite);
- return composite;
- }
-
- private ISelectionChangedListener getChainSelectionListener() {
- return new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof StructuredSelection) {
- selectedCertificate = ((StructuredSelection) selection).getFirstElement();
- }
- }
- };
- }
-
- public TreeViewer getCertificateChainViewer() {
- return certificateChainViewer;
- }
-
- private IDoubleClickListener getDoubleClickListener() {
- return new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- StructuredSelection selection = (StructuredSelection) event.getSelection();
- Object selectedElement = selection.getFirstElement();
- if (selectedElement instanceof TreeNode) {
- TreeNode treeNode = (TreeNode) selectedElement;
- // create and open dialog for certificate chain
- X509CertificateViewDialog certificateViewDialog = new X509CertificateViewDialog(getShell(), (X509Certificate) treeNode.getValue());
- certificateViewDialog.open();
- }
- }
- };
- }
-
- private ISelectionChangedListener getParentSelectionListener() {
- return new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof StructuredSelection) {
- getCertificateChainViewer().setInput(new TreeNode[] {(TreeNode) ((StructuredSelection) selection).getFirstElement()});
- getCertificateChainViewer().refresh();
- }
- }
- };
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java
deleted file mode 100644
index 924e28b60..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/URLDropAdapter.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * EclipseSource - Bug 223991 - [ui] Drag n' Drop does not work on certain platforms
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.repository.helpers.RepositoryHelper;
-import org.eclipse.jface.util.Util;
-import org.eclipse.swt.dnd.*;
-
-/**
- * URLDropAdapter can receive URL text from a drop.
- * The URLDropAdapter should only be used with
- * the URLTransfer mechanism unless otherwise stated.
- *
- * @since 3.4
- *
- */
-public abstract class URLDropAdapter extends DropTargetAdapter {
-
- private boolean convertFileToURL = false;
-
- protected URLDropAdapter(boolean convertFileToURL) {
- this.convertFileToURL = convertFileToURL;
- }
-
- public void dragEnter(DropTargetEvent e) {
- if (!dropTargetIsValid(e)) {
- e.detail = DND.DROP_NONE;
- return;
- }
- if (e.detail == DND.DROP_NONE)
- e.detail = DND.DROP_LINK;
- }
-
- public void dragOperationChanged(DropTargetEvent e) {
- if (e.detail == DND.DROP_NONE)
- e.detail = DND.DROP_LINK;
- }
-
- public void drop(DropTargetEvent event) {
- if (dropTargetIsValid(event)) {
- String urlText = getURLText(event);
- if (urlText != null) {
- handleDrop(urlText, event);
- return;
- }
- }
- event.detail = DND.DROP_NONE;
- }
-
- private String getURLText(DropTargetEvent event) {
- if (URLTransfer.getInstance().isSupportedType(event.currentDataType))
- return (String) URLTransfer.getInstance().nativeToJava(event.currentDataType);
- if (convertFileToURL && FileTransfer.getInstance().isSupportedType(event.currentDataType)) {
- String[] names = (String[]) FileTransfer.getInstance().nativeToJava(event.currentDataType);
- if (names != null && names.length == 1) {
- URI potentialLocation;
- try {
- potentialLocation = URIUtil.fromString(names[0]);
- return URIUtil.toUnencodedString(RepositoryHelper.localRepoURIHelper(potentialLocation));
- } catch (URISyntaxException e) {
- return names[0];
- }
- }
- }
- return null;
- }
-
- /**
- * Determine whether the drop target is valid. Subclasses may override.
- * @param event the drop target event
- * @return <code>true</code> if drop should proceed, <code>false</code> if it should not.
- */
- protected boolean dropTargetIsValid(DropTargetEvent event) {
- if (URLTransfer.getInstance().isSupportedType(event.currentDataType) && dropTargetDataIsValid(event))
- return true;
- if (!convertFileToURL)
- return false;
- if (FileTransfer.getInstance().isSupportedType(event.currentDataType)) {
- String[] names = (String[]) FileTransfer.getInstance().nativeToJava(event.currentDataType);
- return names != null && names.length == 1;
- }
- return false;
- }
-
- /**
- * Determine whether the drop target data is valid. On some platforms this cannot be detected,
- * in which which case we return true.
- * @param event the drop target event
- * @return <code>true</code> if data is valid, (or can not be determined), <code>false</code> otherwise.
- */
- protected boolean dropTargetDataIsValid(DropTargetEvent event) {
- if (Util.isWindows())
- return URLTransfer.getInstance().nativeToJava(event.currentDataType) != null;
- return true;
- }
-
- /**
- * Handle the drop with the given text as the URL.
- * @param urlText The url text specified by the drop. It is never <code>null</code>.
- * @param event the originating drop target event.
- */
- protected abstract void handleDrop(String urlText, DropTargetEvent event);
-}
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
deleted file mode 100644
index f5afea512..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizard.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * 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.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.operations.UninstallOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.wizard.IWizardPage;
-
-/**
- * @since 3.4
- */
-public class UninstallWizard extends ProvisioningOperationWizard {
-
- 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));
- }
-
- protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
- mainPage = new SelectableIUsPage(ui, this, input, selections);
- mainPage.setTitle(ProvUIMessages.UninstallIUOperationLabel);
- mainPage.setDescription(ProvUIMessages.UninstallDialog_UninstallMessage);
- ((SelectableIUsPage) mainPage).updateStatus(input, operation);
- return mainPage;
- }
-
- protected ResolutionResultsWizardPage createResolutionPage() {
- return new UninstallWizardPage(ui, this, root, (UninstallOperation) operation);
- }
-
- protected void initializeResolutionModelElements(Object[] selectedElements) {
- root = new IUElementListRoot();
- ArrayList<InstalledIUElement> list = new ArrayList<InstalledIUElement>(selectedElements.length);
- ArrayList<InstalledIUElement> selections = new ArrayList<InstalledIUElement>(selectedElements.length);
- for (int i = 0; i < selectedElements.length; i++) {
- IInstallableUnit iu = ElementUtils.getIU(selectedElements[i]);
- if (iu != null) {
- InstalledIUElement element = new InstalledIUElement(root, getProfileId(), iu);
- list.add(element);
- selections.add(element);
- }
- }
- root.setChildren(list.toArray());
- planSelections = selections.toArray();
- }
-
- protected IResolutionErrorReportingPage createErrorReportingPage() {
- return (SelectableIUsPage) mainPage;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#getStartingPage()
- */
- public IWizardPage getStartingPage() {
- if (getCurrentStatus().isOK()) {
- ((SelectableIUsPage) mainPage).setPageComplete(true);
- return resolutionPage;
- }
- return super.getStartingPage();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
- */
- protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
- UninstallOperation op = new UninstallOperation(ui.getSession(), ElementUtils.elementsToIUs(elements));
- op.setProfileId(getProfileId());
- // op.setRootMarkerKey(getRootMarkerKey());
- op.setProvisioningContext(getProvisioningContext());
- return op;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
deleted file mode 100644
index 376bbed82..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UninstallWizardPage.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.UninstallOperation;
-import org.eclipse.equinox.p2.query.IQueryable;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-public class UninstallWizardPage extends ResolutionResultsWizardPage {
-
- public UninstallWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, UninstallOperation initialResolution) {
- super(ui, wizard, root, initialResolution);
- setTitle(ProvUIMessages.UninstallWizardPage_Title);
- setDescription(ProvUIMessages.UninstallWizardPage_Description);
- }
-
- protected String getOperationLabel() {
- return ProvUIMessages.UninstallIUOperationLabel;
- }
-
- protected String getOperationTaskName() {
- return ProvUIMessages.UninstallIUOperationTask;
- }
-
- protected IQueryable<IInstallableUnit> getQueryable(IProvisioningPlan plan) {
- return plan.getRemovals();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java
deleted file mode 100644
index 26f230c98..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUPage.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.net.MalformedURLException;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.Update;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-public class UpdateSingleIUPage extends ProvisioningWizardPage {
-
- UpdateOperation operation;
-
- protected UpdateSingleIUPage(UpdateOperation operation, ProvisioningUI ui) {
- super("UpdateSingleIUPage", ui, null); //$NON-NLS-1$
- setTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
- IProduct product = Platform.getProduct();
- String productName = product != null && product.getName() != null ? product.getName() : ProvUIMessages.ApplicationInRestartDialog;
- setDescription(NLS.bind(ProvUIMessages.UpdateSingleIUPage_SingleUpdateDescription, productName));
- Assert.isNotNull(operation);
- Assert.isTrue(operation.hasResolved());
- Assert.isTrue(operation.getSelectedUpdates().length == 1);
- Assert.isTrue(operation.getResolutionResult().isOK());
- this.operation = operation;
- }
-
- public void createControl(Composite parent) {
- IInstallableUnit updateIU = getUpdate().replacement;
- String url = null;
- if (updateIU.getUpdateDescriptor().getLocation() != null)
- try {
- url = URIUtil.toURL(updateIU.getUpdateDescriptor().getLocation()).toExternalForm();
- } catch (MalformedURLException e) {
- // ignore and null URL will be ignored below
- }
- if (url != null) {
- Browser browser = null;
- try {
- browser = new Browser(parent, SWT.NONE);
- browser.setUrl(url);
- browser.setBackground(parent.getBackground());
- setControl(browser);
- return;
- } catch (SWTError e) {
- // Fall through to backup plan.
- }
- }
- // Create a text description of the update.
- Text text = new Text(parent, SWT.MULTI | SWT.V_SCROLL | SWT.READ_ONLY);
- text.setBackground(parent.getBackground());
- text.setText(getUpdateText(updateIU));
- setControl(text);
- }
-
- private String getUpdateText(IInstallableUnit iu) {
- StringBuffer buffer = new StringBuffer();
- buffer.append(new IUDetailsLabelProvider().getClipboardText(getUpdate().replacement, CopyUtils.DELIMITER));
- buffer.append(CopyUtils.NEWLINE);
- buffer.append(CopyUtils.NEWLINE);
- String text = iu.getUpdateDescriptor().getDescription();
- if (text != null)
- buffer.append(text);
- else {
- text = iu.getProperty(IInstallableUnit.PROP_DESCRIPTION);
- if (text != null)
- buffer.append(text);
- }
- return buffer.toString();
-
- }
-
- public boolean performFinish() {
- if (operation.getResolutionResult().getSeverity() != IStatus.ERROR) {
- getProvisioningUI().schedule(operation.getProvisioningJob(null), StatusManager.SHOW | StatusManager.LOG);
- return true;
- }
- return false;
- }
-
- @Override
- protected String getClipboardText(Control control) {
- return getUpdate().toString();
- }
-
- private Update getUpdate() {
- return operation.getSelectedUpdates()[0];
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
deleted file mode 100644
index dd4dd2eea..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateSingleIUWizard.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.AcceptLicensesWizardPage;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.wizard.Wizard;
-
-/**
- * An update wizard that is invoked when there is only one thing to update, only
- * one update to choose, and the resolution is known to be successful.
- *
- * @since 3.6
- */
-public class UpdateSingleIUWizard extends Wizard {
-
- UpdateSingleIUPage mainPage;
- ProvisioningUI ui;
- UpdateOperation operation;
-
- public static boolean validFor(UpdateOperation operation) {
- return operation.hasResolved() && operation.getResolutionResult().isOK() && operation.getSelectedUpdates().length == 1;
- }
-
- public UpdateSingleIUWizard(ProvisioningUI ui, UpdateOperation operation) {
- super();
- this.ui = ui;
- this.operation = operation;
- setWindowTitle(ProvUIMessages.UpdateIUOperationLabel);
- setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UPDATE));
- }
-
- protected UpdateSingleIUPage createMainPage() {
- mainPage = new UpdateSingleIUPage(operation, ui);
- return mainPage;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- mainPage = createMainPage();
- addPage(mainPage);
- AcceptLicensesWizardPage page = createLicensesPage();
- page.update(null, operation);
- if (page.hasLicensesToAccept())
- addPage(page);
- }
-
- protected AcceptLicensesWizardPage createLicensesPage() {
- return new AcceptLicensesWizardPage(ui.getLicenseManager(), null, operation);
- }
-
- @Override
- public boolean performFinish() {
- return mainPage.performFinish();
- }
-
-}
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
deleted file mode 100644
index ee3c10e24..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizard.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * Genuitec, LLC - added license support
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import java.util.*;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.AvailableUpdateElement;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.*;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.wizard.IWizardPage;
-
-/**
- * @since 3.4
- */
-public class UpdateWizard extends WizardWithLicenses {
- IInstallableUnit[] iusToReplace;
- boolean skipSelectionsPage = false;
- IUElementListRoot firstPageRoot;
-
- 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;
- }
-
- public static IInstallableUnit[] getReplacementIUs(Object[] elements) {
- Set<IInstallableUnit> replacements = new HashSet<IInstallableUnit>();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof AvailableUpdateElement) {
- replacements.add(((AvailableUpdateElement) elements[i]).getIU());
- }
- }
- return replacements.toArray(new IInstallableUnit[replacements.size()]);
- }
-
- public static Update[] makeUpdatesFromElements(Object[] elements) {
- Set<Update> updates = new HashSet<Update>();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof AvailableUpdateElement) {
- updates.add(((AvailableUpdateElement) elements[i]).getUpdate());
- }
- }
- return updates.toArray(new Update[updates.size()]);
- }
-
- /**
- * Open an update wizard. For update wizards, the operation must have been resolved in advanced.
- * This prevents searching for updates in the UI thread.
- *
- * @param ui the provisioning UI
- * @param operation the update operation. Must already be resolved!
- * @param initialSelections initial selections for the wizard (can be null)
- * @param preloadJob a job that has been used to preload metadata repositories (can be null)
- */
- public UpdateWizard(ProvisioningUI ui, UpdateOperation operation, Object[] initialSelections, LoadMetadataRepositoryJob preloadJob) {
- super(ui, operation, initialSelections, preloadJob);
- Assert.isLegal(operation.hasResolved(), "Cannot create an update wizard on an unresolved operation"); //$NON-NLS-1$
- setWindowTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
- setDefaultPageImageDescriptor(ProvUIImages.getImageDescriptor(ProvUIImages.WIZARD_BANNER_UPDATE));
- }
-
- protected ISelectableIUsPage createMainPage(IUElementListRoot input, Object[] selections) {
- mainPage = new SelectableIUsPage(ui, this, getAllPossibleUpdatesRoot(), selections);
- mainPage.setTitle(ProvUIMessages.UpdateAction_UpdatesAvailableTitle);
- mainPage.setDescription(ProvUIMessages.UpdateAction_UpdatesAvailableMessage);
- ((SelectableIUsPage) mainPage).updateStatus(getAllPossibleUpdatesRoot(), operation);
- return mainPage;
- }
-
- protected ResolutionResultsWizardPage createResolutionPage() {
- return new UpdateWizardPage(ui, this, root, (UpdateOperation) operation);
- }
-
- protected void initializeResolutionModelElements(Object[] selectedElements) {
- root = new IUElementListRoot();
- ArrayList<AvailableUpdateElement> list = new ArrayList<AvailableUpdateElement>(selectedElements.length);
- ArrayList<AvailableUpdateElement> selected = new ArrayList<AvailableUpdateElement>(selectedElements.length);
- for (int i = 0; i < selectedElements.length; i++) {
- if (selectedElements[i] instanceof AvailableUpdateElement) {
- AvailableUpdateElement element = (AvailableUpdateElement) selectedElements[i];
- AvailableUpdateElement newElement = new AvailableUpdateElement(root, element.getIU(), element.getIUToBeUpdated(), getProfileId(), shouldShowProvisioningPlanChildren());
- list.add(newElement);
- selected.add(newElement);
- } else if (selectedElements[i] instanceof Update) {
- Update update = (Update) selectedElements[i];
- AvailableUpdateElement newElement = new AvailableUpdateElement(root, update.replacement, update.toUpdate, getProfileId(), shouldShowProvisioningPlanChildren());
- list.add(newElement);
- selected.add(newElement);
- }
- }
- root.setChildren(list.toArray());
- planSelections = selected.toArray();
- }
-
- protected IResolutionErrorReportingPage createErrorReportingPage() {
- return (SelectableIUsPage) mainPage;
- }
-
- public void setSkipSelectionsPage(boolean skipSelectionsPage) {
- this.skipSelectionsPage = skipSelectionsPage;
- }
-
- public IWizardPage getStartingPage() {
- if (skipSelectionsPage) {
- // TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=276963
- IWizardPage page = getNextPage(mainPage);
- if (page != null)
- return page;
- }
- return mainPage;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getProfileChangeOperation(java.lang.Object[])
- */
- protected ProfileChangeOperation getProfileChangeOperation(Object[] elements) {
- if (operation == null) {
- operation = new UpdateOperation(ui.getSession(), getIUsToReplace(elements));
- operation.setProfileId(getProfileId());
- // operation.setRootMarkerKey(getRootMarkerKey());
- operation.setProvisioningContext(getProvisioningContext());
-
- } else {
- ((UpdateOperation) operation).setSelectedUpdates(makeUpdatesFromElements(elements));
- }
- return operation;
- }
-
- private IUElementListRoot getAllPossibleUpdatesRoot() {
- if (firstPageRoot == null) {
- firstPageRoot = new IUElementListRoot();
- if (operation != null && operation instanceof UpdateOperation) {
- Update[] updates;
- if (getPolicy().getShowLatestVersionsOnly()) {
- updates = ((UpdateOperation) operation).getSelectedUpdates();
- } else {
- updates = ((UpdateOperation) operation).getPossibleUpdates();
- }
- ArrayList<AvailableUpdateElement> allPossible = new ArrayList<AvailableUpdateElement>(updates.length);
- for (int i = 0; i < updates.length; i++) {
- AvailableUpdateElement newElement = new AvailableUpdateElement(firstPageRoot, updates[i].replacement, updates[i].toUpdate, getProfileId(), shouldShowProvisioningPlanChildren());
- allPossible.add(newElement);
- }
- firstPageRoot.setChildren(allPossible.toArray());
- }
- }
- return firstPageRoot;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
deleted file mode 100644
index c8bf6dd31..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UpdateWizardPage.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-public class UpdateWizardPage extends SizeComputingWizardPage {
-
- public UpdateWizardPage(ProvisioningUI ui, ProvisioningOperationWizard wizard, IUElementListRoot root, UpdateOperation operation) {
- super(ui, wizard, root, operation);
- setTitle(ProvUIMessages.UpdateWizardPage_Title);
- setDescription(ProvUIMessages.UpdateWizardPage_Description);
- }
-
- protected String getIUDescription(IInstallableUnit iu) {
- if (iu != null) {
- IUpdateDescriptor updateDescriptor = iu.getUpdateDescriptor();
- if (updateDescriptor != null && updateDescriptor.getDescription() != null && updateDescriptor.getDescription().length() > 0)
- return updateDescriptor.getDescription();
- }
- return super.getIUDescription(iu);
- }
-
- protected String getOperationLabel() {
- return ProvUIMessages.UpdateIUOperationLabel;
- }
-
- protected String getOperationTaskName() {
- return ProvUIMessages.UpdateIUOperationTask;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java
deleted file mode 100644
index 9f2045cd9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/UserValidationDialog.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.dialogs;
-
-import org.eclipse.equinox.p2.core.UIServices.AuthenticationInfo;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * A dialog to prompt the user for login information such as user name and password.
- */
-public class UserValidationDialog extends Dialog {
-
- private Text username;
- private Text password;
- private AuthenticationInfo result = null;
-
- private Button saveButton;
-
- private String titleMessage;
- private Image titleImage;
-
- private String message;
-
- private int dialogImageType;
-
- /**
- * Creates a new validation dialog that prompts the user for login credentials.
- *
- * @param parentShell the parent shell of this dialog
- * @param titleMessage the message to be displayed by this dialog's window
- * @param titleImage the image of this shell, may be <code>null</code>
- * @param message the message to prompt to the user
- */
- public UserValidationDialog(Shell parentShell, String titleMessage, Image titleImage, String message) {
- this(null, parentShell, titleMessage, titleImage, message, SWT.ICON_QUESTION);
- }
-
- /**
- * Creates a new validation dialog that prompts the user for login credentials.
- *
- * @param lastUsed the authentication information that was originally as an attempt to login
- * @param parentShell the parent shell of this dialog
- * @param titleMessage the message to be displayed by this dialog's window
- * @param titleImage the image of this shell, may be <code>null</code>
- * @param message the message to prompt to the user
- */
- public UserValidationDialog(AuthenticationInfo lastUsed, Shell parentShell, String titleMessage, Image titleImage, String message) {
- this(lastUsed, parentShell, titleMessage, titleImage, message, SWT.ICON_WARNING);
- }
-
- private UserValidationDialog(AuthenticationInfo lastUsed, Shell parentShell, String titleMessage, Image titleImage, String message, int dialogImageType) {
- super(parentShell);
- result = lastUsed;
-
- this.titleMessage = titleMessage;
- this.titleImage = titleImage;
- this.message = message;
- this.dialogImageType = dialogImageType;
- }
-
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(titleMessage);
- newShell.setImage(titleImage);
- }
-
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
-
- Composite container = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- container.setLayout(layout);
- container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- createImageSection(container);
- createFieldsSection(container);
-
- Dialog.applyDialogFont(composite);
-
- return composite;
- }
-
- private void createImageSection(Composite composite) {
- Image image = composite.getDisplay().getSystemImage(dialogImageType);
- if (image != null) {
- Label label = new Label(composite, SWT.NONE);
- label.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
- label.setImage(image);
- }
- }
-
- private void createFieldsSection(Composite composite) {
- Composite fieldContainer = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- fieldContainer.setLayout(layout);
- GridData layoutData = new GridData();
- fieldContainer.setLayoutData(layoutData);
-
- Label label = new Label(fieldContainer, SWT.WRAP | SWT.LEAD);
- GridData data = new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- label.setText(message);
-
- label = new Label(fieldContainer, SWT.NONE);
- label.setText(ProvUIMessages.UserValidationDialog_UsernameLabel);
- username = new Text(fieldContainer, SWT.BORDER);
- layoutData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
- username.setLayoutData(layoutData);
- username.setText(getUserName());
-
- label = new Label(fieldContainer, SWT.NONE);
- label.setText(ProvUIMessages.UserValidationDialog_PasswordLabel);
- password = new Text(fieldContainer, SWT.PASSWORD | SWT.BORDER);
- layoutData = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
- password.setLayoutData(layoutData);
- password.setText(getPassword());
-
- saveButton = new Button(fieldContainer, SWT.CHECK);
- saveButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false, 2, 1));
- saveButton.setText(ProvUIMessages.UserValidationDialog_SavePasswordButton);
- saveButton.setSelection(saveResult());
- }
-
- protected void okPressed() {
- this.result = new AuthenticationInfo(username.getText(), password.getText(), saveButton.getSelection());
- super.okPressed();
- }
-
- /**
- * Returns the authentication information given by the user, or null if the user cancelled
- * @return the authentication information given by the user, or null if the user cancelled
- */
- public AuthenticationInfo getResult() {
- return result;
- }
-
- private String getUserName() {
- return result != null ? result.getUserName() : ""; //$NON-NLS-1$
- }
-
- private String getPassword() {
- return result != null ? result.getPassword() : ""; //$NON-NLS-1$
- }
-
- private boolean saveResult() {
- return result != null ? result.saveResult() : false;
- }
-}
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
deleted file mode 100644
index 8f5765b51..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/WizardWithLicenses.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * 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;
-
-import org.eclipse.equinox.internal.p2.ui.model.ElementUtils;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.ui.*;
-import org.eclipse.jface.wizard.IWizardPage;
-
-/**
- * Common superclass for wizards that need to show licenses.
- * @since 3.5
- */
-public abstract class WizardWithLicenses extends ProvisioningOperationWizard {
-
- AcceptLicensesWizardPage licensePage;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void addPages() {
- super.addPages();
- licensePage = createLicensesPage();
- addPage(licensePage);
- }
-
- public WizardWithLicenses(ProvisioningUI ui, ProfileChangeOperation operation, Object[] initialSelections, LoadMetadataRepositoryJob job) {
- super(ui, operation, initialSelections, job);
- }
-
- protected AcceptLicensesWizardPage createLicensesPage() {
- IInstallableUnit[] ius = new IInstallableUnit[0];
- if (planSelections != null)
- ius = ElementUtils.elementsToIUs(planSelections).toArray(new IInstallableUnit[0]);
- return new AcceptLicensesWizardPage(ui.getLicenseManager(), ius, operation);
- }
-
- /*
- * Overridden to determine whether the license page should be shown.
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
- // If the license page is supposed to be the next page,
- // ensure there are actually licenses that need acceptance.
- IWizardPage proposedPage = super.getNextPage(page);
- if (proposedPage != licensePage)
- return proposedPage;
- if (!licensePage.hasLicensesToAccept())
- return null;
- return licensePage;
- }
-
- protected void planChanged() {
- super.planChanged();
- licensePage.update(ElementUtils.elementsToIUs(planSelections).toArray(new IInstallableUnit[0]), operation);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningOperationWizard#performFinish()
- */
- public boolean performFinish() {
- licensePage.performFinish();
- return super.performFinish();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
deleted file mode 100644
index c323c5f70..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/messages.properties
+++ /dev/null
@@ -1,239 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-
-ProfileModificationAction_InvalidSelections=Problem determining user request. Profile id: {0}, Selection count: {1}
-ProfileModificationWizardPage_DetailsLabel=Details
-ProfileSnapshots_Label=Installation History
-
-ProvisioningOperationRunner_CannotApplyChanges=The changes could not be applied while the application is running. You must restart the application for the changes to take effect.
-ProvisioningOperationWizard_UnexpectedFailureToResolve=Unexpected error
-InstalledSoftwarePage_NoProfile=This installation has not been configured for showing the installed software. See the error log for details.
-InstallIUOperationLabel=Install
-InstallIUOperationTask=Software installation in progress...
-InstallIUCommandLabel=&Install...
-InstallIUCommandTooltip=Install the selected items
-UninstallDialog_UninstallMessage=Check the items that you wish to uninstall.
-UninstallIUOperationLabel=Uninstall
-UninstallIUOperationTask=Uninstall is in progress...
-UninstallIUCommandLabel=&Uninstall...
-UninstallIUCommandTooltip=Uninstall the selected items
-UninstallIUProgress=Uninstalling...
-UninstallWizardPage_Description=Review and confirm the items to be uninstalled.
-UninstallWizardPage_Title=Uninstall Details
-ServiceUI_LoginDetails=Please provide login details for {0}
-ServiceUI_LoginRequired=Login required
-ServiceUI_unsigned_message=Warning: You are installing software that contains unsigned content. The authenticity or validity of this software cannot be established. Do you want to continue with the installation?
-ServiceUI_warning_title=Security Warning
-UpdateIUOperationLabel=Update
-UpdateIUOperationTask=Software update is in progress...
-UpdateIUCommandLabel=Up&date...
-UpdateIUCommandTooltip=See if updates are available for the selected items
-UpdateIUProgress=Updating...
-RefreshAction_Label=Refres&h
-RefreshAction_Tooltip=Refresh
-RemoveColocatedRepositoryAction_Label=&Remove Sites...
-RemoveColocatedRepositoryAction_Tooltip=Remove selected sites from the available software site list
-RevertIUCommandLabel=&Revert...
-RevertIUCommandTooltip=Revert to a previously installed configuration
-ProvDropAdapter_NoIUsToDrop=No items were available to be dropped
-ProvDropAdapter_InvalidDropTarget=Invalid drop target
-ProvDropAdapter_UnsupportedDropOperation=Unsupported drop operation
-ProvElementContentProvider_FetchJobTitle=Fetching Elements
-
-IUCopyrightPropertyPage_NoCopyright=No copyright information has been provided.
-IUCopyrightPropertyPage_ViewLinkLabel=View full copyright:
-IUPropertyPage_NoIUSelected=There was nothing selected to show in the properties.
-IUDetailsLabelProvider_KB={0} KB
-IUDetailsLabelProvider_Bytes={0} Bytes
-IUDetailsLabelProvider_ComputingSize=Computing size...
-IUDetailsLabelProvider_Unknown=Unknown
-IUGeneralInfoPropertyPage_ContactLabel=Contact:
-IUGeneralInfoPropertyPage_CouldNotOpenBrowser=Could not open the web browser.
-IUGeneralInfoPropertyPage_DescriptionLabel=Description
-IUGeneralInfoPropertyPage_DocumentationLink=Documentation is available:
-IUGeneralInfoPropertyPage_IdentifierLabel=Identifier:
-IUGeneralInfoPropertyPage_NameLabel=Name:
-IUGeneralInfoPropertyPage_ProviderLabel=Provider:
-IUGeneralInfoPropertyPage_VersionLabel=Version:
-IULicensePropertyPage_NoLicense=No license information has been provided.
-IULicensePropertyPage_ViewLicenseLabel=View full license:
-
-RepositoryDetailsLabelProvider_Disabled=Disabled
-RepositoryDetailsLabelProvider_Enabled=Enabled
-RepositoryGroup_LocalRepoBrowseButton=L&ocal...
-RepositoryGroup_ArchivedRepoBrowseButton=&Archive...
-RepositoryGroup_SelectRepositoryDirectory=Select a repository root directory:
-RepositoryGroup_RepositoryFile=Repository archive
-RepositoryGroup_URLRequired=Must specify a location
-RepositoryManipulationPage_Add=&Add...
-RepositoryManipulationPage_ContactingSiteMessage=Contacting {0}
-RepositoryManipulationPage_DefaultFilterString=type filter text
-RepositoryManipulationPage_Description=Enabled sites will be used to find available software. Disabled sites are ignored.
-RepositoryManipulationPage_DisableButton=&Disable
-RepositoryManipulationPage_EnableButton=E&nable
-RepositoryManipulationPage_EnabledColumnTitle=Enabled
-RepositoryManipulationPage_Export=E&xport...
-RepositoryManipulationPage_Import=&Import...
-RepositoryManipulationPage_LocationColumnTitle=Location
-RepositoryManipulationPage_NameColumnTitle=Name
-RepositoryManipulationPage_RefreshOperationCanceled=Operation canceled.
-RepositoryManipulationPage_Edit=&Edit
-RepositoryManipulationPage_RefreshConnection=Re&load
-RepositoryManipulationPage_Remove=&Remove
-RepositoryManipulationPage_RemoveConfirmMessage=Are you sure you want to remove the selected items?
-RepositoryManipulationPage_RemoveConfirmSingleMessage=Are you sure you want to remove {0}?
-RepositoryManipulationPage_RemoveConfirmTitle=Remove Sites
-RepositoryManipulationPage_TestConnectionSuccess=Information for "{0}" has been reloaded from the server.
-RepositoryManipulationPage_TestConnectionTitle=Reload
-RepositoryManipulationPage_Title=Available Software Sites
-RepositoryManipulatorDropTarget_DragAndDropJobLabel=Drag and Drop Operation
-RepositoryManipulatorDropTarget_DragSourceNotValid={0} was not accepted as a valid software site location. Check the details.
-RepositoryNameAndLocationDialog_Title=Edit Site
-RepositorySelectionGroup_GenericSiteLinkTitle=<a>Work with the list of software sites</a>
-# Separator used between a site's name and URL when they are shown together, such as "http://update.example.com - Example Site"
-RepositorySelectionGroup_NameAndLocationSeparator=\ -
-RepositorySelectionGroup_PrefPageLink=Find more software by working with the <a>"{0}"</a> preferences.
-RepositorySelectionGroup_PrefPageName=Software Sites
-ResolutionWizardPage_Canceled=The operation was cancelled.
-ResolutionWizardPage_ErrorStatus=The operation cannot be completed. See the details.
-ResolutionWizardPage_NoSelections=There were no installable units selected when the plan was computed.
-ResolutionWizardPage_WarningInfoStatus=Your original request has been modified. See the details.
-
-AcceptLicensesWizardPage_AcceptMultiple=I &accept the terms of the license agreements
-AcceptLicensesWizardPage_AcceptSingle=I &accept the terms of the license agreement
-AcceptLicensesWizardPage_ItemsLabel=&Licenses:
-AcceptLicensesWizardPage_LicenseTextLabel=License &text:
-AcceptLicensesWizardPage_NoLicensesDescription=There are no licenses to review. Either the software does not specify a license, or the license has already been reviewed and approved.
-AcceptLicensesWizardPage_RejectMultiple=I &do not accept the terms of the license agreements
-AcceptLicensesWizardPage_RejectSingle=I &do not accept the terms of the license agreement
-AcceptLicensesWizardPage_ReviewExtraLicensesDescription=Licenses must be reviewed before the software can be installed. This includes licenses for software required to complete the install.
-AcceptLicensesWizardPage_ReviewLicensesDescription=Licenses must be reviewed and accepted before the software can be installed.
-AcceptLicensesWizardPage_SingleLicenseTextLabel=License &text (for {0}):
-AcceptLicensesWizardPage_Title=Review Licenses
-AddRepositoryDialog_Title=Add Repository
-AddRepositoryDialog_InvalidURL=The provided location is not valid
-AddRepositoryDialog_LocationLabel=&Location:
-AddRepositoryDialog_NameLabel=&Name:
-
-UpdateAction_UpdatesAvailableMessage=Check the updates that you wish to install.
-UpdateAction_UpdatesAvailableTitle=Available Updates
-UpdateOrInstallWizardPage_Size=Size: {0}
-UpdateManagerCompatibility_ExportSitesTitle=Export Sites
-UpdateManagerCompatibility_ImportSitesTitle=Import Sites
-UpdateManagerCompatibility_InvalidSiteFileMessage=The selected file does not contain any updates sites. Please select another file.
-UpdateManagerCompatibility_InvalidSitesTitle=Invalid Sites File
-UpdateManagerCompatibility_ItemRequiresUpdateManager=The items selected for install include software ({0}) that requires install procedures from the older Eclipse Update Manager. The installation cannot continue.
-UpdateManagerCompatibility_UnableToOpenFindAndInstall=Unable to open the Classic Update Manager 'Find and Install' wizard.
-UpdateManagerCompatibility_UnableToOpenManageConfiguration=Unable to open the Classic Update Manager 'Manage Configuration' dialog.
-Updates_Label=Updates Available
-UpdateSingleIUPage_SingleUpdateDescription=A new update has been found for {0}.
-UpdateWizardPage_Description=Review and confirm the updates.
-UpdateWizardPage_Title=Update Details
-UserValidationDialog_PasswordLabel=&Password:
-UserValidationDialog_SavePasswordButton=&Save password
-UserValidationDialog_UsernameLabel=&Username:
-ColocatedRepositoryManipulator_AddSiteOperationLabel=Add Site
-RevertProfilePage_ConfirmDeleteMultipleConfigs=Deleting the selected configurations from the installation history will free up the disk space used to store the configurations. However, you will no longer be able to revert your installation to these configurations. Are you sure you want to delete the configurations?
-RevertProfilePage_ConfirmDeleteSingleConfig=Deleting the configuration from the installation history will free up the disk space used to store it. However, you will no longer be able to revert your installation to this configuration. Are you sure you want to delete it?
-RevertProfilePage_Delete=&Delete
-RevertProfilePage_DeleteMultipleConfigurationsTitle=Delete Configurations
-RevertProfilePage_DeleteSingleConfigurationTitle=Delete Configuration
-RevertProfilePage_DeleteTooltip=Delete the selected install configurations.
-RevertProfilePage_NoProfile=This installation has not been configured properly for accessing the installation history. See the error log for details.
-RevertProfilePage_RevertLabel=Re&vert
-RevertProfilePage_RevertTooltip=Revert to the selected install configuration.
-RevertProfilePage_CompareLabel=Co&mpare
-RevertProfilePage_CompareTooltip=Compare selected install configurations.
-InstallWizardPage_NoCheckboxDescription=Review the items to be installed.
-InstallWizardPage_Title=Install Details
-PreselectedIUInstallWizard_Title=Install
-PreselectedIUInstallWizard_Description=Check the items that you wish to install.
-PlatformUpdateTitle = Software Updates
-PlatformRestartMessage = You will need to restart {0} for the changes to take effect. \
-Would you like to restart now?
-Policy_RequiresUpdateManagerMessage=A feature that you have selected uses install procedures that are not compatible with the current installation support. This feature can only be installed by the older Update Manager. \
-\
-Do you want to launch the older Update Manager?
-Policy_RequiresUpdateManagerTitle=Unsupported Install
-ApplicationInRestartDialog = the application
-ProvUI_ErrorDuringApplyConfig=Error while attempting to apply changes. You must restart the application for changes to take effect.
-ProvUI_InformationTitle=Information
-ProvUI_InstallDialogError=Unable to open the Installation Information.
-ProvUI_NameColumnTitle=Name
-ProvUI_IdColumnTitle=Id
-ProvUI_VersionColumnTitle=Version
-ProvUI_WarningTitle=Warning
-ProvUIMessages_NotAccepted_EnterFor_0=Login details were not accepted. Please provide login details for {0}
-ProvUIMessages_SavedNotAccepted_EnterFor_0=Saved login details were not accepted. Please provide login details for {0}
-
-OptionalPlatformRestartMessage = You will need to restart {0} for the installation changes to take effect. \
-\
-You may try to apply the changes without restarting, but this may cause errors.
-ApplyProfileChangesDialog_Restart=&Restart Now
-ApplyProfileChangesDialog_NotYet=&Not Now
-ApplyProfileChangesDialog_ApplyChanges=&Apply Changes Now
-AvailableIUGroup_LoadingRepository=Loading {0}
-AvailableIUGroup_NoSitesConfiguredDescription=This product was not configured with any software sites. Contact your systems administrator.
-AvailableIUGroup_NoSitesConfiguredExplanation=There are no software sites available.
-ColocatedRepositoryManipulator_NoContentExplanation=You may select a site in the combo box at the top. You may also type or paste a site name into the combo box and press Enter. You may also drag a site URL into the combo box or software list.
-ColocatedRepositoryTracker_PromptForSiteLocationEdit=No software site found at {0}. Do you wish to edit the location?
-ColocatedRepositoryTracker_SiteNotFoundTitle=Error Contacting Site
-AvailableIUGroup_NoSitesExplanation=There is no site selected.
-AvailableIUsPage_AddButton=&Add...
-AvailableIUsPage_AllSites=--All Available Sites--
-AvailableIUsPage_Description=Check the items that you wish to install.
-AvailableIUsPage_FilterOnEnvCheckBox=Show only software applicable to target environment
-AvailableIUsPage_GotoInstallInfo=What is <a>already installed</a>?
-AvailableIUsPage_GotoProperties=<a>More...</a>
-AvailableIUsPage_GroupByCategory=&Group items by category
-AvailableIUsPage_HideInstalledItems=&Hide items that are already installed
-AvailableIUsPage_LocalSites=--Only Local Sites--
-AvailableIUsPage_MultipleSelectionCount={0} items selected
-AvailableIUsPage_NameWithLocation={0}{1}{2}
-AvailableIUsPage_NoSites=type or select a site
-AvailableIUsPage_RepoFilterInstructions=You can type a new site location and press 'Enter' to view software from that site.
-AvailableIUsPage_RepoFilterLabel=&Work with:
-AvailableIUsPage_ResolveAllCheckbox=&Contact all update sites during install to find required software
-AvailableIUsPage_SelectASite=Select a site or enter the location of a site.
-AvailableIUsPage_ShowLatestVersions=Show only the &latest versions of available software
-AvailableIUsPage_SingleSelectionCount={0} item selected
-AvailableIUsPage_Title=Available Software
-AvailableIUWrapper_AllAreInstalled=All items are installed
-IUViewQueryContext_AllAreInstalledDescription=You can uncheck the 'Hide items that are already installed' check box to see all items.
-Label_Profiles=All Software Profiles
-Label_Repositories=Known Repositories
-LaunchUpdateManagerButton=Launch...
-LoadMetadataRepositoryJob_ContactSitesProgress=Contacting Software Sites
-LoadMetadataRepositoryJob_SitesMissingError=Some sites could not be found. See the error log for more detail.
-RepositoryElement_NotFound=This repository is currently not available.
-RepositoryTracker_DuplicateLocation=Duplicate location
-MetadataRepositoryElement_RepositoryLoadError=Error loading repository {0}
-IUViewQueryContext_NoCategorizedItemsDescription=You can uncheck the 'Group items by category' check box to see items without categories.
-QueriedElementWrapper_NoCategorizedItemsExplanation=There are no categorized items
-QueriedElementWrapper_NoItemsExplanation=There are no items available
-QueriedElementWrapper_SiteNotFound=Could not find {0}
-QueryableMetadataRepositoryManager_LoadRepositoryProgress=Contacting {0}
-QueryableProfileRegistry_QueryProfileProgress=Getting profiles
-QueryableUpdates_UpdateListProgress=Assembling list of updates
-SelectableIUsPage_Select_All=&Select All
-SelectableIUsPage_Deselect_All=&Deselect All
-SizeComputingWizardPage_SizeJobTitle=Computing size
-
-RevertDialog_ConfigContentsLabel=Con&figuration contents:
-RevertDialog_ConfigsLabel=&Previous configurations:
-RevertDialog_ConfirmRestartMessage=This operation requires restarting the workbench. Would you like to proceed?
-RevertDialog_RevertOperationLabel=Revert configuration
-RevertDialog_Title=Revert Software Configuration
-
-RollbackProfileElement_CurrentInstallation=Current Installation
-TrustCertificateDialog_Details=Details
-TrustCertificateDialog_Title=Do you trust these certificates?
-
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
deleted file mode 100644
index 9ba9f4a7b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-
-/**
- * Element wrapper class for an artifact key and its repository
- *
- * @since 3.4
- */
-public class ArtifactElement extends ProvElement {
-
- IArtifactKey key;
- IArtifactRepository repo;
-
- public ArtifactElement(Object parent, IArtifactKey key, IArtifactRepository repo) {
- super(parent);
- this.key = key;
- this.repo = repo;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
- protected String getImageId(Object obj) {
- return null;
- }
-
- public String getLabel(Object o) {
- return key.getId() + " [" + key.getClassifier() + "]"; //$NON-NLS-1$//$NON-NLS-2$
- }
-
- public Object[] getChildren(Object o) {
- return repo.getArtifactDescriptors(key);
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- if (adapter == IArtifactRepository.class)
- return getArtifactRepository();
- if (adapter == IArtifactKey.class)
- return getArtifactKey();
- return super.getAdapter(adapter);
- }
-
- public IArtifactKey getArtifactKey() {
- return key;
- }
-
- public IArtifactRepository getArtifactRepository() {
- return repo;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
deleted file mode 100644
index 4b12392b8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositories.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Element class that represents the root of an artifact
- * repository viewer. Its children are the artifact repositories
- * obtained using the query installed in the content provider.
- *
- * @since 3.4
- *
- */
-public class ArtifactRepositories extends RootElement {
-
- public ArtifactRepositories(ProvisioningUI ui, QueryableArtifactRepositoryManager queryable) {
- super(ui);
- this.queryable = queryable;
- }
-
- protected int getDefaultQueryType() {
- return QueryProvider.ARTIFACT_REPOS;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return ProvUIMessages.Label_Repositories;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
deleted file mode 100644
index 046657860..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.query.IQueryable;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Element wrapper class for a artifact repository that gets its
- * contents in a deferred manner.
- *
- * @since 3.4
- */
-public class ArtifactRepositoryElement extends RemoteQueriedElement implements IRepositoryElement<IArtifactKey> {
-
- URI location;
- IArtifactRepository repo;
- boolean isEnabled;
- ProvisioningUI ui;
-
- public ArtifactRepositoryElement(Object parent, URI location) {
- this(parent, location, true);
- }
-
- public ArtifactRepositoryElement(Object parent, URI location, boolean isEnabled) {
- super(parent);
- this.location = location;
- this.isEnabled = isEnabled;
- ui = ProvUIActivator.getDefault().getProvisioningUI();
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- if (adapter == IArtifactRepository.class)
- return getRepository(null);
- if (adapter == IRepository.class)
- return getRepository(null);
- return super.getAdapter(adapter);
- }
-
- protected String getImageId(Object obj) {
- return ProvUIImages.IMG_ARTIFACT_REPOSITORY;
- }
-
- public String getLabel(Object o) {
- String name = getName();
- if (name != null && name.length() > 0) {
- return name;
- }
- return URIUtil.toUnencodedString(getLocation());
- }
-
- public IArtifactRepository getRepository(IProgressMonitor monitor) {
- if (repo == null)
- try {
- repo = getArtifactRepositoryManager().loadRepository(location, monitor);
- } catch (ProvisionException e) {
- ui.getRepositoryTracker().reportLoadFailure(location, e);
- } catch (OperationCanceledException e) {
- // nothing to report
- }
- return repo;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getURL()
- */
- public URI getLocation() {
- return location;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getName()
- */
- public String getName() {
- String name = getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
- if (name == null)
- name = getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NAME);
- if (name == null)
- name = ""; //$NON-NLS-1$
- return name;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getDescription()
- */
- public String getDescription() {
- if (ui.getRepositoryTracker().hasNotFoundStatusBeenReported(location))
- return ProvUIMessages.RepositoryElement_NotFound;
- String description = getArtifactRepositoryManager().getRepositoryProperty(location, IRepository.PROP_DESCRIPTION);
- if (description == null)
- return ""; //$NON-NLS-1$
- return description;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#isEnabled()
- */
- public boolean isEnabled() {
- return isEnabled;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement#setEnabled(boolean)
- */
- public void setEnabled(boolean enabled) {
- isEnabled = enabled;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
- */
- protected int getDefaultQueryType() {
- return QueryProvider.AVAILABLE_ARTIFACTS;
- }
-
- /*
- * overridden to lazily fetch repository
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryable()
- */
- public IQueryable<?> getQueryable() {
- if (queryable == null)
- queryable = getRepository(new NullProgressMonitor());
- return queryable;
- }
-
- IArtifactRepositoryManager getArtifactRepositoryManager() {
- return ProvUI.getArtifactRepositoryManager(ui.getSession());
- }
-}
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
deleted file mode 100644
index cccc1816c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.net.URI;
-import java.util.Collection;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.internal.p2.ui.*;
-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.planner.IPlanner;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-import org.eclipse.equinox.p2.repository.IRepository;
-
-/**
- * Element wrapper class for IU's that are available for installation.
- * Used instead of the plain IU when additional information such as sizing
- * info is necessary.
- *
- * @since 3.4
- */
-public class AvailableIUElement extends QueriedElement implements IIUElement {
-
- IInstallableUnit iu;
- boolean shouldShowChildren;
- boolean isInstalled = false;
- boolean isUpdate = false;
-
- // Currently this variable is not settable due to the
- // poor performance of sizing, but it is kept here for future improvement.
- // If we reinstate the ability to compute individual sizes we would
- // probably refer to some preference or policy to decide what to do.
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=221087
- private static boolean shouldShowSize = false;
- long size = ProvUI.SIZE_UNKNOWN;
- String profileID;
-
- public AvailableIUElement(Object parent, IInstallableUnit iu, String profileID, boolean showChildren) {
- super(parent);
- this.iu = iu;
- this.profileID = profileID;
- this.shouldShowChildren = showChildren;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
- protected String getImageId(Object obj) {
- if (isUpdate)
- return ProvUIImages.IMG_UPDATED_IU;
- else if (isInstalled)
- return ProvUIImages.IMG_DISABLED_IU;
- return ProvUIImages.IMG_IU;
- }
-
- public String getLabel(Object o) {
- return iu.getId();
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- if (adapter == IInstallableUnit.class)
- return iu;
- return super.getAdapter(adapter);
- }
-
- public long getSize() {
- return size;
- }
-
- public void computeSize(IProgressMonitor monitor) {
- if (profileID == null)
- return;
- SubMonitor mon = SubMonitor.convert(monitor, 100);
- IProvisioningPlan plan = getSizingPlan(mon.newChild(50));
- size = ProvUI.getSize(getEngine(), plan, getProvisioningContext(), mon.newChild(50));
- }
-
- protected IProfile getProfile() {
- return getProfileRegistry().getProfile(profileID);
- }
-
- protected IProvisioningPlan getSizingPlan(IProgressMonitor monitor) {
- IPlanner planner = getPlanner();
- IProfileChangeRequest request = ProfileChangeRequest.createByProfileId(getProvisioningUI().getSession().getProvisioningAgent(), profileID);
- request.add(getIU());
- return planner.getProvisioningPlan(request, getProvisioningContext(), monitor);
- }
-
- IEngine getEngine() {
- return ProvUI.getEngine(getProvisioningUI().getSession());
- }
-
- IPlanner getPlanner() {
- return (IPlanner) getProvisioningUI().getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME);
- }
-
- IProfileRegistry getProfileRegistry() {
- return ProvUI.getProfileRegistry(getProvisioningUI().getSession());
- }
-
- public IInstallableUnit getIU() {
- return iu;
- }
-
- public boolean shouldShowSize() {
- return shouldShowSize;
- }
-
- public boolean shouldShowVersion() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
- */
- protected int getDefaultQueryType() {
- return QueryProvider.AVAILABLE_IUS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.IUElement#getRequirements()
- */
- public Collection<IRequirement> getRequirements() {
- return iu.getRequirements();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
- */
- public boolean shouldShowChildren() {
- return shouldShowChildren;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof AvailableIUElement))
- return false;
- if (iu == null)
- return false;
- return iu.equals(((AvailableIUElement) obj).getIU());
- }
-
- public int hashCode() {
- if (iu == null)
- return 0;
- return iu.hashCode();
- }
-
- public String toString() {
- if (iu == null)
- return "NULL"; //$NON-NLS-1$
- return iu.toString();
- }
-
- public void setIsInstalled(boolean isInstalled) {
- this.isInstalled = isInstalled;
- }
-
- public boolean isInstalled() {
- return isInstalled;
- }
-
- public void setIsUpdate(boolean isUpdate) {
- this.isUpdate = isUpdate;
- }
-
- public boolean isUpdate() {
- return isUpdate;
- }
-
- private ProvisioningContext getProvisioningContext() {
- ProvisioningContext context = new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent());
- if (hasQueryable() && getQueryable() instanceof IRepository<?>) {
- context.setMetadataRepositories(new URI[] {((IRepository<?>) getQueryable()).getLocation()});
- }
- return context;
- }
-}
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
deleted file mode 100644
index f04063350..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableUpdateElement.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.Update;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
-
-/**
- * Element wrapper class for IU's that are available for installation.
- * Used instead of the plain IU when additional information such as sizing
- * info is necessary.
- *
- * @since 3.4
- */
-public class AvailableUpdateElement extends AvailableIUElement {
-
- IInstallableUnit iuToBeUpdated;
-
- public AvailableUpdateElement(Object parent, IInstallableUnit iu, IInstallableUnit iuToBeUpdated, String profileID, boolean shouldShowChildren) {
- super(parent, iu, profileID, shouldShowChildren);
- setIsInstalled(false);
- this.iuToBeUpdated = iuToBeUpdated;
- }
-
- public IInstallableUnit getIUToBeUpdated() {
- return iuToBeUpdated;
- }
-
- protected IProvisioningPlan getSizingPlan(IProgressMonitor monitor) {
- IPlanner planner = getPlanner();
- IProfileChangeRequest request = ProfileChangeRequest.createByProfileId(getProvisioningUI().getSession().getProvisioningAgent(), profileID);
- if (iuToBeUpdated.getId().equals(getIU().getId()))
- request.remove(iuToBeUpdated);
- request.add(getIU());
- return planner.getProvisioningPlan(request, new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent()), monitor);
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof AvailableUpdateElement))
- return false;
- if (iu == null)
- return false;
- if (iuToBeUpdated == null)
- return false;
- AvailableUpdateElement other = (AvailableUpdateElement) obj;
- return iu.equals(other.getIU()) && iuToBeUpdated.equals(other.getIUToBeUpdated());
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((iu == null) ? 0 : iu.hashCode());
- result = prime * result + ((iuToBeUpdated == null) ? 0 : iuToBeUpdated.hashCode());
- return result;
- }
-
- public Update getUpdate() {
- return new Update(iuToBeUpdated, getIU());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
deleted file mode 100644
index f343af353..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-
-/**
- * Element wrapper class for IU's that represent categories of
- * available IU's
- *
- * @since 3.4
- */
-public class CategoryElement extends RemoteQueriedElement implements IIUElement {
-
- private ArrayList<IInstallableUnit> ius = new ArrayList<IInstallableUnit>(1);
- private Collection<IRequirement> requirements;
-
- public CategoryElement(Object parent, IInstallableUnit iu) {
- super(parent);
- ius.add(iu);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
- protected String getImageId(Object obj) {
- return ProvUIImages.IMG_CATEGORY;
- }
-
- public String getLabel(Object o) {
- IInstallableUnit iu = getIU();
- if (iu != null)
- return iu.getId();
- return null;
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- if (adapter == IInstallableUnit.class)
- return getIU();
- return super.getAdapter(adapter);
- }
-
- protected int getDefaultQueryType() {
- return QueryProvider.AVAILABLE_IUS;
- }
-
- public IInstallableUnit getIU() {
- if (ius == null || ius.isEmpty())
- return null;
- return ius.get(0);
- }
-
- public long getSize() {
- return ProvUI.SIZE_UNKNOWN;
- }
-
- public boolean shouldShowSize() {
- return false;
- }
-
- public void computeSize(IProgressMonitor monitor) {
- // Should never be called, since shouldShowSize() returns false
- }
-
- public boolean shouldShowVersion() {
- return false;
- }
-
- public void mergeIU(IInstallableUnit iu) {
- ius.add(iu);
- }
-
- public boolean shouldMerge(IInstallableUnit iu) {
- IInstallableUnit myIU = getIU();
- if (myIU == null)
- return false;
- return getMergeKey(myIU).equals(getMergeKey(iu));
- }
-
- private String getMergeKey(IInstallableUnit iu) {
- String mergeKey = iu.getProperty(IInstallableUnit.PROP_NAME, null);
- if (mergeKey == null || mergeKey.length() == 0) {
- mergeKey = iu.getId();
- }
- return mergeKey;
- }
-
- public Collection<IRequirement> getRequirements() {
- if (ius == null || ius.isEmpty())
- return CollectionUtils.emptyList();
- if (requirements == null) {
- if (ius.size() == 1)
- requirements = getIU().getRequirements();
- else {
- ArrayList<IRequirement> capabilities = new ArrayList<IRequirement>();
- for (IInstallableUnit iu : ius) {
- capabilities.addAll(iu.getRequirements());
- }
- requirements = capabilities;
- }
- }
- return requirements;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
- */
- public boolean shouldShowChildren() {
- return true;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof CategoryElement))
- return false;
- IInstallableUnit myIU = getIU();
- IInstallableUnit objIU = ((CategoryElement) obj).getIU();
- if (myIU == null || objIU == null)
- return false;
- return getMergeKey(myIU).equals(getMergeKey(objIU));
- }
-
- public int hashCode() {
- IInstallableUnit iu = getIU();
- final int prime = 23;
- int result = 1;
- result = prime * result + ((iu == null) ? 0 : getMergeKey(iu).hashCode());
- return result;
- }
-
- public String toString() {
- IInstallableUnit iu = getIU();
- if (iu == null)
- return "NULL"; //$NON-NLS-1$
- StringBuffer result = new StringBuffer();
- result.append("Category Element - "); //$NON-NLS-1$
- result.append(getMergeKey(iu));
- result.append(" (merging IUs: "); //$NON-NLS-1$
- result.append(ius.toString());
- result.append(")"); //$NON-NLS-1$
- return result.toString();
- }
-}
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
deleted file mode 100644
index f6a5ab2f8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ElementUtils.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Sonatype, Inc. - ongoing development
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.net.URI;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Utility methods for manipulating model elements.
- *
- * @since 3.4
- *
- */
-public class ElementUtils {
-
- public static void updateRepositoryUsingElements(final MetadataRepositoryElement[] elements, final Shell shell) {
- final ProvisioningUI ui = ProvUIActivator.getDefault().getProvisioningUI();
- ui.signalRepositoryOperationStart();
- IMetadataRepositoryManager metaManager = ProvUI.getMetadataRepositoryManager(ui.getSession());
- IArtifactRepositoryManager artManager = ProvUI.getArtifactRepositoryManager(ui.getSession());
- try {
- int visibilityFlags = ui.getRepositoryTracker().getMetadataRepositoryFlags();
- URI[] currentlyEnabled = metaManager.getKnownRepositories(visibilityFlags);
- URI[] currentlyDisabled = metaManager.getKnownRepositories(IRepositoryManager.REPOSITORIES_DISABLED | visibilityFlags);
- for (int i = 0; i < elements.length; i++) {
- URI location = elements[i].getLocation();
- if (elements[i].isEnabled()) {
- if (containsURI(currentlyDisabled, location))
- // It should be enabled and is not currently
- setColocatedRepositoryEnablement(ui, location, true);
- else if (!containsURI(currentlyEnabled, location)) {
- // It is not known as enabled or disabled. Add it.
- metaManager.addRepository(location);
- artManager.addRepository(location);
- }
- } else {
- if (containsURI(currentlyEnabled, location))
- // It should be disabled, and is currently enabled
- setColocatedRepositoryEnablement(ui, location, false);
- else if (!containsURI(currentlyDisabled, location)) {
- // It is not known as enabled or disabled. Add it and then disable it.
- metaManager.addRepository(location);
- artManager.addRepository(location);
- setColocatedRepositoryEnablement(ui, location, false);
- }
- }
- String name = elements[i].getName();
- if (name != null && name.length() > 0) {
- metaManager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
- artManager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
- }
- }
- // Are there any elements that need to be deleted? Go over the original state
- // and remove any elements that weren't in the elements we were given
- Set<String> nowKnown = new HashSet<String>();
- for (int i = 0; i < elements.length; i++)
- nowKnown.add(URIUtil.toUnencodedString(elements[i].getLocation()));
- for (int i = 0; i < currentlyEnabled.length; i++) {
- if (!nowKnown.contains(URIUtil.toUnencodedString(currentlyEnabled[i]))) {
- metaManager.removeRepository(currentlyEnabled[i]);
- artManager.removeRepository(currentlyEnabled[i]);
- }
- }
- for (int i = 0; i < currentlyDisabled.length; i++) {
- if (!nowKnown.contains(URIUtil.toUnencodedString(currentlyDisabled[i]))) {
- metaManager.removeRepository(currentlyDisabled[i]);
- artManager.removeRepository(currentlyDisabled[i]);
- }
- }
- } finally {
- ui.signalRepositoryOperationComplete(null, true);
- }
- }
-
- private static void setColocatedRepositoryEnablement(ProvisioningUI ui, URI location, boolean enable) {
- ProvUI.getArtifactRepositoryManager(ProvUIActivator.getDefault().getSession()).setEnabled(location, enable);
- ProvUI.getMetadataRepositoryManager(ProvUIActivator.getDefault().getSession()).setEnabled(location, enable);
- }
-
- public static IInstallableUnit getIU(Object element) {
- if (element instanceof IInstallableUnit)
- return (IInstallableUnit) element;
- if (element instanceof IIUElement)
- return ((IIUElement) element).getIU();
- return ProvUI.getAdapter(element, IInstallableUnit.class);
- }
-
- 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;
- }
-
- static boolean containsURI(URI[] locations, URI url) {
- for (int i = 0; i < locations.length; i++)
- if (locations[i].equals(url))
- return true;
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java
deleted file mode 100644
index e1a98b029..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/EmptyElementExplanation.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.Dialog;
-
-/**
- * Element class representing an explanation for no children appearing
- * beneath an element.
- *
- * @since 3.5
- */
-public class EmptyElementExplanation extends ProvElement {
-
- String explanation;
- int severity;
- String description;
-
- /**
- * Create an empty element explanation
- * @param parent the parent of this element
- * @param severity the severity of the explanation {@link IStatus#INFO},
- * @param explanation
- */
- public EmptyElementExplanation(Object parent, int severity, String explanation, String description) {
- super(parent);
- this.explanation = explanation;
- this.severity = severity;
- this.description = description;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
- protected String getImageId(Object obj) {
- if (severity == IStatus.ERROR)
- return Dialog.DLG_IMG_MESSAGE_ERROR;
- if (severity == IStatus.WARNING)
- return Dialog.DLG_IMG_MESSAGE_WARNING;
- return Dialog.DLG_IMG_MESSAGE_INFO;
- }
-
- public String getLabel(Object o) {
- return explanation;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- return new Object[0];
- }
-
- public String getDescription() {
- return description;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IIUElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IIUElement.java
deleted file mode 100644
index 06f419b1b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IIUElement.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.util.Collection;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-
-/**
- * Interface for elements that represent IU's.
- *
- * @since 3.4
- */
-public interface IIUElement {
-
- public IInstallableUnit getIU();
-
- public boolean shouldShowSize();
-
- public boolean shouldShowVersion();
-
- public long getSize();
-
- public void computeSize(IProgressMonitor monitor);
-
- public Collection<IRequirement> getRequirements();
-
- public Object getParent(Object obj);
-
- public boolean shouldShowChildren();
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IRepositoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IRepositoryElement.java
deleted file mode 100644
index f2890b704..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IRepositoryElement.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.p2.repository.IRepository;
-
-/**
- * Interface for elements that represent repositories.
- *
- * @since 3.4
- */
-public interface IRepositoryElement<T> {
-
- public URI getLocation();
-
- public String getName();
-
- public String getDescription();
-
- public boolean isEnabled();
-
- public void setEnabled(boolean enabled);
-
- public IRepository<T> getRepository(IProgressMonitor monitor);
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
deleted file mode 100644
index 5689beea3..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/IUElementListRoot.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-
-
-/**
- * Element class representing a fixed set of IU's. This element should
- * never appear in a list, but can be used as a parent in a list.
- *
- * @since 3.5
- */
-public class IUElementListRoot extends ProvElement {
-
- Object[] children;
-
- public IUElementListRoot(Object[] children) {
- super(null);
- this.children = children;
- }
-
- public IUElementListRoot() {
- this(new Object[0]);
- }
-
- public void setChildren(Object[] children) {
- this.children = children;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
- protected String getImageId(Object obj) {
- return null;
- }
-
- public String getLabel(Object o) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- return children;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
deleted file mode 100644
index d4e507234..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.util.Collection;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-
-/**
- * Element wrapper class for installed IU's. Used instead of the plain IU when
- * there should be a parent profile available for operations.
- *
- * @since 3.4
- */
-public class InstalledIUElement extends QueriedElement implements IIUElement {
-
- String profileId;
- IInstallableUnit iu;
-
- public InstalledIUElement(Object parent, String profileId, IInstallableUnit iu) {
- super(parent);
- this.profileId = profileId;
- this.iu = iu;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
- protected String getImageId(Object obj) {
- return ProvUIImages.IMG_IU;
- }
-
- public String getLabel(Object o) {
- return iu.getId();
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- if (adapter == IInstallableUnit.class)
- return iu;
- return super.getAdapter(adapter);
- }
-
- public String getProfileId() {
- return profileId;
- }
-
- public IInstallableUnit getIU() {
- return iu;
- }
-
- // TODO Later we might consider showing this in the installed views,
- // but it is less important than before install.
- public long getSize() {
- return ProvUI.SIZE_UNKNOWN;
- }
-
- public boolean shouldShowSize() {
- return false;
- }
-
- public void computeSize(IProgressMonitor monitor) {
- // Should never be called, as long as shouldShowSize() returns false
- }
-
- public boolean shouldShowVersion() {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.IUElement#getRequirements()
- */
- public Collection<IRequirement> getRequirements() {
- return iu.getRequirements();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
- */
- protected int getDefaultQueryType() {
- return QueryProvider.INSTALLED_IUS;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.IIUElement#shouldShowChildren()
- */
- public boolean shouldShowChildren() {
- return true;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof InstalledIUElement))
- return false;
- if (iu == null)
- return false;
- return iu.equals(((InstalledIUElement) obj).getIU());
- }
-
- public int hashCode() {
- if (iu == null)
- return 0;
- return iu.hashCode();
- }
-
- public String toString() {
- if (iu == null)
- return "NULL"; //$NON-NLS-1$
- return iu.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
deleted file mode 100644
index df87eea75..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositories.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Element class that represents some collection of metadata repositories.
- * It can be configured so that it retrieves its children in different ways.
- * The default query type will return the metadata repositories specified in
- * this element. Other query types can be used to query each repository and
- * aggregate the children.
- *
- * @since 3.4
- *
- */
-public class MetadataRepositories extends RootElement {
-
- private boolean includeDisabled = false;
-
- public MetadataRepositories(ProvisioningUI ui) {
- this(ProvUI.getQueryContext(ui.getPolicy()), ui, null);
- }
-
- public MetadataRepositories(IUViewQueryContext queryContext, ProvisioningUI ui, QueryableMetadataRepositoryManager queryable) {
- super(queryContext, ui);
- this.queryable = queryable;
- }
-
- /**
- * Get whether disabled repositories should be included in queries when no repositories
- * have been specified. This boolean is used because the flags specified when getting
- * repositories from a repository manager are treated as an AND, and we want to permit
- * aggregating disabled repositories along with other flags.
- *
- * @return includeDisabled <code>true</code> if disabled repositories should be included and
- * <code>false</code> if they should not be included.
- */
- public boolean getIncludeDisabledRepositories() {
- return includeDisabled;
- }
-
- /**
- * Set whether disabled repositories should be included in queries when no repositories
- * have been specified. This boolean is used because the flags specified when getting
- * repositories from a repository manager are treated as an AND, and we want to permit
- * aggregating disabled repositories along with other flags.
- *
- * @param includeDisabled <code>true</code> if disabled repositories should be included and
- * <code>false</code> if they should not be included.
- */
- public void setIncludeDisabledRepositories(boolean includeDisabled) {
- this.includeDisabled = includeDisabled;
- }
-
- /*
- * Overridden to check the query context. We might
- * be showing repositories, or we might be flattening the
- * view to some other element
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryType()
- */
- public int getQueryType() {
- if (getQueryContext() == null)
- return getDefaultQueryType();
- return getQueryContext().getQueryType();
- }
-
- protected int getDefaultQueryType() {
- return QueryProvider.METADATA_REPOS;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return ProvUIMessages.Label_Repositories;
- }
-
- /*
- * Overridden because we might be iterating sites
- * (type = METADATA_REPOSITORIES) rather than loading repos. If this
- * is the case, we only care whether we have a queryable or not.
- */
- public boolean hasQueryable() {
- if (getQueryType() == QueryProvider.METADATA_REPOS)
- return queryable != null;
- return super.hasQueryable();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
deleted file mode 100644
index 0892b2829..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.net.URI;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQueryable;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Element wrapper class for a metadata repository that gets its
- * contents in a deferred manner. A metadata repository can be the root
- * (input) of a viewer, when the view is filtered by repo, or a child of
- * an input, when the view is showing many repos.
- *
- * @since 3.4
- */
-public class MetadataRepositoryElement extends RootElement implements IRepositoryElement<IInstallableUnit> {
-
- URI location;
- boolean isEnabled;
- String name;
-
- public MetadataRepositoryElement(Object parent, URI location, boolean isEnabled) {
- this(parent, null, ProvisioningUI.getDefaultUI(), location, isEnabled);
- }
-
- public MetadataRepositoryElement(IUViewQueryContext queryContext, ProvisioningUI ui, URI location, boolean isEnabled) {
- this(null, queryContext, ui, location, isEnabled);
- }
-
- private MetadataRepositoryElement(Object parent, IUViewQueryContext queryContext, ProvisioningUI ui, URI location, boolean isEnabled) {
- super(parent, queryContext, ui);
- this.location = location;
- this.isEnabled = isEnabled;
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- if (adapter == IMetadataRepository.class)
- return getQueryable();
- if (adapter == IRepository.class)
- return getQueryable();
- return super.getAdapter(adapter);
- }
-
- protected Object[] fetchChildren(Object o, IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, 200);
- // Ensure the repository is loaded using the monitor, so we respond to cancelation.
- // Otherwise, a non-loaded repository could be loaded in the query provider without a monitor.
- // If the load fails, return an explanation element.
- try {
- getMetadataRepository(sub.newChild(100));
- //only invoke super if we successfully loaded the repository
- return super.fetchChildren(o, sub.newChild(100));
- } catch (ProvisionException e) {
- getProvisioningUI().getRepositoryTracker().reportLoadFailure(location, e);
- // TODO see https://bugs.eclipse.org/bugs/show_bug.cgi?id=276784
- return new Object[] {new EmptyElementExplanation(this, IStatus.ERROR, e.getLocalizedMessage(), "")}; //$NON-NLS-1$
- }
- }
-
- protected String getImageId(Object obj) {
- return ProvUIImages.IMG_METADATA_REPOSITORY;
- }
-
- protected int getDefaultQueryType() {
- return QueryProvider.AVAILABLE_IUS;
- }
-
- public String getLabel(Object o) {
- String n = getName();
- if (n != null && n.length() > 0) {
- return n;
- }
- return URIUtil.toUnencodedString(getLocation());
- }
-
- /*
- * overridden to lazily fetch repository
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getQueryable()
- */
- public IQueryable<?> getQueryable() {
- if (queryable == null)
- queryable = getRepository(new NullProgressMonitor());
- return queryable;
- }
-
- public IMetadataRepository getRepository(IProgressMonitor monitor) {
- try {
- return getMetadataRepository(monitor);
- } catch (ProvisionException e) {
- getProvisioningUI().getRepositoryTracker().reportLoadFailure(location, e);
- } catch (OperationCanceledException e) {
- // nothing to report
- }
- return null;
- }
-
- private IMetadataRepository getMetadataRepository(IProgressMonitor monitor) throws ProvisionException {
- if (queryable == null) {
- queryable = getProvisioningUI().loadMetadataRepository(location, false, monitor);
- }
- return (IMetadataRepository) queryable;
-
- }
-
- /*
- * overridden to check whether url is specified rather
- * than loading the repo via getQueryable()
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#knowsQueryable()
- */
- public boolean knowsQueryable() {
- return location != null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getURL()
- */
- public URI getLocation() {
- return location;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getName()
- */
- public String getName() {
- if (name == null) {
- name = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
- if (name == null)
- name = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NAME);
- if (name == null)
- name = ""; //$NON-NLS-1$
- }
- return name;
- }
-
- public void setNickname(String name) {
- this.name = name;
- }
-
- public void setLocation(URI location) {
- this.location = location;
- setQueryable(null);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#getDescription()
- */
- public String getDescription() {
- if (getProvisioningUI().getRepositoryTracker().hasNotFoundStatusBeenReported(location))
- return ProvUIMessages.RepositoryElement_NotFound;
- String description = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_DESCRIPTION);
- if (description == null)
- return ""; //$NON-NLS-1$
- return description;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.RepositoryElement#isEnabled()
- */
- public boolean isEnabled() {
- return isEnabled;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.IRepositoryElement#setEnabled(boolean)
- */
- public void setEnabled(boolean enabled) {
- isEnabled = enabled;
- }
-
- /*
- * Overridden to check whether a repository instance has already been loaded.
- * This is necessary to prevent background loading of an already loaded repository
- * by the DeferredTreeContentManager, which will add redundant children to the
- * viewer.
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=229069
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=226343
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#hasQueryable()
- */
- public boolean hasQueryable() {
- if (queryable != null)
- return true;
- if (location == null)
- return false;
- IMetadataRepositoryManager manager = getMetadataRepositoryManager();
- if (manager == null || !(manager instanceof MetadataRepositoryManager))
- return false;
- IMetadataRepository repo = ((MetadataRepositoryManager) manager).getRepository(location);
- if (repo == null)
- return false;
- queryable = repo;
- return true;
- }
-
- public Policy getPolicy() {
- Object parent = getParent(this);
- if (parent == null)
- return super.getPolicy();
- if (parent instanceof QueriedElement)
- return ((QueriedElement) parent).getPolicy();
- return ProvisioningUI.getDefaultUI().getPolicy();
- }
-
- public String toString() {
- StringBuffer result = new StringBuffer();
- result.append("Metadata Repository Element - "); //$NON-NLS-1$
- result.append(URIUtil.toUnencodedString(location));
- if (hasQueryable())
- result.append(" (loaded)"); //$NON-NLS-1$
- else
- result.append(" (not loaded)"); //$NON-NLS-1$
- return result.toString();
- }
-
- IMetadataRepositoryManager getMetadataRepositoryManager() {
- return ProvUI.getMetadataRepositoryManager(getProvisioningUI().getSession());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
deleted file mode 100644
index 35a17d36c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.query.IQueryable;
-
-/**
- * Element wrapper class for a profile that uses the query
- * mechanism to obtain its contents.
- *
- * @since 3.4
- */
-public class ProfileElement extends RemoteQueriedElement {
- String profileId;
-
- public ProfileElement(Object parent, String profileId) {
- super(parent);
- this.profileId = profileId;
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- if (adapter == IProfile.class)
- return getQueryable();
- return super.getAdapter(adapter);
- }
-
- protected String getImageId(Object obj) {
- return ProvUIImages.IMG_PROFILE;
- }
-
- public String getLabel(Object o) {
- return profileId;
- }
-
- public String getProfileId() {
- return profileId;
- }
-
- protected int getDefaultQueryType() {
- return QueryProvider.INSTALLED_IUS;
- }
-
- public IQueryable<?> getQueryable() {
- return ProvUI.getProfileRegistry(getProvisioningUI().getSession()).getProfile(profileId);
- }
-
- /*
- * Overridden to check whether we know the profile id rather
- * than fetch the profile from the registry using getQueryable()
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#knowsQueryable()
- */
- public boolean knowsQueryable() {
- return profileId != null;
- }
-
- /*
- * Overridden to check the children so that profiles
- * showing in profile views accurately reflect if they
- * are empty. We do not cache the children because often
- * this element is the input of a view and when the view
- * is refreshed we want to refetch the children.
- *
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.RemoteQueriedElement#isContainer()
- */
- public boolean isContainer() {
- return super.getChildren(this).length > 0;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
deleted file mode 100644
index 12a24b5b8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileSnapshots.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.IElementCollector;
-
-/**
- * Element class for profile snapshots
- *
- * @since 3.5
- */
-public class ProfileSnapshots extends ProvElement implements IDeferredWorkbenchAdapter {
-
- String profileId;
-
- public ProfileSnapshots(String profileId) {
- super(null);
- this.profileId = profileId;
- }
-
- public String getProfileId() {
- return profileId;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
- */
- public Object[] getChildren(Object o) {
- long[] timestamps = ProvUI.getProfileRegistry(ProvUIActivator.getDefault().getSession()).listProfileTimestamps(profileId);
- RollbackProfileElement[] elements = new RollbackProfileElement[timestamps.length];
- boolean skipFirst = false;
- for (int i = 0; i < timestamps.length; i++) {
- elements[i] = new RollbackProfileElement(this, profileId, timestamps[i]);
- // Eliminate the first in the list (earliest) if there was no content at all.
- // This doesn't always happen, but can, and we don't want to offer the user an empty profile to
- // revert to.
- if (i == 0) {
- skipFirst = elements[0].getChildren(elements[0]).length == 0;
- }
- if (i == timestamps.length - 1) {
- elements[i].setIsCurrentProfile(true);
- }
- }
- if (skipFirst) {
- RollbackProfileElement[] elementsWithoutFirst = new RollbackProfileElement[elements.length - 1];
- System.arraycopy(elements, 1, elementsWithoutFirst, 0, elements.length - 1);
- return elementsWithoutFirst;
- }
- return elements;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return ProvUIMessages.ProfileSnapshots_Label;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#fetchDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IElementCollector, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void fetchDeferredChildren(Object object, IElementCollector collector, IProgressMonitor monitor) {
- Object[] children = getChildren(object);
- collector.add(children, monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#getRule(java.lang.Object)
- */
- public ISchedulingRule getRule(Object object) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#isContainer()
- */
- public boolean isContainer() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
deleted file mode 100644
index 3af9eb4eb..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Profiles.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.QueryProvider;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Element class that represents the root of a profile
- * viewer. Its children are the profiles that match the
- * specified query for profiles.
- *
- * @since 3.4
- *
- */
-public class Profiles extends RootElement {
-
- public Profiles(ProvisioningUI ui) {
- super(ui);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return ProvUIMessages.Label_Profiles;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
- */
- protected int getDefaultQueryType() {
- return QueryProvider.PROFILES;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
deleted file mode 100644
index 047bd7034..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Generic element that represents a provisioning element in
- * a viewer.
- *
- * @since 3.4
- *
- */
-public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
-
- private Object parent;
-
- public ProvElement(Object parent) {
- this.parent = parent;
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- if (adapter == IWorkbenchAdapter.class)
- return this;
- if ((adapter == IDeferredWorkbenchAdapter.class) && this instanceof IDeferredWorkbenchAdapter)
- return this;
- return null;
- }
-
- /**
- * Return a string id of the image that should be used to show the specified
- * object. Returning null indicates that no image should be used.
- *
- * @param obj
- * the object whose image id is requested
- * @return the string id of the image in the provisioning image registry, or
- * <code>null</code> if no image should be shown.
- */
- protected String getImageId(Object obj) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
- */
- public ImageDescriptor getImageDescriptor(Object object) {
- String id = getImageId(object);
- if (id == null) {
- return null;
- }
- ImageDescriptor desc = ProvUIImages.getImageDescriptor(id);
- if (desc == null)
- desc = JFaceResources.getImageRegistry().getDescriptor(id);
- return desc;
- }
-
- /**
- * Return the image that should be used to show the specfied object. The
- * image is managed by an image registry and should not be freed.
- *
- * @param object
- * the object whose image id is requested
- * @return the string id of the image in the provisioning image registry
- *
- */
- public Image getImage(Object object) {
- String id = getImageId(object);
- if (id == null) {
- return null;
- }
- Image img = ProvUIImages.getImage(id);
- if (img == null)
- img = JFaceResources.getImageRegistry().get(id);
- return img;
- }
-
- protected void handleException(Exception e, String message) {
- if (message == null) {
- message = e.getMessage();
- }
- IStatus status = new Status(IStatus.ERROR, ProvUIActivator.PLUGIN_ID, 0, message, e);
- ProvUI.reportStatus(status, StatusManager.LOG);
- }
-
- public boolean hasChildren(Object o) {
- if (this instanceof IDeferredWorkbenchAdapter)
- return ((IDeferredWorkbenchAdapter) this).isContainer();
- Object[] children = getChildren(o);
- if (children == null) {
- return false;
- }
- return children.length > 0;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
- */
- public Object getParent(Object o) {
- return parent;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
deleted file mode 100644
index f4bb6a83e..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElement.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.util.*;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.core.helpers.CollectionUtils;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.p2.query.IQueryable;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Element class that represents an element that gets its children
- * by using a query.
- *
- * @since 3.4
- *
- */
-public abstract class QueriedElement extends ProvElement {
-
- protected IQueryable<?> queryable;
- // This cache is used internally to facilitate child elements
- // that want to eliminate duplicates from the parent hierarchy.
- // This cache is *not* used as a general purpose child cache.
- private Collection<?> cachedChildren;
-
- protected QueriedElement(Object parent) {
- super(parent);
- }
-
- public Policy getPolicy() {
- Object parent = getParent(this);
- if (parent instanceof QueriedElement)
- return ((QueriedElement) parent).getPolicy();
- return ProvUIActivator.getDefault().getProvisioningUI().getPolicy();
- }
-
- public ProvisioningUI getProvisioningUI() {
- Object parent = getParent(this);
- if (parent instanceof QueriedElement)
- return ((QueriedElement) parent).getProvisioningUI();
- return ProvUIActivator.getDefault().getProvisioningUI();
-
- }
-
- public IUViewQueryContext getQueryContext() {
- Object parent = getParent(this);
- if (parent instanceof QueriedElement)
- return ((QueriedElement) parent).getQueryContext();
- return null;
- }
-
- public Object[] getChildren(Object o) {
- return fetchChildren(o, new NullProgressMonitor());
- }
-
- public QueryProvider getQueryProvider() {
- return ProvUI.getQueryProvider();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return null;
- }
-
- /**
- * Return the query type that is appropriate for this element when there
- * is no query context.
- * @return The integer query type
- */
- protected abstract int getDefaultQueryType();
-
- /**
- * Return the query type that should be used for this element.
- * Depending on the element, the query type may take the query context
- * into account. Subclasses should override this method if there are
- * context-dependent decisions to be made to determine the query.
- * @return The integer query type
- */
- public int getQueryType() {
- return getDefaultQueryType();
- }
-
- protected Object[] fetchChildren(Object o, IProgressMonitor monitor) {
- cachedChildren = CollectionUtils.emptyList();
- if (getQueryProvider() == null)
- return new Object[0];
- ElementQueryDescriptor queryDescriptor = getQueryProvider().getQueryDescriptor(this);
- if (queryDescriptor == null)
- return new Object[0];
- Collection<?> results = queryDescriptor.performQuery(monitor);
- cachedChildren = Collections.unmodifiableCollection(results);
- if (results.size() > 0) {
- Collection<Object> returnedChildren = new HashSet<Object>();
- returnedChildren.addAll(results);
- Object[] siblings = getSiblings();
- for (int i = 0; i < siblings.length; i++) {
- returnedChildren.remove(siblings[i]);
- }
- return returnedChildren.toArray();
- }
- return new Object[0];
- }
-
- public void setQueryable(IQueryable<?> queryable) {
- this.queryable = queryable;
- }
-
- public IQueryable<?> getQueryable() {
- return queryable;
- }
-
- /**
- * Return a boolean indicating whether the receiver
- * has enough information to get its queryable. This is used in lieu
- * of {{@link #getQueryable()} when lazy initialization
- * of the queryable is not desired, and a client wishes
- * to know whether the queryable could be obtained. Subclasses
- * that cache information needed to retrieve the queryable rather
- * than the queryable itself should
- * override this.
- *
- * @return <code>true</code> if the receiver has enough
- * information to retrieve its queryable, <code>false</code>
- * if it does not.
- */
- public boolean knowsQueryable() {
- return queryable != null;
- }
-
- /**
- * Return a boolean indicating whether the receiver
- * actually has its queryable. This is used in lieu
- * of {{@link #getQueryable()} when lazy initialization
- * of the queryable is not desired. For example, when
- * working with an element whose queryable may be
- * expensive to obtain, clients may check this before
- * actually getting the queryable. Subclasses
- * should typically not need to override this.
- *
- * @return <code>true</code> if the receiver has its
- * queryable, <code>false</code> if it does not yet.
- */
- public boolean hasQueryable() {
- return queryable != null;
- }
-
- public Object[] getCachedChildren() {
- return cachedChildren.toArray();
- }
-
- protected Object[] getSiblings() {
- Object parent = getParent(this);
- if (parent instanceof QueriedElement)
- return ((QueriedElement) parent).getCachedChildren();
- if (parent instanceof IUElementListRoot)
- return ((IUElementListRoot) parent).getChildren(parent);
- return new Object[0];
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java
deleted file mode 100644
index e5085ab66..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/QueriedElementWrapper.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.query.Collector;
-import org.eclipse.equinox.p2.query.IQueryable;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * A wrapper that assigns a query provider and the queryable
- * who was performing the query to the wrapped elements
- * as they are accepted.
- *
- * @since 3.4
- */
-public abstract class QueriedElementWrapper extends ElementWrapper {
-
- protected IQueryable<?> queryable;
- protected Object parent;
- protected String emptyExplanationString;
- protected int emptyExplanationSeverity;
- protected String emptyExplanationDescription;
-
- public QueriedElementWrapper(IQueryable<?> queryable, Object parent) {
- this.queryable = queryable;
- this.parent = parent;
- }
-
- /**
- * Sets an item as Queryable if it is a QueriedElement
- */
- protected Object wrap(Object item) {
- if (item instanceof QueriedElement) {
- QueriedElement element = (QueriedElement) item;
- if (!element.knowsQueryable()) {
- element.setQueryable(queryable);
- }
- }
- return item;
- }
-
- public Collection<?> getElements(Collector<?> collector) {
- // Any previously stored explanations are not valid.
- emptyExplanationString = null;
- emptyExplanationSeverity = IStatus.INFO;
- emptyExplanationDescription = null;
- if (collector.isEmpty()) {
- // Before we are even filtering out items, there is nothing in the collection.
- // All we can do is look for the most common reasons and guess. If the collection
- // is empty and the parent is an IU, then being empty is not a big deal, it means
- // we are in drilldown.
- if (parent instanceof MetadataRepositoryElement) {
- RepositoryTracker manipulator = ProvisioningUI.getDefaultUI().getRepositoryTracker();
- MetadataRepositoryElement repo = (MetadataRepositoryElement) parent;
- if (manipulator.hasNotFoundStatusBeenReported(repo.getLocation())) {
- return emptyExplanation(IStatus.ERROR, NLS.bind(ProvUIMessages.QueriedElementWrapper_SiteNotFound, URIUtil.toUnencodedString(repo.getLocation())), ""); //$NON-NLS-1$
- }
- }
- if (parent instanceof QueriedElement) {
- QueriedElement element = (QueriedElement) parent;
- IUViewQueryContext context = element.getQueryContext();
- if (context == null)
- context = ProvUI.getQueryContext(element.getPolicy());
- if (parent instanceof MetadataRepositoryElement || parent instanceof MetadataRepositories) {
- if (context != null && context.getViewType() == IUViewQueryContext.AVAILABLE_VIEW_BY_CATEGORY && context.getUseCategories()) {
- return emptyExplanation(IStatus.INFO, ProvUIMessages.QueriedElementWrapper_NoCategorizedItemsExplanation, context.getUsingCategoriesDescription());
- }
- return emptyExplanation(IStatus.INFO, ProvUIMessages.QueriedElementWrapper_NoItemsExplanation, null);
- }
- }
- // It is empty, but the parent is an IU, so this could be a drilldown.
- return Collections.EMPTY_LIST;
- }
- Collection<?> elements = super.getElements(collector);
- // We had elements but now they have been filtered out. Hopefully
- // we can explain this.
- if (elements.isEmpty()) {
- if (emptyExplanationString != null)
- return emptyExplanation(emptyExplanationSeverity, emptyExplanationString, emptyExplanationDescription);
- // We filtered out content but never explained it. Ideally this doesn't happen if
- // all wrappers explain any filtering.
- return emptyExplanation(emptyExplanationSeverity, ProvUIMessages.QueriedElementWrapper_NoItemsExplanation, null);
- }
- return elements;
- }
-
- Collection<?> emptyExplanation(int severity, String explanationString, String explanationDescription) {
- ArrayList<Object> collection = new ArrayList<Object>(1);
- collection.add(new EmptyElementExplanation(parent, severity, explanationString, explanationDescription));
- return collection;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
deleted file mode 100644
index b84c78b10..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RemoteQueriedElement.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.equinox.internal.p2.ui.QueryableMetadataRepositoryManager;
-import org.eclipse.ui.progress.IDeferredWorkbenchAdapter;
-import org.eclipse.ui.progress.IElementCollector;
-
-/**
- * Element wrapper class for objects that gets their children using
- * a deferred query.
- *
- * @since 3.4
- */
-public abstract class RemoteQueriedElement extends QueriedElement implements IDeferredWorkbenchAdapter {
-
- protected RemoteQueriedElement(Object parent) {
- super(parent);
- }
-
- public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor) {
- try {
- Object[] children = fetchChildren(o, monitor);
-
- if (!monitor.isCanceled()) {
- collector.add(children, monitor);
- }
- } catch (OperationCanceledException e) {
- // Nothing to do
- }
- collector.done();
-
- }
-
- public ISchedulingRule getRule(Object object) {
- return null;
- }
-
- public boolean isContainer() {
- return true;
- }
-
- /*
- * Overridden to ensure that we check whether we are using a
- * QueryableMetadataRepositoryManager as our queryable. If so,
- * we must find out if it is up to date with the real manager.
- *
- * This is necessary to prevent background loading of already loaded repositories
- * by the DeferredTreeContentManager, which will add redundant children to the
- * viewer.
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=229069
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=226343
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=275235
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#hasQueryable()
- */
-
- public boolean hasQueryable() {
- if (queryable instanceof QueryableMetadataRepositoryManager)
- return ((QueryableMetadataRepositoryManager) queryable).areRepositoriesLoaded();
- return super.hasQueryable();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
deleted file mode 100644
index d474a7310..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import com.ibm.icu.text.DateFormat;
-import java.util.Date;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.query.IQueryable;
-
-/**
- * Element class for a profile snapshot
- *
- * @since 3.4
- */
-public class RollbackProfileElement extends RemoteQueriedElement {
-
- private String profileId;
- private long timestamp;
- private IProfile snapshot;
- private boolean isCurrent = false;
-
- public RollbackProfileElement(Object parent, String profileId, long timestamp) {
- super(parent);
- this.timestamp = timestamp;
- this.profileId = profileId;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.internal.provisional.p2.ui.model.ProvElement#getImageID(java.lang.Object)
- */
- protected String getImageId(Object obj) {
- return ProvUIImages.IMG_PROFILE;
- }
-
- public String getLabel(Object o) {
- if (isCurrent)
- return ProvUIMessages.RollbackProfileElement_CurrentInstallation;
- return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(new Date(timestamp));
- }
-
- @SuppressWarnings("rawtypes")
- public Object getAdapter(Class adapter) {
- if (adapter == IProfile.class)
- return getProfileSnapshot(new NullProgressMonitor());
- return super.getAdapter(adapter);
- }
-
- public IProfile getProfileSnapshot(IProgressMonitor monitor) {
- if (snapshot == null) {
- snapshot = ProvUI.getProfileRegistry(getProvisioningUI().getSession()).getProfile(profileId, timestamp);
- setQueryable(snapshot);
- }
- return snapshot;
- }
-
- public long getTimestamp() {
- return timestamp;
- }
-
- public void setIsCurrentProfile(boolean current) {
- this.isCurrent = current;
- }
-
- public boolean isCurrentProfile() {
- return isCurrent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getDefaultQueryType()
- */
- protected int getDefaultQueryType() {
- return QueryProvider.INSTALLED_IUS;
- }
-
- /*
- * The queryable is the profile snapshot
- * (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.model.QueriedElement#getQueryable()
- */
- public IQueryable<?> getQueryable() {
- return getProfileSnapshot(new NullProgressMonitor());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java
deleted file mode 100644
index a9574e8f2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RootElement.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.query.IUViewQueryContext;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * Element class that represents the root of a viewer. It can be configured
- * with its own ui and query context.
- *
- * @since 3.5
- *
- */
-public abstract class RootElement extends RemoteQueriedElement {
-
- private IUViewQueryContext queryContext;
- private ProvisioningUI ui;
-
- public RootElement(ProvisioningUI ui) {
- this(null, ProvUI.getQueryContext(ui.getPolicy()), ui);
- }
-
- public RootElement(IUViewQueryContext queryContext, ProvisioningUI ui) {
- this(null, queryContext, ui);
- }
-
- /*
- * Special method for subclasses that can sometimes be a root, and sometimes not.
- */
- protected RootElement(Object parent, IUViewQueryContext queryContext, ProvisioningUI ui) {
- super(parent);
- this.queryContext = queryContext;
- this.ui = ui;
- }
-
- /**
- * Set the query context that is used when querying the receiver.
- *
- * @param context the query context to use
- */
- public void setQueryContext(IUViewQueryContext context) {
- queryContext = context;
- }
-
- public IUViewQueryContext getQueryContext() {
- return queryContext;
- }
-
- public Policy getPolicy() {
- return ui.getPolicy();
- }
-
- public ProvisioningUI getProvisioningUI() {
- return ui;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
deleted file mode 100644
index 3f227d0a2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/Updates.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.model;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.QueryProvider;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * Element class that represents available updates.
- *
- * @since 3.4
- *
- */
-public class Updates extends QueriedElement {
-
- private String profileId;
- private IInstallableUnit[] iusToBeUpdated;
-
- public Updates(String profileId) {
- this(profileId, null);
- }
-
- public Updates(String profileId, IInstallableUnit[] iusToBeUpdated) {
- super(null);
- this.profileId = profileId;
- this.iusToBeUpdated = iusToBeUpdated;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
- */
- public String getLabel(Object o) {
- return ProvUIMessages.Updates_Label;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueriedElement#getDefaultQueryType()
- */
- protected int getDefaultQueryType() {
- return QueryProvider.AVAILABLE_UPDATES;
- }
-
- public String getProfileId() {
- return profileId;
- }
-
- public IInstallableUnit[] getIUs() {
- return iusToBeUpdated;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java
deleted file mode 100644
index 27a4304a7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactKeyWrapper.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import org.eclipse.equinox.internal.p2.ui.model.ArtifactElement;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.p2.metadata.IArtifactKey;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-
-/**
- * Wrapper that accepts artifact keys and wraps them in an ArtifactKeyElement.
- *
- * @since 3.6
- */
-public class ArtifactKeyWrapper extends QueriedElementWrapper {
-
- IArtifactRepository repo;
-
- public ArtifactKeyWrapper(IArtifactRepository repo, Object parent) {
- super(repo, parent);
- this.repo = repo;
- }
-
- protected boolean shouldWrap(Object match) {
- if ((match instanceof IArtifactKey))
- return true;
- return false;
- }
-
- /**
- * Transforms the item to a UI element
- */
- protected Object wrap(Object item) {
- return super.wrap(new ArtifactElement(parent, (IArtifactKey) item, repo));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java
deleted file mode 100644
index a81b6bc9d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ArtifactRepositoryElementWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.model.ArtifactRepositoryElement;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.p2.query.IQueryable;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * ElementWrapper that wraps a URI with an ArtifactRepositoryElement.
- *
- * @since 3.4
- */
-public class ArtifactRepositoryElementWrapper extends QueriedElementWrapper {
-
- public ArtifactRepositoryElementWrapper(IQueryable<URI> queryable, Object parent) {
- super(queryable, parent);
- }
-
- /**
- * Accepts a result that matches the query criteria.
- *
- * @param match an object matching the query
- * @return <code>true</code> if the query should continue,
- * or <code>false</code> to indicate the query should stop.
- */
- protected boolean shouldWrap(Object match) {
- if ((match instanceof URI))
- return true;
- return false;
- }
-
- /**
- * Transforms the item to a UI element
- */
- protected Object wrap(Object item) {
- return super.wrap(new ArtifactRepositoryElement(parent, (URI) item, ProvUI.getArtifactRepositoryManager(ProvisioningUI.getDefaultUI().getSession()).isEnabled((URI) item)));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java
deleted file mode 100644
index 3c6ec295d..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/AvailableIUWrapper.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import java.util.Iterator;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.*;
-
-/**
- * A wrapper that examines available IU's and wraps them in an
- * element representing either a category or a regular IU.
- *
- * @since 3.4
- */
-public class AvailableIUWrapper extends QueriedElementWrapper {
-
- private boolean makeCategories;
- private IProfile profile;
- private boolean hideInstalledIUs = false;
- private boolean drillDownChild = false;
-
- public AvailableIUWrapper(IQueryable<?> queryable, Object parent, boolean makeCategories, boolean makeDrillDownChild) {
- super(queryable, parent);
- this.makeCategories = makeCategories;
- this.drillDownChild = makeDrillDownChild;
- }
-
- public void markInstalledIUs(IProfile targetProfile, boolean hideInstalled) {
- this.profile = targetProfile;
- hideInstalledIUs = hideInstalled;
- }
-
- class InformationCache {
- Object item = null;
- boolean isUpdate = false;
- boolean isInstalled = false;
-
- public InformationCache(Object item, boolean isUpdate, boolean isInstalled) {
- this.item = item;
- this.isUpdate = isUpdate;
- this.isInstalled = isInstalled;
- }
- }
-
- InformationCache cache = null;
-
- protected boolean shouldWrap(Object match) {
- IInstallableUnit iu = ProvUI.getAdapter(match, IInstallableUnit.class);
- cache = computeIUInformation(iu); // Cache the result
-
- // if we are hiding, hide anything that is the same iu or older
- if (hideInstalledIUs && cache.isInstalled && !cache.isUpdate) {
- emptyExplanationString = ProvUIMessages.AvailableIUWrapper_AllAreInstalled;
- emptyExplanationSeverity = IStatus.INFO;
- emptyExplanationDescription = ProvUIMessages.IUViewQueryContext_AllAreInstalledDescription;
- return false;
- }
- return true;
- }
-
- /**
- * Compute information about this IU. This computes whether or
- * not this IU is installed and / or updated.
- */
- private InformationCache computeIUInformation(IInstallableUnit iu) {
- boolean isUpdate = false;
- boolean isInstalled = false;
- if (profile != null && iu != null) {
- IQueryResult<IInstallableUnit> queryResult = profile.query(QueryUtil.createIUQuery(iu.getId()), null);
- Iterator<IInstallableUnit> iter = queryResult.iterator();
- // We are typically iterating over only one IU unless it's a non-singleton.
- while (iter.hasNext()) {
- IInstallableUnit installed = iter.next();
- if (installed.getVersion().compareTo(iu.getVersion()) < 0)
- isUpdate = true;
- else {
- isUpdate = false;
- isInstalled = true;
- }
- }
- }
- return new InformationCache(iu, isUpdate, isInstalled);
-
- }
-
- protected Object wrap(Object item) {
- IInstallableUnit iu = ProvUI.getAdapter(item, IInstallableUnit.class);
- boolean isUpdate = false;
- boolean isInstalled = false;
- if (cache != null && cache.item == item) {
- // This cache should always be valide, since accept is called before transformItem
- isUpdate = cache.isUpdate;
- isInstalled = cache.isInstalled;
- } else {
- InformationCache iuInformation = computeIUInformation(iu);
- isUpdate = iuInformation.isUpdate;
- isInstalled = iuInformation.isInstalled;
- }
- // subclass already made this an element, just set the install flag
- if (item instanceof AvailableIUElement) {
- AvailableIUElement element = (AvailableIUElement) item;
- element.setIsInstalled(isInstalled);
- element.setIsUpdate(isUpdate);
- return super.wrap(item);
- }
- // If it's not an IU or element, we have nothing to do here
- if (!(item instanceof IInstallableUnit))
- return super.wrap(item);
-
- // We need to make an element
- if (makeCategories && isCategory(iu))
- return super.wrap(new CategoryElement(parent, iu));
-
- IIUElement element = makeDefaultElement(iu);
- if (element instanceof AvailableIUElement) {
- AvailableIUElement availableElement = (AvailableIUElement) element;
- availableElement.setIsInstalled(isInstalled);
- availableElement.setIsUpdate(isUpdate);
- }
- return super.wrap(element);
- }
-
- protected IIUElement makeDefaultElement(IInstallableUnit iu) {
- if (parent instanceof AvailableIUElement)
- drillDownChild = ((AvailableIUElement) parent).shouldShowChildren();
- return new AvailableIUElement(parent, iu, null, drillDownChild);
- }
-
- protected boolean isCategory(IInstallableUnit iu) {
- return QueryUtil.isCategory(iu);
- }
-
- protected boolean makeCategory() {
- return makeCategories;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java
deleted file mode 100644
index e66e85bd9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/CategoryElementWrapper.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.p2.ui.model.CategoryElement;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.IRequirement;
-import org.eclipse.equinox.p2.query.Collector;
-import org.eclipse.equinox.p2.query.IQueryable;
-
-/**
- * A collector that converts IU's to category elements as it accepts them.
- * It can be configured so that it is never empty.
- *
- * @since 3.4
- */
-public class CategoryElementWrapper extends QueriedElementWrapper {
-
- // Used to track nested categories
- private Set<String> referredIUs = new HashSet<String>();
-
- public CategoryElementWrapper(IQueryable<?> queryable, Object parent) {
- super(queryable, parent);
- }
-
- protected boolean shouldWrap(Object match) {
- if (match instanceof IInstallableUnit) {
- IInstallableUnit iu = (IInstallableUnit) match;
- Collection<IRequirement> requirements = iu.getRequirements();
- for (IRequirement requirement : requirements) {
- if (requirement instanceof IRequiredCapability) {
- if (((IRequiredCapability) requirement).getNamespace().equals(IInstallableUnit.NAMESPACE_IU_ID)) {
- referredIUs.add(((IRequiredCapability) requirement).getName());
- }
- }
- }
-
- Iterator<?> iter = super.getCollection().iterator();
- // Don't add the same category IU twice.
- while (iter.hasNext()) {
- CategoryElement element = (CategoryElement) iter.next();
- if (element.shouldMerge(iu)) {
- element.mergeIU(iu);
- return false;
- }
- }
- return true;
- }
-
- return false;
- }
-
- public Collection<?> getElements(Collector<?> collector) {
- if (collector.isEmpty())
- return super.getElements(collector);
- Collection<?> results = super.getElements(collector);
- cleanList();
- return results;
- }
-
- protected Object wrap(Object item) {
- IInstallableUnit iu = (IInstallableUnit) item;
- return super.wrap(new CategoryElement(parent, iu));
- }
-
- private void cleanList() {
- removeNestedCategories();
- }
-
- private void removeNestedCategories() {
- CategoryElement[] categoryIUs = getCollection().toArray(new CategoryElement[getCollection().size()]);
- // If any other element refers to a category element, remove it from the list
- for (int i = 0; i < categoryIUs.length; i++) {
- if (referredIUs.contains(categoryIUs[i].getIU().getId())) {
- getCollection().remove(categoryIUs[i]);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java
deleted file mode 100644
index 8f36fb56c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.QueryProvider;
-
-/**
- * IUViewQueryContext defines the different ways
- * IUs can be viewed. Clients can use this context to
- * control how the various IU views are represented and traversed.
- *
- * @since 2.0
- */
-public class IUViewQueryContext {
- public static final int AVAILABLE_VIEW_BY_CATEGORY = 1;
- public static final int AVAILABLE_VIEW_BY_REPO = 2;
- public static final int AVAILABLE_VIEW_FLAT = 3;
-
- // Available view settings
- // Default available view to repo as this provides the fastest information
- private int view = AVAILABLE_VIEW_BY_REPO;
- // Whether to show latest versions only, defaults to
- // true. Clients typically use a pref setting or dialog
- // setting to initialize
- private boolean showLatestVersionsOnly = true;
- // Whether to hide things that are already installed
- // Defaults to false since we wouldn't know what profile to use
- private boolean hideAlreadyInstalled = false;
- // Whether to group items in repos by category. Note this only makes sense when the
- // view type is AVAILABLE_VIEW_BY_REPO
- private boolean useCategories = true;
- // Whether to drill down into installed items
- private boolean showInstallChildren = true;
- // Whether to drill down into available items
- private boolean showAvailableChildren = false;
- // Whether to drill down into items in a provisioning plan
- private boolean showProvisioningPlanChildren = true;
- // Whether to filter out IUs based on the environment settings of the target profile
- private boolean filterOnEnv = false;
-
- private String profileId = null;
-
- private String hidingInstalledDescription = ProvUIMessages.IUViewQueryContext_AllAreInstalledDescription;
- private String groupingCategoriesDescription = ProvUIMessages.IUViewQueryContext_NoCategorizedItemsDescription;
-
- public IUViewQueryContext(int viewType) {
- this.view = viewType;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueryContext#getQueryType()
- */
- public int getQueryType() {
- if (view == AVAILABLE_VIEW_BY_REPO)
- return QueryProvider.METADATA_REPOS;
- return QueryProvider.AVAILABLE_IUS;
- }
-
- public int getViewType() {
- return view;
- }
-
- public void setViewType(int viewType) {
- view = viewType;
- }
-
- public boolean getShowLatestVersionsOnly() {
- return showLatestVersionsOnly;
- }
-
- public void setShowLatestVersionsOnly(boolean showLatest) {
- showLatestVersionsOnly = showLatest;
- }
-
- public void hideAlreadyInstalled(String installedProfileId) {
- profileId = installedProfileId;
- hideAlreadyInstalled = true;
- }
-
- public void showAlreadyInstalled() {
- hideAlreadyInstalled = false;
- }
-
- public boolean getHideAlreadyInstalled() {
- return hideAlreadyInstalled;
- }
-
- public String getInstalledProfileId() {
- return profileId;
- }
-
- public void setInstalledProfileId(String profileId) {
- this.profileId = profileId;
- }
-
- public void setFilterOnEnv(boolean filterOnEnv) {
- this.filterOnEnv = filterOnEnv;
- }
-
- public boolean getFilterOnEnv() {
- return filterOnEnv;
- }
-
- /**
- * Set a boolean that indicates whether categories should be used when
- * viewing by repository.
- *
- * useCategories <code>true</code> if a site in a sites view should expand into categories,
- * <code>false</code> if it should expand into IU's.
- */
-
- public void setUseCategories(boolean useCategories) {
- this.useCategories = useCategories;
- }
-
- /**
- * Return a boolean that indicates whether categories should be used when
- * viewing by repository.
- *
- * @return <code>true</code> if a site in a sites view should expand into categories,
- * <code>false</code> if it should expand into IU's.
- */
- public boolean getUseCategories() {
- return useCategories;
- }
-
- public boolean getShowInstallChildren() {
- return showInstallChildren;
- }
-
- public void setShowInstallChildren(boolean showChildren) {
- showInstallChildren = showChildren;
- }
-
- public boolean getShowAvailableChildren() {
- return showAvailableChildren;
- }
-
- public void setShowAvailableChildren(boolean showChildren) {
- showAvailableChildren = showChildren;
- }
-
- public boolean getShowProvisioningPlanChildren() {
- return showProvisioningPlanChildren;
- }
-
- public void setShowProvisioningPlanChildren(boolean showChildren) {
- showProvisioningPlanChildren = showChildren;
- }
-
- public String getHidingInstalledDescription() {
- return hidingInstalledDescription;
- }
-
- public void setHidingInstalledDescription(String description) {
- hidingInstalledDescription = description;
- }
-
- public String getUsingCategoriesDescription() {
- return groupingCategoriesDescription;
- }
-
- public void setUsingCategoriesDescription(String description) {
- groupingCategoriesDescription = description;
- }
-
- public boolean shouldGroupByCategories() {
- return view == AVAILABLE_VIEW_BY_CATEGORY || (view == AVAILABLE_VIEW_BY_REPO && useCategories);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java
deleted file mode 100644
index 9e465a8f8..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/InstalledIUElementWrapper.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import org.eclipse.equinox.internal.p2.ui.model.InstalledIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQueryable;
-
-/**
- * ElementWrapper that accepts the matched IU's and
- * wraps them in an InstalledIUElement.
- *
- * @since 3.4
- */
-public class InstalledIUElementWrapper extends QueriedElementWrapper {
-
- public InstalledIUElementWrapper(IQueryable<?> queryable, Object parent) {
- super(queryable, parent);
- }
-
- /**
- * Accepts a result that matches the query criteria.
- *
- * @param match an object matching the query
- * @return <code>true</code> if the query should continue,
- * or <code>false</code> to indicate the query should stop.
- */
- protected boolean shouldWrap(Object match) {
- if (match instanceof IInstallableUnit)
- return true;
- return false;
- }
-
- /**
- * Transforms the item to a UI element
- */
- protected Object wrap(Object item) {
- if (queryable instanceof IProfile)
- return super.wrap(new InstalledIUElement(parent, ((IProfile) queryable).getProfileId(), (IInstallableUnit) item));
- // Shouldn't happen, the queryable should typically be a profile
- return super.wrap(item);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java
deleted file mode 100644
index 3718ba120..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/MetadataRepositoryElementWrapper.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.p2.query.IQueryable;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * ElementWrapper that accepts the matched repo URLs and
- * wraps them in a MetadataRepositoryElement.
- *
- * @since 3.4
- */
-public class MetadataRepositoryElementWrapper extends QueriedElementWrapper {
-
- public MetadataRepositoryElementWrapper(IQueryable<URI> queryable, Object parent) {
- super(queryable, parent);
- }
-
- /**
- * Accepts a result that matches the query criteria.
- *
- * @param match an object matching the query
- * @return <code>true</code> if the query should continue,
- * or <code>false</code> to indicate the query should stop.
- */
- protected boolean shouldWrap(Object match) {
- if ((match instanceof URI))
- return true;
- return false;
- }
-
- /**
- * Transforms the item to a UI element
- */
- protected Object wrap(Object item) {
- return super.wrap(new MetadataRepositoryElement(parent, (URI) item, ProvUI.getMetadataRepositoryManager(ProvisioningUI.getDefaultUI().getSession()).isEnabled((URI) item)));
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java
deleted file mode 100644
index d102bafae..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/ProfileElementWrapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import org.eclipse.equinox.internal.p2.ui.model.ProfileElement;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElementWrapper;
-import org.eclipse.equinox.p2.engine.IProfile;
-
-/**
- * Collector that accepts the matched Profiles and
- * wraps them in a ProfileElement.
- *
- * @since 3.4
- */
-public class ProfileElementWrapper extends QueriedElementWrapper {
-
- public ProfileElementWrapper(IProfile profile, Object parent) {
- super(profile, parent);
- }
-
- protected boolean shouldWrap(Object match) {
- if ((match instanceof IProfile))
- return true;
- return false;
- }
-
- /**
- * Transforms the item to a UI element
- */
- protected Object wrap(Object item) {
- return super.wrap(new ProfileElement(parent, ((IProfile) item).getProfileId()));
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java
deleted file mode 100644
index 4d787c09b..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableProfileRegistry.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- * EclipseSource - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import java.util.Arrays;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * An object that adds queryable support to the profile registry.
- */
-public class QueryableProfileRegistry implements IQueryable<IProfile> {
-
- private ProvisioningUI ui;
-
- public QueryableProfileRegistry(ProvisioningUI ui) {
- this.ui = ui;
- }
-
- public IQueryResult<IProfile> query(IQuery<IProfile> query, IProgressMonitor monitor) {
- IProfile[] profiles = ProvUI.getProfileRegistry(ui.getSession()).getProfiles();
- SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.QueryableProfileRegistry_QueryProfileProgress, profiles.length);
- try {
- return query.perform(Arrays.asList(profiles).iterator());
- } finally {
- sub.done();
- }
- }
-}
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
deleted file mode 100644
index 82c8d4f08..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * EclipseSource - ongoing development
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-
-/**
- * An object that implements a query for available updates
- */
-public class QueryableUpdates implements IQueryable<IInstallableUnit> {
-
- private IInstallableUnit[] iusToUpdate;
- ProvisioningUI ui;
-
- public QueryableUpdates(ProvisioningUI ui, IInstallableUnit[] iusToUpdate) {
- this.ui = ui;
- this.iusToUpdate = iusToUpdate;
- }
-
- public IQueryResult<IInstallableUnit> query(IQuery<IInstallableUnit> query, IProgressMonitor monitor) {
- if (monitor == null)
- monitor = new NullProgressMonitor();
- int totalWork = 2000;
- monitor.beginTask(ProvUIMessages.QueryableUpdates_UpdateListProgress, totalWork);
- IPlanner planner = (IPlanner) ui.getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME);
- try {
- Set<IInstallableUnit> allUpdates = new HashSet<IInstallableUnit>();
- for (int i = 0; i < iusToUpdate.length; i++) {
- if (monitor.isCanceled())
- return Collector.emptyCollector();
- IQueryResult<IInstallableUnit> updates = planner.updatesFor(iusToUpdate[i], new ProvisioningContext(ui.getSession().getProvisioningAgent()), new SubProgressMonitor(monitor, totalWork / 2 / iusToUpdate.length));
- allUpdates.addAll(updates.toUnmodifiableSet());
- }
- return query.perform(allUpdates.iterator());
- } catch (OperationCanceledException e) {
- // Nothing more to do, return result
- return Collector.emptyCollector();
- } finally {
- monitor.done();
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java
deleted file mode 100644
index 61333bcc6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/RequiredIUsQuery.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- * Cloudsmith Inc. - converted into expression based query
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.query;
-
-import org.eclipse.equinox.p2.query.ExpressionMatchQuery;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.expression.ExpressionUtil;
-import org.eclipse.equinox.p2.metadata.expression.IExpression;
-
-/**
-/**
- * A query matching every {@link IInstallableUnit} that is meets
- * any requirement of the specified IU. This query is used when
- * drilling down to show the children of an available IU. For example,
- * when installing an IU, we want to show all the IU's that are in the provisioning
- * plan that are required by this IU. This is usually used in combination with
- * other queries (such as show all Required IUs which also are visible to
- * the user as available).
- *
- * @since 2.0
- */
-public class RequiredIUsQuery extends ExpressionMatchQuery<IInstallableUnit> {
-
- private static final IExpression expression = ExpressionUtil.parse("$0.exists(rc | this ~= rc)"); //$NON-NLS-1$
-
- /**
- * Creates a new query that will return any IU that meets any
- * one of the requirements of the specified IU.
- *
- * @param iu The IU whose requirements are to be checked
- */
- public RequiredIUsQuery(IInstallableUnit iu) {
- super(IInstallableUnit.class, expression, iu.getRequirements());
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java
deleted file mode 100644
index d11086b89..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/CertificateLabelProvider.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import org.eclipse.equinox.internal.provisional.security.ui.X500PrincipalHelper;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * A label provider that displays X509 certificates.
- */
-public class CertificateLabelProvider implements ILabelProvider {
-
- public Image getImage(Object element) {
- return null;
- }
-
- public String getText(Object element) {
- Certificate cert = null;
- if (element instanceof TreeNode) {
- cert = (Certificate) ((TreeNode) element).getValue();
- }
- if (cert != null) {
- X500PrincipalHelper principalHelper = new X500PrincipalHelper(((X509Certificate) cert).getSubjectX500Principal());
- return principalHelper.getCN() + "; " + principalHelper.getOU() + "; " + principalHelper.getO(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return ""; //$NON-NLS-1$
- }
-
- public void addListener(ILabelProviderListener listener) {
- // do nothing
- }
-
- public void dispose() {
- // do nothing
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- // do nothing
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java
deleted file mode 100644
index 338acc279..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryContentProvider.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.equinox.internal.p2.ui.model.QueriedElement;
-import org.eclipse.equinox.internal.p2.ui.model.RemoteQueriedElement;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * Content provider that retrieves children asynchronously where
- * possible using the IDeferredWorkbenchAdapter and provisioning
- * query mechanisms.
- *
- * @since 3.4
- *
- */
-public class DeferredQueryContentProvider extends ProvElementContentProvider {
-
- DeferredQueryTreeContentManager manager;
- Object currentInput;
- HashMap<Object, Object> alreadyQueried = new HashMap<Object, Object>();
- HashSet<Object> queryCompleted = new HashSet<Object>();
- AbstractTreeViewer viewer = null;
- ListenerList listeners = new ListenerList();
- boolean synchronous = false;
-
- /**
- *
- */
- public DeferredQueryContentProvider() {
- // Default constructor
- }
-
- public void addListener(IInputChangeListener listener) {
- listeners.add(listener);
- }
-
- public void removeListener(IInputChangeListener listener) {
- listeners.remove(listener);
- }
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- super.inputChanged(v, oldInput, newInput);
-
- if (manager != null)
- manager.cancel(oldInput);
- if (v instanceof AbstractTreeViewer) {
- manager = new DeferredQueryTreeContentManager((AbstractTreeViewer) v);
- viewer = (AbstractTreeViewer) v;
- manager.setListener(new IDeferredQueryTreeListener() {
-
- public void fetchingDeferredChildren(Object parent, Object placeholder) {
- alreadyQueried.put(parent, placeholder);
- }
-
- public void finishedFetchingDeferredChildren(Object parent, Object placeholder) {
- queryCompleted.add(parent);
- }
- });
- } else
- viewer = null;
- alreadyQueried = new HashMap<Object, Object>();
- queryCompleted = new HashSet<Object>();
- currentInput = newInput;
- Object[] inputListeners = listeners.getListeners();
- for (int i = 0; i < inputListeners.length; i++) {
- ((IInputChangeListener) inputListeners[i]).inputChanged(v, oldInput, newInput);
- }
- }
-
- public Object[] getElements(Object input) {
- if (input instanceof QueriedElement) {
- return getChildren(input);
- }
- return super.getElements(input);
- }
-
- public void dispose() {
- super.dispose();
- if (manager != null) {
- manager.cancel(currentInput);
- }
- }
-
- public boolean hasChildren(Object element) {
- if (manager != null) {
- if (manager.isDeferredAdapter(element))
- return manager.mayHaveChildren(element);
- }
- return super.hasChildren(element);
- }
-
- public Object[] getChildren(final Object parent) {
- if (parent instanceof RemoteQueriedElement) {
- RemoteQueriedElement element = (RemoteQueriedElement) parent;
- // We rely on the assumption that the queryable is the most expensive
- // thing to get vs. the query itself being expensive.
- // (loading a repo vs. querying a repo afterward)
- if (element.hasQueryable())
- return element.getChildren(element);
-
- if (manager != null && !synchronous) {
- return manager.getChildren(parent);
- }
- }
- return super.getChildren(parent);
- }
-
- public void setSynchronous(boolean sync) {
- if (sync == true && manager != null)
- manager.cancel(currentInput);
- this.synchronous = sync;
- }
-
- public boolean getSynchronous() {
- return synchronous;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java
deleted file mode 100644
index 8ee7296b2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.*;
-
-/**
- * DeferredQueryTreeContentManager is an extension of DeferredTreeContentManager
- * that associates pending placeholders with their parent elements, so that
- * clients know when a particular parent element is finished fetching
- * its contents.
- *
- * @since 3.4
- *
- */
-public class DeferredQueryTreeContentManager extends DeferredTreeContentManager {
-
- class ElementPendingUpdateAdapter extends PendingUpdateAdapter {
- Object element;
-
- ElementPendingUpdateAdapter(Object element) {
- super();
- this.element = element;
- }
-
- public boolean isRemoved() {
- return super.isRemoved();
- }
- }
-
- Object elementRequested;
- IDeferredQueryTreeListener listener;
-
- public DeferredQueryTreeContentManager(AbstractTreeViewer viewer) {
- super(viewer);
- }
-
- /*
- * Overridden to keep track of the current request long enough
- * to put it in the pending update adapter.
- * (non-Javadoc)
- * @see org.eclipse.ui.progress.DeferredTreeContentManager#getChildren(java.lang.Object)
- */
- public Object[] getChildren(final Object parent) {
- elementRequested = parent;
- return super.getChildren(parent);
- }
-
- /*
- * Overridden to signal the start of a fetch
- * (non-Javadoc)
- * @see org.eclipse.ui.progress.DeferredTreeContentManager#startFetchingDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IDeferredWorkbenchAdapter, org.eclipse.ui.progress.PendingUpdateAdapter)
- */
- protected void startFetchingDeferredChildren(final Object parent, final IDeferredWorkbenchAdapter adapter, final PendingUpdateAdapter placeholder) {
- if (placeholder instanceof ElementPendingUpdateAdapter)
- notifyListener(true, (ElementPendingUpdateAdapter) placeholder);
- super.startFetchingDeferredChildren(parent, adapter, placeholder);
- }
-
- protected void runClearPlaceholderJob(final PendingUpdateAdapter placeholder) {
- if (placeholder instanceof ElementPendingUpdateAdapter) {
- if (((ElementPendingUpdateAdapter) placeholder).isRemoved() || !PlatformUI.isWorkbenchRunning())
- return;
- notifyListener(false, (ElementPendingUpdateAdapter) placeholder);
- }
- super.runClearPlaceholderJob(placeholder);
- }
-
- protected PendingUpdateAdapter createPendingUpdateAdapter() {
- return new ElementPendingUpdateAdapter(elementRequested);
- }
-
- public void setListener(IDeferredQueryTreeListener listener) {
- this.listener = listener;
- }
-
- private void notifyListener(boolean starting, ElementPendingUpdateAdapter placeholder) {
- if (listener == null)
- return;
- if (starting)
- listener.fetchingDeferredChildren(placeholder.element, placeholder);
- else
- listener.finishedFetchingDeferredChildren(placeholder.element, placeholder);
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IDeferredQueryTreeListener.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IDeferredQueryTreeListener.java
deleted file mode 100644
index bcd3c2f55..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IDeferredQueryTreeListener.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import java.util.EventListener;
-
-/**
- * A listening interface used to signal when fetching begins and
- * ends. Used by clients who wish to coordinate fetching with other
- * capabilities of the viewer.
- *
- * @since 3.4
- *
- */
-public interface IDeferredQueryTreeListener extends EventListener {
-
- public void fetchingDeferredChildren(Object parent, Object placeHolder);
-
- public void finishedFetchingDeferredChildren(Object parent, Object placeHolder);
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IInputChangeListener.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IInputChangeListener.java
deleted file mode 100644
index ea53623a1..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IInputChangeListener.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- ******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import java.util.EventListener;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * A listening interface used to signal clients when input changes
- * in a viewer.
- *
- * @since 3.4
- *
- */
-public interface IInputChangeListener extends EventListener {
- public void inputChanged(Viewer v, Object oldInput, Object newInput);
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUColumnConfig.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUColumnConfig.java
deleted file mode 100644
index c5d8be589..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUColumnConfig.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * An IUColumnConfig describes a column in a viewer that is showing
- * information about an IIInstallableUnit.
- *
- * @since 3.4
- */
-public class IUColumnConfig {
- /**
- * Constant indicating that the column represents an IInstallableUnit's id
- */
- public final static int COLUMN_ID = 0;
-
- /**
- * Constant indicating that the column represents an IInstallableUnit's name
- */
- public final static int COLUMN_NAME = 1;
-
- /**
- * Constant indicating that the column represents an IInstallableUnit's version
- */
- public final static int COLUMN_VERSION = 2;
-
- /**
- * Constant indicating that the column represents an IInstallableUnit's size
- */
- public final static int COLUMN_SIZE = 3;
-
- private String columnTitle;
- private int columnType;
- private int columnWidth;
- private int columnWidthInPixels;
-
- /**
- * Create an IUColumnConfig describing a column with the specified title, type, and
- * default width.
- *
- * @param title the title that should appear for the column
- * @param columnType the type of column represented. The type may be used to determine
- * appropriate size or formatting of the column's content.
- * @param columnWidthInChars the width (in characters) that should be used for the column if no
- * other width is specified by the client.
- */
-
- public IUColumnConfig(String title, int columnType, int columnWidthInChars) {
- this.columnTitle = title;
- this.columnType = columnType;
- this.columnWidth = columnWidthInChars;
- this.columnWidthInPixels = -1;
- }
-
- /**
- * Return the title of the column.
- * @return the title that should be used for the column.
- *
- * @since 3.6
- */
- public String getColumnTitle() {
- return columnTitle;
- }
-
- /**
- * Set the title of the column
- * @param title the String that should be used when the column's title is shown
- *
- * @since 3.6
- */
- public void setColumnTitle(String title) {
- this.columnTitle = title;
- }
-
- /**
- * Return the width of the column in character width units
- * @return the width (in characters) of the column
- *
- * @since 3.6
- */
- public int getWidthInChars() {
- return columnWidth;
- }
-
- /**
- * Set the width of the column in character width units
- * @param columnWidth the width (in characters) of the column
- *
- * @since 3.6
- */
- public void setWidthInChars(int columnWidth) {
- this.columnWidth = columnWidth;
- }
-
- /**
- * Get the width in pixels of this column when displayed in the specified
- * control. If a specific width in pixels has already been specified by a client,
- * that width is used. Otherwise, the value is computed based on the character
- * width specified for the column.
- * @param control
- * @return the width in pixels that should be used for the column
- *
- * @since 3.6
- *
- * @see #setWidthInPixels(int)
- */
- public int getWidthInPixels(Control control) {
- if (columnWidthInPixels >= 0)
- return columnWidthInPixels;
-
- GC gc = new GC(control);
- FontMetrics fm = gc.getFontMetrics();
- columnWidthInPixels = Dialog.convertWidthInCharsToPixels(fm, columnWidth);
- gc.dispose();
- return columnWidthInPixels;
- }
-
- /**
- * Set the width in pixels that should be used for this column. This width overrides
- * any character width that has been specified. This method is useful when the column width
- * is determined by user action.
- *
- * @param width
- *
- * @since 3.6
- */
- public void setWidthInPixels(int width) {
- this.columnWidthInPixels = width;
- }
-
- /**
- * Return the type of column.
- * @return an Integer constant specifying the type of data being shown in the column.
- *
- * @since 3.6
- * @see #COLUMN_ID
- * @see #COLUMN_NAME
- * @see #COLUMN_SIZE
- * @see #COLUMN_VERSION
- */
- public int getColumnType() {
- return columnType;
- }
-
- /**
- * Set the type of column.
- * @param type an Integer constant specifying the type of data being shown in the column.
- *
- * @since 3.6
- *
- * @see #COLUMN_ID
- * @see #COLUMN_NAME
- * @see #COLUMN_SIZE
- * @see #COLUMN_VERSION
- */
- public void setColumnType(int type) {
- this.columnType = type;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java
deleted file mode 100644
index e742aeca9..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUComparator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-
-public class IUComparator extends ViewerComparator {
- public static final int IU_NAME = 0;
- public static final int IU_ID = 1;
- private int key;
- private boolean showingId = false;
-
- public IUComparator(int sortKey) {
- this.key = sortKey;
- showingId = sortKey == IU_ID;
- }
-
- /**
- * Use the specified column config to determine
- * whether the id should be used in lieu of an empty name
- * when sorting.
- *
- * @param columnConfig
- */
- public void useColumnConfig(IUColumnConfig[] columnConfig) {
- for (int i = 0; i < columnConfig.length; i++)
- if (columnConfig[i].getColumnType() == IUColumnConfig.COLUMN_ID) {
- showingId = true;
- break;
- }
- }
-
- public int compare(Viewer viewer, Object obj1, Object obj2) {
- IInstallableUnit iu1 = ProvUI.getAdapter(obj1, IInstallableUnit.class);
- IInstallableUnit iu2 = ProvUI.getAdapter(obj2, IInstallableUnit.class);
- if (iu1 == null || iu2 == null)
- // If these are not iu's use the super class comparator.
- return super.compare(viewer, obj1, obj2);
-
- String key1, key2;
- if (key == IU_NAME) {
- // Compare the iu names in the default locale.
- // If a name is not defined, we use blank if we know the id is shown in another
- // column. If the id is not shown elsewhere, then we are displaying it, so use
- // the id instead.
- key1 = iu1.getProperty(IInstallableUnit.PROP_NAME, null);
- if (key1 == null)
- if (showingId)
- key1 = ""; //$NON-NLS-1$
- else
- key1 = iu1.getId();
- key2 = iu2.getProperty(IInstallableUnit.PROP_NAME, null);
- if (key2 == null)
- if (showingId)
- key2 = ""; //$NON-NLS-1$
- else
- key2 = iu2.getId();
- } else {
- key1 = iu1.getId();
- key2 = iu2.getId();
- }
-
- int result = 0;
- result = key1.compareToIgnoreCase(key2);
- if (result == 0) {
- // We want to show later versions first so compare backwards.
- result = iu2.getVersion().compareTo(iu1.getVersion());
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java
deleted file mode 100644
index 3903e0d12..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDetailsLabelProvider.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import java.text.NumberFormat;
-import java.util.HashMap;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.model.IIUElement;
-import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.FilteredTree;
-
-/**
- * Label provider for showing IU's in a table. Clients can configure
- * what is shown in each column.
- *
- * @since 3.4
- */
-public class IUDetailsLabelProvider extends ColumnLabelProvider implements ITableLabelProvider, IFontProvider {
- final static int PRIMARY_COLUMN = 0;
- final static String BLANK = ""; //$NON-NLS-1$
- private String toolTipProperty = null;
- private FilteredTree filteredTree;
- private boolean useBoldFont = false;
- private boolean showingId = false;
-
- private IUColumnConfig[] columnConfig;
- Shell shell;
- HashMap<IIUElement, Job> jobs = new HashMap<IIUElement, Job>();
-
- public IUDetailsLabelProvider() {
- this(null, null, null);
- }
-
- public IUDetailsLabelProvider(FilteredTree filteredTree, IUColumnConfig[] columnConfig, Shell shell) {
- this.filteredTree = filteredTree;
- if (columnConfig == null)
- this.columnConfig = ProvUI.getIUColumnConfig();
- else
- this.columnConfig = columnConfig;
- for (int i = 0; i < this.columnConfig.length; i++)
- if (this.columnConfig[i].getColumnType() == IUColumnConfig.COLUMN_ID) {
- showingId = true;
- break;
- }
- this.shell = shell;
- }
-
- public String getText(Object obj) {
- return getColumnText(obj, PRIMARY_COLUMN);
- }
-
- public Image getImage(Object obj) {
- return getColumnImage(obj, PRIMARY_COLUMN);
- }
-
- public String getColumnText(Object element, int columnIndex) {
- int columnContent = IUColumnConfig.COLUMN_ID;
- if (columnIndex < columnConfig.length) {
- columnContent = columnConfig[columnIndex].getColumnType();
- }
-
- IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
- if (iu == null) {
- if (columnIndex == 0) {
- if (element instanceof ProvElement)
- return ((ProvElement) element).getLabel(element);
- return element.toString();
- }
- return BLANK;
- }
-
- switch (columnContent) {
- case IUColumnConfig.COLUMN_ID :
- return iu.getId();
- case IUColumnConfig.COLUMN_NAME :
- // Get the iu name in the current locale
- String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
- if (name != null)
- return name;
- // If the iu name is not available, we return blank if we know know we are
- // showing id in another column. Otherwise we return id so the user doesn't
- // see blank iu's.
- if (showingId)
- return BLANK;
- return iu.getId();
- case IUColumnConfig.COLUMN_VERSION :
- // If it's an element, determine if version should be shown
- if (element instanceof IIUElement) {
- if (((IIUElement) element).shouldShowVersion())
- return iu.getVersion().toString();
- return BLANK;
- }
- // It's a raw IU, return the version
- return iu.getVersion().toString();
-
- case IUColumnConfig.COLUMN_SIZE :
- if (element instanceof IIUElement && ((IIUElement) element).shouldShowSize())
- return getIUSize((IIUElement) element);
- return BLANK;
- }
- return BLANK;
- }
-
- public Image getColumnImage(Object element, int index) {
- if (index == PRIMARY_COLUMN) {
- if (element instanceof ProvElement)
- return ((ProvElement) element).getImage(element);
- if (ProvUI.getAdapter(element, IInstallableUnit.class) != null)
- return ProvUIImages.getImage(ProvUIImages.IMG_IU);
- }
- return null;
- }
-
- private String getIUSize(final IIUElement element) {
- long size = element.getSize();
- // If size is already known, or we already tried
- // to get it, don't try again
- if (size != ProvUI.SIZE_UNKNOWN)
- return getFormattedSize(size);
- if (!jobs.containsKey(element)) {
- Job resolveJob = new Job(element.getIU().getId()) {
-
- protected IStatus run(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
-
- if (shell == null || shell.isDisposed())
- return Status.CANCEL_STATUS;
-
- element.computeSize(monitor);
-
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
-
- // If we still could not compute size, give up
- if (element.getSize() == ProvUI.SIZE_UNKNOWN)
- return Status.OK_STATUS;
-
- if (shell == null || shell.isDisposed())
- return Status.CANCEL_STATUS;
-
- shell.getDisplay().asyncExec(new Runnable() {
-
- public void run() {
- if (shell != null && !shell.isDisposed())
- fireLabelProviderChanged(new LabelProviderChangedEvent(IUDetailsLabelProvider.this, element));
- }
- });
-
- return Status.OK_STATUS;
- }
- };
- jobs.put(element, resolveJob);
- resolveJob.setSystem(true);
- resolveJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- jobs.remove(element);
- }
- });
- resolveJob.schedule();
- }
- return ProvUIMessages.IUDetailsLabelProvider_ComputingSize;
- }
-
- private String getFormattedSize(long size) {
- if (size == ProvUI.SIZE_UNKNOWN || size == ProvUI.SIZE_UNAVAILABLE)
- return ProvUIMessages.IUDetailsLabelProvider_Unknown;
- if (size > 1000L) {
- long kb = size / 1000L;
- return NLS.bind(ProvUIMessages.IUDetailsLabelProvider_KB, NumberFormat.getInstance().format(new Long(kb)));
- }
- return NLS.bind(ProvUIMessages.IUDetailsLabelProvider_Bytes, NumberFormat.getInstance().format(new Long(size)));
- }
-
- public void setToolTipProperty(String propertyName) {
- toolTipProperty = propertyName;
- }
-
- public String getClipboardText(Object element, String columnDelimiter) {
- StringBuffer result = new StringBuffer();
- for (int i = 0; i < columnConfig.length; i++) {
- if (i != 0)
- result.append(columnDelimiter);
- result.append(getColumnText(element, i));
- }
- return result.toString();
- }
-
- public void setUseBoldFontForFilteredItems(boolean useBoldFont) {
- this.useBoldFont = useBoldFont;
- }
-
- public String getToolTipText(Object element) {
- IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
- if (iu == null || toolTipProperty == null)
- return null;
- return iu.getProperty(toolTipProperty, null);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
- */
- public Font getFont(Object element) {
- if (filteredTree != null && useBoldFont) {
- return FilteredTree.getBoldFont(element, filteredTree, filteredTree.getPatternFilter());
- }
- return null;
- }
-
- public void dispose() {
- super.dispose();
- for (Job job : jobs.values())
- job.cancel();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java
deleted file mode 100644
index 57e163043..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/IUDragAdapter.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import java.util.*;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * Implements drag behaviour when IU items are dragged from a repository view.
- *
- * @since 3.4
- */
-public class IUDragAdapter extends DragSourceAdapter {
-
- ISelectionProvider selectionProvider;
-
- /**
- * Constructs a new drag adapter.
- *
- * @param provider
- * The selection provider
- */
- public IUDragAdapter(ISelectionProvider provider) {
- selectionProvider = provider;
- }
-
- /**
- * Set the drag data to represent the local selection of IU's if possible.
- * Fallback to using a text description of each IU.
- */
- public void dragSetData(DragSourceEvent event) {
- IInstallableUnit[] ius = getSelectedIUs();
-
- if (ius == null || ius.length == 0) {
- return;
- }
-
- // use local selection transfer if possible
- if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataType)) {
- event.data = LocalSelectionTransfer.getTransfer().getSelection();
- return;
- }
- // resort to a text transfer
- if (!TextTransfer.getInstance().isSupportedType(event.dataType)) {
- return;
- }
-
- // Get a text description of each IU and set as the drag data
- final StringBuffer buffer = new StringBuffer();
-
- for (int i = 0; i < ius.length; i++) {
- buffer.append(ius[i].toString());
- buffer.append('\n');
- }
- event.data = buffer.toString();
- }
-
- /**
- * Start the drag only if the selection contains IUs.
- */
- public void dragStart(DragSourceEvent event) {
-
- // Focus workaround copied from navigator drag adapter
- DragSource dragSource = (DragSource) event.widget;
- Control control = dragSource.getControl();
- if (control != control.getDisplay().getFocusControl()) {
- event.doit = false;
- return;
- }
-
- // Check the selection
- IStructuredSelection selection = (IStructuredSelection) selectionProvider.getSelection();
- // No drag if nothing is selected
- if (selection.isEmpty()) {
- event.doit = false;
- return;
- }
- if (!areOnlyIUsSelected(selection)) {
- event.doit = false;
- return;
- }
- LocalSelectionTransfer.getTransfer().setSelection(selection);
- event.doit = true;
- }
-
- private IInstallableUnit[] getSelectedIUs() {
- List<IInstallableUnit> ius = new ArrayList<IInstallableUnit>();
-
- ISelection selection = selectionProvider.getSelection();
- if (!(selection instanceof IStructuredSelection) || selection.isEmpty()) {
- return null;
- }
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-
- Iterator<?> iter = structuredSelection.iterator();
- while (iter.hasNext()) {
- IInstallableUnit iu = ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
- if (iu != null) {
- ius.add(iu);
- }
- }
- return ius.toArray(new IInstallableUnit[ius.size()]);
- }
-
- private boolean areOnlyIUsSelected(IStructuredSelection selection) {
- Iterator<?> iter = selection.iterator();
- while (iter.hasNext()) {
- IInstallableUnit iu = ProvUI.getAdapter(iter.next(), IInstallableUnit.class);
- if (iu == null) {
- return false;
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java
deleted file mode 100644
index c99157838..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/MetadataRepositoryElementComparator.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.model.MetadataRepositoryElement;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-
-/**
- *
- * @since 3.5
- */
-public class MetadataRepositoryElementComparator extends ViewerComparator {
- private int key;
- private static final String ENABLED = "XX"; //$NON-NLS-1$ // Value doesn't matter, just that it's not BLANK
- private static final String BLANK = ""; //$NON-NLS-1$
- private static final int ASCENDING = 1;
- private static final int DESCENDING = -1;
- private int primaryKeyDirection = ASCENDING;
-
- public MetadataRepositoryElementComparator(int sortKey) {
- this.key = sortKey;
- }
-
- public int compare(Viewer viewer, Object obj1, Object obj2) {
- MetadataRepositoryElement repo1 = obj1 instanceof MetadataRepositoryElement ? (MetadataRepositoryElement) obj1 : null;
- MetadataRepositoryElement repo2 = obj2 instanceof MetadataRepositoryElement ? (MetadataRepositoryElement) obj2 : null;
- if (repo1 == null || repo2 == null)
- // If these are not both metadata repository elements, use the super class comparator.
- return super.compare(viewer, obj1, obj2);
- int result = compare(repo1, repo2, key, primaryKeyDirection);
- if (result == 0) {
- int secondaryKey = getSecondaryKeyFor(key);
- if (secondaryKey < 0)
- return result;
- result = compare(repo1, repo2, secondaryKey, ASCENDING);
- if (result == 0)
- result = compare(repo1, repo2, getSecondaryKeyFor(secondaryKey), ASCENDING);
- }
- return result;
- }
-
- int compare(MetadataRepositoryElement repo1, MetadataRepositoryElement repo2, int sortKey, int direction) {
- String key1, key2;
- if (sortKey == RepositoryDetailsLabelProvider.COL_NAME) {
- // Compare the repo names
- key1 = repo1.getName();
- key2 = repo2.getName();
- } else if (sortKey == RepositoryDetailsLabelProvider.COL_LOCATION) {
- key1 = URIUtil.toUnencodedString(repo1.getLocation());
- key2 = URIUtil.toUnencodedString(repo2.getLocation());
- } else { // COL_ENABLEMENT
- key1 = repo1.isEnabled() ? ENABLED : BLANK;
- key2 = repo2.isEnabled() ? ENABLED : BLANK;
- }
- // If the key is blank (no location, or disabled)..it should appear last
- if (key1.length() == 0 && key2.length() > 0)
- return direction;
- if (key1.length() > 0 && key2.length() == 0)
- return direction * -1;
- return key1.compareToIgnoreCase(key2) * direction;
- }
-
- private int getSecondaryKeyFor(int primaryKey) {
- // This is the important one - if sorting by enablement, sort by location, since
- // not all repos have a name
- if (primaryKey == RepositoryDetailsLabelProvider.COL_ENABLEMENT)
- return RepositoryDetailsLabelProvider.COL_LOCATION;
- if (primaryKey == RepositoryDetailsLabelProvider.COL_NAME)
- return RepositoryDetailsLabelProvider.COL_LOCATION;
- // unlikely to have duplicate locations requiring a secondary key
- if (primaryKey == RepositoryDetailsLabelProvider.COL_LOCATION)
- return RepositoryDetailsLabelProvider.COL_NAME;
- return -1;
- }
-
- public void sortAscending() {
- primaryKeyDirection = ASCENDING;
- }
-
- public void sortDescending() {
- primaryKeyDirection = DESCENDING;
- }
-
- public boolean isAscending() {
- return primaryKeyDirection == ASCENDING;
- }
-
- public void setSortKey(int key) {
- this.key = key;
- }
-
- public int getSortKey() {
- return key;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java
deleted file mode 100644
index 7eddb3b2c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementComparer.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import java.net.URI;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.viewers.IElementComparer;
-
-public class ProvElementComparer implements IElementComparer {
-
- public boolean equals(Object a, Object b) {
- // We treat category elements specially because this
- // is one case where resolving down to an IU will lose identity
- // differences. (category IU's with the same name and version number cannot be treated the same).
- if (a instanceof CategoryElement || b instanceof CategoryElement)
- return a.equals(b);
- IInstallableUnit iu1 = getIU(a);
- IInstallableUnit iu2 = getIU(b);
- if (iu1 != null && iu2 != null)
- return iu1.equals(iu2);
- String p1 = getProfileId(a);
- String p2 = getProfileId(b);
- if (p1 != null && p2 != null)
- return p1.equals(p2);
- URI r1 = getRepositoryLocation(a);
- URI r2 = getRepositoryLocation(b);
- if (r1 != null && r2 != null)
- return r1.equals(r2);
- return a.equals(b);
- }
-
- public int hashCode(Object element) {
- if (element instanceof CategoryElement)
- return element.hashCode();
- IInstallableUnit iu = getIU(element);
- if (iu != null)
- return iu.hashCode();
- String profileId = getProfileId(element);
- if (profileId != null)
- return profileId.hashCode();
- URI location = getRepositoryLocation(element);
- if (location != null)
- return location.hashCode();
- return element.hashCode();
- }
-
- private IInstallableUnit getIU(Object obj) {
- return ProvUI.getAdapter(obj, IInstallableUnit.class);
- }
-
- private String getProfileId(Object obj) {
- if (obj instanceof ProfileElement)
- return ((ProfileElement) obj).getLabel(obj);
- IProfile profile = ProvUI.getAdapter(obj, IProfile.class);
- if (profile == null)
- return null;
- return profile.getProfileId();
- }
-
- private URI getRepositoryLocation(Object obj) {
- if (obj instanceof IRepositoryElement<?>)
- return ((IRepositoryElement<?>) obj).getLocation();
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java
deleted file mode 100644
index 0bf4635eb..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementContentProvider.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.ProvElement;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.progress.*;
-
-/**
- * Content provider that retrieves children of a ProvElement.
- *
- * @since 3.5
- *
- */
-public class ProvElementContentProvider implements ITreeContentProvider {
-
- private boolean fetchInBackground = false;
- Viewer viewer;
- private Job fetchJob;
- // family is used by test cases
- Object fetchFamily = new Object();
-
- /**
- *
- */
- public ProvElementContentProvider() {
- // Default constructor
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(final Object input) {
- // Simple deferred fetch handling for table viewers
- if (fetchInBackground && input instanceof IDeferredWorkbenchAdapter && viewer instanceof AbstractTableViewer) {
- final Display display = viewer.getControl().getDisplay();
- final Object pending = new PendingUpdateAdapter();
- if (fetchJob != null)
- fetchJob.cancel();
- fetchJob = new Job(ProvUIMessages.ProvElementContentProvider_FetchJobTitle) {
- protected IStatus run(final IProgressMonitor monitor) {
- IDeferredWorkbenchAdapter parent = (IDeferredWorkbenchAdapter) input;
- final ArrayList<Object> children = new ArrayList<Object>();
- parent.fetchDeferredChildren(parent, new IElementCollector() {
- public void add(Object element, IProgressMonitor mon) {
- if (mon.isCanceled())
- return;
- children.add(element);
- }
-
- public void add(Object[] elements, IProgressMonitor mon) {
- if (mon.isCanceled())
- return;
- children.addAll(Arrays.asList(elements));
- }
-
- public void done() {
- // nothing special to do
- }
-
- }, monitor);
- if (!monitor.isCanceled()) {
- display.asyncExec(new Runnable() {
- public void run() {
- AbstractTableViewer tableViewer = (AbstractTableViewer) viewer;
- if (monitor.isCanceled() || tableViewer == null || tableViewer.getControl().isDisposed())
- return;
- tableViewer.getControl().setRedraw(false);
- tableViewer.remove(pending);
- tableViewer.add(children.toArray());
- finishedFetchingElements(input);
- tableViewer.getControl().setRedraw(true);
- }
- });
- }
- return Status.OK_STATUS;
- }
-
- public boolean belongsTo(Object family) {
- return family == fetchFamily;
- }
-
- };
- fetchJob.schedule();
- return new Object[] {pending};
- }
- Object[] elements = getChildren(input);
- finishedFetchingElements(input);
- return elements;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object child) {
- if (child instanceof ProvElement) {
- return ((ProvElement) child).getParent(child);
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof ProvElement)
- return ((ProvElement) element).hasChildren(element);
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
- public Object[] getChildren(final Object parent) {
- if (parent instanceof ProvElement) {
- return ((ProvElement) parent).getChildren(parent);
- }
- return new Object[0];
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- viewer = null;
- if (fetchJob != null) {
- fetchJob.cancel();
- fetchJob = null;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) {
- this.viewer = aViewer;
- if (fetchJob != null) {
- fetchJob.cancel();
- fetchJob = null;
- }
- }
-
- protected void finishedFetchingElements(Object parent) {
- // do nothing
- }
-
- public void setFetchInBackground(boolean fetchInBackground) {
- this.fetchInBackground = fetchInBackground;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
deleted file mode 100644
index 9d71a1fd7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/ProvElementLabelProvider.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.metadata.IRequiredCapability;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.engine.IProfile;
-import org.eclipse.equinox.p2.metadata.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Label provider for provisioning elements. Some provisioning objects are
- * wrapped by ProvElements and some are not. This is the most generic of the
- * provisioning label providers. A two-column format for elements is
- * supported, with the content of the columns dependent on the type of object.
- *
- * @since 3.4
- */
-public class ProvElementLabelProvider extends LabelProvider implements ITableLabelProvider {
-
- public String getText(Object obj) {
- if (obj instanceof ProvElement) {
- return ((ProvElement) obj).getLabel(obj);
- }
- if (obj instanceof IProfile) {
- String name = ((IProfile) obj).getProperty(IProfile.PROP_NAME);
- if (name != null && name.length() > 0)
- return name;
- return ((IProfile) obj).getProfileId();
- }
- if (obj instanceof IInstallableUnit) {
- IInstallableUnit iu = (IInstallableUnit) obj;
- return iu.getId();
- }
- if (obj instanceof IRepository<?>) {
- String name = ((IRepository<?>) obj).getName();
- if (name != null && name.length() > 0) {
- return name;
- }
- return URIUtil.toUnencodedString(((IRepository<?>) obj).getLocation());
- }
- if (obj instanceof IRepositoryElement<?>) {
- String name = ((IRepositoryElement<?>) obj).getName();
- if (name != null && name.length() > 0) {
- return name;
- }
- return URIUtil.toUnencodedString(((IRepositoryElement<?>) obj).getLocation());
- }
- if (obj instanceof IArtifactKey) {
- IArtifactKey key = (IArtifactKey) obj;
- return key.getId() + " [" + key.getClassifier() + "]"; //$NON-NLS-1$//$NON-NLS-2$
- }
- if (obj instanceof IProcessingStepDescriptor) {
- IProcessingStepDescriptor descriptor = (IProcessingStepDescriptor) obj;
- return descriptor.getProcessorId();
- }
- if (obj instanceof IRequiredCapability) {
- return ((IRequiredCapability) obj).getName();
- }
- return obj.toString();
- }
-
- public Image getImage(Object obj) {
- if (obj instanceof ProvElement) {
- return ((ProvElement) obj).getImage(obj);
- }
- if (obj instanceof IProfile) {
- return ProvUIImages.getImage(ProvUIImages.IMG_PROFILE);
- }
- if (obj instanceof IInstallableUnit) {
- return ProvUIImages.getImage(ProvUIImages.IMG_IU);
- }
- if (obj instanceof IArtifactRepository) {
- return ProvUIImages.getImage(ProvUIImages.IMG_ARTIFACT_REPOSITORY);
- }
- if (obj instanceof IMetadataRepository) {
- return ProvUIImages.getImage(ProvUIImages.IMG_METADATA_REPOSITORY);
- }
- if (obj instanceof IArtifactKey) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
- }
- if (obj instanceof IRequirement) {
- return ProvUIImages.getImage(ProvUIImages.IMG_IU);
- }
- return null;
- }
-
- public Image getColumnImage(Object element, int index) {
- if (index == 0) {
- return getImage(element);
- }
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
-
- switch (columnIndex) {
- case 0 :
- return getText(element);
- case 1 :
- if (element instanceof ProfileElement)
- element = ((ProfileElement) element).getAdapter(IProfile.class);
-
- if (element instanceof IProfile) {
- return ((IProfile) element).getProperty(IProfile.PROP_DESCRIPTION);
- }
- if (element instanceof IIUElement) {
- if (((IIUElement) element).shouldShowVersion())
- return ((IIUElement) element).getIU().getVersion().toString();
- }
- IInstallableUnit iu = ProvUI.getAdapter(element, IInstallableUnit.class);
- if (iu != null) {
- return iu.getVersion().toString();
- }
- if (element instanceof IRepository<?>) {
- return URIUtil.toUnencodedString(((IRepository<?>) element).getLocation());
- }
- if (element instanceof IRepositoryElement<?>) {
- return URIUtil.toUnencodedString(((IRepositoryElement<?>) element).getLocation());
- }
- if (element instanceof IArtifactKey) {
- IArtifactKey key = (IArtifactKey) element;
- return key.getVersion().toString();
- }
- if (element instanceof IRequiredCapability) {
- return ((IRequiredCapability) element).getRange().getMaximum().toString();
- }
-
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java
deleted file mode 100644
index 1aa1088ea..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryContentProvider.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
-
-/**
- * Content provider for provisioning repositories. The repositories are the
- * elements and the repository children are retrieved asynchronously
- * using the IDeferredWorkbenchAdapter mechanism.
- *
- * @since 3.4
- *
- */
-public class RepositoryContentProvider extends DeferredQueryContentProvider {
-
- public Object[] getChildren(final Object parent) {
- Object[] children = super.getChildren(parent);
- if (children != null)
- return children;
- if (parent instanceof IArtifactDescriptor) {
- return ((IArtifactDescriptor) parent).getProcessingSteps();
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java
deleted file mode 100644
index 6247d7db2..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/RepositoryDetailsLabelProvider.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.internal.p2.ui.ProvUIImages;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.osgi.util.TextProcessor;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Label provider for repository elements. The column structure is
- * assumed to be known by the caller who sets up the columns
- *
- * @since 3.5
- */
-public class RepositoryDetailsLabelProvider extends LabelProvider implements ITableLabelProvider {
- public static final int COL_NAME = 0;
- public static final int COL_LOCATION = 1;
- public static final int COL_ENABLEMENT = 2;
-
- public Image getImage(Object obj) {
- if (obj instanceof ProvElement) {
- return ((ProvElement) obj).getImage(obj);
- }
- if (obj instanceof IArtifactRepository) {
- return ProvUIImages.getImage(ProvUIImages.IMG_ARTIFACT_REPOSITORY);
- }
- if (obj instanceof IMetadataRepository) {
- return ProvUIImages.getImage(ProvUIImages.IMG_METADATA_REPOSITORY);
- }
- return null;
- }
-
- public Image getColumnImage(Object element, int index) {
- if (index == 0) {
- return getImage(element);
- }
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
-
- switch (columnIndex) {
- case COL_NAME :
- if (element instanceof IRepositoryElement<?>) {
- String name = ((IRepositoryElement<?>) element).getName();
- if (name != null) {
- return name;
- }
- }
- if (element instanceof IRepository<?>) {
- String name = ((IRepository<?>) element).getName();
- if (name != null) {
- return name;
- }
- }
- return ""; //$NON-NLS-1$
- case COL_LOCATION :
- if (element instanceof IRepository<?>) {
- return TextProcessor.process(URIUtil.toUnencodedString(((IRepository<?>) element).getLocation()));
- }
- if (element instanceof IRepositoryElement<?>) {
- return TextProcessor.process(URIUtil.toUnencodedString(((IRepositoryElement<?>) element).getLocation()));
- }
- break;
- case COL_ENABLEMENT :
- if (element instanceof MetadataRepositoryElement)
- return ((MetadataRepositoryElement) element).isEnabled() ? ProvUIMessages.RepositoryDetailsLabelProvider_Enabled : ProvUIMessages.RepositoryDetailsLabelProvider_Disabled;
-
- }
- return null;
- }
-
- public String getClipboardText(Object element, String columnDelimiter) {
- StringBuffer result = new StringBuffer();
- result.append(getColumnText(element, COL_NAME));
- result.append(columnDelimiter);
- result.append(getColumnText(element, COL_LOCATION));
- result.append(columnDelimiter);
- result.append(getColumnText(element, COL_ENABLEMENT));
- return result.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java
deleted file mode 100644
index 733fd9e52..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/StructuredViewerProvisioningListener.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.ui.viewers;
-
-import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
-import org.eclipse.equinox.internal.p2.ui.model.ProfileElement;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * ProvisioningListener which updates a structured viewer based on
- * provisioning changes. Provides default behavior which refreshes particular
- * model elements or the entire viewer based on the nature of the change and the
- * changes that the client is interested in. Subclasses typically only need
- * override when there is additional, specialized behavior required.
- *
- * @since 3.4
- */
-public class StructuredViewerProvisioningListener extends ProvUIProvisioningListener {
-
- StructuredViewer viewer;
- Display display;
-
- public StructuredViewerProvisioningListener(String name, StructuredViewer viewer, int eventTypes) {
- super(name, eventTypes);
- this.viewer = viewer;
- this.display = viewer.getControl().getDisplay();
- }
-
- /**
- * A repository has been added. The default behavior is to
- * refresh the viewer. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param event the RepositoryEvent describing the details
- */
- protected void repositoryAdded(RepositoryEvent event) {
- safeRefresh();
- }
-
- /**
- * A repository has been removed. The default behavior is to
- * refresh the viewer. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param event the RepositoryEvent describing the details
- */
- protected void repositoryRemoved(RepositoryEvent event) {
- safeRefresh();
- }
-
- /**
- * A repository has been discovered. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param event the RepositoryEvent describing the details
- */
- protected void repositoryDiscovered(RepositoryEvent event) {
- // Do nothing for now
- }
-
- /**
- * A repository has changed. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param event the RepositoryEvent describing the details
- */
- protected void repositoryChanged(RepositoryEvent event) {
- // Do nothing for now. When this event is actually used in
- // the core, we may want to refresh particular elements the way
- // we currently refresh a profile element.
- }
-
- /**
- * The specified profile has changed. The default behavior is to refresh the viewer
- * with a profile element of the matching id. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param profileId the id of the profile that changed.
- */
- protected void profileChanged(final String profileId) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (isClosing())
- return;
- // We want to refresh the affected profile, so we
- // construct a profile element on this profile.
- ProfileElement element = new ProfileElement(null, profileId);
- viewer.refresh(element);
- }
- });
- }
-
- /**
- * The specified profile has been added. The default behavior is to fully
- * refresh the associated viewer. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param profileId the id of the profile that has been added.
- */
- protected void profileAdded(final String profileId) {
- safeRefresh();
- }
-
- /**
- * The specified profile has been removed. The default behavior is to fully
- * refresh the associated viewer. Subclasses may override. May be called
- * from a non-UI thread.
- *
- * @param profileId the id of the profile that has been removed.
- */
- protected void profileRemoved(final String profileId) {
- safeRefresh();
- }
-
- protected void safeRefresh() {
- if (Display.getCurrent() != null) {
- refreshViewer();
- return;
- }
-
- display.asyncExec(new Runnable() {
- public void run() {
- if (isClosing())
- return;
- refreshViewer();
- }
- });
- }
-
- protected void refreshAll() {
- safeRefresh();
- }
-
- /**
- * Refresh the entire structure of the viewer. Subclasses may
- * override to ensure that any caching done in content providers or
- * model elements is refreshed before the viewer is refreshed. This will
- * always be called from the UI thread.
- */
- protected void refreshViewer() {
- viewer.refresh();
- }
-
- /**
- * Return whether the viewer is closing or shutting down.
- * This method should be used in async execs to ensure that
- * the viewer is still alive.
- * @return a boolean indicating whether the viewer is closing
- */
- protected boolean isClosing() {
- IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench.isClosing())
- return true;
-
- if (viewer.getControl().isDisposed())
- return true;
-
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java
deleted file mode 100644
index 6bba70523..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/AcceptLicensesWizardPage.java
+++ /dev/null
@@ -1,488 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.ui;
-
-import java.util.*;
-import java.util.List;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.metadata.License;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
-import org.eclipse.equinox.internal.p2.ui.dialogs.ILayoutConstants;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.equinox.p2.engine.IProvisioningPlan;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.metadata.ILicense;
-import org.eclipse.equinox.p2.operations.*;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-
-/**
- * AcceptLicensesWizardPage shows a list of the IU's that have
- * licenses that have not been approved by the user, and allows the
- * user to approve them.
- *
- * @since 2.0
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class AcceptLicensesWizardPage extends WizardPage {
- private static final String DIALOG_SETTINGS_SECTION = "LicensessPage"; //$NON-NLS-1$
- private static final String LIST_WEIGHT = "ListSashWeight"; //$NON-NLS-1$
- private static final String LICENSE_WEIGHT = "LicenseSashWeight"; //$NON-NLS-1$
- private static final String NAME_COLUMN_WIDTH = "NameColumnWidth"; //$NON-NLS-1$
- private static final String VERSION_COLUMN_WIDTH = "VersionColumnWidth"; //$NON-NLS-1$
-
- class IUWithLicenseParent {
- IInstallableUnit iu;
- ILicense license;
-
- IUWithLicenseParent(ILicense license, IInstallableUnit iu) {
- this.license = license;
- this.iu = iu;
- }
- }
-
- class LicenseContentProvider implements ITreeContentProvider {
- public Object[] getChildren(Object parentElement) {
- if (!(parentElement instanceof ILicense))
- return new Object[0];
-
- if (licensesToIUs.containsKey(parentElement)) {
- List<IInstallableUnit> iusWithLicense = licensesToIUs.get(parentElement);
- IInstallableUnit[] ius = iusWithLicense.toArray(new IInstallableUnit[iusWithLicense.size()]);
- IUWithLicenseParent[] children = new IUWithLicenseParent[ius.length];
- for (int i = 0; i < ius.length; i++) {
- children[i] = new IUWithLicenseParent((ILicense) parentElement, ius[i]);
- }
- return children;
- }
- return null;
- }
-
- public Object getParent(Object element) {
- if (element instanceof IUWithLicenseParent) {
- return ((IUWithLicenseParent) element).license;
- }
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return licensesToIUs.containsKey(element);
- }
-
- public Object[] getElements(Object inputElement) {
- return licensesToIUs.keySet().toArray();
- }
-
- public void dispose() {
- // Nothing to do
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // Nothing to do
- }
- }
-
- class LicenseLabelProvider extends LabelProvider {
- public Image getImage(Object element) {
- return null;
- }
-
- public String getText(Object element) {
- if (element instanceof License) {
- return getFirstLine(((License) element).getBody());
- } else if (element instanceof IUWithLicenseParent) {
- return getIUName(((IUWithLicenseParent) element).iu);
- } else if (element instanceof IInstallableUnit) {
- return getIUName((IInstallableUnit) element);
- }
- return ""; //$NON-NLS-1$
- }
-
- private String getFirstLine(String body) {
- int i = body.indexOf('\n');
- int j = body.indexOf('\r');
- if (i > 0) {
- if (j > 0)
- return body.substring(0, i < j ? i : j);
- return body.substring(0, i);
- } else if (j > 0) {
- return body.substring(0, j);
- }
- return body;
- }
- }
-
- TreeViewer iuViewer;
- Text licenseTextBox;
- Button acceptButton;
- Button declineButton;
- SashForm sashForm;
- private IInstallableUnit[] originalIUs;
- HashMap<ILicense, List<IInstallableUnit>> licensesToIUs; // License -> IU Name
- private LicenseManager manager;
- IUColumnConfig nameColumn;
- IUColumnConfig versionColumn;
-
- static String getIUName(IInstallableUnit iu) {
- StringBuffer buf = new StringBuffer();
- String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
- if (name != null)
- buf.append(name);
- else
- buf.append(iu.getId());
- buf.append(" "); //$NON-NLS-1$
- buf.append(iu.getVersion().toString());
- return buf.toString();
- }
-
- /**
- * Create a license acceptance page for showing licenses to the user.
- *
- * @param manager the license manager that should be used to check for already accepted licenses. May be <code>null</code>.
- * @param ius the IInstallableUnits for which licenses should be checked
- * @param operation the provisioning operation describing what changes are to take place on the profile
- */
- public AcceptLicensesWizardPage(LicenseManager manager, IInstallableUnit[] ius, ProfileChangeOperation operation) {
- super("AcceptLicenses"); //$NON-NLS-1$
- setTitle(ProvUIMessages.AcceptLicensesWizardPage_Title);
- this.manager = manager;
- update(ius, operation);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
- List<IInstallableUnit> ius;
- if (licensesToIUs == null || licensesToIUs.size() == 0) {
- Label label = new Label(parent, SWT.NONE);
- setControl(label);
- } else if (licensesToIUs.size() == 1 && (ius = licensesToIUs.values().iterator().next()).size() == 1) {
- createLicenseContentSection(parent, ius.get(0));
- } else {
- sashForm = new SashForm(parent, SWT.HORIZONTAL);
- sashForm.setLayout(new GridLayout());
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- sashForm.setLayoutData(gd);
-
- createLicenseListSection(sashForm);
- createLicenseContentSection(sashForm, null);
- sashForm.setWeights(getSashWeights());
- setControl(sashForm);
- }
- Dialog.applyDialogFont(getControl());
- }
-
- private void createLicenseListSection(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gd);
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(ProvUIMessages.AcceptLicensesWizardPage_ItemsLabel);
- iuViewer = new TreeViewer(composite, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- iuViewer.setContentProvider(new LicenseContentProvider());
- iuViewer.setLabelProvider(new LicenseLabelProvider());
- iuViewer.setComparator(new ViewerComparator());
- iuViewer.setInput(licensesToIUs);
-
- iuViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleSelectionChanged((IStructuredSelection) event.getSelection());
- }
-
- });
- gd = new GridData(GridData.FILL_BOTH);
- gd.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH);
- gd.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
- iuViewer.getControl().setLayoutData(gd);
- }
-
- private void createLicenseAcceptSection(Composite parent, boolean multiple) {
- // Buttons for accepting licenses
- Composite buttonContainer = new Composite(parent, SWT.NULL);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- buttonContainer.setLayout(new GridLayout());
- buttonContainer.setLayoutData(gd);
-
- acceptButton = new Button(buttonContainer, SWT.RADIO);
- if (multiple)
- acceptButton.setText(ProvUIMessages.AcceptLicensesWizardPage_AcceptMultiple);
- else
- acceptButton.setText(ProvUIMessages.AcceptLicensesWizardPage_AcceptSingle);
-
- acceptButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setPageComplete(acceptButton.getSelection());
- }
- });
- declineButton = new Button(buttonContainer, SWT.RADIO);
- if (multiple)
- declineButton.setText(ProvUIMessages.AcceptLicensesWizardPage_RejectMultiple);
- else
- declineButton.setText(ProvUIMessages.AcceptLicensesWizardPage_RejectSingle);
- declineButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setPageComplete(!declineButton.getSelection());
- }
- });
-
- acceptButton.setSelection(false);
- declineButton.setSelection(true);
- }
-
- private void createLicenseContentSection(Composite parent, IInstallableUnit singleIU) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gd);
-
- Label label = new Label(composite, SWT.NONE);
- if (singleIU == null)
- label.setText(ProvUIMessages.AcceptLicensesWizardPage_LicenseTextLabel);
- else
- label.setText(NLS.bind(ProvUIMessages.AcceptLicensesWizardPage_SingleLicenseTextLabel, getIUName(singleIU)));
- licenseTextBox = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP | SWT.READ_ONLY);
- licenseTextBox.setBackground(licenseTextBox.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- initializeDialogUnits(licenseTextBox);
- gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- gd.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
- gd.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH);
- licenseTextBox.setLayoutData(gd);
-
- createLicenseAcceptSection(composite, licensesToIUs.size() > 1);
-
- if (singleIU != null) {
- String licenseBody = ""; //$NON-NLS-1$
- // We've already established before calling this method that it's a single IU with a single license
- Iterator<ILicense> licenses = singleIU.getLicenses(null).iterator();
- ILicense license = licenses.hasNext() ? licenses.next() : null;
- if (license != null && license.getBody() != null) {
- licenseBody = license.getBody();
- }
- licenseTextBox.setText(licenseBody);
- }
- setControl(composite);
- }
-
- void handleSelectionChanged(IStructuredSelection selection) {
- if (!selection.isEmpty()) {
- Object selected = selection.getFirstElement();
- if (selected instanceof License)
- licenseTextBox.setText(((License) selected).getBody());
- else if (selected instanceof IUWithLicenseParent)
- licenseTextBox.setText(((IUWithLicenseParent) selected).license.getBody());
- }
- }
-
- /**
- * The wizard is finishing. Perform any necessary processing.
- *
- * @return <code>true</code> if the finish can proceed,
- * <code>false</code> if it should not.
- */
- public boolean performFinish() {
- rememberAcceptedLicenses();
- return true;
- }
-
- /**
- * Return a boolean indicating whether there are licenses that must be accepted
- * by the user.
- *
- * @return <code>true</code> if there are licenses that must be accepted, and
- * <code>false</code> if there are no licenses that must be accepted.
- */
- public boolean hasLicensesToAccept() {
- return licensesToIUs != null && licensesToIUs.size() > 0;
- }
-
- /**
- * Update the current page to show the licenses that must be approved for the
- * selected IUs and the provisioning plan.
- *
- * Clients using this page in conjunction with a {@link ProfileChangeOperation} should
- * instead use {@link #update(IInstallableUnit[], ProfileChangeOperation)}. This
- * method is intended for clients who are working with a low-level provisioning plan
- * rather than an {@link InstallOperation} or {@link UpdateOperation}.
- *
- * @param theIUs the installable units to be installed for which licenses must be checked
- * @param plan the provisioning plan that describes a resolved install operation
- *
- * @see #update(IInstallableUnit[], ProfileChangeOperation)
- */
-
- public void updateForPlan(IInstallableUnit[] theIUs, IProvisioningPlan plan) {
- updateLicenses(theIUs, plan);
- }
-
- private void updateLicenses(IInstallableUnit[] theIUs, IProvisioningPlan plan) {
- this.originalIUs = theIUs;
- if (theIUs == null)
- licensesToIUs = new HashMap<ILicense, List<IInstallableUnit>>();
- else
- findUnacceptedLicenses(theIUs, plan);
- setDescription();
- setPageComplete(licensesToIUs.size() == 0);
- if (getControl() != null) {
- Composite parent = getControl().getParent();
- getControl().dispose();
- createControl(parent);
- parent.layout(true);
- }
- }
-
- /**
- * Update the page for the specified IInstallableUnits and operation.
- *
- * @param theIUs the IInstallableUnits for which licenses should be checked
- * @param operation the operation describing the pending profile change
- */
- public void update(IInstallableUnit[] theIUs, ProfileChangeOperation operation) {
- if (operation != null && operation.hasResolved()) {
- int sev = operation.getResolutionResult().getSeverity();
- if (sev != IStatus.ERROR && sev != IStatus.CANCEL) {
- updateLicenses(theIUs, operation.getProvisioningPlan());
- } else {
- updateLicenses(new IInstallableUnit[0], null);
- }
- }
- }
-
- private void findUnacceptedLicenses(IInstallableUnit[] selectedIUs, IProvisioningPlan plan) {
- IInstallableUnit[] iusToCheck = selectedIUs;
- if (plan != null) {
- iusToCheck = plan.getAdditions().query(QueryUtil.createIUAnyQuery(), null).toArray(IInstallableUnit.class);
- }
-
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=218532
- // Current metadata generation can result with a feature group IU and the feature jar IU
- // having the same name and license. We will weed out duplicates if the license and name are both
- // the same.
- licensesToIUs = new HashMap<ILicense, List<IInstallableUnit>>();//map of License->ArrayList of IUs with that license
- HashMap<ILicense, HashSet<String>> namesSeen = new HashMap<ILicense, HashSet<String>>(); // map of License->HashSet of names with that license
- for (int i = 0; i < iusToCheck.length; i++) {
- IInstallableUnit iu = iusToCheck[i];
- for (ILicense license : iu.getLicenses(null)) {
- if (manager != null && !manager.isAccepted(license)) {
- String name = iu.getProperty(IInstallableUnit.PROP_NAME, null);
- if (name == null)
- name = iu.getId();
- // Have we already found this license?
- if (licensesToIUs.containsKey(license)) {
- HashSet<String> names = namesSeen.get(license);
- if (!names.contains(name)) {
- names.add(name);
- ((ArrayList<IInstallableUnit>) licensesToIUs.get(license)).add(iu);
- }
- } else {
- ArrayList<IInstallableUnit> list = new ArrayList<IInstallableUnit>(1);
- list.add(iu);
- licensesToIUs.put(license, list);
- HashSet<String> names = new HashSet<String>(1);
- names.add(name);
- namesSeen.put(license, names);
- }
- }
- }
- }
- }
-
- private void rememberAcceptedLicenses() {
- if (licensesToIUs == null || manager == null)
- return;
- for (ILicense license : licensesToIUs.keySet())
- manager.accept(license);
- }
-
- private void setDescription() {
- // No licenses but the page is open. Shouldn't happen, but just in case...
- if (licensesToIUs == null || licensesToIUs.size() == 0)
- setDescription(ProvUIMessages.AcceptLicensesWizardPage_NoLicensesDescription);
- // We have licenses. Use a generic message if we think we aren't showing extra
- // licenses from required IU's. This check is not entirely accurate, for example
- // one root IU could have no license and the next one has two different
- // IU's with different licenses. But this cheaply catches the common cases.
- else if (licensesToIUs.size() <= originalIUs.length)
- setDescription(ProvUIMessages.AcceptLicensesWizardPage_ReviewLicensesDescription);
- else {
- // Without a doubt we know we are showing extra licenses.
- setDescription(ProvUIMessages.AcceptLicensesWizardPage_ReviewExtraLicensesDescription);
- }
- }
-
- private String getDialogSettingsName() {
- return getWizard().getClass().getName() + "." + DIALOG_SETTINGS_SECTION; //$NON-NLS-1$
- }
-
- /**
- * Save any settings related to the current size and location of the wizard page.
- */
- public void saveBoundsRelatedSettings() {
- if (iuViewer == null || iuViewer.getTree().isDisposed())
- return;
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsName());
- if (section == null) {
- section = settings.addNewSection(getDialogSettingsName());
- }
- section.put(NAME_COLUMN_WIDTH, iuViewer.getTree().getColumn(0).getWidth());
- section.put(VERSION_COLUMN_WIDTH, iuViewer.getTree().getColumn(1).getWidth());
-
- if (sashForm == null || sashForm.isDisposed())
- return;
- int[] weights = sashForm.getWeights();
- section.put(LIST_WEIGHT, weights[0]);
- section.put(LICENSE_WEIGHT, weights[1]);
- }
-
- private int[] getSashWeights() {
- IDialogSettings settings = ProvUIActivator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getDialogSettingsName());
- if (section != null) {
- try {
- int[] weights = new int[2];
- if (section.get(LIST_WEIGHT) != null) {
- weights[0] = section.getInt(LIST_WEIGHT);
- if (section.get(LICENSE_WEIGHT) != null) {
- weights[1] = section.getInt(LICENSE_WEIGHT);
- return weights;
- }
- }
- } catch (NumberFormatException e) {
- // Ignore if there actually was a value that didn't parse.
- }
- }
- return new int[] {55, 45};
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java
deleted file mode 100644
index 70f2d1080..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ICopyable.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.ui;
-
-import org.eclipse.swt.widgets.Control;
-
-/**
- * ICopyable defines an interface for elements that provide
- * copy support in a UI. The active control in the UI determines
- * what should be copied.
- *
- * @since 2.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface ICopyable {
- /**
- * Copy text related to the active control to the clipboard.
- *
- * @param activeControl the active control
- */
- public void copyToClipboard(Control activeControl);
-}
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
deleted file mode 100644
index 906213ecc..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/InstalledSoftwarePage.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.actions.*;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUColumnConfig;
-import org.eclipse.equinox.internal.p2.ui.viewers.IUDetailsLabelProvider;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.SameShellProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.about.InstallationPage;
-import org.eclipse.ui.menus.AbstractContributionFactory;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * InstalledSoftwarePage displays a profile's IInstallableUnits in
- * an Installation Page. Clients can use this class as the implementation
- * class for an installationPages extension.
- *
- * @see InstallationPage
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since 2.0
- *
- */
-public class InstalledSoftwarePage extends InstallationPage implements ICopyable {
-
- private static final int UPDATE_ID = IDialogConstants.CLIENT_ID;
- private static final int UNINSTALL_ID = IDialogConstants.CLIENT_ID + 1;
- private static final int PROPERTIES_ID = IDialogConstants.CLIENT_ID + 2;
- private static final String BUTTON_ACTION = "org.eclipse.equinox.p2.ui.buttonAction"; //$NON-NLS-1$
-
- AbstractContributionFactory factory;
- Text detailsArea;
- InstalledIUGroup installedIUGroup;
- String profileId;
- Button updateButton, uninstallButton, propertiesButton;
- ProvisioningUI ui;
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvHelpContextIds.INSTALLED_SOFTWARE);
-
- ui = ProvisioningUI.getDefaultUI();
- profileId = ui.getProfileId();
- if (profileId == null) {
- IStatus status = ui.getPolicy().getNoProfileChosenStatus();
- if (status != null)
- ProvUI.reportStatus(status, StatusManager.LOG);
- Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
- text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- text.setText(ProvUIMessages.InstalledSoftwarePage_NoProfile);
- setControl(text);
- return;
- }
-
- Composite composite = new Composite(parent, SWT.NONE);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- int width = getDefaultWidth(composite);
- gd.widthHint = width;
- composite.setLayoutData(gd);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
-
- // Table of installed IU's
- installedIUGroup = new InstalledIUGroup(ui, composite, JFaceResources.getDialogFont(), profileId, getColumnConfig());
- // we hook selection listeners on the viewer in createPageButtons because we
- // rely on the actions we create there getting selection events before we use
- // them to update button enablement.
-
- CopyUtils.activateCopy(this, installedIUGroup.getStructuredViewer().getControl());
-
- gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- gd.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_DESCRIPTION_HEIGHT);
- gd.widthHint = width;
-
- detailsArea = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY | SWT.WRAP);
- detailsArea.setBackground(detailsArea.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
- detailsArea.setLayoutData(gd);
-
- setControl(composite);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.about.InstallationPage#createPageButtons(org.eclipse.swt.widgets.Composite)
- */
- public void createPageButtons(Composite parent) {
- if (profileId == null)
- return;
- // For the update action, we create a custom selection provider that will interpret no
- // selection as checking for updates to everything.
- // We also override the run method to close the containing dialog
- // if we successfully try to resolve. This is done to ensure that progress
- // is shown properly.
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=236495
- UpdateAction updateAction = new UpdateAction(ui, new ISelectionProvider() {
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- installedIUGroup.getStructuredViewer().addSelectionChangedListener(listener);
- }
-
- public ISelection getSelection() {
- StructuredViewer viewer = installedIUGroup.getStructuredViewer();
- ISelection selection = viewer.getSelection();
- if (selection.isEmpty()) {
- final Object[] all = ((IStructuredContentProvider) viewer.getContentProvider()).getElements(viewer.getInput());
- return new StructuredSelection(all);
- }
- return selection;
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- installedIUGroup.getStructuredViewer().removeSelectionChangedListener(listener);
- }
-
- public void setSelection(ISelection selection) {
- installedIUGroup.getStructuredViewer().setSelection(selection);
- }
- }, profileId, true) {
- public void run() {
- super.run();
- if (getReturnCode() == Window.OK)
- getPageContainer().closeModalContainers();
- }
- };
- updateAction.setSkipSelectionPage(true);
- updateButton = createButton(parent, UPDATE_ID, updateAction.getText());
- updateButton.setData(BUTTON_ACTION, updateAction);
- // Uninstall action
- Action uninstallAction = new UninstallAction(ui, installedIUGroup.getStructuredViewer(), profileId) {
- public void run() {
- super.run();
- if (getReturnCode() == Window.OK)
- getPageContainer().closeModalContainers();
- }
- };
- uninstallButton = createButton(parent, UNINSTALL_ID, uninstallAction.getText());
- uninstallButton.setData(BUTTON_ACTION, uninstallAction);
-
- // Properties action
- PropertyDialogAction action = new PropertyDialogAction(new SameShellProvider(getShell()), installedIUGroup.getStructuredViewer());
- propertiesButton = createButton(parent, PROPERTIES_ID, action.getText());
- propertiesButton.setData(BUTTON_ACTION, action);
-
- // We rely on the actions getting selection events before we do, because
- // we rely on the enablement state of the action. So we don't hook
- // the selection listener on our table until after actions are created.
- installedIUGroup.getStructuredViewer().addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateDetailsArea();
- updateEnablement();
- }
-
- });
-
- updateEnablement();
- }
-
- void updateDetailsArea() {
- 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;
- }
- }
- detailsArea.setText(""); //$NON-NLS-1$
- }
-
- void updateEnablement() {
- if (updateButton == null || updateButton.isDisposed())
- return;
- Button[] buttons = {updateButton, uninstallButton, propertiesButton};
- for (int i = 0; i < buttons.length; i++) {
- Action action = (Action) buttons[i].getData(BUTTON_ACTION);
- if (action == null || !action.isEnabled())
- buttons[i].setEnabled(false);
- else
- buttons[i].setEnabled(true);
- }
- }
-
- private IUColumnConfig[] getColumnConfig() {
- return new IUColumnConfig[] {new IUColumnConfig(ProvUIMessages.ProvUI_NameColumnTitle, IUColumnConfig.COLUMN_NAME, ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH), new IUColumnConfig(ProvUIMessages.ProvUI_VersionColumnTitle, IUColumnConfig.COLUMN_VERSION, ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH), new IUColumnConfig(ProvUIMessages.ProvUI_IdColumnTitle, IUColumnConfig.COLUMN_ID, ILayoutConstants.DEFAULT_COLUMN_WIDTH)};
- }
-
- private int getDefaultWidth(Control control) {
- IUColumnConfig[] columns = getColumnConfig();
- int totalWidth = 0;
- for (int i = 0; i < columns.length; i++) {
- totalWidth += columns[i].getWidthInPixels(control);
- }
- return totalWidth + 20; // buffer for surrounding composites
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.ui.ICopyable#copyToClipboard(org.eclipse.swt.widgets.Control)
- */
- public void copyToClipboard(Control activeControl) {
- Object[] elements = installedIUGroup.getSelectedIUElements();
- if (elements.length == 0)
- return;
- String text = CopyUtils.getIndentedClipboardText(elements, new IUDetailsLabelProvider(null, getColumnConfig(), null));
- Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
- clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
- clipboard.dispose();
- }
-
- protected void buttonPressed(int buttonId) {
- switch (buttonId) {
- case UPDATE_ID :
- ((Action) updateButton.getData(BUTTON_ACTION)).run();
- break;
- case UNINSTALL_ID :
- ((Action) uninstallButton.getData(BUTTON_ACTION)).run();
- break;
- case PROPERTIES_ID :
- ((Action) propertiesButton.getData(BUTTON_ACTION)).run();
- break;
- default :
- super.buttonPressed(buttonId);
- break;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java
deleted file mode 100644
index 792297f6c..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LicenseManager.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.ui;
-
-import org.eclipse.equinox.p2.metadata.ILicense;
-
-/**
- * LicenseManager defines a service which records the licenses that have been
- * accepted in the course of installing or updating software. It can be used to determine
- * whether a particular license should be presented to a user for acceptance, and
- * to record the user's decision.
- *
- * @since 2.0
- */
-public abstract class LicenseManager {
-
- /**
- * Record the acceptance of the specified license.
- *
- * @param license the license to be accepted
- *
- * @return <code>true</code> if the license was recorded as accepted, <code>false</code> if
- * it was not.
- *
- */
- public abstract boolean accept(ILicense license);
-
- /**
- * Record the rejection of the specified license.
- *
- * @param license the license to be rejected
- *
- * @return <code>true</code> if the license was recorded as rejected, <code>false</code> if
- * it was not.
- *
- */
- public abstract boolean reject(ILicense license);
-
- /**
- * Return a boolean indicating whether a particular license has previously
- * been accepted.
- *
- * @param license the license in question
- *
- * @return <code>true</code> if the license has previously been accepted,
- * <code>false</code> if it has not been accepted before.
- *
- */
- public abstract boolean isAccepted(ILicense license);
-
- /**
- * Return a boolean indicating whether any licenses have been
- * accepted.
- *
- * @return <code>true</code> if accepted licenses have been recorded,
- * <code>false</code> if there have been no licenses accepted.
-
- */
- public abstract boolean hasAcceptedLicenses();
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
deleted file mode 100644
index 8d67bdb37..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.p2.ui;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * A job that loads a set of metadata repositories and caches the loaded repositories.
- * This job can be used when repositories are loaded by a client who wishes to
- * maintain (and pass along) the in-memory references to the repositories. For example,
- * repositories can be loaded in the background and then passed to another
- * component, thus ensuring that the repositories remain loaded in memory.
- *
- * @since 2.0
- * @noextend This class is not intended to be subclassed by clients.
- */
-public class LoadMetadataRepositoryJob extends ProvisioningJob {
-
- /**
- * An object representing the family of jobs that load repositories.
- */
- public static final Object LOAD_FAMILY = new Object();
-
- /**
- * The key that should be used to set a property on a repository load job to indicate
- * that authentication should be suppressed when loading the repositories.
- */
- public static final QualifiedName SUPPRESS_AUTHENTICATION_JOB_MARKER = new QualifiedName(ProvUIActivator.PLUGIN_ID, "SUPPRESS_AUTHENTICATION_REQUESTS"); //$NON-NLS-1$
-
- /**
- * The key that should be used to set a property on a repository load job to indicate
- * that repository events triggered by this job should be suppressed so that clients
- * will ignore all events related to the load.
- */
- public static final QualifiedName SUPPRESS_REPOSITORY_EVENTS = new QualifiedName(ProvUIActivator.PLUGIN_ID, "SUPRESS_REPOSITORY_EVENTS"); //$NON-NLS-1$
-
- /**
- * The key that should be used to set a property on a repository load job to indicate
- * that a wizard receiving this job needs to schedule it. In some cases, a load job
- * is finished before invoking a wizard. In other cases, the job has not yet been
- * scheduled so that listeners can be set up first.
- */
- public static final QualifiedName WIZARD_CLIENT_SHOULD_SCHEDULE = new QualifiedName(ProvUIActivator.PLUGIN_ID, "WIZARD_CLIENT_SHOULD_SCHEDULE"); //$NON-NLS-1$
-
- /**
- * The key that should be used to set a property on a repository load job to indicate
- * that load errors should be accumulated into a single status rather than reported
- * as they occur.
- */
- public static final QualifiedName ACCUMULATE_LOAD_ERRORS = new QualifiedName(ProvUIActivator.PLUGIN_ID, "ACCUMULATE_LOAD_ERRORS"); //$NON-NLS-1$
-
- private List<IMetadataRepository> repoCache = new ArrayList<IMetadataRepository>();
- private RepositoryTracker tracker;
- private MultiStatus accumulatedStatus;
- private URI[] locations;
- private ProvisioningUI ui;
-
- /**
- * Create a job that loads the metadata repositories known by the specified RepositoryTracker.
- * @param ui the ProvisioningUI providing the necessary services
- */
- public LoadMetadataRepositoryJob(ProvisioningUI ui) {
- super(ProvUIMessages.LoadMetadataRepositoryJob_ContactSitesProgress, ui.getSession());
- this.ui = ui;
- this.tracker = ui.getRepositoryTracker();
- this.locations = tracker.getKnownRepositories(ui.getSession());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProvisioningJob#runModal(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IStatus runModal(IProgressMonitor monitor) {
- if (locations == null || locations.length == 0)
- return Status.OK_STATUS;
-
- // We batch all the time as a way of distinguishing client-initiated repository
- // jobs from low level repository manipulation.
- ui.signalRepositoryOperationStart();
- try {
- doLoad(monitor);
- } finally {
- ui.signalRepositoryOperationComplete(null, getProperty(SUPPRESS_REPOSITORY_EVENTS) == null);
- }
- return Status.OK_STATUS;
- }
-
- private IStatus doLoad(IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.LoadMetadataRepositoryJob_ContactSitesProgress, locations.length * 100);
- if (sub.isCanceled())
- return Status.CANCEL_STATUS;
- for (int i = 0; i < locations.length; i++) {
- if (sub.isCanceled())
- return Status.CANCEL_STATUS;
- try {
- repoCache.add(ProvUI.getMetadataRepositoryManager(ui.getSession()).loadRepository(locations[i], sub.newChild(100)));
- } catch (ProvisionException e) {
- handleLoadFailure(e, locations[i]);
- }
- }
- return getCurrentStatus();
- }
-
- private void handleLoadFailure(ProvisionException e, URI location) {
- if (shouldAccumulateFailures()) {
- // Some ProvisionExceptions include an empty multi status with a message.
- // Since empty multi statuses have a severity OK, The platform status handler doesn't handle
- // this well. We correct this by recreating a status with error severity
- // so that the platform status handler does the right thing.
- IStatus status = e.getStatus();
- if (status instanceof MultiStatus && ((MultiStatus) status).getChildren().length == 0)
- status = new Status(IStatus.ERROR, status.getPlugin(), status.getCode(), status.getMessage(), status.getException());
- if (accumulatedStatus == null) {
- accumulatedStatus = new MultiStatus(ProvUIActivator.PLUGIN_ID, ProvisionException.REPOSITORY_NOT_FOUND, new IStatus[] {status}, ProvUIMessages.LoadMetadataRepositoryJob_SitesMissingError, null);
- } else {
- accumulatedStatus.add(status);
- }
- ui.getRepositoryTracker().addNotFound(location);
- // Always log the complete exception so the detailed stack trace is in the log.
- LogHelper.log(e);
- } else {
- tracker.reportLoadFailure(location, e);
- }
- }
-
- private boolean shouldAccumulateFailures() {
- return getProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS) != null;
- }
-
- /**
- * Report the accumulated status for repository load failures. If there has been
- * no status accumulated, or if the job has been cancelled, do not report
- * anything. Detailed errors have already been logged.
- */
- public void reportAccumulatedStatus() {
- IStatus status = getCurrentStatus();
- if (status.isOK() || status.getSeverity() == IStatus.CANCEL)
- return;
-
- // If user is unaware of individual sites, nothing to report here.
- if (!ui.getPolicy().getRepositoriesVisible())
- return;
- StatusManager.getManager().handle(status, StatusManager.SHOW);
- // Reset the accumulated status so that next time we only report the newly not found repos.
- accumulatedStatus = null;
- }
-
- private IStatus getCurrentStatus() {
- if (accumulatedStatus != null) {
- // If there is only missing repo to report, use the specific message rather than the generic.
- if (accumulatedStatus.getChildren().length == 1)
- return accumulatedStatus.getChildren()[0];
- return accumulatedStatus;
- }
- return Status.OK_STATUS;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
- */
- public boolean belongsTo(Object family) {
- return family == LOAD_FAMILY;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java
deleted file mode 100644
index bd61a3bd7..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/Policy.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.p2.ui;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.equinox.internal.p2.ui.ProvUI;
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.ProfileChangeOperation;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * The Policy class is used to specify application specific policies that
- * should be used in the standard p2 UI class libraries. The default policy
- * is acquired using the OSGi service model.
- *
- * Policy allows clients to specify things such as how repositories
- * are manipulated in the standard wizards and dialogs, and how the repositories
- * or the installation itself should be traversed when displaying content.
- *
- * In some cases, the Policy is used only to define a default value that can
- * be overridden by user choice and subsequently stored in dialog settings.
- *
- * Client applications should ensure that their Policy is registered before
- * any of the p2 UI objects access the default Policy.
- *
- * @since 2.0
- */
-
-public class Policy {
-
- /**
- * A constant indicating that restart should be forced (without
- * confirmation) immediately after completion of a provisioning operation.
- *
- */
- public static final int RESTART_POLICY_FORCE = 1;
-
- /**
- * A constant indicating that the changes should be applied dynamically
- * to the profile (without confirmation) immediately after completion of
- * a provisioning operation.
- */
- public static final int RESTART_POLICY_FORCE_APPLY = 2;
-
- /**
- * A constant indicating that the user should be prompted to
- * restart after completion of a provisioning operation.
- */
- public static final int RESTART_POLICY_PROMPT = 3;
-
- /**
- * A constant indicating that, where possible, the user should
- * be given the option to restart or dynamically apply the changes
- * after completion of a provisioning operation.
- */
- public static final int RESTART_POLICY_PROMPT_RESTART_OR_APPLY = 4;
-
- private IQuery<IInstallableUnit> visibleAvailableIUQuery = QueryUtil.createIUGroupQuery();
- private IQuery<IInstallableUnit> visibleInstalledIUQuery = new UserVisibleRootQuery();
- private boolean groupByCategory = true;
- private boolean allowDrilldown = true;
- private boolean repositoriesVisible = true;
- private boolean showLatestVersionsOnly = true;
- private int restartPolicy = RESTART_POLICY_PROMPT_RESTART_OR_APPLY;
- private String repoPrefPageId;
- private String repoPrefPageName;
- private boolean filterOnEnv = false;
-
- /**
- * Answer a boolean indicating whether the caller should continue to work with the
- * specified operation. This method is used when an operation has been resolved, but
- * the UI may have further restrictions on continuing with it.
- *
- * @param operation the operation in question. It must already be resolved.
- * @param shell the shell to use for any interaction with the user
- * @return <code>true</code> if processing of the operation should continue, <code>false</code> if
- * not. It is up to the implementor to report any errors to the user when answering <code>false</code>.
- */
- public boolean continueWorkingWithOperation(ProfileChangeOperation operation, Shell shell) {
- Assert.isTrue(operation.getResolutionResult() != null);
- IStatus status = operation.getResolutionResult();
- // user cancelled
- if (status.getSeverity() == IStatus.CANCEL)
- return false;
-
- // Special case those statuses where we would never want to open a wizard
- if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
- ProvUI.reportStatus(status, StatusManager.BLOCK);
- return false;
- }
-
- // there is no plan, so we can't continue. Report any reason found
- if (operation.getProvisioningPlan() == null && !status.isOK()) {
- StatusManager.getManager().handle(status, StatusManager.LOG | StatusManager.SHOW);
- return false;
- }
-
- // Allow the wizard to open otherwise.
- return true;
- }
-
- /**
- * Return a status that can be used to describe the failure to
- * retrieve a profile.
- * @return a status describing a failure to retrieve a profile,
- * or <code>null</code> if there is no such status.
- */
- public IStatus getNoProfileChosenStatus() {
- return null;
- }
-
- /**
- * Return a query that can be used to obtain the IInstallableUnits that
- * should be presented to the user from the software repositories.
- *
- * @return the query used to retrieve user visible available IUs
- */
- public IQuery<IInstallableUnit> getVisibleAvailableIUQuery() {
- return visibleAvailableIUQuery;
- }
-
- /**
- * Set the query that can be used to obtain the IInstallableUnits that
- * should be presented to the user.
- *
- * @param query the query used to retrieve user visible available IUs
- */
- public void setVisibleAvailableIUQuery(IQuery<IInstallableUnit> query) {
- visibleAvailableIUQuery = query;
- }
-
- /**
- * Return a query that can be used to obtain the IInstallableUnits in
- * the profile that should be presented to the user.
- *
- * @return the query used to retrieve user visible installed IUs
- */
- public IQuery<IInstallableUnit> getVisibleInstalledIUQuery() {
- return visibleInstalledIUQuery;
- }
-
- /**
- * Set the query that can be used to obtain the IInstallableUnits in
- * the profile that should be presented to the user.
- *
- * @param query the query used to retrieve user visible installed IUs
- */
- public void setVisibleInstalledIUQuery(IQuery<IInstallableUnit> query) {
- visibleInstalledIUQuery = query;
- }
-
- /**
- * Get the restart policy that should be used when the provisioning UI
- * determines that a restart is required.
- *
- * @return an integer constant describing the restart policy
- *
- * @see #RESTART_POLICY_FORCE
- * @see #RESTART_POLICY_FORCE_APPLY
- * @see #RESTART_POLICY_PROMPT
- * @see #RESTART_POLICY_PROMPT_RESTART_OR_APPLY
- */
- public int getRestartPolicy() {
- return restartPolicy;
- }
-
- /**
- * Set the restart policy that should be used when the provisioning UI
- * determines that a restart is required.
- *
- * @param restartPolicy an integer constant describing the restart policy
- *
- * @see #RESTART_POLICY_FORCE
- * @see #RESTART_POLICY_FORCE_APPLY
- * @see #RESTART_POLICY_PROMPT
- * @see #RESTART_POLICY_PROMPT_RESTART_OR_APPLY
- */
- public void setRestartPolicy(int restartPolicy) {
- this.restartPolicy = restartPolicy;
- }
-
- /**
- * Return a boolean indicating whether the repositories should
- * be visible to the user, such that the user can add, remove, and
- * otherwise manipulate the software site list.
- *
- * @return <code>true</code> if repositories are visible to the end
- * user, <code>false</code> if they are not.
- */
- public boolean getRepositoriesVisible() {
- return repositoriesVisible;
- }
-
- /**
- * Set a boolean indicating whether the repositories should
- * be visible to the user, such that the user can add, remove, and
- * otherwise manipulate the software site list.
- *
- * @param visible <code>true</code> if repositories are visible to the end
- * user, <code>false</code> if they are not.
- */
- public void setRepositoriesVisible(boolean visible) {
- this.repositoriesVisible = visible;
- }
-
- /**
- * Return a boolean indicating whether only the latest versions of
- * updates and available software should be shown to the user.
- *
- * @return <code>true</code> if only the latest versions are shown,
- * <code>false</code> if all versions should be shown.
- */
- public boolean getShowLatestVersionsOnly() {
- return showLatestVersionsOnly;
- }
-
- /**
- * Set a boolean indicating whether only the latest versions of
- * updates and available software should be shown to the user.
- *
- * @param showLatest <code>true</code> if only the latest versions are shown,
- * <code>false</code> if all versions should be shown.
- */
- public void setShowLatestVersionsOnly(boolean showLatest) {
- this.showLatestVersionsOnly = showLatest;
- }
-
- /**
- * Return a boolean indicating whether the user should be allowed drill
- * down from a visible update or installed item into the requirements.
- *
- * @return <code>true</code> if drilldown is allowed,
- * <code>false</code> if it is not.
- */
- public boolean getShowDrilldownRequirements() {
- return allowDrilldown;
- }
-
- /**
- * Set a boolean indicating whether the user should be allowed drill
- * down from a visible update or installed item into the requirements.
- *
- * @param drilldown <code>true</code> if drilldown is allowed,
- * <code>false</code> if it is not.
- */
- public void setShowDrilldownRequirements(boolean drilldown) {
- this.allowDrilldown = drilldown;
- }
-
- /**
- * Return a boolean value indicating whether or not the list of available
- * software should be filtered based on the environment settings of the profile.
- *
- * @return <code>true</code> if the results should be filtered
- * and <code>false</code> otherwise.
- * @since 2.1
- */
- public boolean getFilterOnEnv() {
- return filterOnEnv;
- }
-
- /**
- * Set a boolean value indicating whether or not the list of available
- * software should be filtered based on the environment settings of the profile.
- *
- * @param filterOnEnv <code>true</code> if the results should be filtered
- * and <code>false</code> otherwise.
- * @since 2.1
- */
- public void setFilterOnEnv(boolean filterOnEnv) {
- this.filterOnEnv = filterOnEnv;
- }
-
- /**
- * Return a boolean indicating whether available software should be
- * grouped by category.
- *
- * @return <code>true</code> if items should be grouped by category,
- * <code>false</code> if categories should not be shown.
- */
- public boolean getGroupByCategory() {
- return groupByCategory;
- }
-
- /**
- * Set a boolean indicating whether available software should be
- * grouped by category.
- *
- * @param group <code>true</code> if items should be grouped by category,
- * <code>false</code> if categories should not be shown.
- */
- public void setGroupByCategory(boolean group) {
- this.groupByCategory = group;
- }
-
- /**
- * Get the id of the preference page that should be used to link to the
- * software sites page.
- *
- * @return the preference page id, or <code>null</code> if there is no
- * preference page id showing the software sites.
- */
- public String getRepositoryPreferencePageId() {
- return repoPrefPageId;
- }
-
- /**
- * Set the id of the preference page that should be used to link to the
- * software sites page.
- *
- * @param id the preference page id, or <code>null</code> if there is no
- * preference page id showing the software sites.
- */
-
- public void setRepositoryPreferencePageId(String id) {
- this.repoPrefPageId = id;
- }
-
- /**
- * Get the localized name of the preference page that should be displayed in
- * links to the software sites page.
- *
- * @return the preference page name, or <code>null</code> if there is no
- * preference page.
- */
- public String getRepositoryPreferencePageName() {
- return repoPrefPageName;
- }
-
- /**
- * Set the localized name of the preference page that should be displayed in
- * links to the software sites page. This name is ignored if no id is specified
- * for the preference page.
- *
- * @param name the preference page name, or <code>null</code> if there is no
- * preference page.
- *
- * @see Policy#setRepositoryPreferencePageId(String)
- */
-
- public void setRepositoryPreferencePageName(String name) {
- this.repoPrefPageName = name;
- }
-}
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
deleted file mode 100644
index d918a6993..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/ProvisioningUI.java
+++ /dev/null
@@ -1,438 +0,0 @@
-/*******************************************************************************
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * 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;
-import org.eclipse.equinox.internal.p2.core.helpers.Tracing;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProvisioningContext;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.operations.*;
-import org.eclipse.equinox.p2.repository.IRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-
-/**
- * ProvisioningUI defines the provisioning session, UI policy, and related services for a
- * provisioning UI.
- *
- * @since 2.0
- *
- */
-public class ProvisioningUI {
-
- /**
- * Return the default ProvisioningUI.
- *
- * @return the default Provisioning UI.
- */
- public static ProvisioningUI getDefaultUI() {
- return ProvUIActivator.getDefault().getProvisioningUI();
- }
-
- private Policy policy;
- private ProvisioningSession session;
- private String profileId;
- private ProvisioningOperationRunner runner;
-
- /**
- * Creates a new instance of the provisioning user interface.
- *
- * @param session The current provisioning session
- * @param profileId The profile that this user interface is operating on
- * @param policy The user interface policy settings to use
- */
- public ProvisioningUI(ProvisioningSession session, String profileId, Policy policy) {
- this.policy = policy;
- this.profileId = profileId;
- if (profileId == null)
- this.profileId = IProfileRegistry.SELF;
- this.session = session;
- this.runner = new ProvisioningOperationRunner(this);
- }
-
- /**
- * Return the UI policy used for this instance of the UI.
- *
- * @return the UI policy, must not be <code>null</code>
- */
- public Policy getPolicy() {
- return policy;
- }
-
- /**
- * Return the provisioning session that should be used to obtain
- * provisioning services.
- *
- * @return the provisioning session, must not be <code>null</code>
- */
- public ProvisioningSession getSession() {
- return session;
- }
-
- /**
- * Return the license manager that should be used to remember
- * accepted user licenses.
- * @return the license manager. May be <code>null</code> if licenses are not
- * to be remembered.
- */
- public LicenseManager getLicenseManager() {
- return (LicenseManager) ServiceHelper.getService(ProvUIActivator.getContext(), LicenseManager.class.getName());
- }
-
- /**
- * Return the repository tracker that should be used to add, remove, and track the
- * statuses of known repositories.
- *
- * @return the repository tracker, must not be <code>null</code>
- */
- public RepositoryTracker getRepositoryTracker() {
- return (RepositoryTracker) ServiceHelper.getService(ProvUIActivator.getContext(), RepositoryTracker.class.getName());
- }
-
- /**
- * Return the profile id that should be assumed for this ProvisioningUI if no other
- * id is otherwise specified. Some UI classes are assigned a profile id, while others
- * are not. For those classes that are not assigned a current profile id, this id can
- * be used to obtain one.
- *
- * @return a profile id
- */
- public String getProfileId() {
- return profileId;
- }
-
- /**
- * Return an install operation that describes installing the specified IInstallableUnits from the
- * provided list of repositories.
- *
- * @param iusToInstall the IInstallableUnits to be installed
- * @param repositories the repositories to use for the operation
- * @return the install operation
- */
- public InstallOperation getInstallOperation(Collection<IInstallableUnit> iusToInstall, URI[] repositories) {
- InstallOperation op = new InstallOperation(getSession(), iusToInstall);
- op.setProfileId(getProfileId());
- op.setProvisioningContext(makeProvisioningContext(repositories));
- return op;
- }
-
- /**
- * Return an update operation that describes updating the specified IInstallableUnits from the
- * provided list of repositories.
- *
- * @param iusToUpdate the IInstallableUnits to be updated
- * @param repositories the repositories to use for the operation
- * @return the update operation
- */
- public UpdateOperation getUpdateOperation(Collection<IInstallableUnit> iusToUpdate, URI[] repositories) {
- UpdateOperation op = new UpdateOperation(getSession(), iusToUpdate);
- op.setProfileId(getProfileId());
- op.setProvisioningContext(makeProvisioningContext(repositories));
- return op;
- }
-
- /**
- * Return an uninstall operation that describes uninstalling the specified IInstallableUnits, using
- * the supplied repositories to replace any metadata that must be retrieved for the uninstall.
- *
- * @param iusToUninstall the IInstallableUnits to be installed
- * @param repositories the repositories to use for the operation
- * @return the uninstall operation
- */
- public UninstallOperation getUninstallOperation(Collection<IInstallableUnit> iusToUninstall, URI[] repositories) {
- UninstallOperation op = new UninstallOperation(getSession(), iusToUninstall);
- op.setProfileId(getProfileId());
- op.setProvisioningContext(makeProvisioningContext(repositories));
- return op;
- }
-
- private ProvisioningContext makeProvisioningContext(URI[] repos) {
- if (repos != null) {
- ProvisioningContext context = new ProvisioningContext(getSession().getProvisioningAgent());
- context.setMetadataRepositories(repos);
- context.setArtifactRepositories(repos);
- return context;
- }
- // look everywhere
- return new ProvisioningContext(getSession().getProvisioningAgent());
- }
-
- /**
- * Open an install wizard for installing the specified IInstallableUnits
- *
- * @param initialSelections the IInstallableUnits that should be selected when the wizard opens. May be <code>null</code>.
- * @param operation the operation describing the proposed install. If this operation is not <code>null</code>, then a wizard showing
- * only the IInstallableUnits described in the operation will be shown. If the operation is <code>null</code>, then a
- * wizard allowing the user to browse the repositories will be opened.
- * @param job a repository load job that is loading or has already loaded the repositories. Can be used to pass along
- * an in-memory repository reference to the wizard.
- *
- * @return the wizard return code
- */
- public int openInstallWizard(Collection<IInstallableUnit> initialSelections, InstallOperation operation, LoadMetadataRepositoryJob job) {
- if (operation == null) {
- InstallWizard wizard = new InstallWizard(this, operation, initialSelections, job);
- WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- dialog.create();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
- return dialog.open();
- }
- PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(this, operation, initialSelections, job);
- WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- dialog.create();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
- return dialog.open();
- }
-
- /**
- * Open an update wizard for the specified update operation.
- *
- * @param skipSelectionsPage <code>true</code> if the selection page should be skipped so that the user is
- * viewing the resolution results. <code>false</code> if the update selection page should be shown first.
- * @param operation the operation describing the proposed update. Must not be <code>null</code>.
- * @param job a repository load job that is loading or has already loaded the repositories. Can be used to pass along
- * an in-memory repository reference to the wizard.
- *
- * @return the wizard return code
- */
- public int openUpdateWizard(boolean skipSelectionsPage, UpdateOperation operation, LoadMetadataRepositoryJob job) {
- UpdateWizard wizard = new UpdateWizard(this, operation, operation.getSelectedUpdates(), job);
- wizard.setSkipSelectionsPage(skipSelectionsPage);
- WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- dialog.create();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.UPDATE_WIZARD);
- return dialog.open();
- }
-
- /**
- * Open an uninstall wizard for the specified uninstall operation.
- *
- * @param initialSelections the IInstallableUnits that should be selected when the wizard opens. May be <code>null</code>.
- * @param operation the operation describing the proposed uninstall. Must not be <code>null</code>.
- * @param job a repository load job that is loading or has already loaded the repositories. Can be used to pass along
- * an in-memory repository reference to the wizard.
- *
- * @return the wizard return code
- */
- public int openUninstallWizard(Collection<IInstallableUnit> initialSelections, UninstallOperation operation, LoadMetadataRepositoryJob job) {
- UninstallWizard wizard = new UninstallWizard(this, operation, initialSelections, job);
- WizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard);
- dialog.create();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.UNINSTALL_WIZARD);
- return dialog.open();
- }
-
- /**
- * Open a UI that allows the user to manipulate the repositories.
- * @param shell the shell that should parent the UI
- */
- public void manipulateRepositories(Shell shell) {
- if (policy.getRepositoryPreferencePageId() != null) {
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell, policy.getRepositoryPreferencePageId(), null, null);
- dialog.open();
- } else {
- TitleAreaDialog dialog = new TitleAreaDialog(shell) {
- RepositoryManipulationPage page;
-
- protected Control createDialogArea(Composite parent) {
- page = new RepositoryManipulationPage();
- page.setProvisioningUI(ProvisioningUI.this);
- page.init(PlatformUI.getWorkbench());
- page.createControl(parent);
- this.setTitle(ProvUIMessages.RepositoryManipulationPage_Title);
- this.setMessage(ProvUIMessages.RepositoryManipulationPage_Description);
-
- Control control = page.getControl();
- control.setLayoutData(new GridData(GridData.FILL_BOTH));
- return page.getControl();
- }
-
- protected boolean isResizable() {
- return true;
- }
-
- protected void okPressed() {
- if (page.performOk())
- super.okPressed();
- }
-
- protected void cancelPressed() {
- if (page.performCancel())
- super.cancelPressed();
- }
- };
- dialog.open();
- }
- }
-
- /**
- * Schedule a job to execute the supplied ProvisioningOperation.
- *
- * @param job The operation to execute
- * @param errorStyle the flags passed to the StatusManager for error reporting
- */
- public void schedule(final ProvisioningJob job, final int errorStyle) {
- job.setUser(true);
- runner.schedule(job, errorStyle);
- }
-
- /**
- * Manage the supplied job as a provisioning operation. This will allow
- * the ProvisioningUI to be aware that a provisioning job is running, as well
- * as manage the restart behavior for the job.
- *
- * @param job the job to be managed
- * @param jobRestartPolicy an integer constant specifying whether the
- * supplied job should cause a restart of the system. The UI Policy's
- * restart policy is used in conjunction with this constant to determine
- * what actually occurs when a job completes.
- *
- * @see ProvisioningJob#RESTART_NONE
- * @see ProvisioningJob#RESTART_ONLY
- * @see ProvisioningJob#RESTART_OR_APPLY
- */
- public void manageJob(Job job, final int jobRestartPolicy) {
- runner.manageJob(job, jobRestartPolicy);
- }
-
- /**
- * Return a boolean indicating whether the receiver has scheduled any operations
- * for the profile under management.
- *
- * @return <code>true</code> if other provisioning operations have been scheduled,
- * <code>false</code> if there are no operations scheduled.
- */
- public boolean hasScheduledOperations() {
- return getSession().hasScheduledOperationsFor(profileId);
- }
-
- /**
- * This method is for automated testing only.
- * @return the provisioning operation that can suppress restart for automated testing.
- * @noreference This method is not intended to be referenced by clients.
- */
- public ProvisioningOperationRunner getOperationRunner() {
- return runner;
- }
-
- /**
- * Signal that a repository operation is about to begin. This allows clients to ignore intermediate
- * events until the operation is completed. Callers are responsible for ensuring that
- * a corresponding operation ending event is signaled.
- */
- public void signalRepositoryOperationStart() {
- runner.eventBatchCount++;
- if (Tracing.DEBUG_EVENTS_CLIENT)
- Tracing.debug("Batch Count Incremented to: " + Integer.toString(runner.eventBatchCount)); //$NON-NLS-1$
- ProvUI.getProvisioningEventBus(getSession()).publishEvent(new RepositoryOperationBeginningEvent(this));
- }
-
- /**
- * Signal that a repository operation has completed.
- *
- * @param event a {@link RepositoryEvent} that describes the overall operation. May be <code>null</code>, which
- * indicates that there was no single event that can describe the operation.
- * @param update <code>true</code> if the event should be reflected in the UI, false if it should be ignored.
- */
- public void signalRepositoryOperationComplete(RepositoryEvent event, boolean update) {
- runner.eventBatchCount--;
- if (Tracing.DEBUG_EVENTS_CLIENT)
- Tracing.debug("Batch Count Decremented to: " + Integer.toString(runner.eventBatchCount)); //$NON-NLS-1$
- ProvUI.getProvisioningEventBus(getSession()).publishEvent(new RepositoryOperationEndingEvent(this, update, event));
- }
-
- /**
- * Load the specified metadata repository, signaling a repository operation start event
- * before loading, and a repository operation complete event after loading.
- *
- * @param location the location of the repository
- * @param notify <code>true</code> if the UI should be updated as a result of the load, <code>false</code> if it should not
- * @param monitor the progress monitor to be used
- * @return the repository
- * @throws ProvisionException if the repository could not be loaded
- */
-
- public IMetadataRepository loadMetadataRepository(URI location, boolean notify, IProgressMonitor monitor) throws ProvisionException {
- IMetadataRepository repo = null;
- try {
- signalRepositoryOperationStart();
- IMetadataRepositoryManager manager = ProvUI.getMetadataRepositoryManager(getSession());
- repo = manager.loadRepository(location, monitor);
- // If there is no user nickname assigned to this repo but there is a provider name, then set the nickname.
- // This will keep the name in the manager even when the repo is not loaded
- String name = manager.getRepositoryProperty(location, IRepository.PROP_NICKNAME);
- if (name == null || name.length() == 0) {
- name = repo.getName();
- if (name != null && name.length() > 0)
- manager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
- }
- } catch (ProvisionException e) {
- getRepositoryTracker().reportLoadFailure(location, e);
- } finally {
- // We have no idea how many repos may have been touched as a result of loading this one.
- signalRepositoryOperationComplete(null, notify);
- }
- return repo;
- }
-
- /**
- * Load the specified artifact repository, signaling a repository operation start event
- * before loading, and a repository operation complete event after loading.
- *
- * @param location the location of the repository
- * @param update <code>true</code> if the UI should be updated as a result of the load, <code>false</code> if it should not
- * @param monitor the progress monitor to be used
- * @return the repository
- * @throws ProvisionException if the repository could not be loaded
- */
- public IArtifactRepository loadArtifactRepository(URI location, boolean update, IProgressMonitor monitor) throws ProvisionException {
- IArtifactRepository repo;
- signalRepositoryOperationStart();
- try {
- IArtifactRepositoryManager manager = ProvUI.getArtifactRepositoryManager(getSession());
- repo = manager.loadRepository(location, monitor);
-
- // If there is no user nickname assigned to this repo but there is a provider name, then set the nickname.
- // This will keep the name in the manager even when the repo is not loaded
- String name = manager.getRepositoryProperty(location, IRepository.PROP_NICKNAME);
- if (name == null) {
- name = manager.getRepositoryProperty(location, IRepository.PROP_NAME);
- if (name != null)
- manager.setRepositoryProperty(location, IRepository.PROP_NICKNAME, name);
- }
- } finally {
- // We have no idea how many repos may have been touched as a result of loading this one,
- // so we do not use a specific repository event to represent it.
- signalRepositoryOperationComplete(null, update);
- }
- return repo;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
deleted file mode 100644
index e1f2935b4..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RepositoryManipulationPage.java
+++ /dev/null
@@ -1,954 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.dialogs.*;
-import org.eclipse.equinox.internal.p2.ui.model.*;
-import org.eclipse.equinox.internal.p2.ui.viewers.*;
-import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleAdapter;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.*;
-import org.eclipse.ui.dialogs.PatternFilter;
-import org.eclipse.ui.progress.WorkbenchJob;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * Page that allows users to update, add, remove, import, and
- * export repositories. This page can be hosted inside a preference
- * dialog or inside its own dialog.
- *
- * When hosting this page inside a non-preference dialog, some of the
- * dialog methods will likely have to call page methods. The following
- * snippet shows how to host this page inside a TitleAreaDialog.
- * <pre>
- * TitleAreaDialog dialog = new TitleAreaDialog(shell) {
- *
- * RepositoryManipulationPage page;
- *
- * protected Control createDialogArea(Composite parent) {
- * page = new RepositoryManipulationPage();
- * page.setProvisioningUI(ProvisioningUI.getDefaultUI());
- * page.createControl(parent);
- * this.setTitle("Software Sites");
- * this.setMessage("The enabled sites will be searched for software. Disabled sites are ignored.");
- * return page.getControl();
- * }
- *
- * protected void okPressed() {
- * if (page.performOk())
- * super.okPressed();
- * }
- *
- * protected void cancelPressed() {
- * if (page.performCancel())
- * super.cancelPressed();
- * }
- * };
- * dialog.open();
- * </pre>
- *
- * @noextend This class is not intended to be subclassed by clients.
- *
- * @since 2.0
- */
-public class RepositoryManipulationPage extends PreferencePage implements IWorkbenchPreferencePage, ICopyable {
- final static String DEFAULT_FILTER_TEXT = ProvUIMessages.RepositoryManipulationPage_DefaultFilterString;
- private final static int FILTER_DELAY = 200;
-
- StructuredViewerProvisioningListener listener;
- CheckboxTableViewer repositoryViewer;
- Table table;
- ProvisioningUI ui;
- Policy policy;
- Display display;
- boolean changed = false;
- MetadataRepositoryElementComparator comparator;
- RepositoryDetailsLabelProvider labelProvider;
- RepositoryTracker tracker;
- RepositoryTracker localCacheRepoManipulator;
- /**
- * The input field is initialized lazily and should only be accessed via the {@link #getInput()} method.
- */
- CachedMetadataRepositories input;
- Text pattern, details;
- PatternFilter filter;
- WorkbenchJob filterJob;
- Button addButton, removeButton, editButton, refreshButton, disableButton, exportButton;
-
- class CachedMetadataRepositories extends MetadataRepositories {
- private Hashtable<String, MetadataRepositoryElement> cachedElements;
-
- CachedMetadataRepositories() {
- super(ui);
- setIncludeDisabledRepositories(getPolicy().getRepositoriesVisible());
- }
-
- public int getQueryType() {
- return QueryProvider.METADATA_REPOS;
- }
-
- public Object[] fetchChildren(Object o, IProgressMonitor monitor) {
- if (cachedElements == null) {
- Object[] children = super.fetchChildren(o, monitor);
- cachedElements = new Hashtable<String, MetadataRepositoryElement>(children.length);
- for (int i = 0; i < children.length; i++) {
- if (children[i] instanceof MetadataRepositoryElement) {
- put((MetadataRepositoryElement) children[i]);
- }
- }
- }
- return cachedElements.values().toArray();
- }
-
- MetadataRepositoryElement[] getElements() {
- return cachedElements.values().toArray(new MetadataRepositoryElement[cachedElements.size()]);
- }
-
- void remove(MetadataRepositoryElement element) {
- cachedElements.remove(getKey(element.getLocation()));
- }
-
- void put(MetadataRepositoryElement element) {
- cachedElements.put(getKey(element.getLocation()), element);
- }
-
- MetadataRepositoryElement get(URI location) {
- return cachedElements.get(getKey(location));
- }
-
- String getKey(URI location) {
- String key = URIUtil.toUnencodedString(location);
- int length = key.length();
- if (length > 0 && key.charAt(length - 1) == '/') {
- key = key.substring(0, length - 1);
- }
- return key;
- }
-
- }
-
- class MetadataRepositoryPatternFilter extends PatternFilter {
- MetadataRepositoryPatternFilter() {
- setIncludeLeadingWildcard(true);
- }
-
- public boolean isElementVisible(Viewer viewer, Object element) {
- if (element instanceof MetadataRepositoryElement) {
- return wordMatches(labelProvider.getColumnText(element, RepositoryDetailsLabelProvider.COL_NAME) + " " + labelProvider.getColumnText(element, RepositoryDetailsLabelProvider.COL_LOCATION)); //$NON-NLS-1$
- }
- return false;
- }
- }
-
- /**
- * Create a repository manipulation page that will display the repositories
- * available to the user.
- */
- public RepositoryManipulationPage() {
- this.setProvisioningUI(ProvisioningUI.getDefaultUI());
- }
-
- /**
- * Set the provisioning UI that provides the session, policy, and other
- * services for the UI. This method must be called before the contents are
- * created or it will have no effect.
- *
- * @param ui the provisioning UI to use for this page.
- */
- public void setProvisioningUI(ProvisioningUI ui) {
- this.ui = ui;
- this.policy = ui.getPolicy();
- tracker = ui.getRepositoryTracker();
- }
-
- protected Control createContents(Composite parent) {
- display = parent.getDisplay();
- // The help refers to the full-blown dialog. No help if it's read only.
- if (policy.getRepositoriesVisible())
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent.getShell(), IProvHelpContextIds.REPOSITORY_MANIPULATION_DIALOG);
-
- Composite composite = new Composite(parent, SWT.NONE);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- composite.setLayoutData(gd);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = policy.getRepositoriesVisible() ? 2 : 1;
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- composite.setLayout(layout);
-
- // Filter box
- pattern = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.CANCEL);
- pattern.getAccessible().addAccessibleListener(new AccessibleAdapter() {
- public void getName(AccessibleEvent e) {
- e.result = DEFAULT_FILTER_TEXT;
- }
- });
- pattern.setText(DEFAULT_FILTER_TEXT);
- pattern.selectAll();
- pattern.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- applyFilter();
- }
- });
-
- pattern.addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.ARROW_DOWN) {
- if (table.getItemCount() > 0) {
- table.setFocus();
- } else if (e.character == SWT.CR) {
- return;
- }
- }
- }
- });
-
- pattern.addFocusListener(new FocusAdapter() {
- public void focusGained(FocusEvent e) {
- display.asyncExec(new Runnable() {
- public void run() {
- if (!pattern.isDisposed()) {
- if (DEFAULT_FILTER_TEXT.equals(pattern.getText().trim())) {
- pattern.selectAll();
- }
- }
- }
- });
- }
- });
- gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- pattern.setLayoutData(gd);
-
- // spacer to fill other column
- if (policy.getRepositoriesVisible())
- new Label(composite, SWT.NONE);
-
- // Table of available repositories
- table = new Table(composite, SWT.CHECK | SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- repositoryViewer = new CheckboxTableViewer(table);
-
- // Key listener for delete
- table.addKeyListener(new KeyAdapter() {
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.DEL) {
- removeRepositories();
- }
- }
- });
- setTableColumns();
- CopyUtils.activateCopy(this, table);
-
- repositoryViewer.setComparer(new ProvElementComparer());
- comparator = new MetadataRepositoryElementComparator(RepositoryDetailsLabelProvider.COL_NAME);
- repositoryViewer.setComparator(comparator);
- filter = new MetadataRepositoryPatternFilter();
- repositoryViewer.setFilters(new ViewerFilter[] {filter});
- // We don't need a deferred content provider because we are caching local results before
- // actually querying
- repositoryViewer.setContentProvider(new ProvElementContentProvider());
- labelProvider = new RepositoryDetailsLabelProvider();
- repositoryViewer.setLabelProvider(labelProvider);
-
- // Edit the nickname
- repositoryViewer.setCellModifier(new ICellModifier() {
- public boolean canModify(Object element, String property) {
- return element instanceof MetadataRepositoryElement;
- }
-
- public Object getValue(Object element, String property) {
- return ((MetadataRepositoryElement) element).getName();
- }
-
- public void modify(Object element, String property, Object value) {
- if (value != null && value.toString().length() >= 0) {
- MetadataRepositoryElement repo;
- if (element instanceof Item) {
- repo = (MetadataRepositoryElement) ((Item) element).getData();
- } else if (element instanceof MetadataRepositoryElement) {
- repo = (MetadataRepositoryElement) element;
- } else {
- return;
- }
- if (!value.toString().equals(repo.getName())) {
- changed = true;
- repo.setNickname(value.toString());
- if (comparator.getSortKey() == RepositoryDetailsLabelProvider.COL_NAME)
- repositoryViewer.refresh(true);
- else
- repositoryViewer.update(repo, null);
- }
- }
- }
-
- });
- repositoryViewer.setColumnProperties(new String[] {"nickname"}); //$NON-NLS-1$
- repositoryViewer.setCellEditors(new CellEditor[] {new TextCellEditor(repositoryViewer.getTable())});
-
- repositoryViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- if (policy.getRepositoriesVisible())
- validateButtons();
- setDetails();
- }
- });
-
- repositoryViewer.setCheckStateProvider(new ICheckStateProvider() {
- public boolean isChecked(Object element) {
- return ((MetadataRepositoryElement) element).isEnabled();
- }
-
- public boolean isGrayed(Object element) {
- return false;
- }
- });
-
- repositoryViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- MetadataRepositoryElement element = (MetadataRepositoryElement) event.getElement();
- element.setEnabled(event.getChecked());
- // paranoid that an equal but not identical element was passed in as the selection.
- // update the cache map just in case.
- getInput().put(element);
- // update the viewer to show the change
- updateForEnablementChange(new MetadataRepositoryElement[] {element});
- }
- });
-
- // Input last
- repositoryViewer.setInput(getInput());
-
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- data.widthHint = convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_WIDTH);
- data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_TABLE_HEIGHT);
- table.setLayoutData(data);
-
- // Drop targets and vertical buttons only if repository manipulation is provided.
- if (policy.getRepositoriesVisible()) {
- DropTarget target = new DropTarget(table, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
- target.setTransfer(new Transfer[] {URLTransfer.getInstance(), FileTransfer.getInstance()});
- target.addDropListener(new RepositoryManipulatorDropTarget(ui, table));
-
- // Vertical buttons
- Composite verticalButtonBar = createVerticalButtonBar(composite);
- data = new GridData(SWT.FILL, SWT.FILL, false, false);
- data.verticalAlignment = SWT.TOP;
- data.verticalIndent = 0;
- verticalButtonBar.setLayoutData(data);
- listener = getViewerProvisioningListener();
-
- ProvUI.addProvisioningListener(listener);
- composite.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- ProvUI.removeProvisioningListener(listener);
- }
- });
-
- validateButtons();
- }
-
- // Details area
- details = new Text(composite, SWT.READ_ONLY | SWT.WRAP);
- data = new GridData(SWT.FILL, SWT.FILL, true, false);
- data.heightHint = convertHeightInCharsToPixels(ILayoutConstants.DEFAULT_SITEDETAILS_HEIGHT);
-
- details.setLayoutData(data);
-
- Dialog.applyDialogFont(composite);
- return composite;
- }
-
- private Button createVerticalButton(Composite parent, String label, boolean defaultButton) {
- Button button = new Button(parent, SWT.PUSH);
- button.setText(label);
-
- GridData data = setVerticalButtonLayoutData(button);
- data.horizontalAlignment = GridData.FILL;
-
- button.setToolTipText(label);
- if (defaultButton) {
- Shell shell = parent.getShell();
- if (shell != null) {
- shell.setDefaultButton(button);
- }
- }
- return button;
- }
-
- private GridData setVerticalButtonLayoutData(Button button) {
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- data.widthHint = Math.max(widthHint, minSize.x);
- button.setLayoutData(data);
- return data;
- }
-
- private void setTableColumns() {
- table.setHeaderVisible(true);
- String[] columnHeaders;
- if (policy.getRepositoriesVisible())
- columnHeaders = new String[] {ProvUIMessages.RepositoryManipulationPage_NameColumnTitle, ProvUIMessages.RepositoryManipulationPage_LocationColumnTitle, ProvUIMessages.RepositoryManipulationPage_EnabledColumnTitle};
- else
- columnHeaders = new String[] {ProvUIMessages.RepositoryManipulationPage_NameColumnTitle, ProvUIMessages.RepositoryManipulationPage_LocationColumnTitle};
- for (int i = 0; i < columnHeaders.length; i++) {
- TableColumn tc = new TableColumn(table, SWT.NONE, i);
- tc.setResizable(true);
- tc.setText(columnHeaders[i]);
- if (i == RepositoryDetailsLabelProvider.COL_ENABLEMENT) {
- tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_SMALL_COLUMN_WIDTH));
- tc.setAlignment(SWT.CENTER);
- } else if (i == RepositoryDetailsLabelProvider.COL_NAME) {
- tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_COLUMN_WIDTH));
- } else {
- tc.setWidth(convertWidthInCharsToPixels(ILayoutConstants.DEFAULT_PRIMARY_COLUMN_WIDTH));
- }
- tc.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- columnSelected((TableColumn) e.widget);
- }
-
- public void widgetSelected(SelectionEvent e) {
- columnSelected((TableColumn) e.widget);
- }
-
- });
- // First column only
- if (i == 0) {
- table.setSortColumn(tc);
- table.setSortDirection(SWT.UP);
- }
- }
- }
-
- private Composite createVerticalButtonBar(Composite parent) {
- // Create composite.
- Composite composite = new Composite(parent, SWT.NONE);
- initializeDialogUnits(composite);
-
- // create a layout with spacing and margins appropriate for the font
- // size.
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginWidth = 5;
- layout.marginHeight = 0;
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- composite.setLayout(layout);
-
- createVerticalButtons(composite);
- return composite;
- }
-
- private void createVerticalButtons(Composite parent) {
- addButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Add, false);
- addButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- addRepository();
- }
- });
-
- editButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Edit, false);
- editButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- changeRepositoryProperties();
- }
- });
-
- removeButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Remove, false);
- removeButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- removeRepositories();
- }
- });
-
- refreshButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_RefreshConnection, false);
- refreshButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- refreshRepository();
- }
- });
-
- disableButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_DisableButton, false);
- disableButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- toggleRepositoryEnablement();
- }
- });
-
- Button button = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Import, false);
- button.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- importRepositories();
- }
- });
-
- exportButton = createVerticalButton(parent, ProvUIMessages.RepositoryManipulationPage_Export, false);
- exportButton.addListener(SWT.Selection, new Listener() {
- public void handleEvent(Event event) {
- exportRepositories();
- }
- });
- }
-
- CachedMetadataRepositories getInput() {
- if (input == null)
- input = new CachedMetadataRepositories();
- return input;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performOk()
- */
- public boolean performOk() {
- if (changed)
- ElementUtils.updateRepositoryUsingElements(getElements(), getShell());
- return super.performOk();
- }
-
- private StructuredViewerProvisioningListener getViewerProvisioningListener() {
- return new StructuredViewerProvisioningListener(RepositoryManipulationPage.this.getClass().getName(), repositoryViewer, ProvUIProvisioningListener.PROV_EVENT_METADATA_REPOSITORY) {
- protected void repositoryDiscovered(RepositoryEvent e) {
- RepositoryManipulationPage.this.safeRefresh(null);
- }
-
- protected void repositoryChanged(RepositoryEvent e) {
- RepositoryManipulationPage.this.safeRefresh(null);
- }
- };
- }
-
- MetadataRepositoryElement[] getElements() {
- return getInput().getElements();
- }
-
- MetadataRepositoryElement[] getSelectedElements() {
- Object[] items = ((IStructuredSelection) repositoryViewer.getSelection()).toArray();
- ArrayList<Object> list = new ArrayList<Object>(items.length);
- for (int i = 0; i < items.length; i++) {
- if (items[i] instanceof MetadataRepositoryElement)
- list.add(items[i]);
- }
- return list.toArray(new MetadataRepositoryElement[list.size()]);
- }
-
- void validateButtons() {
- MetadataRepositoryElement[] elements = getSelectedElements();
- exportButton.setEnabled(elements.length > 0);
- removeButton.setEnabled(elements.length > 0);
- editButton.setEnabled(elements.length == 1);
- refreshButton.setEnabled(elements.length == 1);
- if (elements.length >= 1) {
- if (toggleMeansDisable(elements))
- disableButton.setText(ProvUIMessages.RepositoryManipulationPage_DisableButton);
- else
- disableButton.setText(ProvUIMessages.RepositoryManipulationPage_EnableButton);
- disableButton.setEnabled(true);
- } else {
- disableButton.setText(ProvUIMessages.RepositoryManipulationPage_EnableButton);
- disableButton.setEnabled(false);
- }
- }
-
- void addRepository() {
- AddRepositoryDialog dialog = new AddRepositoryDialog(getShell(), ui) {
- protected RepositoryTracker getRepositoryTracker() {
- return RepositoryManipulationPage.this.getLocalCacheRepoTracker();
- }
- };
- dialog.setTitle(ProvUIMessages.ColocatedRepositoryManipulator_AddSiteOperationLabel);
- dialog.open();
- }
-
- void refreshRepository() {
- final MetadataRepositoryElement[] selected = getSelectedElements();
- final ProvisionException[] fail = new ProvisionException[1];
- final boolean[] remove = new boolean[1];
- remove[0] = false;
- if (selected.length != 1)
- return;
- final URI location = selected[0].getLocation();
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
- try {
- dialog.run(true, true, new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- monitor.beginTask(NLS.bind(ProvUIMessages.RepositoryManipulationPage_ContactingSiteMessage, location), 100);
- try {
- // Batch the events for this operation so that any events on reload (discovery, etc.) will be ignored
- // in the UI as they happen.
- ui.signalRepositoryOperationStart();
- tracker.clearRepositoryNotFound(location);
- // If the managers don't know this repo, refreshing it will not work.
- // We temporarily add it, but we must remove it in case the user cancels out of this page.
- if (!includesRepo(tracker.getKnownRepositories(ui.getSession()), location)) {
- remove[0] = true;
- // We don't want to use the tracker here because it ensures that additions are
- // reported as user events to be responded to. We don't want, for example, the
- // install wizard to change combo selections based on what is done here.
- ProvUI.getMetadataRepositoryManager(ui.getSession()).addRepository(location);
- ProvUI.getArtifactRepositoryManager(ui.getSession()).addRepository(location);
- }
- // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=312332
- // We assume repository colocation here. Ideally we should not do this, but the
- // RepositoryTracker API is swallowing the refresh errors.
- SubMonitor sub = SubMonitor.convert(monitor, 200);
- try {
- ProvUI.getMetadataRepositoryManager(ui.getSession()).refreshRepository(location, sub.newChild(100));
- } catch (ProvisionException e) {
- fail[0] = e;
- }
- try {
- ProvUI.getArtifactRepositoryManager(ui.getSession()).refreshRepository(location, sub.newChild(100));
- } catch (ProvisionException e) {
- // Failure in the artifact repository. We will not report this because the user has no separate visibility
- // of the artifact repository. We should log the error. If this repository fails during a download, the error
- // will be reported at that time to the user, when it matters. This also prevents false error reporting when
- // a metadata repository didn't actually have a colocated artifact repository.
- LogHelper.log(e);
- }
- } catch (OperationCanceledException e) {
- // Catch canceled login attempts
- fail[0] = new ProvisionException(new Status(IStatus.CANCEL, ProvUIActivator.PLUGIN_ID, ProvUIMessages.RepositoryManipulationPage_RefreshOperationCanceled, e));
- } finally {
- // Check if the monitor was canceled
- if (fail[0] == null && monitor.isCanceled())
- fail[0] = new ProvisionException(new Status(IStatus.CANCEL, ProvUIActivator.PLUGIN_ID, ProvUIMessages.RepositoryManipulationPage_RefreshOperationCanceled));
- // If we temporarily added a repo so we could read it, remove it.
- if (remove[0]) {
- ProvUI.getMetadataRepositoryManager(ui.getSession()).removeRepository(location);
- ProvUI.getArtifactRepositoryManager(ui.getSession()).removeRepository(location);
- }
- ui.signalRepositoryOperationComplete(null, false);
- }
- }
- });
- } catch (InvocationTargetException e) {
- // nothing to report
- } catch (InterruptedException e) {
- // nothing to report
- }
- if (fail[0] != null) {
- // If the repo was not found, tell ProvUI that we will be reporting it.
- // We are going to report problems directly to the status manager because we
- // do not want the automatic repo location editing to kick in.
- if (fail[0].getStatus().getCode() == ProvisionException.REPOSITORY_NOT_FOUND) {
- tracker.addNotFound(location);
- }
- if (!fail[0].getStatus().matches(IStatus.CANCEL)) {
- // An error is only shown if the dialog was not canceled
- ProvUI.handleException(fail[0], null, StatusManager.SHOW);
- }
- } else {
- // Confirm that it was successful
- MessageDialog.openInformation(getShell(), ProvUIMessages.RepositoryManipulationPage_TestConnectionTitle, NLS.bind(ProvUIMessages.RepositoryManipulationPage_TestConnectionSuccess, URIUtil.toUnencodedString(location)));
- }
- repositoryViewer.update(selected[0], null);
- setDetails();
- }
-
- boolean includesRepo(URI[] repos, URI repo) {
- for (int i = 0; i < repos.length; i++)
- if (repos[i].equals(repo))
- return true;
- return false;
- }
-
- void toggleRepositoryEnablement() {
- MetadataRepositoryElement[] selected = getSelectedElements();
- if (selected.length >= 1) {
- boolean enableSites = !toggleMeansDisable(selected);
- for (int i = 0; i < selected.length; i++) {
- selected[i].setEnabled(enableSites);
- getInput().put(selected[i]);
- }
- updateForEnablementChange(selected);
- }
- validateButtons();
- }
-
- void updateForEnablementChange(MetadataRepositoryElement[] updated) {
- if (comparator.getSortKey() == RepositoryDetailsLabelProvider.COL_ENABLEMENT)
- repositoryViewer.refresh(true);
- else
- for (int i = 0; i < updated.length; i++)
- repositoryViewer.update(updated[i], null);
- changed = true;
- }
-
- void importRepositories() {
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- MetadataRepositoryElement[] imported = UpdateManagerCompatibility.importSites(getShell());
- if (imported.length > 0) {
- changed = true;
- for (int i = 0; i < imported.length; i++)
- getInput().put(imported[i]);
- safeRefresh(null);
- }
- }
- });
- }
-
- void exportRepositories() {
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- MetadataRepositoryElement[] elements = getSelectedElements();
- if (elements.length == 0)
- elements = getElements();
- UpdateManagerCompatibility.exportSites(getShell(), elements);
- }
- });
- }
-
- void changeRepositoryProperties() {
- final MetadataRepositoryElement[] selected = getSelectedElements();
- if (selected.length != 1)
- return;
- RepositoryNameAndLocationDialog dialog = new RepositoryNameAndLocationDialog(getShell(), ui) {
- protected String getInitialLocationText() {
- return URIUtil.toUnencodedString(selected[0].getLocation());
- }
-
- protected String getInitialNameText() {
- return selected[0].getName();
- }
-
- };
- int retCode = dialog.open();
- if (retCode == Window.OK) {
- selected[0].setNickname(dialog.getName());
- selected[0].setLocation(dialog.getLocation());
- changed = true;
- repositoryViewer.update(selected[0], null);
- setDetails();
- }
- }
-
- void columnSelected(TableColumn tc) {
- TableColumn[] cols = table.getColumns();
- for (int i = 0; i < cols.length; i++) {
- if (cols[i] == tc) {
- if (i != comparator.getSortKey()) {
- comparator.setSortKey(i);
- table.setSortColumn(tc);
- comparator.sortAscending();
- table.setSortDirection(SWT.UP);
- } else {
- if (comparator.isAscending()) {
- table.setSortDirection(SWT.DOWN);
- comparator.sortDescending();
- } else {
- table.setSortDirection(SWT.UP);
- comparator.sortAscending();
- }
- }
- repositoryViewer.refresh();
- break;
- }
- }
- }
-
- void safeRefresh(final MetadataRepositoryElement elementToSelect) {
- Runnable runnable = new Runnable() {
- public void run() {
- repositoryViewer.refresh();
- if (elementToSelect != null)
- repositoryViewer.setSelection(new StructuredSelection(elementToSelect), true);
- }
- };
- if (Display.getCurrent() == null)
- display.asyncExec(runnable);
- else
- runnable.run();
- }
-
- void applyFilter() {
- String text = pattern.getText();
- if (text == DEFAULT_FILTER_TEXT)
- text = ""; //$NON-NLS-1$
- if (text.length() == 0)
- filter.setPattern(null);
- else
- filter.setPattern(text);
- if (filterJob != null)
- filterJob.cancel();
- filterJob = new WorkbenchJob("filter job") { //$NON-NLS-1$
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (monitor.isCanceled())
- return Status.CANCEL_STATUS;
- if (!repositoryViewer.getTable().isDisposed())
- repositoryViewer.refresh();
- return Status.OK_STATUS;
- }
-
- };
- filterJob.setSystem(true);
- filterJob.schedule(FILTER_DELAY);
- }
-
- void setDetails() {
- MetadataRepositoryElement[] selections = getSelectedElements();
- if (selections.length == 1) {
- details.setText(selections[0].getDescription());
- } else {
- details.setText(""); //$NON-NLS-1$
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
- public void init(IWorkbench workbench) {
- noDefaultAndApplyButton();
- if (ui == null) {
- setProvisioningUI(ProvisioningUI.getDefaultUI());
- }
- }
-
- void removeRepositories() {
- MetadataRepositoryElement[] selections = getSelectedElements();
- if (selections.length > 0) {
- String message = ProvUIMessages.RepositoryManipulationPage_RemoveConfirmMessage;
- if (selections.length == 1)
- message = NLS.bind(ProvUIMessages.RepositoryManipulationPage_RemoveConfirmSingleMessage, URIUtil.toUnencodedString(selections[0].getLocation()));
- if (MessageDialog.openQuestion(getShell(), ProvUIMessages.RepositoryManipulationPage_RemoveConfirmTitle, message)) {
-
- changed = true;
- for (int i = 0; i < selections.length; i++) {
- getInput().remove(selections[i]);
- }
- safeRefresh(null);
- }
- }
- }
-
- // Return a repo manipulator that only operates on the local cache.
- // Labels and other presentation info are used from the original manipulator.
- RepositoryTracker getLocalCacheRepoTracker() {
- if (localCacheRepoManipulator == null)
- localCacheRepoManipulator = new RepositoryTracker() {
- public void addRepository(URI location, String nickname, ProvisioningSession session) {
- MetadataRepositoryElement element = getInput().get(location);
- if (element == null) {
- element = new MetadataRepositoryElement(getInput(), location, true);
- getInput().put(element);
- }
- if (nickname != null)
- element.setNickname(nickname);
- changed = true;
- safeRefresh(element);
- }
-
- public URI[] getKnownRepositories(ProvisioningSession session) {
- return RepositoryManipulationPage.this.getKnownRepositories();
- }
-
- public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
- RepositoryManipulationPage.this.removeRepositories();
- }
-
- public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
- // Nothing to refresh in the local cache
- }
-
- public IStatus validateRepositoryLocation(ProvisioningSession session, URI location, boolean contactRepositories, IProgressMonitor monitor) {
- IStatus status = super.validateRepositoryLocation(session, location, contactRepositories, monitor);
- if (status.isOK()) {
- String repoString = URIUtil.toUnencodedString(location);
- int length = repoString.length();
- if (length > 0 && repoString.charAt(length - 1) == '/') {
- try {
- location = URIUtil.fromString(repoString.substring(0, length - 1));
- } catch (URISyntaxException e) {
- return status;
- }
- status = super.validateRepositoryLocation(session, location, contactRepositories, monitor);
- }
- }
- return status;
-
- }
- };
- return localCacheRepoManipulator;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.ui.ICopyable#copyToClipboard(org.eclipse.swt.widgets.Control)
- */
- public void copyToClipboard(Control activeControl) {
- MetadataRepositoryElement[] elements = getSelectedElements();
- if (elements.length == 0)
- elements = getElements();
- String text = ""; //$NON-NLS-1$
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < elements.length; i++) {
- buffer.append(labelProvider.getClipboardText(elements[i], CopyUtils.DELIMITER));
- if (i > 0)
- buffer.append(CopyUtils.NEWLINE);
- }
- text = buffer.toString();
-
- if (text.length() == 0)
- return;
- Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
- clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
- clipboard.dispose();
- }
-
- // If more than half of the selected repos are enabled, toggle means disable.
- // Otherwise it means enable.
- private boolean toggleMeansDisable(MetadataRepositoryElement[] elements) {
- double count = 0;
- for (int i = 0; i < elements.length; i++)
- if (elements[i].isEnabled())
- count++;
- return (count / elements.length) > 0.5;
- }
-
- URI[] getKnownRepositories() {
- MetadataRepositoryElement[] elements = getElements();
- URI[] locations = new URI[elements.length];
- for (int i = 0; i < elements.length; i++)
- locations[i] = elements[i].getLocation();
- return locations;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java
deleted file mode 100644
index 1456612ca..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/RevertProfilePage.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.ui;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.p2.ui.*;
-import org.eclipse.equinox.internal.p2.ui.dialogs.CopyUtils;
-import org.eclipse.equinox.internal.p2.ui.dialogs.InstalledIUGroup;
-import org.eclipse.equinox.internal.p2.ui.model.ProfileSnapshots;
-import org.eclipse.equinox.internal.p2.ui.model.RollbackProfileElement;
-import org.eclipse.equinox.internal.p2.ui.viewers.*;
-import org.eclipse.equinox.p2.core.ProvisionException;
-import org.eclipse.equinox.p2.engine.*;
-import org.eclipse.equinox.p2.operations.*;
-import org.eclipse.equinox.p2.planner.IPlanner;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.*;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.dnd.*;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.about.InstallationPage;
-import org.eclipse.ui.menus.AbstractContributionFactory;
-import org.eclipse.ui.statushandlers.StatusManager;
-
-/**
- * RevertProfilePage displays a profile's configuration history in
- * an Installation Page. Clients can use this class as the implementation
- * class for an installationPages extension.
- *
- * @see InstallationPage
- *
- * @noextend This class is not intended to be subclassed by clients.
- * @noinstantiate This class is not intended to be instantiated by clients.
- * @since 2.0
- *
- */
-public class RevertProfilePage extends InstallationPage implements ICopyable {
-
- private static final int REVERT_ID = IDialogConstants.CLIENT_ID;
- private static final int DELETE_ID = IDialogConstants.CLIENT_ID + 1;
- TableViewer configsViewer;
- TreeViewer configContentsViewer;
- IUDetailsLabelProvider labelProvider;
- IAction revertAction;
- Button revertButton, deleteButton;
- String profileId;
- AbstractContributionFactory factory;
- Text detailsArea;
- InstalledIUGroup installedIUGroup;
- ProvisioningUI ui;
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.about.InstallationPage#createPageButtons(org.eclipse.swt.widgets.Composite)
- */
- public void createPageButtons(Composite parent) {
- if (profileId == null)
- return;
- deleteButton = createButton(parent, DELETE_ID, ProvUIMessages.RevertProfilePage_Delete);
- deleteButton.setToolTipText(ProvUIMessages.RevertProfilePage_DeleteTooltip);
- deleteButton.setEnabled(computeDeleteEnablement());
- revertButton = createButton(parent, REVERT_ID, revertAction.getText());
- revertButton.setToolTipText(revertAction.getToolTipText());
- revertButton.setEnabled(revertAction.isEnabled());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- ui = ProvisioningUI.getDefaultUI();
- profileId = ui.getProfileId();
- if (profileId == null) {
- IStatus status = ui.getPolicy().getNoProfileChosenStatus();
- if (status != null)
- ProvUI.reportStatus(status, StatusManager.LOG);
- Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY);
- text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- text.setText(ProvUIMessages.RevertProfilePage_NoProfile);
- setControl(text);
- return;
- }
-
- initializeDialogUnits(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvHelpContextIds.REVERT_CONFIGURATION_WIZARD);
-
- SashForm sashForm = new SashForm(parent, SWT.VERTICAL);
- sashForm.setLayout(new GridLayout());
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- sashForm.setLayoutData(gd);
-
- createConfigurationsSection(sashForm);
- createContentsSection(sashForm);
- setControl(sashForm);
-
- // prime the selection. The selection accesses the
- // revert action, so create it also.
- createRevertAction();
- }
-
- private void createConfigurationsSection(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gd);
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(ProvUIMessages.RevertDialog_ConfigsLabel);
- configsViewer = new TableViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- ProvElementContentProvider provider = new ProvElementContentProvider() {
- protected void finishedFetchingElements(Object o) {
- Object element = configsViewer.getElementAt(0);
- if (element != null)
- configsViewer.setSelection(new StructuredSelection(element));
- }
- };
- // Use deferred fetch because getting snapshots is expensive.
- provider.setFetchInBackground(true);
- configsViewer.setContentProvider(provider);
- configsViewer.setLabelProvider(new ProvElementLabelProvider());
- configsViewer.setComparator(new ViewerComparator() {
- // We override the ViewerComparator so that we don't get the labels of the elements
- // for comparison, but rather get the timestamps and compare them.
- // Reverse sorting is used so that newest is first.
- public int compare(Viewer viewer, Object o1, Object o2) {
- if (o1 instanceof RollbackProfileElement && o2 instanceof RollbackProfileElement) {
- long timestamp1 = ((RollbackProfileElement) o1).getTimestamp();
- long timestamp2 = ((RollbackProfileElement) o2).getTimestamp();
- if (timestamp1 > timestamp2)
- return -1;
- return 1;
- }
- // this is naive (doesn't consult the label provider), but shouldn't happen
- return o2.toString().compareTo(o1.toString());
- }
- });
- configsViewer.setInput(getInput());
-
- configsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- handleSelectionChanged((IStructuredSelection) event.getSelection());
- }
-
- });
- CopyUtils.activateCopy(this, configsViewer.getControl());
- gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- configsViewer.getControl().setLayoutData(gd);
- }
-
- private void createContentsSection(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- composite.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gd);
-
- Label label = new Label(composite, SWT.NONE);
- label.setText(ProvUIMessages.RevertDialog_ConfigContentsLabel);
- configContentsViewer = new TreeViewer(composite, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- IUComparator comparator = new IUComparator(IUComparator.IU_NAME);
- comparator.useColumnConfig(ProvUI.getIUColumnConfig());
- configContentsViewer.setComparator(comparator);
- configContentsViewer.setComparer(new ProvElementComparer());
- configContentsViewer.setContentProvider(new DeferredQueryContentProvider());
-
- // columns before labels or you get a blank table
- setTreeColumns(configContentsViewer.getTree());
- labelProvider = new IUDetailsLabelProvider();
- configContentsViewer.setLabelProvider(labelProvider);
-
- gd = new GridData(GridData.FILL_BOTH);
- configContentsViewer.getControl().setLayoutData(gd);
- CopyUtils.activateCopy(this, configContentsViewer.getControl());
- }
-
- private void createRevertAction() {
- revertAction = new Action() {
- public void run() {
- boolean result = MessageDialog.openQuestion(getShell(), ProvUIMessages.RevertDialog_Title, ProvUIMessages.RevertDialog_ConfirmRestartMessage);
- if (!result)
- return;
- boolean finish = revert();
- if (finish) {
- getPageContainer().closeModalContainers();
- }
- }
- };
- revertAction.setText(ProvUIMessages.RevertProfilePage_RevertLabel);
- revertAction.setToolTipText(ProvUIMessages.RevertProfilePage_RevertTooltip);
- }
-
- private Object getInput() {
- ProfileSnapshots element = new ProfileSnapshots(profileId);
- return element;
- }
-
- protected void buttonPressed(int buttonId) {
- switch (buttonId) {
- case REVERT_ID :
- revertAction.run();
- break;
- case DELETE_ID :
- deleteSelectedSnapshots();
- break;
- }
- }
-
- protected void handleSelectionChanged(IStructuredSelection selection) {
- if (!selection.isEmpty()) {
- if (selection.size() == 1) {
- final Object selected = selection.getFirstElement();
- if (selected instanceof RollbackProfileElement) {
- Object[] elements = configContentsViewer.getExpandedElements();
- configContentsViewer.getTree().setRedraw(false);
- configContentsViewer.setInput(selected);
- configContentsViewer.setExpandedElements(elements);
- configContentsViewer.getTree().setRedraw(true);
- boolean isNotCurrentProfile = !((RollbackProfileElement) selected).isCurrentProfile();
- revertAction.setEnabled(isNotCurrentProfile);
- if (revertButton != null)
- revertButton.setEnabled(isNotCurrentProfile);
- if (deleteButton != null)
- deleteButton.setEnabled(isNotCurrentProfile);
- return;
- }
- } else {
- // multiple selections, can't revert or look at details
- revertAction.setEnabled(false);
- if (revertButton != null) {
- revertButton.setEnabled(false);
- }
- configContentsViewer.setInput(null);
- deleteButton.setEnabled(computeDeleteEnablement());
- return;
- }
- }
- // Nothing is selected
- configContentsViewer.setInput(null);
- revertAction.setEnabled(false);
- if (revertButton != null)
- revertButton.setEnabled(false);
- if (deleteButton != null)
- deleteButton.setEnabled(computeDeleteEnablement());
- }
-
- boolean computeDeleteEnablement() {
- // delete is permitted if none of the selected elements are the current profile
- boolean okToDelete = true;
- Iterator<?> iter = ((IStructuredSelection) configsViewer.getSelection()).iterator();
- while (iter.hasNext()) {
- Object selected = iter.next();
- // If it's not a recognized element or if it is the current profile, we can't delete. Stop iterating.
- if (!(selected instanceof RollbackProfileElement) || ((RollbackProfileElement) selected).isCurrentProfile()) {
- okToDelete = false;
- break;
- }
- }
- return okToDelete;
- }
-
- private void setTreeColumns(Tree tree) {
- IUColumnConfig[] columns = ProvUI.getIUColumnConfig();
- tree.setHeaderVisible(true);
-
- for (int i = 0; i < columns.length; i++) {
- TreeColumn tc = new TreeColumn(tree, SWT.NONE, i);
- tc.setResizable(true);
- tc.setText(columns[i].getColumnTitle());
- tc.setWidth(columns[i].getWidthInPixels(tree));
- }
- }
-
- private IProfile getSelectedSnapshot() {
- Object selected = ((IStructuredSelection) configsViewer.getSelection()).getFirstElement();
- if (selected != null && selected instanceof RollbackProfileElement)
- return ((RollbackProfileElement) selected).getProfileSnapshot(new NullProgressMonitor());
- return null;
- }
-
- boolean revert() {
- final IProfile snapshot = getSelectedSnapshot();
- if (snapshot == null)
- return false;
- final IProvisioningPlan[] plan = new IProvisioningPlan[1];
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor) {
- IProfile currentProfile;
- IProfileRegistry registry = ProvUI.getProfileRegistry(getSession());
- IPlanner planner = (IPlanner) getSession().getProvisioningAgent().getService(IPlanner.SERVICE_NAME);
- currentProfile = registry.getProfile(profileId);
- plan[0] = planner.getDiffPlan(currentProfile, snapshot, monitor);
- }
- };
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell());
- try {
- dialog.run(true, true, runnable);
- } catch (InvocationTargetException e) {
- ProvUI.handleException(e.getCause(), null, StatusManager.SHOW | StatusManager.LOG);
- } catch (InterruptedException e) {
- // nothing to report
- }
- // the dialog does not throw OperationCanceledException so we have to
- // check the monitor
- if (dialog.getProgressMonitor().isCanceled())
- return false;
-
- boolean reverted = false;
- if (plan[0] != null) {
- if (plan[0].getStatus().isOK()) {
- // We use a default provisioning context (all repos) because we have no other
- // way currently to figure out which sites the user wants to contact
- ProfileModificationJob op = new ProfileModificationJob(ProvUIMessages.RevertDialog_RevertOperationLabel, getSession(), profileId, plan[0], new ProvisioningContext(getSession().getProvisioningAgent()));
- // we want to force a restart (not allow apply changes)
- op.setRestartPolicy(ProvisioningJob.RESTART_ONLY);
- ui.schedule(op, StatusManager.SHOW | StatusManager.LOG);
- reverted = true;
- } else if (plan[0].getStatus().getSeverity() != IStatus.CANCEL) {
- ProvUI.reportStatus(plan[0].getStatus(), StatusManager.LOG | StatusManager.SHOW);
- // This message has no effect in an installation dialog
- // setMessage(ProvUIMessages.ProfileModificationWizardPage_UnexpectedError, IMessageProvider.ERROR);
- }
- }
- return reverted;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.ui.ICopyable#copyToClipboard(org.eclipse.swt.widgets.Control)
- */
- public void copyToClipboard(Control activeControl) {
- String text = ""; //$NON-NLS-1$
- if (activeControl == configContentsViewer.getControl()) {
- text = CopyUtils.getIndentedClipboardText(((IStructuredSelection) configContentsViewer.getSelection()).toArray(), labelProvider);
- } else if (activeControl == configsViewer.getControl()) {
- Object[] elements = ((IStructuredSelection) configsViewer.getSelection()).toArray();
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof RollbackProfileElement) {
- if (i > 0)
- buffer.append(CopyUtils.NEWLINE);
- buffer.append(((RollbackProfileElement) elements[i]).getLabel(elements[i]));
- }
- }
- text = buffer.toString();
- } else
- return;
- if (text.length() == 0)
- return;
- Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
- clipboard.setContents(new Object[] {text}, new Transfer[] {TextTransfer.getInstance()});
- clipboard.dispose();
- }
-
- void deleteSelectedSnapshots() {
- IStructuredSelection selection = (IStructuredSelection) configsViewer.getSelection();
- if (selection.isEmpty())
- return;
- String title = selection.size() == 1 ? ProvUIMessages.RevertProfilePage_DeleteSingleConfigurationTitle : ProvUIMessages.RevertProfilePage_DeleteMultipleConfigurationsTitle;
- String confirmMessage = selection.size() == 1 ? ProvUIMessages.RevertProfilePage_ConfirmDeleteSingleConfig : ProvUIMessages.RevertProfilePage_ConfirmDeleteMultipleConfigs;
- if (MessageDialog.openConfirm(configsViewer.getControl().getShell(), title, confirmMessage)) {
- Iterator<?> iter = selection.iterator();
- while (iter.hasNext()) {
- Object selected = iter.next();
- // If it is a recognized element and it is not the current profile, then it can be deleted.
- if (selected instanceof RollbackProfileElement && !((RollbackProfileElement) selected).isCurrentProfile()) {
- RollbackProfileElement snapshot = (RollbackProfileElement) selected;
- IProfileRegistry registry = ProvUI.getProfileRegistry(getSession());
- if (registry != null) {
- try {
- registry.removeProfile(profileId, snapshot.getTimestamp());
- } catch (ProvisionException e) {
- ProvUI.handleException(e, null, StatusManager.SHOW | StatusManager.LOG);
- }
- }
- }
- }
- configsViewer.refresh();
- }
- }
-
- ProvisioningSession getSession() {
- return getProvisioningUI().getSession();
- }
-
- ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- protected IStructuredSelection getSelection() {
- return (IStructuredSelection) configsViewer.getSelection();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html
deleted file mode 100644
index 8dced36e6..000000000
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/package.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="IBM">
- <meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; I) [Netscape]">
- <title>Package-level Javadoc</title>
-</head>
-<body>
-Provides provisioning user interface classes that can be used for assembling
-a provisioning UI.
-<h2>
-Package Specification</h2>
-<p>
-This package consists of several kinds of classes:
-<ul>
-<li><b>ProvisioningUI</b> is the hub of the UI. It is used to access the underlying
-provisioning session and its services, as well as all services registered by the UI.
-It also provides utility methods that allow clients to create provisioning operations
-or launch provisioning wizards.
-</li>
-<li><b>Policy</b> defines those aspects of the provisioning UI that can be configured
-by clients.
-</li>
-<li><b>LicenseManager</b> describes a service which accepts or rejects
-licenses and remembers the accepted licenses. Clients should register
-an implementation of LicenseManager in order to remember the
-licenses.
-</li>
-<li>Various <b>pages</b> define reusable pages that can be hosted inside wizards
-and dialogs. In general, the pages are meant to be contributed by extension point.
-In some cases, direct instantiation of the pages is permitted. See the individual page
-javadoc for usage.
-</li>
-</ul>
-<p>
-@since 2.0
-</body>
-</html>
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.classpath b/bundles/org.eclipse.equinox.p2.updatechecker/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.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.updatechecker/.cvsignore b/bundles/org.eclipse.equinox.p2.updatechecker/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.project b/bundles/org.eclipse.equinox.p2.updatechecker/.project
deleted file mode 100644
index c6151439a..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.updatechecker</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index e515fdb64..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,329 +0,0 @@
-#Wed Dec 30 07:21:17 CET 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-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=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-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=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=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
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
-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.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
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-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_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
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index dbe72f165..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:14 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 6904bd96c..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Sat Aug 11 20:17:52 EDT 2007
-eclipse.preferences.version=1
-pluginProject.extensions=false
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
deleted file mode 100644
index 1efcb2e09..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.equinox.p2.updatechecker;singleton:=true
-Bundle-Version: 1.1.200.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.equinox.internal.p2.updatechecker;x-internal:=true,
- org.eclipse.equinox.internal.provisional.p2.updatechecker;x-friends:="org.eclipse.equinox.p2.ui.sdk.scheduler"
-Require-Bundle: org.eclipse.equinox.common;bundle-version="[3.3.0,4.0)"
-Service-Component: OSGI-INF/updatechecker.xml
-Bundle-RequiredExecutionEnvironment: J2SE-1.5,
- J2SE-1.4,
- CDC-1.1/Foundation-1.1
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.internal.p2.core.helpers,
- org.eclipse.equinox.p2.core;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.core.spi;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.engine;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.planner;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.query;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.repository.metadata;version="[2.0.0,3.0.0)"
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml b/bundles/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml
deleted file mode 100644
index 97a3e7887..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/OSGI-INF/updatechecker.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.updatechecker">
- <implementation class="org.eclipse.equinox.internal.p2.updatechecker.UpdateCheckerComponent"/>
- <service>
- <provide interface="org.eclipse.equinox.p2.core.spi.IAgentServiceFactory"/>
- </service>
- <property name="p2.agent.servicename" type="String" value="org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/about.html b/bundles/org.eclipse.equinox.p2.updatechecker/about.html
deleted file mode 100644
index d62785d75..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/about.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
- <h3>Third Party Content</h3>
- <p>The Content includes items that have been sourced from third parties as set out below. If you
- did not receive this Content directly from the Eclipse Foundation, the following is provided
- for informational purposes only, and you should look to the Redistributor's license for
- terms and conditions of use.</p>
-
- <h4>FileInstall 1.0</h4>
- <p>The bundle includes derivative works of software originally developed by Peter Kriens (aQute).
- That original work was licensed under the EPL v1.0 and this derivative work is similarly licensed.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/build.properties b/bundles/org.eclipse.equinox.p2.updatechecker/build.properties
deleted file mode 100644
index c15f3da6f..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- OSGI-INF/
-src.includes = about.html
-javacSource = 1.5
-javacTarget = jsr14
-source.. = src/
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties b/bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties
deleted file mode 100644
index 3c8feb57a..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-pluginName = Equinox Provisioning Update Checker
-providerName = Eclipse.org - Equinox
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml b/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml
deleted file mode 100644
index fe21958bb..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.updatechecker</artifactId>
- <version>1.1.100.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
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
deleted file mode 100644
index f3b4b2a65..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateChecker.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.updatechecker;
-
-import java.net.URI;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.*;
-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.planner.IPlanner;
-import org.eclipse.equinox.p2.query.*;
-import org.eclipse.equinox.p2.repository.IRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-
-/**
- * Default implementation of {@link IUpdateChecker}.
- * <p>
- * This implementation is not optimized. It doesn't optimize for multiple
- * polls on the same profile, nor does it cache any info about a profile from
- * poll to poll.
- */
-public class UpdateChecker implements IUpdateChecker {
- public static boolean DEBUG = false;
- public static boolean TRACE = false;
- /**
- * Map of IUpdateListener->UpdateCheckThread.
- */
- private HashMap<IUpdateListener, UpdateCheckThread> checkers = new HashMap<IUpdateListener, UpdateCheckThread>();
-
- private final IProvisioningAgent agent;
- IProfileRegistry profileRegistry;
- IPlanner planner;
-
- private class UpdateCheckThread extends Thread {
- boolean done = false;
- long poll, delay;
- IUpdateListener listener;
- String profileId;
- IQuery<IInstallableUnit> query;
-
- UpdateCheckThread(String profileId, IQuery<IInstallableUnit> query, long delay, long poll, IUpdateListener listener) {
- this.poll = poll;
- this.delay = delay;
- this.profileId = profileId;
- this.query = query;
- this.listener = listener;
- }
-
- public void run() {
- try {
- if (delay != ONE_TIME_CHECK && delay > 0) {
- Thread.sleep(delay);
- }
- while (!done) {
-
- trace("Checking for updates for " + profileId + " at " + getTimeStamp()); //$NON-NLS-1$ //$NON-NLS-2$
- 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)
- listener.updatesAvailable(event);
- } else {
- trace("No updates were available"); //$NON-NLS-1$
- }
- if (delay == ONE_TIME_CHECK || delay <= 0) {
- done = true;
- } else {
- Thread.sleep(poll);
- }
- }
- } catch (InterruptedException e) {
- // nothing
- } catch (Exception e) {
- LogHelper.log(new Status(IStatus.ERROR, UpdateCheckerComponent.BUNDLE_ID, "Exception in update check thread", e)); //$NON-NLS-1$
- }
- }
- }
-
- public UpdateChecker(IProvisioningAgent agent) {
- this.agent = agent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker#addUpdateCheck(java.lang.String, long, long, org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener)
- */
- public void addUpdateCheck(String profileId, IQuery<IInstallableUnit> query, long delay, long poll, IUpdateListener listener) {
- if (checkers.containsKey(listener))
- return;
- trace("Adding update checker for " + profileId + " at " + getTimeStamp()); //$NON-NLS-1$ //$NON-NLS-2$
- UpdateCheckThread thread = new UpdateCheckThread(profileId, query, delay, poll, listener);
- checkers.put(listener, thread);
- thread.start();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateChecker#removeUpdateCheck(org.eclipse.equinox.internal.provisional.p2.updatechecker.IUpdateListener)
- */
- public void removeUpdateCheck(IUpdateListener listener) {
- checkers.remove(listener);
- }
-
- /*
- * Return the array of ius in the profile that have updates
- * available.
- */
- Collection<IInstallableUnit> checkForUpdates(String profileId, IQuery<IInstallableUnit> query) {
- IProfile profile = getProfileRegistry().getProfile(profileId);
- ArrayList<IInstallableUnit> iusWithUpdates = new ArrayList<IInstallableUnit>();
- if (profile == null)
- return CollectionUtils.emptyList();
- ProvisioningContext context = new ProvisioningContext(agent);
- context.setMetadataRepositories(getAvailableRepositories());
- if (query == null)
- query = QueryUtil.createIUAnyQuery();
- Iterator<IInstallableUnit> iter = profile.query(query, null).iterator();
- while (iter.hasNext()) {
- IInstallableUnit iu = iter.next();
- IQueryResult<IInstallableUnit> replacements = getPlanner().updatesFor(iu, context, null);
- if (!replacements.isEmpty())
- iusWithUpdates.add(iu);
- }
- return iusWithUpdates;
- }
-
- /**
- * Returns the list of metadata repositories that are currently available.
- */
- private URI[] getAvailableRepositories() {
- IMetadataRepositoryManager repoMgr = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- URI[] repositories = repoMgr.getKnownRepositories(IRepositoryManager.REPOSITORIES_ALL);
- ArrayList<URI> available = new ArrayList<URI>();
- for (int i = 0; i < repositories.length; i++) {
- try {
- repoMgr.loadRepository(repositories[i], null);
- available.add(repositories[i]);
- } catch (ProvisionException e) {
- LogHelper.log(e.getStatus());
- }
- }
- return available.toArray(new URI[available.size()]);
- }
-
- void trace(String message) {
- if (Tracing.DEBUG_UPDATE_CHECK)
- Tracing.debug(message);
- }
-
- String getTimeStamp() {
- Date d = new Date();
- SimpleDateFormat df = new SimpleDateFormat("[MM/dd/yy;HH:mm:ss:SSS]"); //$NON-NLS-1$
- return df.format(d);
- }
-
- IPlanner getPlanner() {
- if (planner == null) {
- planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
- if (planner == null) {
- throw new IllegalStateException("Provisioning system has not been initialized"); //$NON-NLS-1$
- }
- }
- return planner;
- }
-
- IProfileRegistry getProfileRegistry() {
- if (profileRegistry == null) {
- profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME);
- if (profileRegistry == null) {
- throw new IllegalStateException("Provisioning system has not been initialized"); //$NON-NLS-1$
- }
- }
- return profileRegistry;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java
deleted file mode 100644
index e5c4e4d94..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/p2/updatechecker/UpdateCheckerComponent.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-
-package org.eclipse.equinox.internal.p2.updatechecker;
-
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory;
-
-/**
- * Component for instantiating update checker service instances.
- */
-public class UpdateCheckerComponent implements IAgentServiceFactory {
- public static final String BUNDLE_ID = "org.eclipse.equinox.p2.updatechecker"; //$NON-NLS-1$
-
- public Object createService(IProvisioningAgent agent) {
- return new UpdateChecker(agent);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java
deleted file mode 100644
index 31c6e5618..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateChecker.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.updatechecker;
-
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-import org.eclipse.equinox.p2.query.IQuery;
-
-/**
- * An update checker periodically polls for updates to specified profiles and
- * informs listeners if updates are available. Listeners may then determine
- * whether to retrieve the updates, inform the user, etc.
- */
-public interface IUpdateChecker {
- public static final String SERVICE_NAME = IUpdateChecker.class.getName();
- public static long ONE_TIME_CHECK = -1L;
-
- /**
- * Adds an update listener that will be notified when updates are available for all
- * installable units that satisfy the given query. The listener will remain
- * registered until removed using the {@link #removeUpdateCheck(IUpdateListener)}
- * method. Adding a listener that is identical to a listener that is already registered
- * has no effect.
- * <p>
- * Once the listener is registered, it will continue to receive notification of updates
- * based on the specified polling frequency. However, if a delay value of {@link #ONE_TIME_CHECK}
- * is used, only a single update check will occur for that listener. If this delay value
- * is used, the specified polling frequency is ignored.
- *
- * @param profileId The profile id to check for updates
- * @param iusToCheckQuery An installable unit query that matches the units to check for updates
- * @param delay The delay in milliseconds before the first query should occur, or {@link #ONE_TIME_CHECK}
- * to indicate that a single update check should occur immediately
- * @param poll The polling frequency, in milliseconds, between checks for updates
- * @param listener The listener to be notified of updates
- * @see #removeUpdateCheck(IUpdateListener)
- */
- public abstract void addUpdateCheck(String profileId, IQuery<IInstallableUnit> iusToCheckQuery, long delay, long poll, IUpdateListener listener);
-
- /**
- * Removes an update listener from the set of listeners registered with this update
- * checker. If an update check is currently in progress the listener may still receive
- * events after this method returns. Removing a listener that is not registered has
- * no effect.
- *
- * @param listener The listener to remove
- * @see #addUpdateCheck(String, IQuery, long, long, IUpdateListener)
- */
- public abstract void removeUpdateCheck(IUpdateListener listener);
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateListener.java b/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateListener.java
deleted file mode 100644
index 7cde63663..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/IUpdateListener.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.updatechecker;
-
-/**
- * An IUpdateListener informs listeners that an update is available for
- * the specified profile. Listeners should expect to receive this notification
- * from a background thread.
- */
-public interface IUpdateListener {
-
- public void updatesAvailable(UpdateEvent event);
-}
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
deleted file mode 100644
index 7c4a38890..000000000
--- a/bundles/org.eclipse.equinox.p2.updatechecker/src/org/eclipse/equinox/internal/provisional/p2/updatechecker/UpdateEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- * Sonatype, Inc. - ongoing development
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.p2.updatechecker;
-
-import java.util.Collection;
-import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-
-/**
- * An UpdateEvent describes what IU's have updates for a given profile.
- */
-public class UpdateEvent {
-
- String profileId;
- Collection<IInstallableUnit> iusWithUpdates;
-
- public UpdateEvent(String profileId, Collection<IInstallableUnit> iusWithUpdates) {
- this.profileId = profileId;
- this.iusWithUpdates = iusWithUpdates;
- }
-
- public Collection<IInstallableUnit> getIUs() {
- return iusWithUpdates;
- }
-
- public String getProfileId() {
- return profileId;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.classpath b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/CDC-1.1%Foundation-1.1"/>
- <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.simpleconfigurator.manipulator/.cvsignore b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.cvsignore
deleted file mode 100644
index d567ba01e..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-target
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project
deleted file mode 100644
index 4de3c836f..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.simpleconfigurator.manipulator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index a40cecb5e..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,343 +0,0 @@
-#Thu Mar 04 09:59:51 EST 2010
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.format_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=false
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index fe84d458f..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,57 +0,0 @@
-#Sun Sep 23 11:59:48 EDT 2007
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.format_source_code=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
deleted file mode 100644
index c4d585c60..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %bundleName
-Bundle-SymbolicName: org.eclipse.equinox.simpleconfigurator.manipulator;singleton:=true
-Bundle-Version: 2.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.equinox.frameworkadmin;version="[2.0.0,3.0.0)",
- org.eclipse.equinox.internal.frameworkadmin.equinox,
- org.eclipse.equinox.internal.frameworkadmin.utils,
- org.eclipse.equinox.internal.provisional.configuratormanipulator,
- org.eclipse.equinox.internal.provisional.frameworkadmin,
- org.eclipse.equinox.internal.simpleconfigurator,
- org.eclipse.equinox.internal.simpleconfigurator.utils,
- org.eclipse.osgi.service.datalocation,
- org.osgi.framework;version="1.3.0"
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.equinox.internal.simpleconfigurator.manipulator;x-friends:="org.eclipse.equinox.p2.touchpoint.eclipse",
- org.eclipse.equinox.simpleconfigurator.manipulator;version="2.0.0"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
-Require-Bundle: org.eclipse.equinox.common;bundle-version="3.5.0"
-Service-Component: OSGI-INF/configurator.xml
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml
deleted file mode 100644
index 0887bd3b1..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/OSGI-INF/configurator.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.simpleconfigurator.manipulator">
- <implementation class="org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl"/>
- <property name="org.eclipse.equinox.configurator.BundleSymbolicName" type="String" value="org.eclipse.equinox.simpleconfigurator"/>
- <property name="service.vendor" type="String" value="Eclipse.org"/>
- <service>
- <provide interface="org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator"/>
- <provide interface="org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties
deleted file mode 100644
index 3d8dfe4be..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- OSGI-INF/
-src.includes = about.html
-qualifier = context
-source.. = src/
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties
deleted file mode 100644
index 71be7bbe8..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-bundleName= Simple Configurator Manipulator
-providerName = Eclipse.org - Equinox
-
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml
deleted file mode 100644
index b52d1de71..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.simpleconfigurator.manipulator</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorFactoryImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorFactoryImpl.java
deleted file mode 100644
index 3819aac02..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorFactoryImpl.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
-
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulatorFactory;
-
-public class SimpleConfiguratorManipulatorFactoryImpl extends ConfiguratorManipulatorFactory {
-
- protected ConfiguratorManipulator createConfiguratorManipulator() {
- return new SimpleConfiguratorManipulatorImpl();
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
deleted file mode 100644
index 66de40090..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
-import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
-import org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.EquinoxUtils;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
-import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-
-/**
- *
- */
-public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorManipulator, ConfiguratorManipulator {
- class LocationInfo {
- URI[] prerequisiteLocations = null;
- URI systemBundleLocation = null;
- URI[] systemFragmentedBundleLocations = null;
- }
-
- private final static boolean DEBUG = false;
-
- private static final BundleInfo[] NULL_BUNDLEINFOS = new BundleInfo[0];
-
- public static final String PROP_KEY_EXCLUSIVE_INSTALLATION = "org.eclipse.equinox.simpleconfigurator.exclusiveInstallation"; //$NON-NLS-1$
- public static final String CONFIG_LIST = "bundles.info"; //$NON-NLS-1$
- public static final String CONFIGURATOR_FOLDER = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
- public static final String PROP_KEY_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
-
- private Set manipulators = new HashSet();
-
- /**
- * Return the ConfiguratorConfigFile which is determined
- * by the parameters set in Manipulator.
- *
- * @param manipulator
- * @return File
- */
- private static File getConfigFile(Manipulator manipulator) throws IllegalStateException {
- File fwConfigLoc = manipulator.getLauncherData().getFwConfigLocation();
- File baseDir = null;
- if (fwConfigLoc == null) {
- baseDir = manipulator.getLauncherData().getHome();
- if (baseDir == null) {
- if (manipulator.getLauncherData().getLauncher() != null) {
- baseDir = manipulator.getLauncherData().getLauncher().getParentFile();
- } else {
- throw new IllegalStateException("All of fwConfigFile, home, launcher are not set.");
- }
- }
- } else {
- if (fwConfigLoc.exists())
- if (fwConfigLoc.isDirectory())
- baseDir = fwConfigLoc;
- else
- baseDir = fwConfigLoc.getParentFile();
- else {
- // TODO We need to decide whether launcher data configLocation is the location of a file or a directory
- if (fwConfigLoc.getName().endsWith(".ini")) //$NON-NLS-1$
- baseDir = fwConfigLoc.getParentFile();
- else
- baseDir = fwConfigLoc;
- }
- }
- File configuratorFolder = new File(baseDir, SimpleConfiguratorManipulatorImpl.CONFIGURATOR_FOLDER);
- File targetFile = new File(configuratorFolder, SimpleConfiguratorManipulatorImpl.CONFIG_LIST);
- if (!Utils.createParentDir(targetFile))
- return null;
- return targetFile;
- }
-
- static boolean isPrerequisiteBundles(URI location, LocationInfo info) {
- boolean ret = false;
-
- if (info.prerequisiteLocations == null)
- return false;
- for (int i = 0; i < info.prerequisiteLocations.length; i++)
- if (location.equals(info.prerequisiteLocations[i])) {
- ret = true;
- break;
- }
-
- return ret;
- }
-
- static boolean isSystemBundle(URI location, LocationInfo info) {
- if (info.systemBundleLocation == null)
- return false;
- if (location.equals(info.systemBundleLocation))
- return true;
- return false;
- }
-
- static boolean isSystemFragmentBundle(URI location, LocationInfo info) {
- boolean ret = false;
- if (info.systemFragmentedBundleLocations == null)
- return false;
- for (int i = 0; i < info.systemFragmentedBundleLocations.length; i++)
- if (location.equals(info.systemFragmentedBundleLocations[i])) {
- ret = true;
- break;
- }
- return ret;
- }
-
- private static boolean isTargetConfiguratorBundle(BundleInfo[] bInfos) {
- for (int i = 0; i < bInfos.length; i++) {
- if (isTargetConfiguratorBundle(bInfos[i].getLocation())) {
- return true;
- //TODO confirm that startlevel of configurator bundle must be no larger than beginning start level of fw. However, there is no way to know the start level of cached ones.
- }
- }
- return false;
- }
-
- private static boolean isTargetConfiguratorBundle(URI location) {
- final String symbolic = Utils.getPathFromClause(Utils.getManifestMainAttributes(location, Constants.BUNDLE_SYMBOLICNAME));
- return (SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.equals(symbolic));
- }
-
- private void algorithm(int initialSl, SortedMap bslToList, BundleInfo configuratorBInfo, List setToInitialConfig, List setToSimpleConfig, LocationInfo info) {
- int configuratorSL = configuratorBInfo.getStartLevel();
-
- Integer sL0 = (Integer) bslToList.keySet().iterator().next();// StartLevel == 0;
- List list0 = (List) bslToList.get(sL0);
- if (sL0.intValue() == 0)
- for (Iterator ite2 = list0.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (isSystemBundle(bInfo.getLocation(), info)) {
- setToSimpleConfig.add(bInfo);
- break;
- }
- }
-
- for (Iterator ite = bslToList.keySet().iterator(); ite.hasNext();) {
- Integer sL = (Integer) ite.next();
- List list = (List) bslToList.get(sL);
-
- if (sL.intValue() < configuratorSL) {
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (!isSystemBundle(bInfo.getLocation(), info))
- setToInitialConfig.add(bInfo);
- }
- } else if (sL.intValue() > configuratorSL) {
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (isPrerequisiteBundles(bInfo.getLocation(), info) || isSystemFragmentBundle(bInfo.getLocation(), info))
- if (!isSystemBundle(bInfo.getLocation(), info))
- setToInitialConfig.add(bInfo);
- setToSimpleConfig.add(bInfo);
- }
- } else {
- boolean found = false;
- for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (found) {
- if (!isSystemBundle(bInfo.getLocation(), info))
- if (isPrerequisiteBundles(bInfo.getLocation(), info) || isSystemFragmentBundle(bInfo.getLocation(), info))
- setToInitialConfig.add(bInfo);
- setToSimpleConfig.add(bInfo);
- continue;
- }
- if (isTargetConfiguratorBundle(bInfo.getLocation()))
- found = true;
- else if (!isSystemBundle(bInfo.getLocation(), info))
- setToInitialConfig.add(bInfo);
- setToSimpleConfig.add(bInfo);
- }
- }
- }
-
- setToInitialConfig.add(configuratorBInfo);
- }
-
- private boolean checkResolve(BundleInfo bInfo, BundlesState state) {//throws ManipulatorException {
- if (bInfo == null)
- throw new IllegalArgumentException("bInfo is null.");
-
- if (!state.isResolved())
- state.resolve(false);
- // if (DEBUG)
- // System.out.println(state.toString());
-
- if (!state.isResolved(bInfo)) {
- printoutUnsatisfiedConstraints(bInfo, state);
- return false;
- }
- return true;
- }
-
- private boolean divideBundleInfos(Manipulator manipulator, List setToInitialConfig, List setToSimpleConfig, final int initialBSL) {
- BundlesState state = manipulator.getBundlesState();
- BundleInfo[] targetBundleInfos = null;
- if (state.isFullySupported()) {
- targetBundleInfos = state.getExpectedState();
- } else {
- targetBundleInfos = manipulator.getConfigData().getBundles();
- }
- BundleInfo configuratorBInfo = null;
- for (int i = 0; i < targetBundleInfos.length; i++) {
- if (isTargetConfiguratorBundle(targetBundleInfos[i].getLocation())) {
- if (targetBundleInfos[i].isMarkedAsStarted()) {
- configuratorBInfo = targetBundleInfos[i];
- break;
- }
- }
- }
- if (configuratorBInfo == null && !manipulators.contains(manipulator)) {
- return false;
- } else if (manipulators.contains(manipulator) && targetBundleInfos.length == 0) {
- // Resulting state will have no bundles - so is an uninstall, including
- // uninstall of the configurator. However, we have seen this manipulator
- // before with a target configurator bundle, so allow uninstall to proceed,
- // but only get one chance.
- manipulators.remove(manipulator);
- } else if (!manipulators.contains(manipulator)) {
- manipulators.add(manipulator);
- }
-
- if (state.isFullySupported()) {
- state.resolve(false);
- }
-
- LocationInfo info = new LocationInfo();
- setSystemBundles(state, info);
- if (configuratorBInfo != null) {
- setPrerequisiteBundles(configuratorBInfo, state, info);
- SortedMap bslToList = getSortedMap(initialBSL, targetBundleInfos);
- algorithm(initialBSL, bslToList, configuratorBInfo, setToInitialConfig, setToSimpleConfig, info);
- }
- return true;
- }
-
- private SortedMap getSortedMap(int initialSl, BundleInfo[] bInfos) {
- SortedMap bslToList = new TreeMap();
- for (int i = 0; i < bInfos.length; i++) {
- Integer sL = new Integer(bInfos[i].getStartLevel());
- if (sL.intValue() == BundleInfo.NO_LEVEL)
- sL = new Integer(initialSl);
- List list = (List) bslToList.get(sL);
- if (list == null) {
- list = new LinkedList();
- bslToList.put(sL, list);
- }
- list.add(bInfos[i]);
- }
- return bslToList;
- }
-
- private BundleInfo[] orderingInitialConfig(List setToInitialConfig) {
- List notToBeStarted = new LinkedList();
- List toBeStarted = new LinkedList();
- for (Iterator ite2 = setToInitialConfig.iterator(); ite2.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite2.next();
- if (bInfo.isMarkedAsStarted())
- toBeStarted.add(bInfo);
- else
- notToBeStarted.add(bInfo);
- }
- setToInitialConfig.clear();
- setToInitialConfig.addAll(notToBeStarted);
- setToInitialConfig.addAll(toBeStarted);
- return Utils.getBundleInfosFromList(setToInitialConfig);
-
- }
-
- private void printoutUnsatisfiedConstraints(BundleInfo bInfo, BundlesState state) {
- if (DEBUG) {
- StringBuffer sb = new StringBuffer();
- sb.append("Missing constraints:\n"); //$NON-NLS-1$
- String[] missings = state.getUnsatisfiedConstraints(bInfo);
- for (int i = 0; i < missings.length; i++)
- sb.append(" " + missings[i] + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println(sb.toString());
- }
- }
-
- public BundleInfo[] loadConfiguration(BundleContext context, String infoPath) throws IOException {
- URI installArea = EquinoxUtils.getInstallLocationURI(context);
-
- URL configURL = null;
- InputStream stream = null;
-
- if (infoPath == null) {
- SimpleConfiguratorImpl simpleImpl = new SimpleConfiguratorImpl(context, null);
- configURL = simpleImpl.getConfigurationURL();
- } else {
- // == (not .equals) use the default source info, currently SOURCE_INFO_PATH
- boolean defaultSource = (infoPath == SOURCE_INFO);
- if (defaultSource)
- infoPath = SOURCE_INFO_PATH;
-
- Location configLocation = EquinoxUtils.getConfigLocation(context);
- configURL = configLocation.getDataArea(infoPath);
- try {
- stream = configURL.openStream();
- } catch (FileNotFoundException e) {
- if (defaultSource && configLocation.getParentLocation() != null) {
- configURL = configLocation.getParentLocation().getDataArea(infoPath);
- } else {
- return new BundleInfo[0];
- }
- }
- }
- if (configURL == null)
- return new BundleInfo[0];
- else if (stream == null) {
- try {
- stream = configURL.openStream();
- } catch (FileNotFoundException e) {
- return new BundleInfo[0];
- }
- }
-
- //stream will be closed
- return loadConfiguration(stream, installArea);
- }
-
- /*
- * InputStream must be closed
- * (non-Javadoc)
- * @see org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator#loadConfiguration(java.io.InputStream, java.net.URI)
- */
- public BundleInfo[] loadConfiguration(InputStream stream, URI installArea) throws IOException {
- if (stream == null)
- return NULL_BUNDLEINFOS;
-
- List simpleBundles = SimpleConfiguratorUtils.readConfiguration(stream, installArea);
-
- // convert to FrameworkAdmin BundleInfo Type
- BundleInfo[] result = new BundleInfo[simpleBundles.size()];
- int i = 0;
- for (Iterator iterator = simpleBundles.iterator(); iterator.hasNext();) {
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo simpleInfo = (org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo) iterator.next();
- URI location = simpleInfo.getLocation();
- if (!location.isAbsolute() && simpleInfo.getBaseLocation() != null)
- location = URIUtil.makeAbsolute(location, simpleInfo.getBaseLocation());
-
- BundleInfo bundleInfo = new BundleInfo(simpleInfo.getSymbolicName(), simpleInfo.getVersion(), location, simpleInfo.getStartLevel(), simpleInfo.isMarkedAsStarted());
- bundleInfo.setBaseLocation(simpleInfo.getBaseLocation());
- result[i++] = bundleInfo;
- }
- return result;
- }
-
- public void saveConfiguration(BundleInfo[] configuration, OutputStream stream, URI installArea) throws IOException {
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
- SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, stream);
- }
-
- public void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea) throws IOException {
- saveConfiguration(configuration, outputFile, installArea, false);
- }
-
- private void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea, boolean backup) throws IOException {
- if (backup && outputFile.exists()) {
- File backupFile = Utils.getSimpleDataFormattedFile(outputFile);
- if (!outputFile.renameTo(backupFile)) {
- throw new IOException("Fail to rename from (" + outputFile + ") to (" + backupFile + ")");
- }
- }
-
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
-
- // if empty remove the configuration file
- if (simpleInfos == null || simpleInfos.length == 0) {
- if (outputFile.exists()) {
- outputFile.delete();
- }
- File parentDir = outputFile.getParentFile();
- if (parentDir.exists()) {
- parentDir.delete();
- }
- return;
- }
- SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, outputFile);
- }
-
- private org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] convertBundleInfos(BundleInfo[] configuration, URI installArea) {
- // convert to SimpleConfigurator BundleInfo Type
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[configuration.length];
- for (int i = 0; i < configuration.length; i++) {
- BundleInfo bundleInfo = configuration[i];
- URI location = bundleInfo.getLocation();
- if (bundleInfo.getSymbolicName() == null || bundleInfo.getVersion() == null || location == null)
- throw new IllegalArgumentException("Cannot persist bundleinfo: " + bundleInfo.toString());
- //only need to make a new BundleInfo if we are changing it.
- if (installArea != null)
- location = URIUtil.makeRelative(location, installArea);
- simpleInfos[i] = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo(bundleInfo.getSymbolicName(), bundleInfo.getVersion(), location, bundleInfo.getStartLevel(), bundleInfo.isMarkedAsStarted());
- simpleInfos[i].setBaseLocation(bundleInfo.getBaseLocation());
- }
- return simpleInfos;
- }
-
- public BundleInfo[] save(Manipulator manipulator, boolean backup) throws IOException {
- List setToInitialConfig = new LinkedList();
- List setToSimpleConfig = new LinkedList();
- ConfigData configData = manipulator.getConfigData();
-
- if (!divideBundleInfos(manipulator, setToInitialConfig, setToSimpleConfig, configData.getInitialBundleStartLevel()))
- return configData.getBundles();
-
- File outputFile = getConfigFile(manipulator);
- URI installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI();
- saveConfiguration((BundleInfo[]) setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, installArea, backup);
- configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm());
- return orderingInitialConfig(setToInitialConfig);
- }
-
- void setPrerequisiteBundles(BundleInfo configuratorBundleInfo, BundlesState state, LocationInfo info) {
- if (state.isFullySupported())
- if (!this.checkResolve(configuratorBundleInfo, state)) {
- printoutUnsatisfiedConstraints(configuratorBundleInfo, state);
- return;
- }
- BundleInfo[] prerequisites = state.getPrerequisteBundles(configuratorBundleInfo);
- info.prerequisiteLocations = new URI[prerequisites.length];
- for (int i = 0; i < prerequisites.length; i++)
- info.prerequisiteLocations[i] = prerequisites[i].getLocation();
- return;
-
- }
-
- void setSystemBundles(BundlesState state, LocationInfo info) {
- BundleInfo systemBundleInfo = state.getSystemBundle();
- if (systemBundleInfo == null) {
- // TODO Log
- //throw new IllegalStateException("There is no systemBundle.\n");
- return;
- }
- if (state.isFullySupported())
- if (!this.checkResolve(systemBundleInfo, state)) {
- printoutUnsatisfiedConstraints(systemBundleInfo, state);
- return;
- }
- info.systemBundleLocation = systemBundleInfo.getLocation();
- BundleInfo[] fragments = state.getSystemFragmentedBundles();
- info.systemFragmentedBundleLocations = new URI[fragments.length];
- for (int i = 0; i < fragments.length; i++)
- info.systemFragmentedBundleLocations[i] = fragments[i].getLocation();
- }
-
- public void updateBundles(Manipulator manipulator) throws IOException {
- if (DEBUG)
- System.out.println("SimpleConfiguratorManipulatorImpl#updateBundles()"); //$NON-NLS-1$
-
- BundlesState bundleState = manipulator.getBundlesState();
-
- if (bundleState == null)
- return;
- if (bundleState.isFullySupported())
- bundleState.resolve(true);
-
- BundleInfo[] currentBInfos = bundleState.getExpectedState();
- if (!isTargetConfiguratorBundle(currentBInfos))
- return;
- Properties properties = new Properties();
- String[] jvmArgs = manipulator.getLauncherData().getJvmArgs();
- for (int i = 0; i < jvmArgs.length; i++) {
- if (jvmArgs[i].startsWith("-D")) { //$NON-NLS-1$
- int index = jvmArgs[i].indexOf("="); //$NON-NLS-1$
- if (index > 0 && jvmArgs[i].length() > 2) {
- String key = jvmArgs[i].substring(2, index);
- String value = jvmArgs[i].substring(index + 1);
- properties.setProperty(key, value);
- }
- }
- }
-
- Utils.appendProperties(properties, manipulator.getConfigData().getProperties());
- boolean exclusiveInstallation = Boolean.valueOf(properties.getProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_EXCLUSIVE_INSTALLATION)).booleanValue();
- File configFile = getConfigFile(manipulator);
-
- File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData());
- BundleInfo[] toInstall = null;
- try {
- //input stream will be closed for us
- toInstall = loadConfiguration(new FileInputStream(configFile), installArea.toURI());
- } catch (FileNotFoundException e) {
- //no file, just return an empty list
- toInstall = new BundleInfo[0];
- }
-
- List toUninstall = new LinkedList();
- if (exclusiveInstallation)
- for (int i = 0; i < currentBInfos.length; i++) {
- boolean install = false;
- for (int j = 0; j < toInstall.length; j++)
- if (currentBInfos[i].getLocation().equals(toInstall[j].getLocation())) {
- install = true;
- break;
- }
- if (!install)
- toUninstall.add(currentBInfos[i]);
- }
-
- for (int i = 0; i < toInstall.length; i++) {
- try {
- bundleState.installBundle(toInstall[i]);
- } catch (RuntimeException e) {
- //Ignore
- }
- }
- if (exclusiveInstallation)
- for (Iterator ite = toUninstall.iterator(); ite.hasNext();) {
- BundleInfo bInfo = (BundleInfo) ite.next();
- bundleState.uninstallBundle(bInfo);
- }
-
- bundleState.resolve(true);
- manipulator.getConfigData().setBundles(bundleState.getExpectedState());
- }
-
- public void cleanup(Manipulator manipulator) {
- File outputFile = getConfigFile(manipulator);
- outputFile.delete();
-
- if (outputFile.getParentFile().isDirectory())
- outputFile.getParentFile().delete();
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
deleted file mode 100644
index 84c8c7b31..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.manipulator;
-
-import java.io.*;
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Comparator;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.Messages;
-import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorUtils;
-import org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator;
-import org.osgi.framework.Version;
-
-public class SimpleConfiguratorManipulatorUtils {
-
- private static final String VERSION_PREFIX = "#version="; //$NON-NLS-1$
- private static final String VERSION_1 = "1"; //$NON-NLS-1$
- private static final Version OLD_STYLE_SIMPLE_CONFIGURATOR_VERSION = new Version("1.0.100.v20081206"); //$NON-NLS-1$
- private static final Version DEFAULT_ENCODING_CONFIGURATOR_VERSION = new Version("2.0.0.v20100329"); //$NON-NLS-1$
-
- public static void writeConfiguration(BundleInfo[] simpleInfos, File outputFile) throws IOException {
- if (!Utils.createParentDir(outputFile)) {
- throw new IllegalStateException(Messages.exception_failedToCreateDir);
- }
-
- IOException caughtException = null;
- OutputStream stream = null;
- try {
- stream = new FileOutputStream(outputFile);
- writeConfiguration(simpleInfos, stream);
- } catch (IOException e) {
- caughtException = e;
- } finally {
- try {
- if (stream != null)
- stream.close();
- } catch (IOException e) {
- // we want to avoid over-writing the original exception
- if (caughtException != null)
- caughtException = e;
- }
- }
- if (caughtException != null)
- throw caughtException;
- }
-
- /**
- * The output stream is left open
- * @param simpleInfos
- * @param stream
- * @throws IOException
- */
- public static void writeConfiguration(BundleInfo[] simpleInfos, OutputStream stream) throws IOException {
- // sort by symbolic name
- Arrays.sort(simpleInfos, new Comparator() {
- public int compare(Object o1, Object o2) {
- if (o1 instanceof BundleInfo && o2 instanceof BundleInfo) {
- return ((BundleInfo) o1).getSymbolicName().compareTo(((BundleInfo) o2).getSymbolicName());
- }
- return 0;
- }
- });
-
- BufferedWriter writer = null;
- boolean oldStyle = false;
- boolean utf8 = true;
- for (int i = 0; i < simpleInfos.length; i++) {
- if (SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.equals(simpleInfos[i].getSymbolicName())) {
- Version version = new Version(simpleInfos[i].getVersion());
- if (version.compareTo(OLD_STYLE_SIMPLE_CONFIGURATOR_VERSION) < 0)
- oldStyle = true;
- if (version.compareTo(DEFAULT_ENCODING_CONFIGURATOR_VERSION) <= 0)
- utf8 = false;
- break;
- }
- }
-
- if (utf8) {
- writer = new BufferedWriter(new OutputStreamWriter(stream, "UTF-8")); //$NON-NLS-1$
- //encoding is expected to be the first line
- writer.write(SimpleConfiguratorUtils.ENCODING_UTF8);
- writer.newLine();
- } else {
- writer = new BufferedWriter(new OutputStreamWriter(stream));
- }
- writer.write(createVersionLine());
- writer.newLine();
-
- // bundle info lines
- for (int i = 0; i < simpleInfos.length; i++) {
- writer.write(createBundleInfoLine(simpleInfos[i], oldStyle));
- writer.newLine();
- }
- writer.flush();
- }
-
- public static String createVersionLine() {
- return VERSION_PREFIX + VERSION_1;
- }
-
- public static String createBundleInfoLine(BundleInfo bundleInfo, boolean oldStyle) {
- // symbolicName,version,location,startLevel,markedAsStarted
- StringBuffer buffer = new StringBuffer();
- buffer.append(bundleInfo.getSymbolicName());
- buffer.append(',');
- buffer.append(bundleInfo.getVersion());
- buffer.append(',');
- buffer.append(createBundleLocation(bundleInfo.getLocation(), oldStyle));
- buffer.append(',');
- buffer.append(bundleInfo.getStartLevel());
- buffer.append(',');
- buffer.append(bundleInfo.isMarkedAsStarted());
- return buffer.toString();
- }
-
- public static String createBundleLocation(URI location, boolean oldStyle) {
- if (oldStyle) {
- String scheme = location.getScheme();
- if (scheme == null)
- scheme = "file"; //$NON-NLS-1$
- return scheme + ':' + location.getSchemeSpecificPart();
- }
-
- //encode comma characters because it is used as the segment delimiter in the bundle info file
- String result = location.toString();
- int commaIndex = result.indexOf(',');
- while (commaIndex != -1) {
- result = result.substring(0, commaIndex) + "%2C" + result.substring(commaIndex + 1); //$NON-NLS-1$
- commaIndex = result.indexOf(',');
- }
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
deleted file mode 100644
index fbd55c155..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/simpleconfigurator/manipulator/SimpleConfiguratorManipulator.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * 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 http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.equinox.simpleconfigurator.manipulator;
-
-import java.io.*;
-import java.net.URI;
-import org.eclipse.equinox.frameworkadmin.BundleInfo;
-import org.osgi.framework.BundleContext;
-
-/**
- * A ConfiguratorManipulator Service used to read and write bundles.info configuration files
- * @since 2.0
- * @noimplement This interface is not intended to be implemented by clients.
- */
-public interface SimpleConfiguratorManipulator {
- /**
- * A common location to find the bundle configuration file
- */
- public static final String BUNDLES_INFO_PATH = "org.eclipse.equinox.simpleconfigurator/bundles.info"; //$NON-NLS-1$
-
- /**
- * A common location to find the source configuration file
- */
- public static final String SOURCE_INFO_PATH = "org.eclipse.equinox.source/source.info"; //$NON-NLS-1$
-
- /**
- * Pass this to {@link #loadConfiguration(BundleContext, String)} to read the default source configuration file
- */
- public static final String SOURCE_INFO = new String("source.info"); //$NON-NLS-1$
-
- /**
- * An instance of an ISimpleConfiguratorManipulator is registered as a ConfiguratorManipulator
- * service with ConfiguratorManipulator.SERVICE_PROP_KEY_CONFIGURATOR_BUNDLESYMBOLICNAME =
- * SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.
- */
- public static final String SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
-
- /**
- * Load the configuration file for the currently running system.
- * <p>
- * Pass null for bundleInfoPath to read the bundle configuration file for the running system as
- * specified by the "org.eclipse.equinox.simpleconfigurator.configUrl" system property.
- * </p>
- * <p>If bundleInfoPath == {@link #SOURCE_INFO} the default source configuration file for the running
- * system will be loaded.
- * </p>
- * @param context - the BundleContext for the running system
- * @param bundleInfoPath - pass null or a path to the bundle info file to read, relative to the configuration location. Pass {@link #SOURCE_INFO}
- * to load the default source configuration. Common locations are {@link #BUNDLES_INFO_PATH} and {@link #SOURCE_INFO_PATH}.
- * @return The loaded configuration. Bundles will have at least symbolic name, version and location information.
- * @throws IOException
- */
- public BundleInfo[] loadConfiguration(BundleContext context, String bundleInfoPath) throws IOException;
-
- /**
- * Load the configuration from the given input stream
- * The supplied input stream is consumed by this method and will be closed.
- *
- * @param configuration - the input stream to read the configuration from. The stream will be closed even if an exception is thrown
- * @param installArea - Relative URIs from the configuration file will be resolved relative to here
- * @return The loaded configuration. Bundles will have at least symbolic name, version and location information.
- * @throws IOException
- */
- public BundleInfo[] loadConfiguration(InputStream configuration, URI installArea) throws IOException;
-
- /**
- * Save the configuration to the given output stream
- * The output stream is flushed and left open.
- * To be persisted, bundles are required to have at least a symbolic name, version and location.
- *
- * @param configuration - bundle information to save
- * @param outputStream - the output stream to write to. Stream is not closed
- * @param installArea - bundle locations are written as relative to this URI
- * @throws IOException
- */
- public void saveConfiguration(BundleInfo[] configuration, OutputStream outputStream, URI installArea) throws IOException;
-
- /**
- * Save the configuration to the specified file
- * To be persisted, bundles are required to have at least a symbolic name, version and location.
- *
- * @param configuration - bundle information to save
- * @param configurationFile - file to save the configuration in
- * @param installArea - bundle locations are written as relative to this URI
- *
- * @throws IOException
- */
- public void saveConfiguration(BundleInfo[] configuration, File configurationFile, URI installArea) throws IOException;
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/.classpath b/bundles/org.eclipse.equinox.simpleconfigurator/.classpath
deleted file mode 100644
index 6f3b481ac..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/CDC-1.1%Foundation-1.1"/>
- <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.simpleconfigurator/.cvsignore b/bundles/org.eclipse.equinox.simpleconfigurator/.cvsignore
deleted file mode 100644
index 98d91b940..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bin
-build.xml
-javaCompiler...args
-target
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/.externalToolBuilders/Copy built version of simple configurator into metadata generator.launch b/bundles/org.eclipse.equinox.simpleconfigurator/.externalToolBuilders/Copy built version of simple configurator into metadata generator.launch
deleted file mode 100644
index b68ad487d..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.externalToolBuilders/Copy built version of simple configurator into metadata generator.launch
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.simpleconfigurator"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.simpleconfigurator"/>
-<mapAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_PROPERTIES">
-<mapEntry key="buildDirectory" value="${build_project}/trash"/>
-<mapEntry key="targetFolder" value="${resource_loc:/org.eclipse.equinox.p2.metadata.generator}"/>
-<mapEntry key="eclipse.pdebuild.scripts" value="/D:/eclipse/plugins/org.eclipse.pde.build_3.3.0.v20070312/scripts/"/>
-<mapEntry key="eclipse.running" value="true"/>
-<mapEntry key="thisPlugin" value="${resource_loc:/org.eclipse.equinox.simpleconfigurator}"/>
-<mapEntry key="eclipse.pdebuild.templates" value="/D:/eclipse/plugins/org.eclipse.pde.build_3.3.0.v20070312/templates/"/>
-<mapEntry key="eclipse.pdebuild.home" value="/D:/eclipse/plugins/org.eclipse.pde.build_3.3.0.v20070312/./"/>
-<mapEntry key="eclipse.home" value="D:\eclipse"/>
-<mapEntry key="baseLocation" value="${target_home}"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.simpleconfigurator/localbuild.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
-<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
-</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/.project b/bundles/org.eclipse.equinox.simpleconfigurator/.project
deleted file mode 100644
index b0cc0f957..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.project
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.simpleconfigurator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value>&lt;project&gt;/.externalToolBuilders/Copy built version of simple configurator into metadata generator.launch</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ec72a23c5..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,283 +0,0 @@
-#Thu Mar 04 09:52:05 EST 2010
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.comment.format_block_comments=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.lineSplit=800
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 40cde6858..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,61 +0,0 @@
-#Wed Jan 07 13:39:10 EST 2009
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_core
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=3
-org.eclipse.jdt.ui.staticondemandthreshold=3
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF
deleted file mode 100644
index 2360a0e57..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.equinox.simpleconfigurator;singleton:=true
-Bundle-Version: 1.0.200.qualifier
-Bundle-Name: %bundleName
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.equinox.internal.simpleconfigurator.Activator
-Bundle-ActivationPolicy: lazy
-Import-Package: org.eclipse.osgi.framework.console;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.datalocation;version="1.0.0";resolution:=optional,
- org.eclipse.osgi.service.resolver;version="1.2.0";resolution:=optional,
- org.osgi.framework;version="1.3.0",
- org.osgi.service.packageadmin;version="1.2.0",
- org.osgi.service.startlevel;version="1.0.0",
- org.osgi.util.tracker;version="1.3.0"
-Export-Package: org.eclipse.equinox.internal.provisional.configurator;
- x-friends:="org.eclipse.equinox.p2.reconciler.dropins,
- org.eclipse.equinox.p2.console,
- org.eclipse.equinox.p2.operations,
- org.eclipse.equinox.p2.ui,
- org.eclipse.equinox.p2.director",
- org.eclipse.equinox.internal.simpleconfigurator;x-friends:="org.eclipse.equinox.simpleconfigurator.manipulator",
- org.eclipse.equinox.internal.simpleconfigurator.console;x-internal:=true,
- org.eclipse.equinox.internal.simpleconfigurator.utils;x-friends:="org.eclipse.equinox.simpleconfigurator.manipulator"
-Bundle-RequiredExecutionEnvironment: CDC-1.1/Foundation-1.1,
- J2SE-1.4
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/about.html b/bundles/org.eclipse.equinox.simpleconfigurator/about.html
deleted file mode 100644
index 460233046..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/build.properties b/bundles/org.eclipse.equinox.simpleconfigurator/build.properties
deleted file mode 100644
index ac72e5e75..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 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
-###############################################################################
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-qualifier=context
-src.includes = about.html
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/localbuild.xml b/bundles/org.eclipse.equinox.simpleconfigurator/localbuild.xml
deleted file mode 100644
index a5d7fd718..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/localbuild.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0"?>
-<!-- ======================================================================
- Mar 14, 2007 11:17:02 AM
-
- project
- description
-
- Administrator
- ====================================================================== -->
-<project name="project" default="default">
- <description>
- description
- </description>
-
- <!-- =================================
- target: default
- ================================= -->
- <target name="default" description="--> description">
- <echo message="bd is ${buildDirectory}"/>
- <tstamp/>
- <eclipse.buildScript elements="plugin@org.eclipse.equinox.simpleconfigurator"
- buildDirectory="${buildDirectory}"
- configInfo="*,*,*"
- baseLocation="${baseLocation}"
- buildingOSGi="true"
- outputUpdateJars="false"
- pluginpath="${thisPlugin}"
- forceContextQualifier="z${DSTAMP}${TSTAMP}"
- />
- <ant antfile="build.xml" target="build.jars"/>
- <ant antfile="build.xml" target="build.update.jar"/>
- <move todir="${targetFolder}" includeEmptyDirs="no" failonerror="yes">
- <fileset dir="${basedir}">
- <include name="*.jar"/>
- </fileset>
- <regexpmapper from="^(.*)_.*$" to="\1.jar"/>
- </move>
- <ant antfile="build.xml" target="clean"/>
- <delete file="build.xml"/>
- <delete file="javaCompiler...args"/>
- </target>
-
-
-</project>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/plugin.properties b/bundles/org.eclipse.equinox.simpleconfigurator/plugin.properties
deleted file mode 100644
index b9da99e0b..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-###############################################################################
-bundleName= Simple Configurator
-providerName = Eclipse.org - Equinox
-
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml b/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml
deleted file mode 100644
index bef764a22..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.simpleconfigurator</artifactId>
- <version>1.0.200.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java
deleted file mode 100644
index b28832758..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/provisional/configurator/Configurator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.provisional.configurator;
-
-import java.io.IOException;
-import java.net.URL;
-
-/**
- * The implementation of this interface will be registered into a service registry
- * by a Configurator Bundle.
- *
- * The client bundle can apply configuration which can be interpreted by referring
- * the specified location to the current running OSGi environment. In addition,
- * the client can expect bundle state in advance .
- *
- * TODO: this interface might not be required to be defined.
- *
- *
- * **********************************************
- * Current Definition of Configurator Bundle:
- *
- * Configurator Bundle will do the following operation at its startup.
- *
- * 1. Create a Configurator object.
- * 2. Register it as a service to the service registry.
- * 3. Get where to read for knowing what kinds of bundles in its implementation dependent way.
- * 4. Call {@link Configurator#applyConfiguration(URL)} with the URL.
- *
- * At its stopping, the service registered will be unregistered.
- *
- * see org.eclipse.equinox.internal.provisional.configuratormanipulato.ConfiguratorManipulator
- *
- */
-public interface Configurator {
-
- /**
- * Apply configuration read from the specified url to the OSGi
- * environment currently running.
- *
- * @param url URL to be read.
- * @throws IOException - If reading information from the specified url fails.
- */
- void applyConfiguration(URL url) throws IOException;
-
- /**
- * Apply configuration read from the previously used url to the OSGi
- * environment currently running. If it is never used, do nothing.
- *
- * @throws IOException - If reading information from the specified url fails.
- */
- void applyConfiguration() throws IOException;
-
- /**
- * Return the url in use.
- * If it is never used, return null.
- *
- * @return URL
- */
- URL getUrlInUse();
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/Activator.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/Activator.java
deleted file mode 100644
index 333df29e7..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/Activator.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator;
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.EquinoxUtils;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.SimpleConfiguratorConstants;
-import org.osgi.framework.*;
-
-/**
- * At its start, SimpleConfigurator bundle does the followings.
- *
- * 1. A value will be gotten by @{link BundleContext#getProperty(key)} with
- * {@link SimpleConfiguratorConstants#PROP_KEY_CONFIGURL} as a key.
- * The value will be used for the referal URL. Under the url, there must be a simple
- * bundles list file to be installed with thier start level and flag of marked as started.
- *
- * 2. If the value is null, do nothing any more.
- * 3. Otherwise, retrieve the bundles list from the url and install,
- * set start level of and start bundles, as specified.
- *
- * 4. A value will be gotten by @{link BundleContext#getProperty(key)} with
- * {@link SimpleConfiguratorConstants#PROP_KEY_EXCLUSIVE_INSTALLATION} as a key.
- *
- * 5. If it equals "false", it will do exclusive installation, which means that
- * the bundles will not be listed in the specified url but installed at the time
- * of the method call except SystemBundle will be uninstalled.
- * Otherwise, no uninstallation will not be done.
- *
- */
-public class Activator implements BundleActivator {
- public final static boolean DEBUG = false;
- private ServiceRegistration configuratorRegistration;
- private ServiceRegistration commandRegistration;
-
- public void start(BundleContext context) throws Exception {
- SimpleConfiguratorImpl bundleConfigurator = new SimpleConfiguratorImpl(context, context.getBundle());
- bundleConfigurator.applyConfiguration();
-
- Dictionary props = new Hashtable();
- props.put(Constants.SERVICE_VENDOR, "Eclipse"); //$NON-NLS-1$
- props.put(Constants.SERVICE_PID, SimpleConfiguratorConstants.TARGET_CONFIGURATOR_NAME);
- ServiceFactory configurationFactory = new SimpleConfiguratorFactory(context);
- configuratorRegistration = context.registerService(Configurator.class.getName(), configurationFactory, props);
-
- try {
- if (null != context.getBundle().loadClass("org.eclipse.osgi.framework.console.CommandProvider")) //$NON-NLS-1$
- commandRegistration = EquinoxUtils.registerConsoleCommands(context);
- } catch (ClassNotFoundException e) {
- // CommandProvider is not available
- // Ok -- optional
- }
-
- if (DEBUG)
- System.out.println("registered Configurator"); //$NON-NLS-1$
- }
-
- public void stop(BundleContext context) throws Exception {
- if (configuratorRegistration != null) {
- configuratorRegistration.unregister();
- configuratorRegistration = null;
- }
- if (commandRegistration != null) {
- commandRegistration.unregister();
- commandRegistration = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java
deleted file mode 100644
index 1da445cc4..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/ConfigApplier.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.util.*;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.*;
-import org.osgi.framework.*;
-import org.osgi.service.packageadmin.PackageAdmin;
-import org.osgi.service.startlevel.StartLevel;
-
-class ConfigApplier {
- private static final String LAST_BUNDLES_INFO = "last.bundles.info"; //$NON-NLS-1$
- private static final String PROP_DEVMODE = "osgi.dev"; //$NON-NLS-1$
-
- private final BundleContext manipulatingContext;
- private final PackageAdmin packageAdminService;
- private final StartLevel startLevelService;
- private final boolean runningOnEquinox;
- private final boolean inDevMode;
-
- private final Bundle callingBundle;
- private final URI baseLocation;
-
- ConfigApplier(BundleContext context, Bundle callingBundle) {
- manipulatingContext = context;
- this.callingBundle = callingBundle;
- runningOnEquinox = "Eclipse".equals(context.getProperty(Constants.FRAMEWORK_VENDOR)); //$NON-NLS-1$
- inDevMode = manipulatingContext.getProperty(PROP_DEVMODE) != null;
- baseLocation = runningOnEquinox ? EquinoxUtils.getInstallLocationURI(context) : null;
-
- ServiceReference packageAdminRef = manipulatingContext.getServiceReference(PackageAdmin.class.getName());
- if (packageAdminRef == null)
- throw new IllegalStateException("No PackageAdmin service is available."); //$NON-NLS-1$
- packageAdminService = (PackageAdmin) manipulatingContext.getService(packageAdminRef);
-
- ServiceReference startLevelRef = manipulatingContext.getServiceReference(StartLevel.class.getName());
- if (startLevelRef == null)
- throw new IllegalStateException("No StartLevelService service is available."); //$NON-NLS-1$
- startLevelService = (StartLevel) manipulatingContext.getService(startLevelRef);
- }
-
- void install(URL url, boolean exclusiveMode) throws IOException {
- List bundleInfoList = SimpleConfiguratorUtils.readConfiguration(url, baseLocation);
- if (Activator.DEBUG)
- System.out.println("applyConfiguration() bundleInfoList.size()=" + bundleInfoList.size());
- if (bundleInfoList.size() == 0)
- return;
-
- BundleInfo[] expectedState = Utils.getBundleInfosFromList(bundleInfoList);
-
- // check for an update to the system bundle
- String systemBundleSymbolicName = manipulatingContext.getBundle(0).getSymbolicName();
- Version systemBundleVersion = manipulatingContext.getBundle(0).getVersion();
- if (systemBundleSymbolicName != null) {
- for (int i = 0; i < expectedState.length; i++) {
- String symbolicName = expectedState[i].getSymbolicName();
- if (!systemBundleSymbolicName.equals(symbolicName))
- continue;
-
- Version version = Version.parseVersion(expectedState[i].getVersion());
- if (!systemBundleVersion.equals(version))
- throw new IllegalStateException("The System Bundle was updated. The framework must be restarted to finalize the configuration change");
- }
- }
-
- HashSet toUninstall = null;
- if (!exclusiveMode) {
- BundleInfo[] lastInstalledBundles = getLastState();
- if (lastInstalledBundles != null) {
- toUninstall = new HashSet(Arrays.asList(lastInstalledBundles));
- toUninstall.removeAll(Arrays.asList(expectedState));
- }
- saveStateAsLast(url);
- }
-
- Collection prevouslyResolved = getResolvedBundles();
- Collection toRefresh = new ArrayList();
- Collection toStart = new ArrayList();
- if (exclusiveMode) {
- toRefresh.addAll(installBundles(expectedState, toStart));
- toRefresh.addAll(uninstallBundles(expectedState, packageAdminService));
- } else {
- toRefresh.addAll(installBundles(expectedState, toStart));
- if (toUninstall != null)
- toRefresh.addAll(uninstallBundles(toUninstall));
- }
- refreshPackages((Bundle[]) toRefresh.toArray(new Bundle[toRefresh.size()]), manipulatingContext);
- if (toRefresh.size() > 0)
- try {
- manipulatingContext.getBundle().loadClass("org.eclipse.osgi.service.resolver.PlatformAdmin"); //$NON-NLS-1$
- // now see if there are any currently resolved bundles with option imports which could be resolved or
- // if there are fragments with additional constraints which conflict with an already resolved host
- Bundle[] additionalRefresh = StateResolverUtils.getAdditionalRefresh(prevouslyResolved, manipulatingContext);
- if (additionalRefresh.length > 0)
- refreshPackages(additionalRefresh, manipulatingContext);
- } catch (ClassNotFoundException cnfe) {
- // do nothing; no resolver package available
- }
- startBundles((Bundle[]) toStart.toArray(new Bundle[toStart.size()]));
- }
-
- private Collection getResolvedBundles() {
- Collection resolved = new HashSet();
- Bundle[] allBundles = manipulatingContext.getBundles();
- for (int i = 0; i < allBundles.length; i++)
- if ((allBundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0)
- resolved.add(allBundles[i]);
- return resolved;
- }
-
- private Collection uninstallBundles(HashSet toUninstall) {
- Collection removedBundles = new ArrayList(toUninstall.size());
- for (Iterator iterator = toUninstall.iterator(); iterator.hasNext();) {
- BundleInfo current = (BundleInfo) iterator.next();
- Bundle[] matchingBundles = packageAdminService.getBundles(current.getSymbolicName(), getVersionRange(current.getVersion()));
- for (int j = 0; matchingBundles != null && j < matchingBundles.length; j++) {
- try {
- removedBundles.add(matchingBundles[j]);
- matchingBundles[j].uninstall();
- } catch (BundleException e) {
- //TODO log in debug mode...
- }
- }
- }
- return removedBundles;
- }
-
- private void saveStateAsLast(URL url) {
- InputStream sourceStream = null;
- OutputStream destinationStream = null;
-
- File lastBundlesTxt = getLastBundleInfo();
- try {
- try {
- destinationStream = new FileOutputStream(lastBundlesTxt);
- sourceStream = url.openStream();
- SimpleConfiguratorUtils.transferStreams(sourceStream, destinationStream);
- } finally {
- if (destinationStream != null)
- destinationStream.close();
- if (sourceStream != null)
- sourceStream.close();
- }
- } catch (IOException e) {
- //nothing
- }
- }
-
- private File getLastBundleInfo() {
- return manipulatingContext.getDataFile(LAST_BUNDLES_INFO);
- }
-
- private BundleInfo[] getLastState() {
- File lastBundlesInfo = getLastBundleInfo();
- if (!lastBundlesInfo.isFile())
- return null;
- try {
- return (BundleInfo[]) SimpleConfiguratorUtils.readConfiguration(lastBundlesInfo.toURL(), baseLocation).toArray(new BundleInfo[1]);
- } catch (IOException e) {
- return null;
- }
- }
-
- private ArrayList installBundles(BundleInfo[] finalList, Collection toStart) {
- ArrayList toRefresh = new ArrayList();
-
- String useReferenceProperty = manipulatingContext.getProperty(SimpleConfiguratorConstants.PROP_KEY_USE_REFERENCE);
- boolean useReference = useReferenceProperty == null ? runningOnEquinox : Boolean.valueOf(useReferenceProperty).booleanValue();
-
- for (int i = 0; i < finalList.length; i++) {
- if (finalList[i] == null)
- continue;
- //TODO here we do not deal with bundles that don't have a symbolic id
- //TODO Need to handle the case where getBundles return multiple value
-
- String symbolicName = finalList[i].getSymbolicName();
- String version = finalList[i].getVersion();
-
- Bundle[] matches = null;
- if (symbolicName != null && version != null)
- matches = packageAdminService.getBundles(symbolicName, getVersionRange(version));
-
- String bundleLocation = SimpleConfiguratorUtils.getBundleLocation(finalList[i], useReference);
-
- Bundle current = matches == null ? null : (matches.length == 0 ? null : matches[0]);
- if (current == null) {
- try {
- current = manipulatingContext.installBundle(bundleLocation);
- if (Activator.DEBUG)
- System.out.println("installed bundle:" + finalList[i]); //$NON-NLS-1$
- toRefresh.add(current);
- } catch (BundleException e) {
- if (Activator.DEBUG) {
- System.err.println("Can't install " + symbolicName + '/' + version + " from location " + finalList[i].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- e.printStackTrace();
- }
- continue;
- }
- } else if (inDevMode && current.getBundleId() != 0 && current != manipulatingContext.getBundle() && !bundleLocation.equals(current.getLocation()) && !current.getLocation().startsWith("initial@")) {
- // We do not do this for the system bundle (id==0), the manipulating bundle or any bundle installed from the osgi.bundles list (locations starting with "@initial"
- // The bundle exists; but the location is different. Uninstall the current and install the new one (bug 229700)
- try {
- current.uninstall();
- toRefresh.add(current);
- } catch (BundleException e) {
- if (Activator.DEBUG) {
- System.err.println("Can't uninstall " + symbolicName + '/' + version + " from location " + current.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- e.printStackTrace();
- }
- continue;
- }
- try {
- current = manipulatingContext.installBundle(bundleLocation);
- if (Activator.DEBUG)
- System.out.println("installed bundle:" + finalList[i]); //$NON-NLS-1$
- toRefresh.add(current);
- } catch (BundleException e) {
- if (Activator.DEBUG) {
- System.err.println("Can't install " + symbolicName + '/' + version + " from location " + finalList[i].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- e.printStackTrace();
- }
- continue;
- }
- }
-
- // Mark Started
- if (finalList[i].isMarkedAsStarted()) {
- toStart.add(current);
- }
-
- // Set Start Level
- int startLevel = finalList[i].getStartLevel();
- if (startLevel < 1)
- continue;
- if (current.getBundleId() == 0)
- continue;
- if (packageAdminService.getBundleType(current) == PackageAdmin.BUNDLE_TYPE_FRAGMENT)
- continue;
- if (SimpleConfiguratorConstants.TARGET_CONFIGURATOR_NAME.equals(current.getSymbolicName()))
- continue;
-
- try {
- startLevelService.setBundleStartLevel(current, startLevel);
- } catch (IllegalArgumentException ex) {
- Utils.log(4, null, null, "Failed to set start level of Bundle:" + finalList[i], ex); //$NON-NLS-1$
- }
- }
- return toRefresh;
- }
-
- private void refreshPackages(Bundle[] bundles, BundleContext context) {
- if (bundles.length == 0 || packageAdminService == null)
- return;
-
- final boolean[] flag = new boolean[] {false};
- FrameworkListener listener = new FrameworkListener() {
- public void frameworkEvent(FrameworkEvent event) {
- if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) {
- synchronized (flag) {
- flag[0] = true;
- flag.notifyAll();
- }
- }
- }
- };
- context.addFrameworkListener(listener);
- packageAdminService.refreshPackages(bundles);
- synchronized (flag) {
- while (!flag[0]) {
- try {
- flag.wait();
- } catch (InterruptedException e) {
- //ignore
- }
- }
- }
- // if (DEBUG) {
- // for (int i = 0; i < bundles.length; i++) {
- // System.out.println(SimpleConfiguratorUtils.getBundleStateString(bundles[i]));
- // }
- // }
- context.removeFrameworkListener(listener);
- }
-
- private void startBundles(Bundle[] bundles) {
- for (int i = 0; i < bundles.length; i++) {
- Bundle bundle = bundles[i];
- if (bundle.getState() == Bundle.UNINSTALLED) {
- System.err.println("Could not start: " + bundle.getSymbolicName() + '(' + bundle.getLocation() + ':' + bundle.getBundleId() + ')' + ". It's state is uninstalled.");
- continue;
- }
- if (bundle.getState() == Bundle.STARTING && (bundle == callingBundle || bundle == manipulatingContext.getBundle()))
- continue;
- if (packageAdminService.getBundleType(bundle) == PackageAdmin.BUNDLE_TYPE_FRAGMENT)
- continue;
-
- try {
- bundle.start();
- if (Activator.DEBUG)
- System.out.println("started Bundle:" + bundle.getSymbolicName() + '(' + bundle.getLocation() + ':' + bundle.getBundleId() + ')'); //$NON-NLS-1$
- } catch (BundleException e) {
- e.printStackTrace();
- // FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_FAILED_START, bundle.getLocation()), 0, e, null);
- // log.log(entry);
- }
- }
- }
-
- /**
- * Uninstall bundles which are not listed on finalList.
- *
- * @param finalList bundles list not to be uninstalled.
- * @param packageAdmin package admin service.
- * @return Collection HashSet of bundles finally installed.
- */
- private Collection uninstallBundles(BundleInfo[] finalList, PackageAdmin packageAdmin) {
- Bundle[] allBundles = manipulatingContext.getBundles();
-
- //Build a set with all the bundles from the system
- Set removedBundles = new HashSet(allBundles.length);
- // configurator.setPrerequisiteBundles(allBundles);
- for (int i = 0; i < allBundles.length; i++) {
- if (allBundles[i].getBundleId() == 0)
- continue;
- removedBundles.add(allBundles[i]);
- }
-
- //Remove all the bundles appearing in the final list from the set of installed bundles
- for (int i = 0; i < finalList.length; i++) {
- if (finalList[i] == null)
- continue;
- Bundle[] toAdd = packageAdmin.getBundles(finalList[i].getSymbolicName(), getVersionRange(finalList[i].getVersion()));
- for (int j = 0; toAdd != null && j < toAdd.length; j++) {
- removedBundles.remove(toAdd[j]);
- }
- }
-
- for (Iterator iter = removedBundles.iterator(); iter.hasNext();) {
- try {
- Bundle bundle = ((Bundle) iter.next());
- if (bundle.getLocation().startsWith("initial@")) {
- if (Activator.DEBUG)
- System.out.println("Simple configurator thinks a bundle installed by the boot strap should be uninstalled:" + bundle.getSymbolicName() + '(' + bundle.getLocation() + ':' + bundle.getBundleId() + ')'); //$NON-NLS-1$
- // Avoid uninstalling bundles that the boot strap code thinks should be installed (bug 232191)
- iter.remove();
- continue;
- }
- bundle.uninstall();
- if (Activator.DEBUG)
- System.out.println("uninstalled Bundle:" + bundle.getSymbolicName() + '(' + bundle.getLocation() + ':' + bundle.getBundleId() + ')'); //$NON-NLS-1$
- } catch (BundleException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return removedBundles;
- }
-
- private String getVersionRange(String version) {
- return version == null ? null : new StringBuffer().append('[').append(version).append(',').append(version).append(']').toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorFactory.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorFactory.java
deleted file mode 100644
index 7e8dbeb5d..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorFactory.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator;
-
-import org.osgi.framework.*;
-
-public class SimpleConfiguratorFactory implements ServiceFactory {
- private BundleContext context;
-
- public SimpleConfiguratorFactory(BundleContext context) {
- this.context = context;
- }
-
- public Object getService(Bundle bundle, ServiceRegistration registration) {
- return new SimpleConfiguratorImpl(context, bundle);
- }
-
- public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
- // nothing to do
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
deleted file mode 100644
index 6c6f70e7f..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/SimpleConfiguratorImpl.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.*;
-import java.util.List;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.*;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/*
- * SimpleConfigurator provides ways to install bundles listed in a file
- * accessible by the specified URL and expect states for it in advance without
- * actual application.
- *
- * In every methods of SimpleConfiguration object,
- *
- * 1. A value will be gotten by @{link BundleContext#getProperty(key) with
- * {@link SimpleConfiguratorConstants#PROP_KEY_EXCLUSIVE_INSTALLATION} as a key.
- * 2. If it equals "true", it will do exclusive installation, which means that
- * the bundles will not be listed in the specified url but installed at the time
- * of the method call except SystemBundle will be uninstalled. Otherwise, no
- * uninstallation will not be done.
- */
-public class SimpleConfiguratorImpl implements Configurator {
-
- private static URL configurationURL = null;
- private static Object configurationLock = new Object();
-
- private BundleContext context;
- private ConfigApplier configApplier;
- private Bundle bundle;
-
- public SimpleConfiguratorImpl(BundleContext context, Bundle bundle) {
- this.context = context;
- this.bundle = bundle;
- }
-
- public URL getConfigurationURL() throws IOException {
- String specifiedURL = context.getProperty(SimpleConfiguratorConstants.PROP_KEY_CONFIGURL);
- if (specifiedURL == null)
- specifiedURL = "file:" + SimpleConfiguratorConstants.CONFIGURATOR_FOLDER + "/" + SimpleConfiguratorConstants.CONFIG_LIST;
-
- try {
- //If it is not a file URL use it as is
- if (!specifiedURL.startsWith("file:"))
- return new URL(specifiedURL);
- } catch (MalformedURLException e) {
- return null;
- }
-
- try {
- // if it is an absolute file URL, use it as is
- boolean done = false;
- URL url = null;
- String file = specifiedURL;
- while (!done) {
- // TODO what is this while loop for? nested file:file:file: urls?
- try {
- url = Utils.buildURL(file);
- file = url.getFile();
- } catch (java.net.MalformedURLException e) {
- done = true;
- }
- }
- if (url != null && new File(url.getFile()).isAbsolute())
- return url;
-
- //if it is an relative file URL, then resolve it against the configuration area
- // TODO Support relative file URLs when not on Equinox
- URL[] configURL = EquinoxUtils.getConfigAreaURL(context);
- if (configURL != null) {
- File userConfig = new File(configURL[0].getFile(), url.getFile());
- if (configURL.length == 1)
- return userConfig.exists() ? userConfig.toURL() : null;
-
- File sharedConfig = new File(configURL[1].getFile(), url.getFile());
- if (!userConfig.exists())
- return sharedConfig.exists() ? sharedConfig.toURL() : null;
-
- if (!sharedConfig.exists())
- return userConfig.toURL();
-
- URI base = EquinoxUtils.getInstallLocationURI(context);
-
- URL sharedConfigURL = sharedConfig.toURL();
- List sharedBundles = SimpleConfiguratorUtils.readConfiguration(sharedConfigURL, base);
-
- URL userConfigURL = userConfig.toURL();
- List userBundles = SimpleConfiguratorUtils.readConfiguration(userConfigURL, base);
-
- return (userBundles.containsAll(sharedBundles)) ? userConfigURL : sharedConfigURL;
- }
- } catch (MalformedURLException e) {
- return null;
- }
-
- //Last resort
- try {
- return Utils.buildURL(specifiedURL);
- } catch (MalformedURLException e) {
- //Ignore
- }
-
- return null;
- }
-
- public void applyConfiguration(URL url) throws IOException {
- synchronized (configurationLock) {
- if (Activator.DEBUG)
- System.out.println("applyConfiguration() URL=" + url);
- if (url == null)
- return;
- configurationURL = url;
-
- if (this.configApplier == null)
- configApplier = new ConfigApplier(context, bundle);
- configApplier.install(url, isExclusiveInstallation());
- }
- }
-
- private boolean isExclusiveInstallation() {
- String value = context.getProperty(SimpleConfiguratorConstants.PROP_KEY_EXCLUSIVE_INSTALLATION);
- if (value == null || value.trim().length() == 0)
- value = "true";
- return Boolean.valueOf(value).booleanValue();
- }
-
- public void applyConfiguration() throws IOException {
- synchronized (configurationLock) {
- configurationURL = getConfigurationURL();
- applyConfiguration(configurationURL);
- }
- }
-
- public URL getUrlInUse() {
- synchronized (configurationLock) {
- return configurationURL;
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java
deleted file mode 100644
index b4bb8b0d5..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ApplyCommand.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.console;
-
-import java.io.IOException;
-import java.net.URL;
-import org.eclipse.equinox.internal.provisional.configurator.Configurator;
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * An OSGi console command to apply a configuration
- */
-public class ApplyCommand {
-
- private URL configURL;
- private CommandInterpreter interpreter;
- private BundleContext context;
-
- public ApplyCommand(CommandInterpreter interpreter, BundleContext context, URL configURL) {
- this.interpreter = interpreter;
- this.context = context;
- this.configURL = configURL;
- }
-
- /**
- * Runs the apply console command
- */
- public void run() {
- ServiceTracker tracker = new ServiceTracker(context, Configurator.class.getName(), null);
- tracker.open();
- Configurator configurator = (Configurator) tracker.getService();
- if (configurator != null) {
- try {
- if (configURL != null)
- configurator.applyConfiguration(configURL);
- else
- configurator.applyConfiguration();
-
- if (configurator.getUrlInUse() == null)
- interpreter.println("Config URL not set.");
- } catch (IOException e) {
- interpreter.println(e.getMessage());
- }
- } else {
- interpreter.println("No configurator registered"); //$NON-NLS-1$
- }
- tracker.close();
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
deleted file mode 100644
index 99a667eed..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/console/ConfiguratorCommandProvider.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.console;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.equinox.internal.simpleconfigurator.utils.Utils;
-import org.eclipse.osgi.framework.console.CommandInterpreter;
-import org.eclipse.osgi.framework.console.CommandProvider;
-import org.osgi.framework.BundleContext;
-
-public class ConfiguratorCommandProvider implements CommandProvider {
- public static final String NEW_LINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private BundleContext context;
-
- public ConfiguratorCommandProvider(BundleContext context) {
- this.context = context;
- }
-
- /**
- * Returns the given string as an URL, or <code>null</code> if
- * the string could not be interpreted as an URL.
- */
- private URL toURL(CommandInterpreter interpreter, String urlString) {
- try {
- return Utils.buildURL(urlString);
- } catch (MalformedURLException e) {
- interpreter.println(e.getMessage());
- return null;
- }
- }
-
- /**
- * Apply the current configuration
- * @param interpreter
- */
- public void _confapply(CommandInterpreter interpreter) {
- String parameter = interpreter.nextArgument();
- URL configURL = null;
- if (parameter != null)
- configURL = toURL(interpreter, parameter);
-
- new ApplyCommand(interpreter, context, configURL).run();
- }
-
- public String getHelp() {
- StringBuffer help = new StringBuffer();
- help.append("---"); //$NON-NLS-1$
- help.append("Configurator Commands"); //$NON-NLS-1$
- help.append("---"); //$NON-NLS-1$
- help.append(NEW_LINE);
- help.append("\tconfapply [<config URL>] - Applies a configuration"); //$NON-NLS-1$
- help.append(NEW_LINE);
- return help.toString();
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java
deleted file mode 100644
index 8f44d08b3..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.net.URI;
-
-/*
- * This object represents information of a bundle.
- */
-public class BundleInfo {
- public static final int NO_LEVEL = -1;
-
- private String symbolicName = null;
- private String version = null;
- private URI location;
- private URI baseLocation;
-
- private boolean markedAsStarted = false;
- private int startLevel = NO_LEVEL;
-
- public BundleInfo(String symbolic, String version, URI location, int startLevel, boolean started) {
- this.symbolicName = symbolic;
- this.version = version;
- this.location = location;
- this.markedAsStarted = started;
- this.startLevel = startLevel;
- }
-
- public URI getLocation() {
- return location;
- }
-
- public int getStartLevel() {
- return startLevel;
- }
-
- public String getSymbolicName() {
- return symbolicName;
- }
-
- public String getVersion() {
- return version;
- }
-
- public boolean isMarkedAsStarted() {
- return markedAsStarted;
- }
-
- public URI getBaseLocation() {
- return baseLocation;
- }
-
- public void setBaseLocation(URI baseLocation) {
- this.baseLocation = baseLocation;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("BundleInfo("); //$NON-NLS-1$
- if (symbolicName != null)
- buffer.append(symbolicName);
- buffer.append(", "); //$NON-NLS-1$
- if (version != null)
- buffer.append(version);
- if (baseLocation != null) {
- buffer.append(", baseLocation="); //$NON-NLS-1$
- buffer.append(baseLocation);
- }
- buffer.append(", location="); //$NON-NLS-1$
- buffer.append(location);
- buffer.append(", startLevel="); //$NON-NLS-1$
- buffer.append(startLevel);
- buffer.append(", toBeStarted="); //$NON-NLS-1$
- buffer.append(markedAsStarted);
- buffer.append(')');
- return buffer.toString();
- }
-
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode());
- result = prime * result + ((version == null) ? 0 : version.hashCode());
- return result;
- }
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
-
- if (obj == null)
- return false;
-
- if (getClass() != obj.getClass())
- return false;
-
- BundleInfo other = (BundleInfo) obj;
- if (symbolicName == null) {
- if (other.symbolicName != null)
- return false;
- } else if (!symbolicName.equals(other.symbolicName))
- return false;
-
- if (version == null) {
- if (other.version != null)
- return false;
- } else if (!version.equals(other.version))
- return false;
-
- if (location == null || other.location == null)
- return true;
-
- //compare absolute location URIs
- URI absoluteLocation = baseLocation == null ? location : URIUtil.append(baseLocation, location.toString());
- URI otherAbsoluteLocation = other.baseLocation == null ? other.location : URIUtil.append(other.baseLocation, other.location.toString());
- return URIUtil.sameURI(absoluteLocation, otherAbsoluteLocation);
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java
deleted file mode 100644
index 66454c087..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/EquinoxUtils.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.net.*;
-import org.eclipse.equinox.internal.simpleconfigurator.console.ConfiguratorCommandProvider;
-import org.eclipse.osgi.framework.console.CommandProvider;
-import org.eclipse.osgi.service.datalocation.Location;
-import org.osgi.framework.*;
-import org.osgi.util.tracker.ServiceTracker;
-
-public class EquinoxUtils {
-
- public static URL[] getConfigAreaURL(BundleContext context) {
- Location configLocation = getConfigLocation(context);
- if (configLocation == null)
- return null;
-
- URL baseURL = configLocation.getURL();
- if (configLocation.getParentLocation() != null && configLocation.getURL() != null) {
- if (baseURL == null)
- return new URL[] {configLocation.getParentLocation().getURL()};
- else
- return new URL[] {baseURL, configLocation.getParentLocation().getURL()};
- }
- if (baseURL != null)
- return new URL[] {baseURL};
-
- return null;
- }
-
- public static Location getConfigLocation(BundleContext context) {
- Filter filter = null;
- try {
- filter = context.createFilter(Location.CONFIGURATION_FILTER);
- } catch (InvalidSyntaxException e) {
- // should not happen
- }
- ServiceTracker configLocationTracker = new ServiceTracker(context, filter, null);
- configLocationTracker.open();
- try {
- return (Location) configLocationTracker.getService();
- } finally {
- configLocationTracker.close();
- }
- }
-
- public static URI getInstallLocationURI(BundleContext context) {
- try {
- ServiceReference[] references = context.getServiceReferences(Location.class.getName(), Location.INSTALL_FILTER);
- if (references != null && references.length > 0) {
- ServiceReference reference = references[0];
- Location installLocation = (Location) context.getService(reference);
- if (installLocation != null) {
- try {
- if (installLocation.isSet()) {
- URL location = installLocation.getURL();
- return URIUtil.toURI(location);
- }
- } catch (URISyntaxException e) {
- //TODO: log an error
- } finally {
- context.ungetService(reference);
- }
- }
- }
- } catch (InvalidSyntaxException e) {
- //TODO: log an error
- }
- return null;
- }
-
- public static ServiceRegistration registerConsoleCommands(BundleContext context) {
- return context.registerService(CommandProvider.class.getName(), new ConfiguratorCommandProvider(context), null);
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorConstants.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorConstants.java
deleted file mode 100644
index 425c16028..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorConstants.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-public class SimpleConfiguratorConstants {
- /**
- * If BundleContext#getProperty(PROP_KEY_EXCLUSIVE_INSTALLATION) equals "true" ignoring case,
- * Configurator.applyConfiguration(url) will uninstall the installed bundles which are not
- * listed in the simpleconfigurator config file after install bundles listed.
- * Otherwise, it never uninstall any bundles.
- *
- * Default: true
- */
- public static final String PROP_KEY_EXCLUSIVE_INSTALLATION = "org.eclipse.equinox.simpleconfigurator.exclusiveInstallation"; //$NON-NLS-1$
-
- /**
- * If BundleContext#getProperty(PROP_KEY_USE_REFERENCE) does not equal "false" ignoring case,
- * when a SimpleConfigurator installs a bundle, "reference:" is added to its bundle location in order to avoid
- * caching its bundle jar. Otherwise, it will add nothing to any bundle location.
- *
- * Default: true
- */
- public static final String PROP_KEY_USE_REFERENCE = "org.eclipse.equinox.simpleconfigurator.useReference"; //$NON-NLS-1$
-
- /**
- * BundleContext#getProperty(PROP_KEY_CONFIGURL) is used for SimpleConfigurator to do life cycle control of bundles.
- * The file specified by the returned url is read by SimpleConfigurator and do life cycle control according to it.
- * If improper value or null is returned, SimpleConfigurator doesn't do it.
- *
- * Default: null
- */
- public static final String PROP_KEY_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
-
- public static final String CONFIG_LIST = "bundles.info"; //$NON-NLS-1$
- public static final String CONFIGURATOR_FOLDER = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
-
- public static final String TARGET_CONFIGURATOR_NAME = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
-
- public static final String PARAMETER_BASEURL = "org.eclipse.equinox.simpleconfigurator.baseUrl"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
deleted file mode 100644
index 0ab0582f2..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/SimpleConfiguratorUtils.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * 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
- ******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import org.eclipse.osgi.service.resolver.VersionRange;
-import org.osgi.framework.Version;
-
-public class SimpleConfiguratorUtils {
-
- private static final String UNC_PREFIX = "//";
- private static final String VERSION_PREFIX = "#version=";
- public static final String ENCODING_UTF8 = "#encoding=UTF-8";
- public static final Version COMPATIBLE_VERSION = new Version(1, 0, 0);
- public static final VersionRange VERSION_TOLERANCE = new VersionRange(COMPATIBLE_VERSION, true, new Version(2, 0, 0), false);
-
- private static final String FILE_SCHEME = "file";
- private static final String REFERENCE_PREFIX = "reference:";
- private static final String FILE_PREFIX = "file:";
- private static final String COMMA = ",";
- private static final String ENCODED_COMMA = "%2C";
-
- public static List readConfiguration(URL url, URI base) throws IOException {
- InputStream stream = null;
- try {
- stream = url.openStream();
- } catch (IOException e) {
- // if the exception is a FNF we return an empty bundle list
- if (e instanceof FileNotFoundException)
- return Collections.EMPTY_LIST;
- throw e;
- }
-
- try {
- return readConfiguration(stream, base);
- } finally {
- stream.close();
- }
- }
-
- /**
- * Read the configuration from the given InputStream
- *
- * @param stream - the stream is always closed
- * @param base
- * @return List of {@link BundleInfo}
- * @throws IOException
- */
- public static List readConfiguration(InputStream stream, URI base) throws IOException {
- List bundles = new ArrayList();
-
- BufferedInputStream bufferedStream = new BufferedInputStream(stream);
- String encoding = determineEncoding(bufferedStream);
- BufferedReader r = new BufferedReader(encoding == null ? new InputStreamReader(bufferedStream) : new InputStreamReader(bufferedStream, encoding));
-
- String line;
- try {
- while ((line = r.readLine()) != null) {
- line = line.trim();
- //ignore any comment or empty lines
- if (line.length() == 0)
- continue;
-
- if (line.startsWith("#")) {//$NON-NLS-1$
- parseCommentLine(line);
- continue;
- }
-
- BundleInfo bundleInfo = parseBundleInfoLine(line, base);
- if (bundleInfo != null)
- bundles.add(bundleInfo);
- }
- } finally {
- try {
- r.close();
- } catch (IOException ex) {
- // ignore
- }
- }
- return bundles;
- }
-
- /*
- * We expect the first line of the bundles.info to be
- * #encoding=UTF-8
- * if it isn't, then it is an older bundles.info and should be
- * read with the default encoding
- */
- private static String determineEncoding(BufferedInputStream stream) {
- byte[] utfBytes = ENCODING_UTF8.getBytes();
- byte[] buffer = new byte[utfBytes.length];
-
- int bytesRead = -1;
- stream.mark(utfBytes.length + 1);
- try {
- bytesRead = stream.read(buffer);
- } catch (IOException e) {
- //do nothing
- }
-
- if (bytesRead == utfBytes.length && Arrays.equals(utfBytes, buffer))
- return "UTF-8";
-
- //if the first bytes weren't the encoding, need to reset
- try {
- stream.reset();
- } catch (IOException e) {
- // nothing
- }
- return null;
- }
-
- public static void parseCommentLine(String line) {
- // version
- if (line.startsWith(VERSION_PREFIX)) {
- String version = line.substring(VERSION_PREFIX.length()).trim();
- if (!VERSION_TOLERANCE.isIncluded(new Version(version)))
- throw new IllegalArgumentException("Invalid version: " + version);
- }
- }
-
- public static BundleInfo parseBundleInfoLine(String line, URI base) {
- // symbolicName,version,location,startLevel,markedAsStarted
- StringTokenizer tok = new StringTokenizer(line, COMMA);
- int numberOfTokens = tok.countTokens();
- if (numberOfTokens < 5)
- throw new IllegalArgumentException("Line does not contain at least 5 tokens: " + line);
-
- String symbolicName = tok.nextToken().trim();
- String version = tok.nextToken().trim();
- URI location = parseLocation(tok.nextToken().trim());
- int startLevel = Integer.parseInt(tok.nextToken().trim());
- boolean markedAsStarted = Boolean.valueOf(tok.nextToken()).booleanValue();
- BundleInfo result = new BundleInfo(symbolicName, version, location, startLevel, markedAsStarted);
- if (!location.isAbsolute())
- result.setBaseLocation(base);
- return result;
- }
-
- public static URI parseLocation(String location) {
- // decode any commas we previously encoded when writing this line
- int encodedCommaIndex = location.indexOf(ENCODED_COMMA);
- while (encodedCommaIndex != -1) {
- location = location.substring(0, encodedCommaIndex) + COMMA + location.substring(encodedCommaIndex + 3);
- encodedCommaIndex = location.indexOf(ENCODED_COMMA);
- }
-
- if (File.separatorChar != '/') {
- int colon = location.indexOf(':');
- String scheme = colon < 0 ? null : location.substring(0, colon);
- if (scheme == null || scheme.equals(FILE_SCHEME))
- location = location.replace(File.separatorChar, '/');
- //if the file is a UNC path, insert extra leading // if needed to make a valid URI (see bug 207103)
- if (scheme == null) {
- if (location.startsWith(UNC_PREFIX) && !location.startsWith(UNC_PREFIX, 2))
- location = UNC_PREFIX + location;
- } else {
- //insert UNC prefix after the scheme
- if (location.startsWith(UNC_PREFIX, colon + 1) && !location.startsWith(UNC_PREFIX, colon + 3))
- location = location.substring(0, colon + 3) + location.substring(colon + 1);
- }
- }
-
- try {
- URI uri = new URI(location);
- if (!uri.isOpaque())
- return uri;
- } catch (URISyntaxException e1) {
- // this will catch the use of invalid URI characters (e.g. spaces, etc.)
- // ignore and fall through
- }
-
- try {
- return URIUtil.fromString(location);
- } catch (URISyntaxException e) {
- throw new IllegalArgumentException("Invalid location: " + location);
- }
- }
-
- public static void transferStreams(InputStream source, OutputStream destination) throws IOException {
- source = new BufferedInputStream(source);
- destination = new BufferedOutputStream(destination);
- try {
- byte[] buffer = new byte[8192];
- while (true) {
- int bytesRead = -1;
- if ((bytesRead = source.read(buffer)) == -1)
- break;
- destination.write(buffer, 0, bytesRead);
- }
- } finally {
- try {
- source.close();
- } catch (IOException e) {
- // ignore
- }
- try {
- destination.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
-
- // This will produce an unencoded URL string
- public static String getBundleLocation(BundleInfo bundle, boolean useReference) {
- URI location = bundle.getLocation();
- String scheme = location.getScheme();
- String host = location.getHost();
- String path = location.getPath();
-
- if (location.getScheme() == null) {
- URI baseLocation = bundle.getBaseLocation();
- if (baseLocation != null && baseLocation.getScheme() != null) {
- scheme = baseLocation.getScheme();
- host = baseLocation.getHost();
- }
- }
-
- String bundleLocation = null;
- try {
- URL bundleLocationURL = new URL(scheme, host, path);
- bundleLocation = bundleLocationURL.toExternalForm();
-
- } catch (MalformedURLException e1) {
- bundleLocation = location.toString();
- }
-
- if (useReference && bundleLocation.startsWith(FILE_PREFIX))
- bundleLocation = REFERENCE_PREFIX + bundleLocation;
- return bundleLocation;
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/StateResolverUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/StateResolverUtils.java
deleted file mode 100644
index 0b1b5f935..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/StateResolverUtils.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.util.*;
-import org.eclipse.osgi.service.resolver.*;
-import org.osgi.framework.*;
-
-public class StateResolverUtils {
-
- public static Bundle[] getAdditionalRefresh(Collection currentResolved, BundleContext context) {
- ServiceReference ref = context.getServiceReference(PlatformAdmin.class.getName());
- if (ref == null)
- return new Bundle[0];
- PlatformAdmin platformAdmin = (PlatformAdmin) context.getService(ref);
- if (platformAdmin == null)
- return new Bundle[0];
- try {
- State state = platformAdmin.getState(false);
- BundleDescription[] bundles = state.getBundles();
- HashSet results = new HashSet(bundles.length);
- getAdditionRefresh(bundles, state, currentResolved, results, context);
- return (Bundle[]) results.toArray(new Bundle[results.size()]);
- } finally {
- context.ungetService(ref);
- }
- }
-
- private static void getAdditionRefresh(BundleDescription[] bundleDescriptions, State state, Collection currentResolved, Set results, BundleContext context) {
- bundles: for (int i = 0; i < bundleDescriptions.length; i++) {
- Bundle bundle = context.getBundle(bundleDescriptions[i].getBundleId());
- if (bundle == null)
- continue bundles;
- // look for a fragment which adds a conflicted constraint to an already resolved host
- if (!bundleDescriptions[i].isResolved() && bundleDescriptions[i].getHost() != null) {
- ResolverError[] errors = state.getResolverErrors(bundleDescriptions[i]);
- for (int j = 0; j < errors.length; j++) {
- if ((errors[j].getType() & ResolverError.FRAGMENT_CONFLICT) != 0) {
- BundleDescription[] possibleHosts = state.getBundles(bundleDescriptions[i].getHost().getName());
- for (int k = 0; k < possibleHosts.length; k++) {
- Bundle hostBundle = context.getBundle(possibleHosts[k].getBundleId());
- if (hostBundle != null && currentResolved.contains(hostBundle) && bundleDescriptions[i].getHost().isSatisfiedBy(possibleHosts[k]))
- results.add(hostBundle);
- }
- }
- }
- continue bundles;
- }
- if (!currentResolved.contains(bundle) || !bundleDescriptions[i].isResolved())
- continue bundles;
- // look for optional imports which are unresolved but are resolvable
- ImportPackageSpecification[] imports = bundleDescriptions[i].getImportPackages();
- for (int j = 0; j < imports.length; j++)
- if (ImportPackageSpecification.RESOLUTION_OPTIONAL.equals(imports[j].getDirective(Constants.RESOLUTION_DIRECTIVE)) && !imports[j].isResolved() && state.getStateHelper().isResolvable(imports[j])) {
- results.add(bundle);
- continue bundles;
- }
- // look for optional requires which are unresolved but are resolvable
- BundleSpecification[] requires = bundleDescriptions[i].getRequiredBundles();
- for (int j = 0; j < requires.length; j++)
- if (requires[j].isOptional() && !requires[j].isResolved() && state.getStateHelper().isResolvable(requires[j])) {
- results.add(bundle);
- continue bundles;
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/URIUtil.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/URIUtil.java
deleted file mode 100644
index 7f74610ce..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/URIUtil.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.io.File;
-import java.net.*;
-
-/**
- * This class copies various methods from the URIUtil class in
- * org.eclipse.equinox.common. Unless otherwise noted the implementations here
- * should mirror those in the common implementation.
- */
-public class URIUtil {
-
- private static final String SCHEME_FILE = "file"; //$NON-NLS-1$
- private static final String UNC_PREFIX = "//"; //$NON-NLS-1$
-
- /**
- * Appends the given extension to the path of the give base URI and returns
- * the corresponding new path.
- * @param base The base URI to append to
- * @param extension The path extension to be added
- * @return The appended URI
- */
- public static URI append(URI base, String extension) {
- try {
- String path = base.getPath();
- if (path == null)
- return appendOpaque(base, extension);
- //if the base is already a directory then resolve will just do the right thing
- if (path.endsWith("/")) {//$NON-NLS-1$
- URI result = base.resolve(extension);
- //Fix UNC paths that are incorrectly normalized by URI#resolve (see Java bug 4723726)
- String resultPath = result.getPath();
- if (path.startsWith(UNC_PREFIX) && (resultPath == null || !resultPath.startsWith(UNC_PREFIX)))
- result = new URI(result.getScheme(), "///" + result.getSchemeSpecificPart(), result.getFragment()); //$NON-NLS-1$
- return result;
- }
- path = path + "/" + extension; //$NON-NLS-1$
- return new URI(base.getScheme(), base.getUserInfo(), base.getHost(), base.getPort(), path, base.getQuery(), base.getFragment());
- } catch (URISyntaxException e) {
- //shouldn't happen because we started from a valid URI
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Special case of appending to an opaque URI. Since opaque URIs
- * have no path segment the best we can do is append to the scheme-specific part
- */
- private static URI appendOpaque(URI base, String extension) throws URISyntaxException {
- String ssp = base.getSchemeSpecificPart();
- if (ssp.endsWith("/")) //$NON-NLS-1$
- ssp += extension;
- else
- ssp = ssp + "/" + extension; //$NON-NLS-1$
- return new URI(base.getScheme(), ssp, base.getFragment());
- }
-
- /**
- * Returns a URI corresponding to the given unencoded string.
- * @throws URISyntaxException If the string cannot be formed into a valid URI
- */
- public static URI fromString(String uriString) throws URISyntaxException {
- int colon = uriString.indexOf(':');
- int hash = uriString.lastIndexOf('#');
- boolean noHash = hash < 0;
- if (noHash)
- hash = uriString.length();
- String scheme = colon < 0 ? null : uriString.substring(0, colon);
- String ssp = uriString.substring(colon + 1, hash);
- String fragment = noHash ? null : uriString.substring(hash + 1);
- //use java.io.File for constructing file: URIs
- if (scheme != null && scheme.equals(SCHEME_FILE)) {
- File file = new File(uriString.substring(5));
- if (file.isAbsolute())
- return file.toURI();
- scheme = null;
- if (File.separatorChar != '/')
- ssp = ssp.replace(File.separatorChar, '/');
- }
- return new URI(scheme, ssp, fragment);
- }
-
- /*
- * Compares two URI for equality.
- * Return false if one of them is null
- */
- public static boolean sameURI(URI url1, URI url2) {
- if (url1 == url2)
- return true;
- if (url1 == null || url2 == null)
- return false;
- if (url1.equals(url2))
- return true;
-
- if (url1.isAbsolute() != url2.isAbsolute())
- return false;
-
- // check if we have two local file references that are case variants
- File file1 = toFile(url1);
- return file1 == null ? false : file1.equals(toFile(url2));
- }
-
- /**
- * Returns the URI as a local file, or <code>null</code> if the given
- * URI does not represent a local file.
- * @param uri The URI to return the file for
- * @return The local file corresponding to the given URI, or <code>null</code>
- */
- public static File toFile(URI uri) {
- try {
- if (!SCHEME_FILE.equalsIgnoreCase(uri.getScheme()))
- return null;
- //assume all illegal characters have been properly encoded, so use URI class to unencode
- return new File(uri);
- } catch (IllegalArgumentException e) {
- //File constructor does not support non-hierarchical URI
- String path = uri.getPath();
- //path is null for non-hierarchical URI such as file:c:/tmp
- if (path == null)
- path = uri.getSchemeSpecificPart();
- return new File(path);
- }
- }
-
- /**
- * Returns a string representation of the given URI that doesn't have illegal
- * characters encoded. This string is suitable for later passing to {@link #fromString(String)}.
- * @param uri The URI to convert to string format
- * @return An unencoded string representation of the URI
- */
- public static String toUnencodedString(URI uri) {
- StringBuffer result = new StringBuffer();
- String scheme = uri.getScheme();
- if (scheme != null)
- result.append(scheme).append(':');
- //there is always a ssp
- result.append(uri.getSchemeSpecificPart());
- String fragment = uri.getFragment();
- if (fragment != null)
- result.append('#').append(fragment);
- return result.toString();
- }
-
- /**
- * Returns the URL as a URI. This method will handle broken URLs that are
- * not properly encoded (for example they contain unencoded space characters).
- */
- public static URI toURI(URL url) throws URISyntaxException {
- //URL behaves differently across platforms so for file: URLs we parse from string form
- if (SCHEME_FILE.equals(url.getProtocol())) {
- String pathString = url.toExternalForm().substring(5);
- //ensure there is a leading slash to handle common malformed URLs such as file:c:/tmp
- if (pathString.indexOf('/') != 0)
- pathString = '/' + pathString;
- else if (pathString.startsWith(UNC_PREFIX) && !pathString.startsWith(UNC_PREFIX, 2)) {
- //URL encodes UNC path with two slashes, but URI uses four (see bug 207103)
- pathString = UNC_PREFIX + pathString;
- }
- return new URI(SCHEME_FILE, null, pathString, null);
- }
- try {
- return new URI(url.toExternalForm());
- } catch (URISyntaxException e) {
- //try multi-argument URI constructor to perform encoding
- return new URI(url.getProtocol(), url.getUserInfo(), url.getHost(), url.getPort(), url.getPath(), url.getQuery(), url.getRef());
- }
- }
-
- /**
- * Returns a URI as a URL.
- *
- * @throws MalformedURLException
- */
- public static URL toURL(URI uri) throws MalformedURLException {
- return new URL(uri.toString());
- }
-}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/Utils.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/Utils.java
deleted file mode 100644
index 2d21e13bb..000000000
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/Utils.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.internal.simpleconfigurator.utils;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-
-/*
- * This class was copied from org.eclipse.equinox.internal.frameworkadmin.utils
- * package of org.eclipse.equinox.frameworkadmin plugin on March 3 2007.
- *
- * The reason why it was copied is to make simpleconfigurator dependent on any
- * bundles(org.eclipse.equinox.framework).
- */
-
-public class Utils {
- private final static String PATH_SEP = "/"; //$NON-NLS-1$
-
- public static URL checkFullUrl(URL url, String urlName) throws IllegalArgumentException {//throws ManipulatorException {
- if (url == null)
- throw new IllegalArgumentException(urlName + " is null");
- if (!url.getProtocol().endsWith("file"))
- return url;
- File file = new File(url.getFile());
- if (!file.isAbsolute())
- throw new IllegalArgumentException(urlName + "(" + url + ") does not have absolute path");
- if (file.getAbsolutePath().startsWith(PATH_SEP))
- return url;
- try {
- return getUrl("file", null, PATH_SEP + file.getAbsolutePath());
- } catch (MalformedURLException e) {
- throw new IllegalArgumentException(urlName + "(" + "file:" + PATH_SEP + file.getAbsolutePath() + ") is not fully quallified");
- }
- }
-
- public static void deleteDir(File file) throws IOException {
- if (file.isFile()) {
- if (!file.delete())
- throw new IOException("Fail to delete File(" + file.getAbsolutePath() + ")");
- return;
- }
- File[] children = file.listFiles();
- for (int i = 0; i < children.length; i++) {
- deleteDir(children[i]);
- }
- if (!file.delete())
- throw new IOException("Fail to delete Dir(" + file.getAbsolutePath() + ")");
- return;
- }
-
- public static BundleInfo[] getBundleInfosFromList(List list) {
- if (list == null)
- return new BundleInfo[0];
- BundleInfo[] ret = new BundleInfo[list.size()];
- list.toArray(ret);
- return ret;
- }
-
- public static URL getUrl(String protocol, String host, String file) throws MalformedURLException {// throws ManipulatorException {
- file = Utils.replaceAll(file, File.separator, "/");
- return new URL(protocol, host, file);
- }
-
- public static String removeLastCh(String target, char ch) {
- while (target.charAt(target.length() - 1) == ch) {
- target = target.substring(0, target.length() - 1);
- }
- return target;
- }
-
- public static String replaceAll(String st, String oldSt, String newSt) {
- int index = -1;
- while ((index = st.indexOf(oldSt)) != -1) {
- st = st.substring(0, index) + newSt + st.substring(index + oldSt.length());
- }
- return st;
- }
-
- public static void log(int level, Object obj, String method, String message, Throwable e) {
- String msg = "";
- if (method == null) {
- if (obj != null)
- msg = "(" + obj.getClass().getName() + ")";
- } else if (obj == null)
- msg = "[" + method + "]" + message;
- else
- msg = "[" + method + "](" + obj.getClass().getName() + ")";
- msg += message;
-
-// if (LogService logService = Activator.getLogService();
-// if (logService != null) {
-// logService.log(level, msg, e);
-// } else {
- String levelSt = null;
- if (level == 1)
- levelSt = "DEBUG";
- else if (level == 2)
- levelSt = "INFO";
- else if (level == 3)
- levelSt = "WARNING";
- else if (level == 4) {
- levelSt = "ERROR";
-// useLog = true;
- }
-// if (useLog) {
- System.err.println("[" + levelSt + "]" + msg);
- if (e != null)
- e.printStackTrace();
-// }
- }
-
- public static URL buildURL(String spec) throws MalformedURLException {
- if (spec == null)
- throw new NullPointerException("URL spec is null."); //$NON-NLS-1$
- // Construct the URL carefully so as to preserve UNC paths etc.
- if (spec.startsWith("file:")) { //$NON-NLS-1$
- // need to do this for UNC paths
- File file = new File(spec.substring(5));
- if (file.isAbsolute())
- return file.toURL();
- }
- return new URL(spec);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.cvsignore b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.cvsignore
deleted file mode 100644
index f401d4633..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-repository
-buildDirectory
-TestBuild-* \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.project b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.project
deleted file mode 100644
index 96fb3bc7a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.cloud.releng</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/Build Cloud Example.launch b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/Build Cloud Example.launch
deleted file mode 100644
index c2eb88df9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/Build Cloud Example.launch
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.examples.rcp.cloud.releng"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/build.properties
deleted file mode 100644
index d8e85b5a7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/build.properties
+++ /dev/null
@@ -1,120 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 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
-###############################################################################
-product=/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
-runPackager=true
-
-p2.gathering=true
-p2.metadata.repo=file:${builder}/repository
-p2.artifact.repo=file:${builder}/repository
-
-#Set the name of the archive that will result from the product build.
-#archiveNamePrefix=
-
-# The prefix that will be used in the generated archive.
-archivePrefix=eclipse
-
-# The location underwhich all of the build output will be collected.
-collectingFolder=${archivePrefix}
-
-# The list of {os, ws, arch} configurations to build. This
-# value is a '&' separated list of ',' separate triples. For example,
-# configs=win32,win32,x86 & linux,motif,x86
-# By default the value is *,*,*
-configs = win32, win32, x86 & \
- linux, gtk, x86 &
-#configs=win32, win32, x86 & \
-# linux, gtk, ppc &\
-# linux, gtk, x86 & \
-# linux, gtk, x86_64 & \
-# linux, motif, x86 & \
-# solaris, motif, sparc & \
-# solaris, gtk, sparc & \
-# aix, motif, ppc & \
-# hpux, motif, PA_RISC & \
-# macosx, carbon, ppc
-
-#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
-allowBinaryCycles = true
-
-# Type of build. Used in naming the build output. Typically this value is
-# one of I, N, M, S, ...
-buildType=I
-
-# ID of the build. Used in naming the build output.
-buildId=TestBuild
-
-# Label for the build. Used in naming the build output
-buildLabel=${buildType}.${buildId}
-
-# Timestamp for the build. Used in naming the build output
-timestamp=007
-
-#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
-resolution.devMode=false
-
-skipBase=true
-skipMaps=true
-skipFetch=true
-
-
-############# JAVA COMPILER OPTIONS ##############
-# For this example:
-# We specify the JRE locations for CDC-1.1/Foundation-1.1 and J2SE-1.5
-# because these are the required execution environments defined for the
-# bundles in the example.
-
-# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE
-#bootclasspath=${java.home}/lib/rt.jar
-
-# If using an IBM VM, use
-#bootclasspath=${java.home}/lib/core.jar;${java.home}/lib/vm.jar
-
-# specific JRE locations to compile against. These values are used to compile bundles specifying a
-# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
-#CDC-1.0/Foundation-1.0= /path/to/rt.jar
-CDC-1.1/Foundation-1.1=${java.home}/lib/rt.jar
-#OSGi/Minimum-1.0=
-#OSGi/Minimum-1.1=
-#JRE-1.1=
-#J2SE-1.2=
-#J2SE-1.3=
-#J2SE-1.4=
-J2SE-1.5=${java.home}/lib/rt.jar
-#JavaSE-1.6=
-#PersonalJava-1.1=
-#PersonalJava-1.2=
-#CDC-1.0/PersonalBasis-1.0=
-#CDC-1.0/PersonalJava-1.0=
-#CDC-1.1/PersonalBasis-1.1=
-#CDC-1.1/PersonalJava-1.1=
-
-# Specify the output format of the compiler log when eclipse jdt is used
-logExtension=.log
-
-# Whether or not to include debug info in the output jars
-javacDebugInfo=false
-
-# Whether or not to fail the build if there are compiler errors
-javacFailOnError=true
-
-# Enable or disable verbose mode of the compiler
-javacVerbose=true
-
-# Extra arguments for the compiler. These are specific to the java compiler being used.
-#compilerArg=
-
-# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
-#javacSource=1.3
-
-# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
-#javacTarget=1.1
-
-
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml
deleted file mode 100644
index be9929d62..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/buildProduct.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<project default="main">
- <target name="main">
- <property name="baseLocation" value="${eclipse.home}"/>
- <!-- by default, check for deltapack co-located with eclipse -->
- <property name="deltapack" value="${eclipse.home}/../deltapack/eclipse"/>
-
- <!-- Check that we have a deltapack -->
- <available property="haveDeltaPack" file="${deltapack}"/>
- <fail unless="haveDeltaPack" message="The deltapack is required to build this product. Please edit buildProduct.xml or set the &quot;deltapack&quot; property." />
-
- <property name="builder" value="${basedir}" />
- <property name="buildDirectory" value="${basedir}/buildDirectory"/>
- <property name="pluginPath" value="${deltapack}" />
- <property name="buildTempFolder" value="${buildDirectory}" />
-
- <!-- Clean build directory and workspace -->
- <delete includeemptydirs="true" failonerror="false">
- <fileset dir="${basedir}/buildDirectory"/>
- <fileset dir="${basedir}/repository"/>
- </delete>
-
- <!-- Copy plug-ins from workspace -->
- <copy todir="${buildDirectory}/plugins">
- <fileset dir="${basedir}/..">
- <include name="org.eclipse.equinox.p2.examples.rcp.cloud/**/*"/>
- <exclude name="**/bin/**"/>
- </fileset>
- </copy>
-
- <ant antfile="${eclipse.pdebuild.scripts}/productBuild/productBuild.xml" />
-
- <move todir="${basedir}" overwrite="true">
- <fileset dir="${buildDirectory}/I.TestBuild" includes="*.zip"/>
- </move>
-
- <!-- refresh the workspace -->
- <eclipse.convertPath fileSystemPath="${basedir}" property="resourcePath"/>
- <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
- </target>
-</project> \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/readme.txt b/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/readme.txt
deleted file mode 100644
index eb0d08981..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud.releng/readme.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-This project is a releng builder for the org.eclipse.equinox.p2.examples.rcp.cloud project.
-
-1) This build requires 3.5M6 or later
-
-2) This build requires the deltapack. By default it looks beside the eclipse install for "deltapack/eclipse/*".
- If your deltapack is located elsewhere, set the "deltapack" property or edit the buildProduct.xml file. The
- version of the deltapack used should match the version of the eclipse that is running.
-
-3) Due to bug 268867, if the buildDirectory/buildRepo is deleted/cleaned, then the repo must also be removed from
- the workspace Available Software Sites preferences.
-
-4) Use the included launch config, or run buildProduct.xml as an ant build using the same JRE as the workspace
-
-5) The build.properties file specifically defines the JRE's for CDC-1.1/Foundation-1.1 and
- J2SE-1.5 because these are the required bundle execution environments in the example.
- The build should be run on a 1.5 VM. \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.project b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.project
deleted file mode 100644
index 9276cae55..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.cloud</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8f8669add..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Thu Mar 12 11:04:59 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
deleted file mode 100644
index 789636ca3..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: RCP Mail (Cloud Update Example)
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.cloud; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.cloud.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.operations;bundle-version="2.0.0",
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.1.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="2.0.0",
- org.eclipse.equinox.p2.engine;bundle-version="2.0.0",
- org.eclipse.equinox.p2.core;bundle-version="2.0.0",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1",
- org.eclipse.equinox.p2.ui.sdk.scheduler;bundle-version="1.0.0",
- org.eclipse.equinox.ds;bundle-version="1.2.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties
deleted file mode 100644
index f5ecc5c82..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp,\
- plugin.properties,\
- plugin_customization.ini
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
deleted file mode 100644
index 917ae236f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (Cloud Update)" id="org.eclipse.equinox.p2.examples.rcp.cloud.product" application="org.eclipse.equinox.p2.examples.rcp.cloud.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail template created by PDE
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.cloud" />
- <launcher name="cloud">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.event"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.cloud" version="1.0.0.qualifier"/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
- <plugin id="org.eclipse.equinox.p2.updatechecker"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.browser"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product.launch b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product.launch
deleted file mode 100644
index 1dc4e4204..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product.launch
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.equinox.p2.examples.rcp.cloud.application"/>
-<booleanAttribute key="askclear" value="true"/>
-<booleanAttribute key="automaticAdd" value="false"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<booleanAttribute key="clearws" value="false"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/cloud.product"/>
-<booleanAttribute key="default" value="false"/>
-<booleanAttribute key="generateProfile" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../runtime-cloud.product"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx384m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.equinox.p2.examples.rcp.cloud.product"/>
-<stringAttribute key="productFile" value="\org.eclipse.equinox.p2.examples.rcp.cloud\cloud.product"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.core.variables@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.databinding.observable@default:default,org.apache.commons.codec*1.3.0.v20100106-1700@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.databinding@default:default,org.apache.commons.codec*1.3.0.v20080530-1600@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.ds@1:true,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.ecf.provider.filetransfer.httpclient@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.app@default:default,javax.servlet@default:default,org.apache.commons.httpclient@default:default,org.eclipse.core.expressions@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.swt@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.equinox.event@default:default,org.eclipse.core.commands@default:default,org.eclipse.osgi@-1:true,org.eclipse.help@default:default,org.eclipse.ecf.provider.filetransfer.httpclient.ssl@default:false,org.eclipse.core.net.win32.x86@default:false,com.ibm.icu@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.util@default:default,org.eclipse.core.jobs@default:default,org.apache.commons.logging@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.core.net@default:default,org.eclipse.ui.browser@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.runtime@default:true"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.equinox.p2.directorywatcher@default:default,org.eclipse.equinox.p2.ql@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.p2.ui.sdk.scheduler@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.sat4j.pb@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.equinox.p2.extensionlocation@default:default,org.eclipse.equinox.p2.updatechecker@default:default,org.eclipse.equinox.p2.examples.rcp.cloud*1.0.0.qualifier@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.repository@default:default,org.sat4j.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.jface@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.director@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.equinox.p2.ui@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="true"/>
-<booleanAttribute key="usefeatures" value="false"/>
-</launchConfiguration>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/p2.inf
deleted file mode 100644
index 48f31a324..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.properties b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.properties
deleted file mode 100644
index cdf457c0e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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
-###############################################################################
-#
-# RCP Mail Plug-in Resources
-#
-Update.command=Check for Updates
-Update.command.mnemonic=U
-Install.command=Install New Software...
-Install.command.mnemonic=S
-installedSoftwarePage = Installed Software
-installHistoryPage = Installation History
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml
deleted file mode 100644
index 7e1298fb6..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.cloud.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.View"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.cloud.category"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.cloud.category"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.cloud.application"
- name="RCP Mail Example (Cloud Update)">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- <property name="preferenceCustomization" value="plugin_customization.ini"/>
-
- </product>
- </extension>
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
- <initializer class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.PreferenceInitializer"/>
- </extension>
- <extension
- point="org.eclipse.ui.installationPages">
- <page
- name="%installedSoftwarePage"
- class="org.eclipse.equinox.p2.ui.InstalledSoftwarePage"
- id="10.org.eclipse.equinox.p2.examples.rcp.cloud.InstalledSoftwarePage">
- </page>
- <page
- name="%installHistoryPage"
- class="org.eclipse.equinox.p2.ui.RevertProfilePage"
- id="11.org.eclipse.equinox.p2.examples.rcp.cloud.RevertProfilePage">
- </page>
-
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%Update.command"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.command.update">
- </command>
- <command
- name="%Install.command"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.command.install">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.update"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.UpdateHandler">
- </handler>
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.install"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.InstallNewSoftwareHandler">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:tools?after=additions">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.update"
- mnemonic="%Update.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.menu.update">
- </command>
-
- </menuContribution>
- <menuContribution
- locationURI="menu:tools?after=org.eclipse.equinox.p2.examples.rcp.cloud.menu.update">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.install"
- mnemonic="%Install.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.menu.install">
- </command>
- </menuContribution>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin_customization.ini b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin_customization.ini
deleted file mode 100644
index 4fc0faec8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/plugin_customization.ini
+++ /dev/null
@@ -1,39 +0,0 @@
-# we can configure the update UI by using application preferences to initialize the default UI policy
-
-# should user be able to see and manipulate repositories in the install wizard
-org.eclipse.equinox.p2.examples.rcp.cloud/repositoriesVisible=false
-
-# force restart after a provisioning operation (see possible values in org.eclipse.equinox.p2.ui.Policy.restartPolicy())
-org.eclipse.equinox.p2.examples.rcp.cloud/restartPolicy=1
-
-# show only latest versions when browsing for updates
-org.eclipse.equinox.p2.examples.rcp.cloud/showLatestVersionOnly=true
-
-# software should be grouped by category by default
-org.eclipse.equinox.p2.examples.rcp.cloud/groupByCategory=true
-
-# show only groups (features) in the available list, not every bundle
-org.eclipse.equinox.p2.examples.rcp.cloud/showAllBundlesAvailable=false
-
-# show only the install roots in the installed software list
-org.eclipse.equinox.p2.examples.rcp.cloud/showAllBundlesInstalled=true
-
-# do not drilldown into requirements in the wizards, just show the high level things
-org.eclipse.equinox.p2.examples.rcp.cloud/showDrilldownRequirements=false
-
-# automatic update options are defined in org.eclipse.equinox.p2.sdk.scheduler.PreferenceConstants
-
-# check for updates on startup
-org.eclipse.equinox.p2.ui.sdk.scheduler/enabled=true
-org.eclipse.equinox.p2.ui.sdk.scheduler/schedule=on-startup
-
-# remind the user every 4 hours
-org.eclipse.equinox.p2.ui.sdk.scheduler/remindOnSchedule=true
-# see AutomaticUpdatesPopup, values can be "30 minutes", "Hour", "4 Hours"
-org.eclipse.equinox.p2.ui.sdk.scheduler/remindElapsedTime=4 Hours
-
-# download updates before notifying the user
-org.eclipse.equinox.p2.ui.sdk.scheduler/download=true
-
-
-
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml
deleted file mode 100644
index 9e60cbe1e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.examples.rcp.cloud</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java
deleted file mode 100644
index df16caf86..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.equinox.p2.examples.rcp.cloud.p2.CloudPolicy;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.cloud";
-
- // The shared instance
- private static Activator plugin;
-
- ServiceRegistration policyRegistration;
- CloudPolicy policy;
- IPropertyChangeListener preferenceListener;
-
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- // XXX register the p2 UI policy
- registerP2Policy(context);
- getPreferenceStore().addPropertyChangeListener(getPreferenceListener());
- }
-
- private IPropertyChangeListener getPreferenceListener() {
- if (preferenceListener == null) {
- preferenceListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- policy.updateForPreferences();
- }
- };
- }
- return preferenceListener;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- // XXX unregister the UI policy
- policyRegistration.unregister();
- policyRegistration = null;
- getPreferenceStore().removePropertyChangeListener(preferenceListener);
- preferenceListener = null;
- super.stop(context);
-
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- private void registerP2Policy(BundleContext context) {
- policy = new CloudPolicy();
- policy.updateForPreferences();
- policyRegistration = context.registerService(Policy.class.getName(), policy, null);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java
deleted file mode 100644
index cf495c34d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 8064f403c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- // XXX we want to show preferences
- private IWorkbenchAction preferencesAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
- public static final String M_TOOLS = "tools";
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- // XXX we want to show auto update preferences
- preferencesAction = ActionFactory.PREFERENCES.create(window);
- register(preferencesAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- // XXX add a tools menu
- MenuManager toolsMenu = new MenuManager("&Tools", M_TOOLS);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- menuBar.add(toolsMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // XXX add preferences to tools
- toolsMenu.add(preferencesAction);
- // XXX add a group for new other tools contributions
- toolsMenu.add(new Separator());
- toolsMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-
- // Help
- helpMenu.add(aboutAction);
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index 717a4fa7c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies
- * the perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index a71e1b3f2..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- // XXX Set the status line and progress indicator so that update
- // information can be shown there
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
-
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java
deleted file mode 100644
index 6bf884ccb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.cloud.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.cloud.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java
deleted file mode 100644
index 85324bae0..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.cloud.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java
deleted file mode 100644
index c58a55812..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class NavigationView extends ViewPart {
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.cloud.navigationView";
- private TreeViewer viewer;
-
- class TreeObject {
- private String name;
- private TreeParent parent;
-
- public TreeObject(String name) {
- this.name = name;
- }
- public String getName() {
- return name;
- }
- public void setParent(TreeParent parent) {
- this.parent = parent;
- }
- public TreeParent getParent() {
- return parent;
- }
- public String toString() {
- return getName();
- }
- }
-
- class TreeParent extends TreeObject {
- private ArrayList children;
- public TreeParent(String name) {
- super(name);
- children = new ArrayList();
- }
- public void addChild(TreeObject child) {
- children.add(child);
- child.setParent(this);
- }
- public void removeChild(TreeObject child) {
- children.remove(child);
- child.setParent(null);
- }
- public TreeObject[] getChildren() {
- return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
- }
- public boolean hasChildren() {
- return children.size()>0;
- }
- }
-
- class ViewContentProvider implements IStructuredContentProvider,
- ITreeContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- public Object getParent(Object child) {
- if (child instanceof TreeObject) {
- return ((TreeObject)child).getParent();
- }
- return null;
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof TreeParent) {
- return ((TreeParent)parent).getChildren();
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof TreeParent)
- return ((TreeParent)parent).hasChildren();
- return false;
- }
- }
-
- class ViewLabelProvider extends LabelProvider {
-
- public String getText(Object obj) {
- return obj.toString();
- }
- public Image getImage(Object obj) {
- String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
- if (obj instanceof TreeParent)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
- }
-
- /**
- * We will set up a dummy model to initialize tree heararchy. In real
- * code, you will connect to a real model and expose its hierarchy.
- */
- private TreeObject createDummyModel() {
- TreeObject to1 = new TreeObject("Inbox");
- TreeObject to2 = new TreeObject("Drafts");
- TreeObject to3 = new TreeObject("Sent");
- TreeParent p1 = new TreeParent("me@this.com");
- p1.addChild(to1);
- p1.addChild(to2);
- p1.addChild(to3);
-
- TreeObject to4 = new TreeObject("Inbox");
- TreeParent p2 = new TreeParent("other@aol.com");
- p2.addChild(to4);
-
- TreeParent root = new TreeParent("");
- root.addChild(p1);
- root.addChild(p2);
- return root;
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize
- * it.
- */
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(createDummyModel());
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java
deleted file mode 100644
index 317e07342..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-
-
-public class OpenViewAction extends Action {
-
- private final IWorkbenchWindow window;
- private int instanceNum = 0;
- private final String viewId;
-
- public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
- this.window = window;
- this.viewId = viewId;
- setText(label);
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.cloud.Activator.getImageDescriptor("/icons/sample2.gif"));
- }
-
- public void run() {
- if(window != null) {
- try {
- window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException e) {
- MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
- }
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java
deleted file mode 100644
index 63299ce7e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.cloud.perspective";
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java
deleted file mode 100644
index d215e5b2c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.cloud.view";
-
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
- "- add a top-level menu and toolbar with actions\n"+
- "- add keybindings to actions\n" +
- "- create views that can't be closed and\n"+
- " multiple instances of the same view\n"+
- "- perspectives with placeholders for new views\n"+
- "- use the default about dialog\n"+
- "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- public void setFocus() {
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java
deleted file mode 100644
index d2df4a112..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.equinox.p2.engine.query.UserVisibleRootQuery;
-import org.eclipse.equinox.p2.examples.rcp.cloud.Activator;
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-/**
- * CloudPolicy defines the RCP Cloud Example policies for the p2 UI. The policy
- * is registered as an OSGi service when the example bundle starts.
- *
- * @since 3.5
- */
-public class CloudPolicy extends Policy {
-
- public void updateForPreferences() {
- IPreferenceStore prefs = Activator.getDefault().getPreferenceStore();
- setRepositoriesVisible(prefs
- .getBoolean(PreferenceConstants.REPOSITORIES_VISIBLE));
- setRestartPolicy(prefs.getInt(PreferenceConstants.RESTART_POLICY));
- setShowLatestVersionsOnly(prefs
- .getBoolean(PreferenceConstants.SHOW_LATEST_VERSION_ONLY));
- setGroupByCategory(prefs
- .getBoolean(PreferenceConstants.AVAILABLE_GROUP_BY_CATEGORY));
- setShowDrilldownRequirements(prefs
- .getBoolean(PreferenceConstants.SHOW_DRILLDOWN_REQUIREMENTS));
- if (prefs.getBoolean(PreferenceConstants.AVAILABLE_SHOW_ALL_BUNDLES))
- setVisibleAvailableIUQuery(QueryUtil.ALL_UNITS);
- else
- setVisibleAvailableIUQuery(QueryUtil.createIUGroupQuery());
- if (prefs.getBoolean(PreferenceConstants.INSTALLED_SHOW_ALL_BUNDLES))
- setVisibleAvailableIUQuery(QueryUtil.ALL_UNITS);
- else
- setVisibleAvailableIUQuery(new UserVisibleRootQuery());
-
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
deleted file mode 100644
index 06643cca1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(null, null, job);
- }
-
- protected boolean waitForPreload() {
- // If the user cannot see repositories, then we may as well wait
- // for existing repos to load so that content is available.
- // If the user can manipulate the repositories, then we don't wait,
- // because we don't know which ones they want to work with.
- return !getProvisioningUI().getPolicy().getRepositoriesVisible();
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- super.setLoadJobProperties(loadJob);
- // If we are doing a background load, we do not wish to authenticate, as the
- // user is unaware that loading was needed
- if (!waitForPreload()) {
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceConstants.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceConstants.java
deleted file mode 100644
index b4b72e5c1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceConstants.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-public class PreferenceConstants {
- public static final String RESTART_POLICY = "restartPolicy"; //$NON-NLS-1$
- public static final String SHOW_LATEST_VERSION_ONLY = "showLatestVersionOnly"; //$NON-NLS-1$
- public static final String AVAILABLE_GROUP_BY_CATEGORY = "groupByCategory"; //$NON-NLS-1$
- public static final String AVAILABLE_SHOW_ALL_BUNDLES = "showAllBundlesAvailable"; //$NON-NLS-1$
- public static final String INSTALLED_SHOW_ALL_BUNDLES = "showAllBundlesInstalled"; //$NON-NLS-1$
- public static final String REPOSITORIES_VISIBLE = "repositoriesVisible"; //$NON-NLS-1$
- public static final String SHOW_DRILLDOWN_REQUIREMENTS = "showDrilldownRequirements"; //$NON-NLS-1$
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceInitializer.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceInitializer.java
deleted file mode 100644
index 8ba7ae8d5..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreferenceInitializer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.preferences.*;
-import org.eclipse.equinox.p2.core.IAgentLocation;
-import org.eclipse.equinox.p2.engine.IProfileRegistry;
-import org.eclipse.equinox.p2.engine.ProfileScope;
-import org.eclipse.equinox.p2.examples.rcp.cloud.Activator;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.ui.statushandlers.StatusManager;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * @since 3.6
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- Preferences node = new DefaultScope().getNode(Activator.PLUGIN_ID); //$NON-NLS-1$
- // default values
- node.putBoolean(PreferenceConstants.REPOSITORIES_VISIBLE, false);
- node.putBoolean(PreferenceConstants.SHOW_LATEST_VERSION_ONLY, true);
- node.putBoolean(PreferenceConstants.AVAILABLE_SHOW_ALL_BUNDLES, false);
- node.putBoolean(PreferenceConstants.INSTALLED_SHOW_ALL_BUNDLES, false);
- node.putBoolean(PreferenceConstants.AVAILABLE_GROUP_BY_CATEGORY, true);
- node.putBoolean(PreferenceConstants.SHOW_DRILLDOWN_REQUIREMENTS, false);
- node.putInt(PreferenceConstants.RESTART_POLICY, Policy.RESTART_POLICY_PROMPT_RESTART_OR_APPLY);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
deleted file mode 100644
index a4c4710a2..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * PreloadingRepositoryHandler provides background loading of
- * repositories before executing the provisioning handler.
- *
- * @since 3.5
- */
-abstract class PreloadingRepositoryHandler extends AbstractHandler {
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- doExecuteAndLoad();
- return null;
- }
-
- void doExecuteAndLoad() {
- if (preloadRepositories()) {
- //cancel any load that is already running
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI());
- setLoadJobProperties(loadJob);
- if (waitForPreload()) {
- loadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if (PlatformUI.isWorkbenchRunning())
- if (event.getResult().isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- doExecute(loadJob);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(null);
- }
- } else {
- doExecute(null);
- }
- }
-
- protected abstract void doExecute(LoadMetadataRepositoryJob job);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- * @return a Shell
- */
- protected Shell getShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
deleted file mode 100644
index e484212a0..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.cloud/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.equinox.internal.p2.ui.dialogs.UpdateSingleIUWizard;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.wizard.WizardDialog;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- if (hasNoRepos) {
- return;
- }
- UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
- // check for updates
- operation.resolveModal(null);
- if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- if (UpdateSingleIUWizard.validFor(operation)) {
- // Special case for only updating a single root
- UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- dialog.open();
- } else {
- // Open the normal version of the update wizard
- getProvisioningUI().openUpdateWizard(false, operation, job);
- }
- }
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
- if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.cvsignore b/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.cvsignore
deleted file mode 100644
index f401d4633..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-repository
-buildDirectory
-TestBuild-* \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.project b/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.project
deleted file mode 100644
index 80d1497a6..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.discovery.releng</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/Build Discovery Example.launch b/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/Build Discovery Example.launch
deleted file mode 100644
index 8442bedd4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/Build Discovery Example.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.examples.rcp.discovery.releng/buildProduct.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="/tmp/build.log"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.examples.rcp.discovery.releng"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.examples.rcp.discovery.releng/buildProduct.xml}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/build.properties
deleted file mode 100644
index 4be192c46..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/build.properties
+++ /dev/null
@@ -1,120 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 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
-###############################################################################
-product=/org.eclipse.equinox.p2.examples.rcp.cloud/cloud.product
-runPackager=true
-
-p2.gathering=true
-p2.metadata.repo=file:${builder}/repository
-p2.artifact.repo=file:${builder}/repository
-
-#Set the name of the archive that will result from the product build.
-#archiveNamePrefix=
-
-# The prefix that will be used in the generated archive.
-archivePrefix=eclipse
-
-# The location underwhich all of the build output will be collected.
-collectingFolder=${archivePrefix}
-
-# The list of {os, ws, arch} configurations to build. This
-# value is a '&' separated list of ',' separate triples. For example,
-# configs=win32,win32,x86 & linux,motif,x86
-# By default the value is *,*,*
-configs = win32, win32, x86 & \
- linux, gtk, x86
-#configs=win32, win32, x86 & \
-# linux, gtk, ppc &\
-# linux, gtk, x86 & \
-# linux, gtk, x86_64 & \
-# linux, motif, x86 & \
-# solaris, motif, sparc & \
-# solaris, gtk, sparc & \
-# aix, motif, ppc & \
-# hpux, motif, PA_RISC & \
-# macosx, carbon, ppc
-
-#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
-allowBinaryCycles = true
-
-# Type of build. Used in naming the build output. Typically this value is
-# one of I, N, M, S, ...
-buildType=I
-
-# ID of the build. Used in naming the build output.
-buildId=TestBuild
-
-# Label for the build. Used in naming the build output
-buildLabel=${buildType}.${buildId}
-
-# Timestamp for the build. Used in naming the build output
-timestamp=007
-
-#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
-resolution.devMode=false
-
-skipBase=true
-skipMaps=true
-skipFetch=true
-
-
-############# JAVA COMPILER OPTIONS ##############
-# For this example:
-# We specify the JRE locations for CDC-1.1/Foundation-1.1 and J2SE-1.5
-# because these are the required execution environments defined for the
-# bundles in the example.
-
-# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE
-#bootclasspath=${java.home}/lib/rt.jar
-
-# If using an IBM VM, use
-#bootclasspath=${java.home}/lib/core.jar;${java.home}/lib/vm.jar
-
-# specific JRE locations to compile against. These values are used to compile bundles specifying a
-# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
-#CDC-1.0/Foundation-1.0= /path/to/rt.jar
-CDC-1.1/Foundation-1.1=${java.home}/lib/rt.jar
-#OSGi/Minimum-1.0=
-#OSGi/Minimum-1.1=
-#JRE-1.1=
-#J2SE-1.2=
-#J2SE-1.3=
-#J2SE-1.4=
-J2SE-1.5=${java.home}/lib/rt.jar
-#JavaSE-1.6=
-#PersonalJava-1.1=
-#PersonalJava-1.2=
-#CDC-1.0/PersonalBasis-1.0=
-#CDC-1.0/PersonalJava-1.0=
-#CDC-1.1/PersonalBasis-1.1=
-#CDC-1.1/PersonalJava-1.1=
-
-# Specify the output format of the compiler log when eclipse jdt is used
-logExtension=.log
-
-# Whether or not to include debug info in the output jars
-javacDebugInfo=false
-
-# Whether or not to fail the build if there are compiler errors
-javacFailOnError=true
-
-# Enable or disable verbose mode of the compiler
-javacVerbose=true
-
-# Extra arguments for the compiler. These are specific to the java compiler being used.
-#compilerArg=
-
-# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
-#javacSource=1.3
-
-# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
-#javacTarget=1.1
-
-
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/buildProduct.xml b/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/buildProduct.xml
deleted file mode 100644
index 6c446e593..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/buildProduct.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<project default="main">
- <target name="main">
- <property name="baseLocation" value="${eclipse.home}"/>
- <!-- by default, check for deltapack co-located with eclipse -->
- <property name="deltapack" value="${eclipse.home}/../deltapack/eclipse"/>
-
- <!-- Check that we have a deltapack -->
- <available property="haveDeltaPack" file="${deltapack}"/>
- <fail unless="haveDeltaPack" message="The deltapack is required to build this product. Please edit buildProduct.xml or set the &quot;deltapack&quot; property." />
-
- <property name="builder" value="${basedir}" />
- <property name="buildDirectory" value="${basedir}/buildDirectory"/>
- <property name="pluginPath" value="${deltapack}" />
- <property name="buildTempFolder" value="${buildDirectory}" />
-
- <!-- Clean build directory and workspace -->
- <delete includeemptydirs="true" failonerror="false">
- <fileset dir="${basedir}/buildDirectory"/>
- <fileset dir="${basedir}/repository"/>
- </delete>
-
- <!-- Copy plug-ins from workspace -->
- <copy todir="${buildDirectory}/plugins">
- <fileset dir="${basedir}/..">
- <include name="org.eclipse.equinox.p2.examples.rcp.discovery/**/*"/>
- <exclude name="**/bin/**"/>
- </fileset>
- </copy>
-
- <!-- Fix project name of example plugin -->
- <move file="${buildDirectory}/plugins/org.eclipse.equinox.p2.examples.rcp.discovery" tofile="${buildDirectory}/plugins/org.eclipse.equinox.p2.examples.rcp.cloud"/>
-
- <ant antfile="${eclipse.pdebuild.scripts}/productBuild/productBuild.xml" />
-
- <move todir="${basedir}" overwrite="true">
- <fileset dir="${buildDirectory}/I.TestBuild" includes="*.zip"/>
- </move>
-
- <replace file="${basedir}/repository/content.xml">
- <replacetoken><![CDATA[<update id='org.eclipse.equinox.p2.examples.rcp.cloud.product' range='0.0.0' severity='0'/>]]></replacetoken>
- <replacevalue><![CDATA[<update id='org.eclipse.equinox.p2.examples.rcp.cloud.product' range='0.0.0' severity='0' description='This update contains Mylyn Discovery!' uri='http://localhost/updatenotification.png'/>]]></replacevalue>
- </replace>
-
- <!-- refresh the workspace -->
- <eclipse.convertPath fileSystemPath="${basedir}" property="resourcePath"/>
- <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
- </target>
-
-</project> \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/readme.txt b/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/readme.txt
deleted file mode 100644
index eb0d08981..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery.releng/readme.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-This project is a releng builder for the org.eclipse.equinox.p2.examples.rcp.cloud project.
-
-1) This build requires 3.5M6 or later
-
-2) This build requires the deltapack. By default it looks beside the eclipse install for "deltapack/eclipse/*".
- If your deltapack is located elsewhere, set the "deltapack" property or edit the buildProduct.xml file. The
- version of the deltapack used should match the version of the eclipse that is running.
-
-3) Due to bug 268867, if the buildDirectory/buildRepo is deleted/cleaned, then the repo must also be removed from
- the workspace Available Software Sites preferences.
-
-4) Use the included launch config, or run buildProduct.xml as an ant build using the same JRE as the workspace
-
-5) The build.properties file specifically defines the JRE's for CDC-1.1/Foundation-1.1 and
- J2SE-1.5 because these are the required bundle execution environments in the example.
- The build should be run on a 1.5 VM. \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/.classpath
deleted file mode 100644
index 3450ccb12..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="**/internal/**/discovery/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/.project b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/.project
deleted file mode 100644
index e736f7ff4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.discovery</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8f8669add..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Thu Mar 12 11:04:59 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/META-INF/MANIFEST.MF
deleted file mode 100644
index 790cb0f49..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,33 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: RCP Mail (Cloud Update Example)
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.cloud;singleton:=true
-Bundle-Version: 2.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.cloud.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.operations;bundle-version="2.0.0",
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.1.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="2.0.0",
- org.eclipse.equinox.p2.engine;bundle-version="2.0.0",
- org.eclipse.equinox.p2.core;bundle-version="2.0.0",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1",
- org.eclipse.equinox.p2.ui.sdk.scheduler;bundle-version="1.0.0",
- org.eclipse.equinox.ds;bundle-version="1.2.0",
- org.eclipse.equinox.p2.discovery;bundle-version="1.0.0",
- org.eclipse.equinox.p2.discovery.compatibility;bundle-version="1.0.0",
- org.eclipse.equinox.p2.ui.discovery;bundle-version="1.0.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/build.properties
deleted file mode 100644
index 5c50a0005..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp,\
- plugin.properties
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/cloud.product b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/cloud.product
deleted file mode 100644
index 5a2b36e5e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/cloud.product
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (p2 Discovery)" id="org.eclipse.equinox.p2.examples.rcp.cloud.product" application="org.eclipse.equinox.p2.examples.rcp.cloud.application" version="2.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail template created by PDE with p2 Discovery support
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.cloud" />
- <launcher name="cloud">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.event"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.discovery"/>
- <plugin id="org.eclipse.equinox.p2.discovery.compatibility"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.cloud" version="2.0.0.qualifier"/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.discovery"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
- <plugin id="org.eclipse.equinox.p2.updatechecker"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.browser"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail-screenshot.png b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail-screenshot.png
deleted file mode 100644
index d6a8a0ea9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail-screenshot.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.png b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.png
deleted file mode 100644
index d88869829..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mail.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc-screenshot.png b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc-screenshot.png
deleted file mode 100644
index 3c1f04629..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc-screenshot.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc.png b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc.png
deleted file mode 100644
index f135e36e1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/mpc.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/pop3.png b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/pop3.png
deleted file mode 100644
index 8de654ae4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/pop3.png
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/p2.inf
deleted file mode 100644
index 48f31a324..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.properties b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.properties
deleted file mode 100644
index cdf457c0e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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
-###############################################################################
-#
-# RCP Mail Plug-in Resources
-#
-Update.command=Check for Updates
-Update.command.mnemonic=U
-Install.command=Install New Software...
-Install.command.mnemonic=S
-installedSoftwarePage = Installed Software
-installHistoryPage = Installation History
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.xml
deleted file mode 100644
index bff2bb0e7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/plugin.xml
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.cloud.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.View"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.cloud.category"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.cloud.category"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.cloud.application"
- name="RCP Mail Example (p2 Discovery)">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE with p2 Discovery support">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- <property
- name="appName"
- value="RCP Mail Example (p2 Discovery)">
- </property>
- </product>
- </extension>
- <extension
- point="org.eclipse.ui.installationPages">
- <page
- name="%installedSoftwarePage"
- class="org.eclipse.equinox.p2.ui.InstalledSoftwarePage"
- id="10.org.eclipse.equinox.p2.examples.rcp.cloud.InstalledSoftwarePage">
- </page>
- <page
- name="%installHistoryPage"
- class="org.eclipse.equinox.p2.ui.RevertProfilePage"
- id="11.org.eclipse.equinox.p2.examples.rcp.cloud.RevertProfilePage">
- </page>
-
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%Update.command"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.command.update">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.update"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.UpdateHandler">
- </handler>
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.install"
- class="org.eclipse.equinox.p2.examples.rcp.cloud.p2.InstallNewSoftwareHandler">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:tools?after=additions">
- <command
- commandId="org.eclipse.equinox.p2.ui.discovery.commands.ShowBundleCatalog"
- label="Install Extensions..."
- style="push">
- </command>
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.cloud.command.update"
- mnemonic="%Update.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.cloud.menu.update">
- </command>
-
- </menuContribution>
- </extension>
- <extension
- point="org.eclipse.mylyn.discovery.core.connectorDiscovery">
- <connectorCategory
- description="Extensions for additional email protocols."
- id="org.eclipse.equinox.p2.examples.rcp.cloud.category.protocols"
- name="Email Protocol Support">
- </connectorCategory>
- <connectorDescriptor
- categoryId="org.eclipse.equinox.p2.examples.rcp.cloud.category.protocols"
- description="Sample extension that provides support for the IMAP protocol."
- id="org.eclipse.equinox.p2.examples.rcp.cloud.extensions.imap"
- kind="task"
- license="EPL"
- name="IMAP protocol support"
- provider="Eclipse.org"
- siteUrl="http://www.eclipse.org/equinox/p2/testing/updateSite">
- <icon
- image32="icons/mail.png">
- </icon>
- </connectorDescriptor>
- <connectorDescriptor
- categoryId="org.eclipse.equinox.p2.examples.rcp.cloud.category.protocols"
- description="Sample extension that provides support for the POP3 protocol."
- id="org.eclipse.equinox.p2.examples.rcp.cloud.extensions.pop"
- kind="task"
- license="EPL"
- name="POP3 protocol support"
- provider="Eclipse.org"
- siteUrl="http://www.eclipse.org/equinox/p2/testing/updateSite">
- <overview
- screenshot="icons/mail-screenshot.png"
- summary="In computing, the Post Office Protocol (POP) is an application-layer Internet standard protocol used by local e-mail clients to retrieve e-mail from a remote server over a TCP/IP connection. POP and IMAP (Internet Message Access Protocol) are the two most prevalent Internet standard protocols for e-mail retrieval. Virtually all modern e-mail clients and servers support both. The POP protocol has been developed through several versions, with version 3 (POP3) being the current standard."
- url="http://en.wikipedia.org/wiki/Post_Office_Protocol">
- </overview>
- <icon
- image32="icons/mail.png">
- </icon>
- </connectorDescriptor>
- <connectorCategory
- description="Other extensions for the RCP Mail application."
- id="org.eclipse.equinox.p2.examples.rcp.cloud.category.misc"
- name="Tools">
- </connectorCategory>
- <connectorDescriptor
- categoryId="org.eclipse.equinox.p2.examples.rcp.cloud.category.misc"
- description="Another example of integrating p2 discovery."
- id="org.eclipse.epp.mpc"
- kind="task"
- license="EPL"
- name="Eclipse Marketplace Client"
- provider="Eclipse Packaging Project"
- siteUrl="http://download.eclipse.org/releases/staging">
- <overview
- screenshot="icons/mpc-screenshot.png"
- summary="Marketplace Client is a rich client solution for installing solutions listed on Eclipse Marketplace directly from an Eclipse Installation.&#x0A;&#x0A;The Eclipse community has hundreds, if not thousands, of third-party plugins that users can add to their Eclipse installation. Unfortunately, there is not easy way to discover and install these solutions from within Eclipse.&#x0A;&#x0A;The Eclipse Foundation has recently launched a new website, called Eclipse Marketplace, that provides a listing of Eclipse-based solutions. The listings allow each solution provider to specify a P2 repository for their solution. Eclipse users now have a central catalog to find Eclipse solutions but the install process is still not tightly integrated with the Eclipse workspace.&#x0A;&#x0A;MPC provides the tight install integration between the Eclipse workspace and Eclipse Marketplace, plus other third party solution listings. MPC is included in many of the EPP packages."
- url="http://eclipse.org/mpc/"></overview>
- <icon
- image32="icons/mpc.png">
- </icon>
- </connectorDescriptor>
- </extension>
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml
deleted file mode 100644
index 87471e819..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.examples.rcp.cloud</artifactId>
- <version>2.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java
deleted file mode 100644
index c0589471a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Activator.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.equinox.p2.examples.rcp.cloud.p2.CloudPolicy;
-import org.eclipse.equinox.p2.ui.Policy;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.cloud";
-
- // The shared instance
- private static Activator plugin;
-
- ServiceRegistration policyRegistration;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- /// XXX register the p2 UI policy
- registerP2Policy(context);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- // XXX unregister the UI policy
- policyRegistration.unregister();
- policyRegistration = null;
- super.stop(context);
-
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- private void registerP2Policy(BundleContext context) {
- policyRegistration = context.registerService(Policy.class.getName(), new CloudPolicy(), null);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java
deleted file mode 100644
index cf495c34d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Application.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 8064f403c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- // XXX we want to show preferences
- private IWorkbenchAction preferencesAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
- public static final String M_TOOLS = "tools";
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- // XXX we want to show auto update preferences
- preferencesAction = ActionFactory.PREFERENCES.create(window);
- register(preferencesAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- // XXX add a tools menu
- MenuManager toolsMenu = new MenuManager("&Tools", M_TOOLS);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- menuBar.add(toolsMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // XXX add preferences to tools
- toolsMenu.add(preferencesAction);
- // XXX add a group for new other tools contributions
- toolsMenu.add(new Separator());
- toolsMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-
- // Help
- helpMenu.add(aboutAction);
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index 717a4fa7c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies
- * the perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index a71e1b3f2..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- // XXX Set the status line and progress indicator so that update
- // information can be shown there
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
-
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java
deleted file mode 100644
index 6bf884ccb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.cloud.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.cloud.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java
deleted file mode 100644
index 85324bae0..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/MessagePopupAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.cloud.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java
deleted file mode 100644
index c58a55812..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/NavigationView.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class NavigationView extends ViewPart {
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.cloud.navigationView";
- private TreeViewer viewer;
-
- class TreeObject {
- private String name;
- private TreeParent parent;
-
- public TreeObject(String name) {
- this.name = name;
- }
- public String getName() {
- return name;
- }
- public void setParent(TreeParent parent) {
- this.parent = parent;
- }
- public TreeParent getParent() {
- return parent;
- }
- public String toString() {
- return getName();
- }
- }
-
- class TreeParent extends TreeObject {
- private ArrayList children;
- public TreeParent(String name) {
- super(name);
- children = new ArrayList();
- }
- public void addChild(TreeObject child) {
- children.add(child);
- child.setParent(this);
- }
- public void removeChild(TreeObject child) {
- children.remove(child);
- child.setParent(null);
- }
- public TreeObject[] getChildren() {
- return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
- }
- public boolean hasChildren() {
- return children.size()>0;
- }
- }
-
- class ViewContentProvider implements IStructuredContentProvider,
- ITreeContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- public Object getParent(Object child) {
- if (child instanceof TreeObject) {
- return ((TreeObject)child).getParent();
- }
- return null;
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof TreeParent) {
- return ((TreeParent)parent).getChildren();
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof TreeParent)
- return ((TreeParent)parent).hasChildren();
- return false;
- }
- }
-
- class ViewLabelProvider extends LabelProvider {
-
- public String getText(Object obj) {
- return obj.toString();
- }
- public Image getImage(Object obj) {
- String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
- if (obj instanceof TreeParent)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
- }
-
- /**
- * We will set up a dummy model to initialize tree heararchy. In real
- * code, you will connect to a real model and expose its hierarchy.
- */
- private TreeObject createDummyModel() {
- TreeObject to1 = new TreeObject("Inbox");
- TreeObject to2 = new TreeObject("Drafts");
- TreeObject to3 = new TreeObject("Sent");
- TreeParent p1 = new TreeParent("me@this.com");
- p1.addChild(to1);
- p1.addChild(to2);
- p1.addChild(to3);
-
- TreeObject to4 = new TreeObject("Inbox");
- TreeParent p2 = new TreeParent("other@aol.com");
- p2.addChild(to4);
-
- TreeParent root = new TreeParent("");
- root.addChild(p1);
- root.addChild(p2);
- return root;
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize
- * it.
- */
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(createDummyModel());
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java
deleted file mode 100644
index 317e07342..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/OpenViewAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-
-
-public class OpenViewAction extends Action {
-
- private final IWorkbenchWindow window;
- private int instanceNum = 0;
- private final String viewId;
-
- public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
- this.window = window;
- this.viewId = viewId;
- setText(label);
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.cloud.Activator.getImageDescriptor("/icons/sample2.gif"));
- }
-
- public void run() {
- if(window != null) {
- try {
- window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException e) {
- MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
- }
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java
deleted file mode 100644
index 63299ce7e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/Perspective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.cloud.perspective";
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java
deleted file mode 100644
index d215e5b2c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/View.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.cloud;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.cloud.view";
-
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
- "- add a top-level menu and toolbar with actions\n"+
- "- add keybindings to actions\n" +
- "- create views that can't be closed and\n"+
- " multiple instances of the same view\n"+
- "- perspectives with placeholders for new views\n"+
- "- use the default about dialog\n"+
- "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- public void setFocus() {
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java
deleted file mode 100644
index c5b754f93..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/CloudPolicy.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.equinox.p2.ui.Policy;
-
-/**
- * CloudPolicy defines the RCP Cloud Example policies for the p2 UI. The policy
- * is registered as an OSGi service when the example bundle starts.
- *
- * @since 3.5
- */
-public class CloudPolicy extends Policy {
- public CloudPolicy() {
- // XXX User has no visibility for repos
- setRepositoriesVisible(false);
-
- // XXX Default view is by category
- setGroupByCategory(true);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
deleted file mode 100644
index 06643cca1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/InstallNewSoftwareHandler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(null, null, job);
- }
-
- protected boolean waitForPreload() {
- // If the user cannot see repositories, then we may as well wait
- // for existing repos to load so that content is available.
- // If the user can manipulate the repositories, then we don't wait,
- // because we don't know which ones they want to work with.
- return !getProvisioningUI().getPolicy().getRepositoriesVisible();
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- super.setLoadJobProperties(loadJob);
- // If we are doing a background load, we do not wish to authenticate, as the
- // user is unaware that loading was needed
- if (!waitForPreload()) {
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
deleted file mode 100644
index a4c4710a2..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/PreloadingRepositoryHandler.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * PreloadingRepositoryHandler provides background loading of
- * repositories before executing the provisioning handler.
- *
- * @since 3.5
- */
-abstract class PreloadingRepositoryHandler extends AbstractHandler {
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- doExecuteAndLoad();
- return null;
- }
-
- void doExecuteAndLoad() {
- if (preloadRepositories()) {
- //cancel any load that is already running
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI());
- setLoadJobProperties(loadJob);
- if (waitForPreload()) {
- loadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if (PlatformUI.isWorkbenchRunning())
- if (event.getResult().isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- doExecute(loadJob);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(null);
- }
- } else {
- doExecute(null);
- }
- }
-
- protected abstract void doExecute(LoadMetadataRepositoryJob job);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- * @return a Shell
- */
- protected Shell getShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
deleted file mode 100644
index e484212a0..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.discovery/src/org/eclipse/equinox/p2/examples/rcp/cloud/p2/UpdateHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.cloud.p2;
-
-import org.eclipse.equinox.internal.p2.ui.dialogs.UpdateSingleIUWizard;
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.wizard.WizardDialog;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- if (hasNoRepos) {
- return;
- }
- UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
- // check for updates
- operation.resolveModal(null);
- if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- if (UpdateSingleIUWizard.validFor(operation)) {
- // Special case for only updating a single root
- UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- dialog.open();
- } else {
- // Open the normal version of the update wizard
- getProvisioningUI().openUpdateWizard(false, operation, job);
- }
- }
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
- if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/.project b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/.project
deleted file mode 100644
index 593704fe5..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/Build PrestartUpdate Example.launch b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/Build PrestartUpdate Example.launch
deleted file mode 100644
index d0ceb1341..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/Build PrestartUpdate Example.launch
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/build.properties
deleted file mode 100644
index 44358173c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/build.properties
+++ /dev/null
@@ -1,119 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 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
-###############################################################################
-product=/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product
-runPackager=true
-
-p2.gathering=true
- p2.metadata.repo=file:${builder}/repository
-p2.artifact.repo=file:${builder}/repository
-
-#Set the name of the archive that will result from the product build.
-#archiveNamePrefix=
-
-# The prefix that will be used in the generated archive.
-archivePrefix=eclipse
-
-# The location underwhich all of the build output will be collected.
-collectingFolder=${archivePrefix}
-
-# The list of {os, ws, arch} configurations to build. This
-# value is a '&' separated list of ',' separate triples. For example,
-# configs=win32,win32,x86 & linux,motif,x86
-# By default the value is *,*,*
-configs = win32, win32, x86
-#configs=win32, win32, x86 & \
-# linux, gtk, ppc &\
-# linux, gtk, x86 & \
-# linux, gtk, x86_64 & \
-# linux, motif, x86 & \
-# solaris, motif, sparc & \
-# solaris, gtk, sparc & \
-# aix, motif, ppc & \
-# hpux, motif, PA_RISC & \
-# macosx, carbon, ppc
-
-#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
-allowBinaryCycles = true
-
-# Type of build. Used in naming the build output. Typically this value is
-# one of I, N, M, S, ...
-buildType=I
-
-# ID of the build. Used in naming the build output.
-buildId=TestBuild
-
-# Label for the build. Used in naming the build output
-buildLabel=${buildType}.${buildId}
-
-# Timestamp for the build. Used in naming the build output
-timestamp=007
-
-#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
-resolution.devMode=false
-
-skipBase=true
-skipMaps=true
-skipFetch=true
-
-
-############# JAVA COMPILER OPTIONS ##############
-# For this example:
-# We specify the JRE locations for CDC-1.1/Foundation-1.1 and J2SE-1.5
-# because these are the required execution environments defined for the
-# bundles in the example.
-
-# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE
-#bootclasspath=${java.home}/lib/rt.jar
-
-# If using an IBM VM, use
-#bootclasspath=${java.home}/lib/core.jar;${java.home}/lib/vm.jar
-
-# specific JRE locations to compile against. These values are used to compile bundles specifying a
-# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
-#CDC-1.0/Foundation-1.0= /path/to/rt.jar
-CDC-1.1/Foundation-1.1=${java.home}/lib/rt.jar
-#OSGi/Minimum-1.0=
-#OSGi/Minimum-1.1=
-#JRE-1.1=
-#J2SE-1.2=
-#J2SE-1.3=
-#J2SE-1.4=
-J2SE-1.5=${java.home}/lib/rt.jar
-#JavaSE-1.6=
-#PersonalJava-1.1=
-#PersonalJava-1.2=
-#CDC-1.0/PersonalBasis-1.0=
-#CDC-1.0/PersonalJava-1.0=
-#CDC-1.1/PersonalBasis-1.1=
-#CDC-1.1/PersonalJava-1.1=
-
-# Specify the output format of the compiler log when eclipse jdt is used
-logExtension=.log
-
-# Whether or not to include debug info in the output jars
-javacDebugInfo=false
-
-# Whether or not to fail the build if there are compiler errors
-javacFailOnError=true
-
-# Enable or disable verbose mode of the compiler
-javacVerbose=true
-
-# Extra arguments for the compiler. These are specific to the java compiler being used.
-#compilerArg=
-
-# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
-#javacSource=1.3
-
-# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
-#javacTarget=1.1
-
-
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml
deleted file mode 100644
index 2f1b9a970..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/buildProduct.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<project default="main">
- <target name="main">
- <property name="baseLocation" value="${eclipse.home}"/>
- <!-- by default, check for deltapack co-located with eclipse -->
- <property name="deltapack" value="${eclipse.home}/../deltapack/eclipse"/>
-
- <!-- Check that we have a deltapack -->
- <available property="haveDeltaPack" file="${deltapack}"/>
- <fail unless="haveDeltaPack" message="The deltapack is required to build this product. Please edit buildProduct.xml or set the &quot;deltapack&quot; property." />
-
- <property name="builder" value="${basedir}" />
- <property name="buildDirectory" value="${basedir}/buildDirectory"/>
- <property name="pluginPath" value="${basedir}/..${path.separator}${deltapack}" />
- <property name="buildTempFolder" value="${buildDirectory}" />
-
- <ant antfile="${eclipse.pdebuild.scripts}/productBuild/productBuild.xml" />
-
- <move todir="${basedir}">
- <fileset dir="${buildDirectory}/I.TestBuild" includes="*.zip"/>
- </move>
-
- <!-- refresh the workspace -->
- <eclipse.convertPath fileSystemPath="${basedir}" property="resourcePath"/>
- <eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
- </target>
-</project> \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/readme.txt b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/readme.txt
deleted file mode 100644
index e0ab34ec4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate.releng/readme.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-This project is a releng builder for the org.eclipse.equinox.p2.examples.rcp.prestartupdate project.
-
-1) This build requires 3.5M6 or later
-
-2) This build requires the deltapack. By default it looks beside the eclipse install for "deltapack/eclipse/*".
- If your deltapack is located elsewhere, set the "deltapack" property or edit the buildProduct.xml file. The
- version of the deltapack used should match the version of the eclipse that is running.
-
-3) Due to bug 268867, if the buildDirectory/buildRepo is deleted/cleaned, then the repo must also be removed from
- the workspace Available Software Sites preferences.
-
-4) Use the included launch config, or run buildProduct.xml as an ant build using the same JRE as the workspace
-
-5) The build.properties file specifically defines the JRE's for CDC-1.1/Foundation-1.1 and
- J2SE-1.5 because these are the required bundle execution environments in the example.
- The build should be run on a 1.5 VM. \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.project b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.project
deleted file mode 100644
index 1646bc9ad..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.prestartupdate</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 92bb3f369..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Mar 16 12:12:08 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF
deleted file mode 100644
index 6ee61c3c6..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Prestartupdate
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.prestartupdate; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.prestartupdate.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.core,
- org.eclipse.equinox.p2.metadata,
- org.eclipse.equinox.p2.operations,
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/build.properties
deleted file mode 100644
index bb0913764..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/p2.inf
deleted file mode 100644
index 24aefb41a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/demos);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/demos); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/plugin.xml
deleted file mode 100644
index 283ed1da8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/plugin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.prestartupdate.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.prestartupdate.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.prestartupdate.View"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.prestartupdate.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.prestartupdate.category"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.prestartupdate.category"
- id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.prestartupdate.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.prestartupdate.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.prestartupdate.application"
- name="RCP Product">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- </product>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml
deleted file mode 100644
index 4d4642a92..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.examples.rcp.prestartupdate</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product
deleted file mode 100644
index c85369b93..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/prestartupdate.product
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (Pre-Startup Example)" id="org.eclipse.equinox.p2.examples.rcp.prestartupdate.product" application="org.eclipse.equinox.p2.examples.rcp.prestartupdate.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail Example (Pre-Startup Example)
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.prestartupdate" />
- <launcher name="prestartupdate">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="com.ibm.icu.source"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.prestartupdate"/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.natives"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
- <configurations>
- <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="0" />
- <plugin id="org.eclipse.equinox.p2.examples.rcp.prestartupdate" autoStart="true" startLevel="5" />
- </configurations>
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java
deleted file mode 100644
index c005f61f7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Activator.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.prestartupdate";
-
- // The shared instance
- private static Activator plugin;
-
- // XXX Shared instance of bundle context
- static BundleContext bundleContext;
-
- // XXX services for starting bundles
- private static PackageAdmin packageAdmin = null;
- private static ServiceReference packageAdminRef = null;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- bundleContext = context;
-
- packageAdminRef = bundleContext.getServiceReference(PackageAdmin.class.getName());
- packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminRef);
- }
-
- private static Bundle getBundle(String symbolicName) {
- if (packageAdmin == null)
- return null;
- Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
- if (bundles == null)
- return null;
- // Return the first bundle that is not installed or uninstalled
- for (int i = 0; i < bundles.length; i++) {
- if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
- return bundles[i];
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Application.java
deleted file mode 100644
index 0f180eee9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Application.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 68f0ad7c4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // Help
- helpMenu.add(aboutAction);
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index 64ddfc625..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies the
- * perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
- IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.application.WorkbenchAdvisor#preStartup()
- */
-
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index 0896291f3..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-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.ServiceHelper;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- private static final String JUSTUPDATED = "justUpdated";
-
- public ApplicationWorkbenchWindowAdvisor(
- IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(
- IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#preWindowOpen()
- */
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- configurer.setShowStatusLine(false);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#postWindowOpen()
- */
- public void postWindowOpen() {
- final IProvisioningAgent agent = (IProvisioningAgent) ServiceHelper
- .getService(Activator.bundleContext,
- IProvisioningAgent.SERVICE_NAME);
- if (agent == null) {
- LogHelper
- .log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
- "No provisioning agent found. This application is not set up for updates."));
- }
- // XXX if we're restarting after updating, don't check again.
- final IPreferenceStore prefStore = Activator.getDefault().getPreferenceStore();
- if (prefStore.getBoolean(JUSTUPDATED)) {
- prefStore.setValue(JUSTUPDATED, false);
- return;
- }
-
- // XXX check for updates before starting up.
- // If an update is performed, restart. Otherwise log
- // the status.
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException, InterruptedException {
- IStatus updateStatus = P2Util.checkForUpdates(agent, monitor);
- if (updateStatus.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
- PlatformUI.getWorkbench().getDisplay()
- .asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openInformation(null,
- "Updates", "No updates were found");
- }
- });
- } else if (updateStatus.getSeverity() != IStatus.ERROR) {
- prefStore.setValue(JUSTUPDATED, true);
- PlatformUI.getWorkbench().restart();
- } else {
- LogHelper.log(updateStatus);
- }
- }
- };
- try {
- new ProgressMonitorDialog(null).run(true, true, runnable);
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- }
-
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ICommandIds.java
deleted file mode 100644
index 42a745511..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.prestartupdate.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.prestartupdate.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/MessagePopupAction.java
deleted file mode 100644
index 2eb2ca93d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/MessagePopupAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.prestartupdate.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/NavigationView.java
deleted file mode 100644
index 77f69a28d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/NavigationView.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class NavigationView extends ViewPart {
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.prestartupdate.navigationView";
- private TreeViewer viewer;
-
- class TreeObject {
- private String name;
- private TreeParent parent;
-
- public TreeObject(String name) {
- this.name = name;
- }
- public String getName() {
- return name;
- }
- public void setParent(TreeParent parent) {
- this.parent = parent;
- }
- public TreeParent getParent() {
- return parent;
- }
- public String toString() {
- return getName();
- }
- }
-
- class TreeParent extends TreeObject {
- private ArrayList children;
- public TreeParent(String name) {
- super(name);
- children = new ArrayList();
- }
- public void addChild(TreeObject child) {
- children.add(child);
- child.setParent(this);
- }
- public void removeChild(TreeObject child) {
- children.remove(child);
- child.setParent(null);
- }
- public TreeObject[] getChildren() {
- return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
- }
- public boolean hasChildren() {
- return children.size()>0;
- }
- }
-
- class ViewContentProvider implements IStructuredContentProvider,
- ITreeContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- public Object getParent(Object child) {
- if (child instanceof TreeObject) {
- return ((TreeObject)child).getParent();
- }
- return null;
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof TreeParent) {
- return ((TreeParent)parent).getChildren();
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof TreeParent)
- return ((TreeParent)parent).hasChildren();
- return false;
- }
- }
-
- class ViewLabelProvider extends LabelProvider {
-
- public String getText(Object obj) {
- return obj.toString();
- }
- public Image getImage(Object obj) {
- String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
- if (obj instanceof TreeParent)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
- }
-
- /**
- * We will set up a dummy model to initialize tree heararchy. In real
- * code, you will connect to a real model and expose its hierarchy.
- */
- private TreeObject createDummyModel() {
- TreeObject to1 = new TreeObject("Inbox");
- TreeObject to2 = new TreeObject("Drafts");
- TreeObject to3 = new TreeObject("Sent");
- TreeParent p1 = new TreeParent("me@this.com");
- p1.addChild(to1);
- p1.addChild(to2);
- p1.addChild(to3);
-
- TreeObject to4 = new TreeObject("Inbox");
- TreeParent p2 = new TreeParent("other@aol.com");
- p2.addChild(to4);
-
- TreeParent root = new TreeParent("");
- root.addChild(p1);
- root.addChild(p2);
- return root;
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize
- * it.
- */
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(createDummyModel());
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/OpenViewAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/OpenViewAction.java
deleted file mode 100644
index b741fa946..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/OpenViewAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-
-
-public class OpenViewAction extends Action {
-
- private final IWorkbenchWindow window;
- private int instanceNum = 0;
- private final String viewId;
-
- public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
- this.window = window;
- this.viewId = viewId;
- setText(label);
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.prestartupdate.Activator.getImageDescriptor("/icons/sample2.gif"));
- }
-
- public void run() {
- if(window != null) {
- try {
- window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException e) {
- MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
- }
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java
deleted file mode 100644
index cca8f3f7d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/P2Util.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- ******************************************************************************/
-
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.operations.ProvisioningJob;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-
-/**
- * This class shows an example for checking for updates and performing the
- * update synchronously. It is up to the caller to run this in a job if
- * a background update check is desired. This is a reasonable way to run an
- * operation when user intervention is not required. Another approach is
- * to separately perform the resolution and provisioning steps, deciding
- * whether to perform these synchronously or in a job.
- *
- * Any p2 operation can be run modally (synchronously), or the job
- * can be requested and scheduled by the caller.
- *
- * @see UpdateOperation#resolveModal(IProgressMonitor)
- * @see UpdateOperation#getResolveJob(IProgressMonitor)
- * @see UpdateOperation#getProvisioningJob(IProgressMonitor)
- */
-public class P2Util {
- // XXX Check for updates to this application and return a status.
- static IStatus checkForUpdates(IProvisioningAgent agent, IProgressMonitor monitor) throws OperationCanceledException {
- ProvisioningSession session = new ProvisioningSession(agent);
- // the default update operation looks for updates to the currently
- // running profile, using the default profile root marker. To change
- // which installable units are being updated, use the more detailed
- // constructors.
- UpdateOperation operation = new UpdateOperation(session);
- SubMonitor sub = SubMonitor.convert(monitor,
- "Checking for application updates...", 200);
- IStatus status = operation.resolveModal(sub.newChild(100));
- if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
- return status;
- }
- if (status.getSeverity() == IStatus.CANCEL)
- throw new OperationCanceledException();
-
- if (status.getSeverity() != IStatus.ERROR) {
- // More complex status handling might include showing the user what updates
- // are available if there are multiples, differentiating patches vs. updates, etc.
- // In this example, we simply update as suggested by the operation.
- ProvisioningJob job = operation.getProvisioningJob(null);
- status = job.runModal(sub.newChild(100));
- if (status.getSeverity() == IStatus.CANCEL)
- throw new OperationCanceledException();
- }
- return status;
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Perspective.java
deleted file mode 100644
index 244eca03c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/Perspective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.prestartupdate.perspective";
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/View.java
deleted file mode 100644
index 38be31690..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate/src/org/eclipse/equinox/p2/examples/rcp/prestartupdate/View.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.prestartupdate;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.prestartupdate.view";
-
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
- "- add a top-level menu and toolbar with actions\n"+
- "- add keybindings to actions\n" +
- "- create views that can't be closed and\n"+
- " multiple instances of the same view\n"+
- "- perspectives with placeholders for new views\n"+
- "- use the default about dialog\n"+
- "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- public void setFocus() {
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.project b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.project
deleted file mode 100644
index 0b1635933..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1be1d28ec..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Mar 16 12:11:08 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=jsr14
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF
deleted file mode 100644
index 72b45e32f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Sdkbundlevisibility
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Activator
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime,
- org.eclipse.equinox.ds,
- org.eclipse.equinox.p2.operations;bundle-version="2.0.0",
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="1.0.100",
- org.eclipse.equinox.p2.engine;bundle-version="1.0.100",
- org.eclipse.equinox.p2.core;bundle-version="1.0.100",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Service-Component: OSGI-INF/policy_component.xml
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml
deleted file mode 100644
index adb20bed6..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/OSGI-INF/policy_component.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.policy">
- <implementation class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2.AllIUsAreVisiblePolicy"/>
- <service>
- <provide interface="org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy"/>
- </service>
- <property name="service.ranking" type="Integer" value="1000"/>
-</scr:component>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/build.properties
deleted file mode 100644
index 91db6ad8f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp,\
- plugin.properties,\
- OSGI-INF/
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/p2.inf
deleted file mode 100644
index 48f31a324..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.properties
deleted file mode 100644
index 2dee9a537..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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
-###############################################################################
-#
-# RCP Mail Plug-in Resources
-#
-Update.command=Check for Updates
-Update.command.mnemonic=U
-Install.command=Install New Software...
-Install.command.mnemonic=S
-provisioningPrefPage = Install/Update
-sitesPrefPage = Available Software Sites
-installedSoftwarePage = Installed Software
-installHistoryPage = Installation History
-preferenceKeywords.general=automatic update schedule download site software install import bundle
-preferences=Update and Install Preferences \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml
deleted file mode 100644
index 13964a440..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/plugin.xml
+++ /dev/null
@@ -1,183 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.View"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.application"
- name="RCP Product">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- </product>
- </extension>
- <extension
- point="org.eclipse.ui.installationPages">
- <page
- name="%installedSoftwarePage"
- class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.InstalledSoftwarePage"
- id="10.org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.InstalledSoftwarePage">
- </page>
- <page
- name="%installHistoryPage"
- class="org.eclipse.equinox.internal.provisional.p2.ui.dialogs.RevertProfilePage"
- id="11.org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.RevertProfilePage">
- </page>
-
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- name="%Update.command"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.update">
- </command>
- <command
- name="%Install.command"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.install">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.update"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2.UpdateHandler">
- </handler>
- <handler
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.install"
- class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2.InstallNewSoftwareHandler">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:tools?after=additions">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.update"
- mnemonic="%Update.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.menu.update">
- </command>
-
- </menuContribution>
- <menuContribution
- locationURI="menu:tools?after=org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.menu.update">
- <command
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.command.install"
- mnemonic="%Install.command.mnemonic"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.menu.install">
- </command>
- </menuContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- name="%provisioningPrefPage"
- class="org.eclipse.equinox.p2.ui.ProvisioningPreferencePage"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.ProvisioningPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
-
- <page
- name="%sitesPrefPage"
- category="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.ProvisioningPreferencePage"
- class="org.eclipse.equinox.p2.ui.RepositoryManipulationPage"
- id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.SitesPreferencePage">
- <keywordReference id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </page>
-
- </extension>
-
- <extension
- point="org.eclipse.ui.keywords">
- <keyword
- label="%preferenceKeywords.general"
- id="org.eclipse.equinox.p2.ui.sdk.updates.general"/>
- </extension>
-
- <extension
- id="preferences" point="org.eclipse.core.runtime.preferences" name="%preferences">
- <initializer class="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.PreferenceInitializer"/>
- </extension>
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml
deleted file mode 100644
index 0b27af10a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/pom.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version><relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility</artifactId>
- <version>1.0.0.qualifier</version>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product
deleted file mode 100644
index c791093f9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/sdkbundlevisibility.product
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (Bundle Visibility Update Example)" id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.product" application="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail Example (Bundle Visibility Update Example)
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility" />
- <launcher name="sdkbundlevisibility">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility"/>
- <plugin id="org.eclipse.equinox.p2.exemplarysetup" fragment=""/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
- <plugin id="org.eclipse.equinox.p2.updatechecker"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.cocoa" fragment="true"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Activator.java
deleted file mode 100644
index 0141e950a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Activator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Application.java
deleted file mode 100644
index 2fb79727e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Application.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 86b3594f2..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- // XXX we want to show preferences
- private IWorkbenchAction preferencesAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
- public static final String M_TOOLS = "tools";
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- // XXX we want to show auto update preferences
- preferencesAction = ActionFactory.PREFERENCES.create(window);
- register(preferencesAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- // XXX add a tools menu
- MenuManager toolsMenu = new MenuManager("&Tools", M_TOOLS);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- menuBar.add(toolsMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // XXX add preferences to tools
- toolsMenu.add(preferencesAction);
- toolsMenu.add(new Separator());
- toolsMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-
- // Help
- helpMenu.add(aboutAction);
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index ce56de956..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies
- * the perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index 2f512930a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- // XXX Set the status line and progress indicator so that update
- // information can be shown there
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
-
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ICommandIds.java
deleted file mode 100644
index 96e8172ef..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/MessagePopupAction.java
deleted file mode 100644
index a9a83e99c..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/MessagePopupAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/NavigationView.java
deleted file mode 100644
index 87949a3bc..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/NavigationView.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class NavigationView extends ViewPart {
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.navigationView";
- private TreeViewer viewer;
-
- class TreeObject {
- private String name;
- private TreeParent parent;
-
- public TreeObject(String name) {
- this.name = name;
- }
- public String getName() {
- return name;
- }
- public void setParent(TreeParent parent) {
- this.parent = parent;
- }
- public TreeParent getParent() {
- return parent;
- }
- public String toString() {
- return getName();
- }
- }
-
- class TreeParent extends TreeObject {
- private ArrayList children;
- public TreeParent(String name) {
- super(name);
- children = new ArrayList();
- }
- public void addChild(TreeObject child) {
- children.add(child);
- child.setParent(this);
- }
- public void removeChild(TreeObject child) {
- children.remove(child);
- child.setParent(null);
- }
- public TreeObject[] getChildren() {
- return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
- }
- public boolean hasChildren() {
- return children.size()>0;
- }
- }
-
- class ViewContentProvider implements IStructuredContentProvider,
- ITreeContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- public Object getParent(Object child) {
- if (child instanceof TreeObject) {
- return ((TreeObject)child).getParent();
- }
- return null;
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof TreeParent) {
- return ((TreeParent)parent).getChildren();
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof TreeParent)
- return ((TreeParent)parent).hasChildren();
- return false;
- }
- }
-
- class ViewLabelProvider extends LabelProvider {
-
- public String getText(Object obj) {
- return obj.toString();
- }
- public Image getImage(Object obj) {
- String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
- if (obj instanceof TreeParent)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
- }
-
- /**
- * We will set up a dummy model to initialize tree heararchy. In real
- * code, you will connect to a real model and expose its hierarchy.
- */
- private TreeObject createDummyModel() {
- TreeObject to1 = new TreeObject("Inbox");
- TreeObject to2 = new TreeObject("Drafts");
- TreeObject to3 = new TreeObject("Sent");
- TreeParent p1 = new TreeParent("me@this.com");
- p1.addChild(to1);
- p1.addChild(to2);
- p1.addChild(to3);
-
- TreeObject to4 = new TreeObject("Inbox");
- TreeParent p2 = new TreeParent("other@aol.com");
- p2.addChild(to4);
-
- TreeParent root = new TreeParent("");
- root.addChild(p1);
- root.addChild(p2);
- return root;
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize
- * it.
- */
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(createDummyModel());
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/OpenViewAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/OpenViewAction.java
deleted file mode 100644
index 162da81c3..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/OpenViewAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-
-
-public class OpenViewAction extends Action {
-
- private final IWorkbenchWindow window;
- private int instanceNum = 0;
- private final String viewId;
-
- public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
- this.window = window;
- this.viewId = viewId;
- setText(label);
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Activator.getImageDescriptor("/icons/sample2.gif"));
- }
-
- public void run() {
- if(window != null) {
- try {
- window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException e) {
- MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
- }
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Perspective.java
deleted file mode 100644
index 08aefe17e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/Perspective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.perspective";
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/View.java
deleted file mode 100644
index 66f6584f9..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/View.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.view";
-
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
- "- add a top-level menu and toolbar with actions\n"+
- "- add keybindings to actions\n" +
- "- create views that can't be closed and\n"+
- " multiple instances of the same view\n"+
- "- perspectives with placeholders for new views\n"+
- "- use the default about dialog\n"+
- "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- public void setFocus() {
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.java
deleted file mode 100644
index 1c61138ce..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/AllIUsAreVisiblePolicy.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.equinox.p2.query.QueryUtil;
-import org.eclipse.equinox.p2.ui.Policy;
-
-/**
- * AllIUsAreVisiblePolicy redefines the IU visibility. In this
- * example, the policy is declared using OSGi declarative services.
- * The declaration is in the policy_component.xml file.
- *
- * @since 3.5
- */
-public class AllIUsAreVisiblePolicy extends Policy {
- public AllIUsAreVisiblePolicy() {
- // XXX Use the pref-based repository manipulator
- setRepositoryPreferencePageId(PreferenceConstants.PREF_PAGE_SITES);
-
- // XXX All available IU's should be shown, not just groups/features
- setVisibleAvailableIUQuery(QueryUtil.createIUAnyQuery());
- // XXX All installed IU's should be shown, not just the user-installed.
- setVisibleInstalledIUQuery(QueryUtil.createIUAnyQuery());
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/IProvSDKHelpContextIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/IProvSDKHelpContextIds.java
deleted file mode 100644
index eccbe3555..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/IProvSDKHelpContextIds.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-/**
- * Help context ids for the P2 SDK
- * <p>
- * This interface contains constants only; it is not intended to be implemented
- * or extended.
- * </p>
- * @since 3.4
- */
-
-public interface IProvSDKHelpContextIds {
- // XXX Must match the id used in the help doc
- public static final String PREFIX = "org.eclipse.equinox.p2.ui.sdk"; //$NON-NLS-1$
-
- public static final String PROVISIONING_PREFERENCE_PAGE = PREFIX + "provisioning_preference_page_context"; //$NON-NLS-1$
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java
deleted file mode 100644
index 4432c07fa..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/InstallNewSoftwareHandler.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-
-/**
- * InstallNewSoftwareHandler invokes the install wizard
- *
- * @since 3.5
- */
-public class InstallNewSoftwareHandler extends PreloadingRepositoryHandler {
-
- /**
- * The constructor.
- */
- public InstallNewSoftwareHandler() {
- super();
- }
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- getProvisioningUI().openInstallWizard(null, null, job);
- }
-
- protected boolean waitForPreload() {
- // If the user cannot see repositories, then we may as well wait
- // for existing repos to load so that content is available.
- // If the user can manipulate the repositories, then we don't wait,
- // because we don't know which ones they want to work with.
- return !getProvisioningUI().getPolicy().getRepositoriesVisible();
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- super.setLoadJobProperties(loadJob);
- // If we are doing a background load, we do not wish to authenticate, as the
- // user is unaware that loading was needed
- if (!waitForPreload()) {
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_AUTHENTICATION_JOB_MARKER, Boolean.toString(true));
- loadJob.setProperty(LoadMetadataRepositoryJob.SUPPRESS_REPOSITORY_EVENTS, Boolean.toString(true));
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java
deleted file mode 100644
index 5a480f75d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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
- *******************************************************************************/
-
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2.messages"; //$NON-NLS-1$
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
- public static String UpdateHandler_NoSitesMessage;
- public static String UpdateHandler_NoSitesTitle;
- public static String ProvisioningPreferencePage_AlwaysOpenWizard;
- public static String ProvisioningPreferencePage_BrowsingPrefsGroup;
- public static String ProvisioningPreferencePage_ShowLatestVersions;
- public static String ProvisioningPreferencePage_ShowAllVersions;
- public static String ProvisioningPreferencePage_NeverOpenWizard;
- public static String ProvisioningPreferencePage_OpenWizardIfInvalid;
- public static String ProvisioningPreferencePage_PromptToOpenWizard;
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java
deleted file mode 100644
index bd133104e..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceConstants.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-/**
- * @since 3.6
- */
-public class PreferenceConstants {
- public static final String PREF_PAGE_PROVISIONING = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.ProvisioningPreferencePage"; //$NON-NLS-1$
- public static final String PREF_PAGE_SITES = "org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.SitesPreferencePage"; //$NON-NLS-1$
- public static final String PREF_SHOW_LATEST_VERSION = "showLatestVersion"; //$NON-NLS-1$
- public static final String PREF_OPEN_WIZARD_ON_ERROR_PLAN = "allowNonOKPlan"; //$NON-NLS-1$
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceInitializer.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceInitializer.java
deleted file mode 100644
index 858b04fd6..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreferenceInitializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * @since 3.4
- */
-public class PreferenceInitializer extends AbstractPreferenceInitializer {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- Preferences node = new DefaultScope().getNode("org.eclipse.equinox.p2.ui.sdk"); //$NON-NLS-1$
- node.putBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION, true);
- node.put(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java
deleted file mode 100644
index df8436790..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/PreloadingRepositoryHandler.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * PreloadingRepositoryHandler provides background loading of
- * repositories before executing the provisioning handler.
- *
- * @since 3.5
- */
-abstract class PreloadingRepositoryHandler extends AbstractHandler {
-
- /**
- * The constructor.
- */
- public PreloadingRepositoryHandler() {
- // constructor
- }
-
- /**
- * Execute the command.
- */
- public Object execute(ExecutionEvent event) {
- doExecuteAndLoad();
- return null;
- }
-
- void doExecuteAndLoad() {
- if (preloadRepositories()) {
- //cancel any load that is already running
- Job.getJobManager().cancel(LoadMetadataRepositoryJob.LOAD_FAMILY);
- final LoadMetadataRepositoryJob loadJob = new LoadMetadataRepositoryJob(getProvisioningUI());
- setLoadJobProperties(loadJob);
- if (waitForPreload()) {
- loadJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- if (PlatformUI.isWorkbenchRunning())
- if (event.getResult().isOK()) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
- public void run() {
- doExecute(loadJob);
- }
- });
- }
- }
- });
- loadJob.setUser(true);
- loadJob.schedule();
-
- } else {
- loadJob.setSystem(true);
- loadJob.setUser(false);
- loadJob.schedule();
- doExecute(null);
- }
- } else {
- doExecute(null);
- }
- }
-
- protected abstract void doExecute(LoadMetadataRepositoryJob job);
-
- protected boolean preloadRepositories() {
- return true;
- }
-
- protected boolean waitForPreload() {
- return true;
- }
-
- protected void setLoadJobProperties(Job loadJob) {
- loadJob.setProperty(LoadMetadataRepositoryJob.ACCUMULATE_LOAD_ERRORS, Boolean.toString(true));
- }
-
- protected ProvisioningUI getProvisioningUI() {
- return ProvisioningUI.getDefaultUI();
- }
-
- /**
- * Return a shell appropriate for parenting dialogs of this handler.
- * @return a Shell
- */
- protected Shell getShell() {
- return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java
deleted file mode 100644
index b6cd2b8c4..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/ProvisioningPreferencePage.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.Activator;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Preference page for general provisioning preferences.
- *
- * @since 3.4
- */
-
-public class ProvisioningPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- private Group browsingGroup, validateGroup;
- private Button showLatestRadio, showAllRadio;
- private Button alwaysShowFailedPlan, neverShowFailedPlan, promptOnFailedPlan;
-
- protected Control createContents(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IProvSDKHelpContextIds.PROVISIONING_PREFERENCE_PAGE);
-
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- container.setLayout(layout);
-
- // Group for show all versions vs. show latest
- browsingGroup = new Group(container, SWT.NONE);
- browsingGroup.setText(Messages.ProvisioningPreferencePage_BrowsingPrefsGroup);
- layout = new GridLayout();
- layout.numColumns = 3;
- browsingGroup.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- browsingGroup.setLayoutData(gd);
-
- showLatestRadio = new Button(browsingGroup, SWT.RADIO);
- showLatestRadio.setText(Messages.ProvisioningPreferencePage_ShowLatestVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showLatestRadio.setLayoutData(gd);
-
- showAllRadio = new Button(browsingGroup, SWT.RADIO);
- showAllRadio.setText(Messages.ProvisioningPreferencePage_ShowAllVersions);
- gd = new GridData();
- gd.horizontalSpan = 3;
- showAllRadio.setLayoutData(gd);
-
- //Group for validating a failed plan
- validateGroup = new Group(container, SWT.NONE);
- validateGroup.setText(Messages.ProvisioningPreferencePage_OpenWizardIfInvalid);
- layout = new GridLayout();
- layout.numColumns = 3;
- validateGroup.setLayout(layout);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- validateGroup.setLayoutData(gd);
-
- alwaysShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- alwaysShowFailedPlan.setText(Messages.ProvisioningPreferencePage_AlwaysOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- alwaysShowFailedPlan.setLayoutData(gd);
-
- neverShowFailedPlan = new Button(validateGroup, SWT.RADIO);
- neverShowFailedPlan.setText(Messages.ProvisioningPreferencePage_NeverOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- neverShowFailedPlan.setLayoutData(gd);
-
- promptOnFailedPlan = new Button(validateGroup, SWT.RADIO);
- promptOnFailedPlan.setText(Messages.ProvisioningPreferencePage_PromptToOpenWizard);
- gd = new GridData();
- gd.horizontalSpan = 3;
- promptOnFailedPlan.setLayoutData(gd);
-
- initialize();
-
- Dialog.applyDialogFont(container);
- return container;
-
- }
-
- private void initialize() {
- Preferences pref = Activator.getDefault().getPluginPreferences();
- showLatestRadio.setSelection(pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- showAllRadio.setSelection(!pref.getBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- String openWizard = pref.getString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- protected void performDefaults() {
- super.performDefaults();
- Preferences pref = Activator.getDefault().getPluginPreferences();
- showLatestRadio.setSelection(pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- showAllRadio.setSelection(!pref.getDefaultBoolean(PreferenceConstants.PREF_SHOW_LATEST_VERSION));
- String openWizard = pref.getDefaultString(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN);
- alwaysShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.ALWAYS));
- neverShowFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.NEVER));
- promptOnFailedPlan.setSelection(openWizard.equals(MessageDialogWithToggle.PROMPT));
- }
-
- public boolean performOk() {
- Preferences pref = Activator.getDefault().getPluginPreferences();
- pref.setValue(PreferenceConstants.PREF_SHOW_LATEST_VERSION, showLatestRadio.getSelection());
- if (alwaysShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.ALWAYS);
- else if (neverShowFailedPlan.getSelection())
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.NEVER);
- else
- pref.setValue(PreferenceConstants.PREF_OPEN_WIZARD_ON_ERROR_PLAN, MessageDialogWithToggle.PROMPT);
-
- Activator.getDefault().savePluginPreferences();
- return true;
- }
-
- public void init(IWorkbench workbench) {
- // Nothing to do
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java
deleted file mode 100644
index 1883b78fc..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/UpdateHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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
- *******************************************************************************/
-package org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.p2;
-
-import org.eclipse.equinox.p2.operations.RepositoryTracker;
-import org.eclipse.equinox.p2.operations.UpdateOperation;
-import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob;
-import org.eclipse.jface.dialogs.MessageDialog;
-
-/**
- * UpdateHandler invokes the check for updates UI
- *
- * @since 3.4
- */
-public class UpdateHandler extends PreloadingRepositoryHandler {
-
- boolean hasNoRepos = false;
-
- protected void doExecute(LoadMetadataRepositoryJob job) {
- if (hasNoRepos) {
- if (getProvisioningUI().getPolicy().getRepositoriesVisible()) {
- boolean goToSites = MessageDialog.openQuestion(getShell(), Messages.UpdateHandler_NoSitesTitle, Messages.UpdateHandler_NoSitesMessage);
- if (goToSites) {
- getProvisioningUI().manipulateRepositories(getShell());
- }
- }
- return;
- }
- UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
- // check for updates
- operation.resolveModal(null);
- if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
- getProvisioningUI().openUpdateWizard(true, operation, job);
- }
- }
-
- protected boolean preloadRepositories() {
- hasNoRepos = false;
- RepositoryTracker repoMan = getProvisioningUI().getRepositoryTracker();
- if (repoMan.getKnownRepositories(getProvisioningUI().getSession()).length == 0) {
- hasNoRepos = true;
- return false;
- }
- return super.preloadRepositories();
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties
deleted file mode 100644
index 3da5a90c0..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility/src/org/eclipse/equinox/p2/examples/rcp/sdkbundlevisibility/p2/messages.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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
-###############################################################################
-
-
-UpdateHandler_NoSitesMessage=There are no update sites to search. Do you wish to open the "Available Software Sites" preferences?
-UpdateHandler_NoSitesTitle=No Updates Found
-ProvisioningPreferencePage_AlwaysOpenWizard=&Open the wizard anyway to review or change selections
-ProvisioningPreferencePage_BrowsingPrefsGroup=Browsing for updates
-ProvisioningPreferencePage_ShowLatestVersions=Show only the &latest versions of available software
-ProvisioningPreferencePage_ShowAllVersions=Show all &versions of available software
-ProvisioningPreferencePage_NeverOpenWizard=&Report the problems and do not open the wizard
-ProvisioningPreferencePage_OpenWizardIfInvalid=When software selected for an install wizard may not be compatible
-ProvisioningPreferencePage_PromptToOpenWizard=&Ask me what to do when it happens
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.project b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.project
deleted file mode 100644
index ca9f8bc17..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1fe1140c0..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Mar 16 11:53:51 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF
deleted file mode 100644
index d574720e3..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Sdknoautoupdates
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="1.0.100",
- org.eclipse.equinox.p2.engine;bundle-version="1.0.100",
- org.eclipse.equinox.p2.core;bundle-version="1.0.100",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1",
- org.eclipse.equinox.p2.ui.sdk;bundle-version="1.0.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/build.properties
deleted file mode 100644
index 4b6aaf25b..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/p2.inf
deleted file mode 100644
index 48f31a324..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/plugin.xml
deleted file mode 100644
index e786d2934..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/plugin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.View"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.application"
- name="RCP Product">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- </product>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/sdknoautoupdates.product b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/sdknoautoupdates.product
deleted file mode 100644
index 09e70ab09..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/sdknoautoupdates.product
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (No Automatic Updates)" id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.product" application="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.application" version="1.0.0.qualifier" useFeatures="false">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail Example (No Automatic Updates)
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates" />
- <launcher name="sdknoautoupdates">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates"/>
- <plugin id="org.eclipse.equinox.p2.exemplarysetup"/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Activator.java
deleted file mode 100644
index c23f9256d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Activator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Application.java
deleted file mode 100644
index 3279bab80..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Application.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 0794fc426..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- // XXX we want to show all update preferences
- private IWorkbenchAction preferencesAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- //XXX preferences action
- preferencesAction = ActionFactory.PREFERENCES.create(window);
- register(preferencesAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- // XXX Window menu
- MenuManager windowMenu = new MenuManager("&Window", IWorkbenchActionConstants.M_WINDOW);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- // XXX Window menu
- menuBar.add(windowMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // XXX Window menu
- windowMenu.add(preferencesAction);
-
- // Help
- // XXX add an additions group because this is what SDK UI expects
- helpMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- helpMenu.add(new Separator());
- helpMenu.add(aboutAction);
-
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index 183ba01f2..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies
- * the perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index 94a996d07..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- // XXX We set the status line and progress indicator so that update
- // information can be shown there
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ICommandIds.java
deleted file mode 100644
index 018fef16d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java
deleted file mode 100644
index 09cf1f900..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/MessagePopupAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/NavigationView.java
deleted file mode 100644
index 8eeaa6ece..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/NavigationView.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class NavigationView extends ViewPart {
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.navigationView";
- private TreeViewer viewer;
-
- class TreeObject {
- private String name;
- private TreeParent parent;
-
- public TreeObject(String name) {
- this.name = name;
- }
- public String getName() {
- return name;
- }
- public void setParent(TreeParent parent) {
- this.parent = parent;
- }
- public TreeParent getParent() {
- return parent;
- }
- public String toString() {
- return getName();
- }
- }
-
- class TreeParent extends TreeObject {
- private ArrayList children;
- public TreeParent(String name) {
- super(name);
- children = new ArrayList();
- }
- public void addChild(TreeObject child) {
- children.add(child);
- child.setParent(this);
- }
- public void removeChild(TreeObject child) {
- children.remove(child);
- child.setParent(null);
- }
- public TreeObject[] getChildren() {
- return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
- }
- public boolean hasChildren() {
- return children.size()>0;
- }
- }
-
- class ViewContentProvider implements IStructuredContentProvider,
- ITreeContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- public Object getParent(Object child) {
- if (child instanceof TreeObject) {
- return ((TreeObject)child).getParent();
- }
- return null;
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof TreeParent) {
- return ((TreeParent)parent).getChildren();
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof TreeParent)
- return ((TreeParent)parent).hasChildren();
- return false;
- }
- }
-
- class ViewLabelProvider extends LabelProvider {
-
- public String getText(Object obj) {
- return obj.toString();
- }
- public Image getImage(Object obj) {
- String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
- if (obj instanceof TreeParent)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
- }
-
- /**
- * We will set up a dummy model to initialize tree heararchy. In real
- * code, you will connect to a real model and expose its hierarchy.
- */
- private TreeObject createDummyModel() {
- TreeObject to1 = new TreeObject("Inbox");
- TreeObject to2 = new TreeObject("Drafts");
- TreeObject to3 = new TreeObject("Sent");
- TreeParent p1 = new TreeParent("me@this.com");
- p1.addChild(to1);
- p1.addChild(to2);
- p1.addChild(to3);
-
- TreeObject to4 = new TreeObject("Inbox");
- TreeParent p2 = new TreeParent("other@aol.com");
- p2.addChild(to4);
-
- TreeParent root = new TreeParent("");
- root.addChild(p1);
- root.addChild(p2);
- return root;
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize
- * it.
- */
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(createDummyModel());
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/OpenViewAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/OpenViewAction.java
deleted file mode 100644
index e55917985..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/OpenViewAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-
-
-public class OpenViewAction extends Action {
-
- private final IWorkbenchWindow window;
- private int instanceNum = 0;
- private final String viewId;
-
- public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
- this.window = window;
- this.viewId = viewId;
- setText(label);
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.Activator.getImageDescriptor("/icons/sample2.gif"));
- }
-
- public void run() {
- if(window != null) {
- try {
- window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException e) {
- MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
- }
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Perspective.java
deleted file mode 100644
index dbe205e64..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/Perspective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.perspective";
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/View.java
deleted file mode 100644
index ec39948c7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates/src/org/eclipse/equinox/p2/examples/rcp/sdknoautoupdates/View.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdknoautoupdates.view";
-
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
- "- add a top-level menu and toolbar with actions\n"+
- "- add keybindings to actions\n" +
- "- create views that can't be closed and\n"+
- " multiple instances of the same view\n"+
- "- perspectives with placeholders for new views\n"+
- "- use the default about dialog\n"+
- "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- public void setFocus() {
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.classpath b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.classpath
deleted file mode 100644
index 64c5e31b7..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.project b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.project
deleted file mode 100644
index bdfbea86a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.examples.rcp.sdkui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0168ffa74..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon Mar 16 11:26:17 PDT 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF
deleted file mode 100644
index d3e191cb5..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: RCP Mail (SDK UI)
-Bundle-SymbolicName: org.eclipse.equinox.p2.examples.rcp.sdkui; singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.equinox.p2.examples.rcp.sdkui.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.equinox.p2.ui;bundle-version="2.0.0",
- org.eclipse.equinox.p2.metadata;bundle-version="1.0.0",
- org.eclipse.equinox.p2.metadata.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.artifact.repository;bundle-version="1.0.0",
- org.eclipse.equinox.p2.extensionlocation;bundle-version="1.0.100",
- org.eclipse.equinox.p2.updatesite;bundle-version="1.0.0",
- org.eclipse.equinox.p2.director;bundle-version="1.0.100",
- org.eclipse.equinox.p2.engine;bundle-version="1.0.100",
- org.eclipse.equinox.p2.core;bundle-version="1.0.100",
- org.eclipse.ecf;bundle-version="3.0.0",
- org.eclipse.ecf.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.identity;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer;bundle-version="3.0.0",
- org.eclipse.ecf.provider.filetransfer.httpclient;bundle-version="3.0.0",
- org.apache.commons.codec;bundle-version="1.2.0",
- org.apache.commons.httpclient;bundle-version="3.0.1",
- org.eclipse.equinox.p2.ui.sdk;bundle-version="1.0.0",
- org.eclipse.equinox.p2.ui.sdk.scheduler;bundle-version="1.0.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/build.properties b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/build.properties
deleted file mode 100644
index 4b6aaf25b..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- product_lg.gif,\
- splash.bmp
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/mail.ico b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/mail.ico
deleted file mode 100644
index b00006113..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/mail.ico
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.gif
deleted file mode 100644
index 34fb3c9d8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.icns b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.icns
deleted file mode 100644
index 1e92ccce1..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample.icns
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample2.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample2.gif
deleted file mode 100644
index 252d7ebcb..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample2.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample3.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample3.gif
deleted file mode 100644
index b949ac948..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/icons/sample3.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/p2.inf b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/p2.inf
deleted file mode 100644
index 48f31a324..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/p2.inf
+++ /dev/null
@@ -1,3 +0,0 @@
-instructions.configure=\
- addRepository(type:0,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite);\
- addRepository(type:1,location:http${#58}//www.eclipse.org/equinox/p2/testing/updateSite); \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/plugin.xml b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/plugin.xml
deleted file mode 100644
index 7dd551117..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/plugin.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
-
- <extension
- id="application"
- point="org.eclipse.core.runtime.applications">
- <application>
- <run
- class="org.eclipse.equinox.p2.examples.rcp.sdkui.Application">
- </run>
- </application>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="RCP Perspective"
- class="org.eclipse.equinox.p2.examples.rcp.sdkui.Perspective"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.perspective">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- name="Message"
- allowMultiple="true"
- icon="icons/sample2.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdkui.View"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.view">
- </view>
- <view
- name="Mailboxes"
- allowMultiple="true"
- icon="icons/sample3.gif"
- class="org.eclipse.equinox.p2.examples.rcp.sdkui.NavigationView"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.navigationView">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- name="Mail"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.category">
- </category>
- <command
- name="Open Mailbox"
- description="Opens a mailbox"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdkui.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.open">
- </command>
- <command
- name="Open Message Dialog"
- description="Open a message dialog"
- categoryId="org.eclipse.equinox.p2.examples.rcp.sdkui.category"
- id="org.eclipse.equinox.p2.examples.rcp.sdkui.openMessage">
- </command>
- </extension>
- <extension
- point="org.eclipse.ui.bindings">
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkui.open"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+2">
- </key>
- <key
- commandId="org.eclipse.equinox.p2.examples.rcp.sdkui.openMessage"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+3">
- </key>
- <key
- commandId="org.eclipse.ui.file.exit"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+X">
- </key>
- </extension>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.equinox.p2.examples.rcp.sdkui.application"
- name="RCP Product">
- <property
- name="aboutText"
- value="RCP Mail template created by PDE">
- </property>
- <property
- name="windowImages"
- value="icons/sample2.gif">
- </property>
- <property
- name="aboutImage"
- value="product_lg.gif">
- </property>
- </product>
- </extension>
-
-</plugin>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/product_lg.gif b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/product_lg.gif
deleted file mode 100644
index bd95e283f..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/product_lg.gif
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product
deleted file mode 100644
index 5d8f28e92..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/sdkui.product
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="RCP Mail Example (with p2 SDK UI)" id="org.eclipse.equinox.p2.examples.rcp.sdkui.product" application="org.eclipse.equinox.p2.examples.rcp.sdkui.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <aboutInfo>
- <image path="product_lg.gif"/>
- <text>
- RCP Mail Example (with p2 SDK UI)
- </text>
- </aboutInfo>
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <windowImages i16="icons/sample2.gif"/>
-
- <splash
- location="org.eclipse.equinox.p2.examples.rcp.sdkui" />
- <launcher name="sdkui">
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="org.apache.commons.codec"/>
- <plugin id="org.apache.commons.httpclient"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.compare"/>
- <plugin id="org.eclipse.compare.core"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.filebuffers"/>
- <plugin id="org.eclipse.core.filesystem"/>
- <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.resources"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.ecf"/>
- <plugin id="org.eclipse.ecf.filetransfer"/>
- <plugin id="org.eclipse.ecf.identity"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.provider.filetransfer.ssl" fragment="true"/>
- <plugin id="org.eclipse.ecf.ssl" fragment="true"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.directorywatcher"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.examples.rcp.sdkui"/>
- <plugin id="org.eclipse.equinox.p2.exemplarysetup" fragment=""/>
- <plugin id="org.eclipse.equinox.p2.extensionlocation"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.operations"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.ql"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.ui"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk"/>
- <plugin id="org.eclipse.equinox.p2.ui.sdk.scheduler"/>
- <plugin id="org.eclipse.equinox.p2.updatechecker"/>
- <plugin id="org.eclipse.equinox.p2.updatesite"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.security.ui"/>
- <plugin id="org.eclipse.equinox.security.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.jface.text"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
- <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/>
- <plugin id="org.eclipse.text"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.cocoa" fragment="true"/>
- <plugin id="org.eclipse.ui.editors"/>
- <plugin id="org.eclipse.ui.forms"/>
- <plugin id="org.eclipse.ui.ide"/>
- <plugin id="org.eclipse.ui.views"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.eclipse.ui.workbench.texteditor"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- </plugins>
-
-
-</product>
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/splash.bmp b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/splash.bmp
deleted file mode 100644
index d7d2e3032..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/splash.bmp
+++ /dev/null
Binary files differ
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Activator.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Activator.java
deleted file mode 100644
index be08d5ac8..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Activator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.equinox.p2.examples.rcp.sdkui";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Application.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Application.java
deleted file mode 100644
index 333f4c610..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Application.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class controls all aspects of the application's execution
- */
-public class Application implements IApplication {
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
- */
- public Object start(IApplicationContext context) {
- Display display = PlatformUI.createDisplay();
- try {
- int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
- if (returnCode == PlatformUI.RETURN_RESTART) {
- return IApplication.EXIT_RESTART;
- }
- return IApplication.EXIT_OK;
- } finally {
- display.dispose();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.equinox.app.IApplication#stop()
- */
- public void stop() {
- final IWorkbench workbench = PlatformUI.getWorkbench();
- if (workbench == null)
- return;
- final Display display = workbench.getDisplay();
- display.syncExec(new Runnable() {
- public void run() {
- if (!display.isDisposed())
- workbench.close();
- }
- });
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationActionBarAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationActionBarAdvisor.java
deleted file mode 100644
index 588f0106b..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationActionBarAdvisor.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.GroupMarker;
-import org.eclipse.jface.action.ICoolBarManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.action.ToolBarContributionItem;
-import org.eclipse.jface.action.ToolBarManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-
-/**
- * An action bar advisor is responsible for creating, adding, and disposing of the
- * actions added to a workbench window. Each window will be populated with
- * new actions.
- */
-public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
-
- // Actions - important to allocate these only in makeActions, and then use them
- // in the fill methods. This ensures that the actions aren't recreated
- // when fillActionBars is called with FILL_PROXY.
- private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
- private IWorkbenchAction newWindowAction;
- // XXX we want to show all update preferences
- private IWorkbenchAction preferencesAction;
- private OpenViewAction openViewAction;
- private Action messagePopupAction;
-
-
- public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
- super(configurer);
- }
-
- protected void makeActions(final IWorkbenchWindow window) {
- // Creates the actions and registers them.
- // Registering is needed to ensure that key bindings work.
- // The corresponding commands keybindings are defined in the plugin.xml file.
- // Registering also provides automatic disposal of the actions when
- // the window is closed.
-
- exitAction = ActionFactory.QUIT.create(window);
- register(exitAction);
-
- aboutAction = ActionFactory.ABOUT.create(window);
- register(aboutAction);
-
- newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(window);
- register(newWindowAction);
-
- //XXX preferences action
- preferencesAction = ActionFactory.PREFERENCES.create(window);
- register(preferencesAction);
-
- openViewAction = new OpenViewAction(window, "Open Another Message View", View.ID);
- register(openViewAction);
-
- messagePopupAction = new MessagePopupAction("Open Message", window);
- register(messagePopupAction);
- }
-
- protected void fillMenuBar(IMenuManager menuBar) {
- MenuManager fileMenu = new MenuManager("&File", IWorkbenchActionConstants.M_FILE);
- // XXX Window menu
- MenuManager windowMenu = new MenuManager("&Window", IWorkbenchActionConstants.M_WINDOW);
- MenuManager helpMenu = new MenuManager("&Help", IWorkbenchActionConstants.M_HELP);
-
- menuBar.add(fileMenu);
- // XXX Window menu
- menuBar.add(windowMenu);
- // Add a group marker indicating where action set menus will appear.
- menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- menuBar.add(helpMenu);
-
- // File
- fileMenu.add(newWindowAction);
- fileMenu.add(new Separator());
- fileMenu.add(messagePopupAction);
- fileMenu.add(openViewAction);
- fileMenu.add(new Separator());
- fileMenu.add(exitAction);
-
- // XXX Window menu
- windowMenu.add(preferencesAction);
-
- // Help
- // XXX add an additions group because this is what SDK UI expects
- helpMenu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
- helpMenu.add(new Separator());
- helpMenu.add(aboutAction);
-
- }
-
- protected void fillCoolBar(ICoolBarManager coolBar) {
- IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
- coolBar.add(new ToolBarContributionItem(toolbar, "main"));
- toolbar.add(openViewAction);
- toolbar.add(messagePopupAction);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchAdvisor.java
deleted file mode 100644
index effefa115..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchAdvisor.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchAdvisor;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-/**
- * This workbench advisor creates the window advisor, and specifies
- * the perspective id for the initial window.
- */
-public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
-
- public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- return new ApplicationWorkbenchWindowAdvisor(configurer);
- }
-
- public String getInitialWindowPerspectiveId() {
- return Perspective.ID;
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchWindowAdvisor.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchWindowAdvisor.java
deleted file mode 100644
index 0391fe090..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ApplicationWorkbenchWindowAdvisor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.application.ActionBarAdvisor;
-import org.eclipse.ui.application.IActionBarConfigurer;
-import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
-import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-
-public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
-
- public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
- super(configurer);
- }
-
- public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) {
- return new ApplicationActionBarAdvisor(configurer);
- }
-
- public void preWindowOpen() {
- IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
- configurer.setInitialSize(new Point(600, 400));
- configurer.setShowCoolBar(true);
- // XXX We set the status line and progress indicator so that update
- // information can be shown there
- configurer.setShowStatusLine(true);
- configurer.setShowProgressIndicator(true);
- }
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ICommandIds.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ICommandIds.java
deleted file mode 100644
index 1f4928f3d..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/ICommandIds.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-/**
- * Interface defining the application's command IDs.
- * Key bindings can be defined for specific commands.
- * To associate an action with a command, use IAction.setActionDefinitionId(commandId).
- *
- * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String)
- */
-public interface ICommandIds {
-
- public static final String CMD_OPEN = "org.eclipse.equinox.p2.examples.rcp.sdkui.open";
- public static final String CMD_OPEN_MESSAGE = "org.eclipse.equinox.p2.examples.rcp.sdkui.openMessage";
-
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/MessagePopupAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/MessagePopupAction.java
deleted file mode 100644
index 223749337..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/MessagePopupAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public class MessagePopupAction extends Action {
-
- private final IWorkbenchWindow window;
-
- MessagePopupAction(String text, IWorkbenchWindow window) {
- super(text);
- this.window = window;
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN_MESSAGE);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN_MESSAGE);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdkui.Activator.getImageDescriptor("/icons/sample3.gif"));
- }
-
- public void run() {
- MessageDialog.openInformation(window.getShell(), "Open", "Open Message Dialog!");
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/NavigationView.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/NavigationView.java
deleted file mode 100644
index 2f0335398..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/NavigationView.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.ViewPart;
-
-public class NavigationView extends ViewPart {
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdkui.navigationView";
- private TreeViewer viewer;
-
- class TreeObject {
- private String name;
- private TreeParent parent;
-
- public TreeObject(String name) {
- this.name = name;
- }
- public String getName() {
- return name;
- }
- public void setParent(TreeParent parent) {
- this.parent = parent;
- }
- public TreeParent getParent() {
- return parent;
- }
- public String toString() {
- return getName();
- }
- }
-
- class TreeParent extends TreeObject {
- private ArrayList<TreeObject> children;
- public TreeParent(String name) {
- super(name);
- children = new ArrayList<TreeObject>();
- }
- public void addChild(TreeObject child) {
- children.add(child);
- child.setParent(this);
- }
- public void removeChild(TreeObject child) {
- children.remove(child);
- child.setParent(null);
- }
- public TreeObject[] getChildren() {
- return (TreeObject[]) children.toArray(new TreeObject[children.size()]);
- }
- public boolean hasChildren() {
- return children.size()>0;
- }
- }
-
- class ViewContentProvider implements IStructuredContentProvider,
- ITreeContentProvider {
-
- public void inputChanged(Viewer v, Object oldInput, Object newInput) {
- }
-
- public void dispose() {
- }
-
- public Object[] getElements(Object parent) {
- return getChildren(parent);
- }
-
- public Object getParent(Object child) {
- if (child instanceof TreeObject) {
- return ((TreeObject)child).getParent();
- }
- return null;
- }
-
- public Object[] getChildren(Object parent) {
- if (parent instanceof TreeParent) {
- return ((TreeParent)parent).getChildren();
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object parent) {
- if (parent instanceof TreeParent)
- return ((TreeParent)parent).hasChildren();
- return false;
- }
- }
-
- class ViewLabelProvider extends LabelProvider {
-
- public String getText(Object obj) {
- return obj.toString();
- }
- public Image getImage(Object obj) {
- String imageKey = ISharedImages.IMG_OBJ_ELEMENT;
- if (obj instanceof TreeParent)
- imageKey = ISharedImages.IMG_OBJ_FOLDER;
- return PlatformUI.getWorkbench().getSharedImages().getImage(imageKey);
- }
- }
-
- /**
- * We will set up a dummy model to initialize tree heararchy. In real
- * code, you will connect to a real model and expose its hierarchy.
- */
- private TreeObject createDummyModel() {
- TreeObject to1 = new TreeObject("Inbox");
- TreeObject to2 = new TreeObject("Drafts");
- TreeObject to3 = new TreeObject("Sent");
- TreeParent p1 = new TreeParent("me@this.com");
- p1.addChild(to1);
- p1.addChild(to2);
- p1.addChild(to3);
-
- TreeObject to4 = new TreeObject("Inbox");
- TreeParent p2 = new TreeParent("other@aol.com");
- p2.addChild(to4);
-
- TreeParent root = new TreeParent("");
- root.addChild(p1);
- root.addChild(p2);
- return root;
- }
-
- /**
- * This is a callback that will allow us to create the viewer and initialize
- * it.
- */
- public void createPartControl(Composite parent) {
- viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new ViewLabelProvider());
- viewer.setInput(createDummyModel());
- }
-
- /**
- * Passing the focus request to the viewer's control.
- */
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-} \ No newline at end of file
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/OpenViewAction.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/OpenViewAction.java
deleted file mode 100644
index ea54ddffc..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/OpenViewAction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-
-
-public class OpenViewAction extends Action {
-
- private final IWorkbenchWindow window;
- private int instanceNum = 0;
- private final String viewId;
-
- public OpenViewAction(IWorkbenchWindow window, String label, String viewId) {
- this.window = window;
- this.viewId = viewId;
- setText(label);
- // The id is used to refer to the action in a menu or toolbar
- setId(ICommandIds.CMD_OPEN);
- // Associate the action with a pre-defined command, to allow key bindings.
- setActionDefinitionId(ICommandIds.CMD_OPEN);
- setImageDescriptor(org.eclipse.equinox.p2.examples.rcp.sdkui.Activator.getImageDescriptor("/icons/sample2.gif"));
- }
-
- public void run() {
- if(window != null) {
- try {
- window.getActivePage().showView(viewId, Integer.toString(instanceNum++), IWorkbenchPage.VIEW_ACTIVATE);
- } catch (PartInitException e) {
- MessageDialog.openError(window.getShell(), "Error", "Error opening view:" + e.getMessage());
- }
- }
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Perspective.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Perspective.java
deleted file mode 100644
index d25e02381..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/Perspective.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-public class Perspective implements IPerspectiveFactory {
-
- /**
- * The ID of the perspective as specified in the extension.
- */
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdkui.perspective";
-
- public void createInitialLayout(IPageLayout layout) {
- String editorArea = layout.getEditorArea();
- layout.setEditorAreaVisible(false);
-
- layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.25f, editorArea);
- IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
- folder.addPlaceholder(View.ID + ":*");
- folder.addView(View.ID);
-
- layout.getViewLayout(NavigationView.ID).setCloseable(false);
- }
-}
diff --git a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/View.java b/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/View.java
deleted file mode 100644
index 7a3b0219a..000000000
--- a/examples/org.eclipse.equinox.p2.examples.rcp.sdkui/src/org/eclipse/equinox/p2/examples/rcp/sdkui/View.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.equinox.p2.examples.rcp.sdkui;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.part.ViewPart;
-
-public class View extends ViewPart {
-
- public static final String ID = "org.eclipse.equinox.p2.examples.rcp.sdkui.view";
-
- public void createPartControl(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- top.setLayout(layout);
- // top banner
- Composite banner = new Composite(top, SWT.NONE);
- banner.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
- layout = new GridLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.numColumns = 2;
- banner.setLayout(layout);
-
- // setup bold font
- Font boldFont = JFaceResources.getFontRegistry().getBold(JFaceResources.DEFAULT_FONT);
-
- Label l = new Label(banner, SWT.WRAP);
- l.setText("Subject:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("This is a message about the cool Eclipse RCP!");
-
- l = new Label(banner, SWT.WRAP);
- l.setText("From:");
- l.setFont(boldFont);
-
- final Link link = new Link(banner, SWT.NONE);
- link.setText("<a>nicole@mail.org</a>");
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- MessageDialog.openInformation(getSite().getShell(), "Not Implemented", "Imagine the address book or a new message being created now.");
- }
- });
-
- l = new Label(banner, SWT.WRAP);
- l.setText("Date:");
- l.setFont(boldFont);
- l = new Label(banner, SWT.WRAP);
- l.setText("10:34 am");
- // message contents
- Text text = new Text(top, SWT.MULTI | SWT.WRAP);
- text.setText("This RCP Application was generated from the PDE Plug-in Project wizard. This sample shows how to:\n"+
- "- add a top-level menu and toolbar with actions\n"+
- "- add keybindings to actions\n" +
- "- create views that can't be closed and\n"+
- " multiple instances of the same view\n"+
- "- perspectives with placeholders for new views\n"+
- "- use the default about dialog\n"+
- "- create a product definition\n");
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- public void setFocus() {
- }
-}
diff --git a/features/org.eclipse.equinox.p2.core.feature/.project b/features/org.eclipse.equinox.p2.core.feature/.project
deleted file mode 100644
index 462763313..000000000
--- a/features/org.eclipse.equinox.p2.core.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.core.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.equinox.p2.core.feature/build.properties b/features/org.eclipse.equinox.p2.core.feature/build.properties
deleted file mode 100644
index 94bb8830a..000000000
--- a/features/org.eclipse.equinox.p2.core.feature/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html
diff --git a/features/org.eclipse.equinox.p2.core.feature/epl-v10.html b/features/org.eclipse.equinox.p2.core.feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.equinox.p2.core.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.core.feature/feature.properties b/features/org.eclipse.equinox.p2.core.feature/feature.properties
deleted file mode 100644
index 4819ea219..000000000
--- a/features/org.eclipse.equinox.p2.core.feature/feature.properties
+++ /dev/null
@@ -1,164 +0,0 @@
-###############################################################################
-# Copyright (c) 2010 EclipseSource Inc. 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:
-# EclipseSource - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Equinox p2 Core Function
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse Equinox Project
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2010 EclipseSource Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- EclipseSource - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-April 14, 2010\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
- 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
- the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
- extending or updating the functionality of an Eclipse-based product.\n\
- 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
- Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
- 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
- govern the use of the Installable Software ("Installable Software Agreement") and such\n\
- Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
- with the Specification. Such Installable Software Agreement must inform the user of the\n\
- terms and conditions that govern the Installable Software and must solicit acceptance by\n\
- the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
- indication of agreement by the user, the provisioning Technology will complete installation\n\
- of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.equinox.p2.core.feature/feature.xml b/features/org.eclipse.equinox.p2.core.feature/feature.xml
deleted file mode 100644
index f345a689e..000000000
--- a/features/org.eclipse.equinox.p2.core.feature/feature.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.core.feature"
- label="%featureName"
- version="1.0.0.qualifier"
- provider-name="%providerName">
-
- <copyright url="%copyrightURL">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.equinox.p2.artifact.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.engine"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.garbagecollector"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.eclipse"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.natives"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator.manipulator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.pb"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.identity"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer.httpclient"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer.httpclient.ssl"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer.ssl"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.ssl"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.codec"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.httpclient"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.logging"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin.equinox"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.preferences"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.security"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.jarprocessor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ql"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/features/org.eclipse.equinox.p2.core.feature/license.html b/features/org.eclipse.equinox.p2.core.feature/license.html
deleted file mode 100644
index c184ca36a..000000000
--- a/features/org.eclipse.equinox.p2.core.feature/license.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html>
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/.project b/features/org.eclipse.equinox.p2.discovery.feature/.project
deleted file mode 100644
index 774ef70e4..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.discovery.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/build.properties b/features/org.eclipse.equinox.p2.discovery.feature/build.properties
deleted file mode 100644
index 0d205334c..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2010 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-bin.includes = feature.xml,license.html,epl-v10.html,license.html,feature.properties
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/epl-v10.html b/features/org.eclipse.equinox.p2.discovery.feature/epl-v10.html
deleted file mode 100755
index ed4b19665..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/feature.properties b/features/org.eclipse.equinox.p2.discovery.feature/feature.properties
deleted file mode 100755
index 6bd1ba0d6..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/feature.properties
+++ /dev/null
@@ -1,171 +0,0 @@
-###############################################################################
-# Copyright (c) 2010 Tasktop Technologies 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:
-# Tasktop Technologies - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Equinox p2 Discovery
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse Equinox Project
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Equinox Project Repository
-
-# "description" property - description of the feature
-description=All of the bundles that comprise Equinox p2 discovery. \n\
-This feature is intended to be used by integrators building on discovery.
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2010 Tasktop Technologies and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- Tasktop Technologies - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-April 14, 2010\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
- 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
- the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
- extending or updating the functionality of an Eclipse-based product.\n\
- 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
- Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
- 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
- govern the use of the Installable Software ("Installable Software Agreement") and such\n\
- Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
- with the Specification. Such Installable Software Agreement must inform the user of the\n\
- terms and conditions that govern the Installable Software and must solicit acceptance by\n\
- the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
- indication of agreement by the user, the provisioning Technology will complete installation\n\
- of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ########################################## \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/feature.xml b/features/org.eclipse.equinox.p2.discovery.feature/feature.xml
deleted file mode 100644
index 0327f032f..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/feature.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.discovery.feature"
- label="%featureName"
- version="1.0.100.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.equinox.p2.discovery"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.discovery.compatibility"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.discovery"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/license.html b/features/org.eclipse.equinox.p2.discovery.feature/license.html
deleted file mode 100755
index c184ca36a..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/license.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html>
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties b/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties
deleted file mode 100644
index 5278417b9..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2008 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
-###############################################################################
-bin.includes =\
-epl-v10.html,\
-eclipse_update_120.jpg,\
-feature.xml,\
-feature.properties,\
-license.html
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpg b/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html b/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties b/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties
deleted file mode 100644
index 3b5a98e30..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/feature.properties
+++ /dev/null
@@ -1,144 +0,0 @@
-###############################################################################
-# Copyright (c) 2008, 2009 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
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Eclipse p2 Discovery Developer Resources
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Project Updates
-
-# "description" property - description of the feature
-description=Source code for the Equinox p2 Discovery
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2010 Sonatype Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- Sonatype Inc. - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html b/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html
deleted file mode 100644
index c6af966b6..000000000
--- a/features/org.eclipse.equinox.p2.discovery.feature/sourceTemplateFeature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/features/org.eclipse.equinox.p2.extras.feature/.project b/features/org.eclipse.equinox.p2.extras.feature/.project
deleted file mode 100644
index 9a5320baf..000000000
--- a/features/org.eclipse.equinox.p2.extras.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.extras.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.equinox.p2.extras.feature/build.properties b/features/org.eclipse.equinox.p2.extras.feature/build.properties
deleted file mode 100644
index 94bb8830a..000000000
--- a/features/org.eclipse.equinox.p2.extras.feature/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-bin.includes = feature.xml,\
- feature.properties,\
- license.html,\
- epl-v10.html
diff --git a/features/org.eclipse.equinox.p2.extras.feature/epl-v10.html b/features/org.eclipse.equinox.p2.extras.feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.equinox.p2.extras.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.equinox.p2.extras.feature/feature.properties b/features/org.eclipse.equinox.p2.extras.feature/feature.properties
deleted file mode 100644
index 2da1dc16b..000000000
--- a/features/org.eclipse.equinox.p2.extras.feature/feature.properties
+++ /dev/null
@@ -1,164 +0,0 @@
-###############################################################################
-# Copyright (c) 2010 EclipseSource Inc. 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:
-# EclipseSource - initial API and implementation
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=Add-on Function for p2
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse Equinox Project
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2010 EclipseSource Inc. and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- EclipseSource - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-April 14, 2010\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
- 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
- the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
- extending or updating the functionality of an Eclipse-based product.\n\
- 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
- Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
- 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
- govern the use of the Installable Software ("Installable Software Agreement") and such\n\
- Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
- with the Specification. Such Installable Software Agreement must inform the user of the\n\
- terms and conditions that govern the Installable Software and must solicit acceptance by\n\
- the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
- indication of agreement by the user, the provisioning Technology will complete installation\n\
- of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.equinox.p2.extras.feature/feature.xml b/features/org.eclipse.equinox.p2.extras.feature/feature.xml
deleted file mode 100644
index 5564a9001..000000000
--- a/features/org.eclipse.equinox.p2.extras.feature/feature.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.extras.feature"
- label="%featureName"
- version="1.0.0.qualifier"
- provider-name="%providerName">
-
- <description url="%descriptionURL">
- %description
- </description>
-
- <copyright url="%copyrightURL">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <includes
- id="org.eclipse.equinox.p2.core.feature"
- version="0.0.0"/>
-
- <requires>
- <import feature="org.eclipse.equinox.core.feature" version="1.0.0" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.equinox.p2.operations"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director.app"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.directorywatcher"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.reconciler.dropins"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.publisher"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.extensionlocation"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.repository.tools"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/features/org.eclipse.equinox.p2.extras.feature/license.html b/features/org.eclipse.equinox.p2.extras.feature/license.html
deleted file mode 100644
index c184ca36a..000000000
--- a/features/org.eclipse.equinox.p2.extras.feature/license.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html>
diff --git a/org.eclipse.equinox.p2.releng/.project b/org.eclipse.equinox.p2.releng/.project
deleted file mode 100644
index 5383151e6..000000000
--- a/org.eclipse.equinox.p2.releng/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.releng</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/HOW TO RUN.txt b/org.eclipse.equinox.p2.releng/HOW TO RUN.txt
deleted file mode 100644
index 4db026ad9..000000000
--- a/org.eclipse.equinox.p2.releng/HOW TO RUN.txt
+++ /dev/null
@@ -1 +0,0 @@
-See http://wiki.eclipse.org/Equinox_Provisioning_Getting_Started \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/.project b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/.project
deleted file mode 100644
index 7d1eaedb0..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.agent.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/build.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/build.properties
deleted file mode 100644
index 40ba61a68..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-bin.includes = feature.xml,epl-v10.html,feature.properties
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/epl-v10.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.properties
deleted file mode 100644
index 863ecb730..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.properties
+++ /dev/null
@@ -1,152 +0,0 @@
-# "featureName" property - name of the feature
-featureName=Equinox p2 Agent feature
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "description" property - description of the feature
-description=p2 Agent
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2010 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-April 14, 2010\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
- 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
- the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
- extending or updating the functionality of an Eclipse-based product.\n\
- 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
- Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
- 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
- govern the use of the Installable Software ("Installable Software Agreement") and such\n\
- Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
- with the Specification. Such Installable Software Agreement must inform the user of the\n\
- terms and conditions that govern the Installable Software and must solicit acceptance by\n\
- the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
- indication of agreement by the user, the provisioning Technology will complete installation\n\
- of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ##########################################
-
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.xml b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.xml
deleted file mode 100644
index 5a48e3d76..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/feature.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.agent.feature"
- label="%featureName"
- version="2.0.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import plugin="org.eclipse.ecf" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.filetransfer" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.identity" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.provider.filetransfer" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.provider.filetransfer.ssl" version="1.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.ssl" version="1.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.provider.filetransfer.httpclient" version="3.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.eclipse.ecf.provider.filetransfer.httpclient.ssl" version="1.0.0.v20090505-1437" match="compatible"/>
- <import plugin="org.apache.commons.codec" version="1.3.0" match="compatible"/>
- <import plugin="org.apache.commons.httpclient" version="3.1.0" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.equinox.p2.director"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.engine"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.jarprocessor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.artifact.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.eclipse"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.natives"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin.equinox"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator.manipulator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.admin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.admin.rcp"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.updatechecker"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.garbagecollector"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.generator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.updatesite"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.pb"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.security"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.publisher"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.repository.tools"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.security.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ql"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/license.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/license.html
deleted file mode 100644
index 61d632d9c..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.agent.feature/license.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
-
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
-
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/.project b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/.project
deleted file mode 100644
index 8c3f5e3f7..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.director.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/build.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/build.properties
deleted file mode 100644
index 40ba61a68..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2009 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
-###############################################################################
-bin.includes = feature.xml,epl-v10.html,feature.properties
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/epl-v10.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.properties
deleted file mode 100644
index d4a830984..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.properties
+++ /dev/null
@@ -1,151 +0,0 @@
-# "featureName" property - name of the feature
-featureName=Equinox p2 director feature
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "description" property - description of the feature
-description=Equinox p2 director
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2010 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-April 14, 2010\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
- 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
- the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
- extending or updating the functionality of an Eclipse-based product.\n\
- 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
- Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
- 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
- govern the use of the Installable Software ("Installable Software Agreement") and such\n\
- Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
- with the Specification. Such Installable Software Agreement must inform the user of the\n\
- terms and conditions that govern the Installable Software and must solicit acceptance by\n\
- the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
- indication of agreement by the user, the provisioning Technology will complete installation\n\
- of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.xml b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.xml
deleted file mode 100644
index 88daabc91..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/feature.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.director.feature"
- label="%featureName"
- version="2.0.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.equinox.p2.director"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director.app"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.engine"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.jarprocessor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.artifact.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.identity"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.eclipse"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.natives"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin.equinox"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator.manipulator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.garbagecollector"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.pb"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.security"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ql"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/license.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/license.html
deleted file mode 100644
index 61d632d9c..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.director.feature/license.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
-
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
-
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/.project b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/.project
deleted file mode 100644
index f06214666..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.generator.feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/build.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/build.properties
deleted file mode 100644
index 80e7c57cc..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/build.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2007, 2008 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
-###############################################################################
-bin.includes = feature.xml,epl-v10.html,feature.properties
-customBuildCallbacks=customBuildCallbacks.xml
-customBuildCallbacks.inheritall=true
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/customBuildCallbacks.xml b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/customBuildCallbacks.xml
deleted file mode 100644
index d04cc1983..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/customBuildCallbacks.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!-- ===================================================================== -->
-<!-- Custom targets called from a project's generated build.xml -->
-<!-- Set customBuildCallbacks=<path/to/this/file> in your build.properties.-->
-<!-- ===================================================================== -->
-<project name="Build specific targets and properties" default="noDefault">
-
- <!-- ===================================================================== -->
- <!-- Default target -->
- <!-- ===================================================================== -->
- <target name="noDefault">
- <echo message="This file must be called with explicit targets" />
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do before the target gather.bin.parts -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - the directory plugins will be collected to -->
- <!-- feature.directory - the directory containing the resulting feature -->
- <!-- ===================================================================== -->
- <target name="pre.gather.bin.parts">
- </target>
-
- <!-- ===================================================================== -->
- <!-- Steps to do after the target gather.bin.parts -->
- <!-- Available parameters : -->
- <!-- destination.temp.folder - the directory plugins will be collected to -->
- <!-- feature.directory - the directory containing the resulting feature -->
- <!-- ===================================================================== -->
- <target name="post.gather.bin.parts">
- <!-- load the properties file to get the bundle versions -->
- <property file="${buildDirectory}/finalPluginsVersions.properties"/>
- <!-- zip up the simple.configurator into the generator bundle -->
- <zip
- basedir="${destination.temp.folder}/org.eclipse.equinox.simpleconfigurator_${org.eclipse.equinox.simpleconfigurator}"
- destfile="${destination.temp.folder}/org.eclipse.equinox.p2.metadata.generator_${org.eclipse.equinox.p2.metadata.generator}/org.eclipse.equinox.simpleconfigurator.jar">
- </zip>
- </target>
-
-</project>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/epl-v10.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.properties b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.properties
deleted file mode 100644
index 54b80490b..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.properties
+++ /dev/null
@@ -1,151 +0,0 @@
-# "featureName" property - name of the feature
-featureName=Equinox p2 generator feature
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "description" property - description of the feature
-description=Equinox p2 Generator feature
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008, 2010 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-April 14, 2010\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
- 1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
- the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
- extending or updating the functionality of an Eclipse-based product.\n\
- 2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
- Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
- 3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
- govern the use of the Installable Software ("Installable Software Agreement") and such\n\
- Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
- with the Specification. Such Installable Software Agreement must inform the user of the\n\
- terms and conditions that govern the Installable Software and must solicit acceptance by\n\
- the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
- indication of agreement by the user, the provisioning Technology will complete installation\n\
- of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.xml b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.xml
deleted file mode 100644
index 898258706..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/feature.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.equinox.p2.generator.feature"
- label="%featureName"
- version="2.0.0.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <plugin
- id="org.eclipse.equinox.p2.artifact.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.engine"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.jarprocessor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.generator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.eclipse"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.natives"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.identity"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin.equinox"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator.manipulator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.garbagecollector"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.sat4j.pb"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.security"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.publisher"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/license.html b/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/license.html
deleted file mode 100644
index 61d632d9c..000000000
--- a/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.generator.feature/license.html
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
-
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
-
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/ecf.psf b/org.eclipse.equinox.p2.releng/ecf.psf
deleted file mode 100644
index 15aa7df88..000000000
--- a/org.eclipse.equinox.p2.releng/ecf.psf
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.ecf/framework/bundles/org.eclipse.ecf,org.eclipse.ecf"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.ecf/framework/bundles/org.eclipse.ecf.filetransfer,org.eclipse.ecf.filetransfer"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.ecf/framework/bundles/org.eclipse.ecf.identity,org.eclipse.ecf.identity"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.ecf/providers/bundles/org.eclipse.ecf.provider.filetransfer,org.eclipse.ecf.provider.filetransfer"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.ecf/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient,org.eclipse.ecf.provider.filetransfer.httpclient"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.ecf/providers/bundles/org.eclipse.ecf.provider.filetransfer.httpclient.ssl,org.eclipse.ecf.provider.filetransfer.httpclient.ssl"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.ecf/providers/bundles/org.eclipse.ecf.provider.filetransfer.ssl,org.eclipse.ecf.provider.filetransfer.ssl"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.ecf/framework/bundles/org.eclipse.ecf.ssl,org.eclipse.ecf.ssl"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/components/bundles/org.eclipse.equinox.concurrent,org.eclipse.equinox.concurrent"/>
-
-<project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.apache.commons.codec,org.apache.commons.codec,v1_2_0"/>
-<project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.apache.commons.httpclient,org.apache.commons.httpclient,v3_0_1"/>
-<project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.apache.commons.logging,org.apache.commons.logging,v1_0_4"/>
-</provider>
-</psf> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/examples.psf b/org.eclipse.equinox.p2.releng/examples.psf
deleted file mode 100644
index a09dd6d03..000000000
--- a/org.eclipse.equinox.p2.releng/examples.psf
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility,org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.cloud,org.eclipse.equinox.p2.examples.rcp.cloud"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.discovery,org.eclipse.equinox.p2.examples.rcp.discovery"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/examples/org.eclipse.equinox.p2.examples.rcp.prestartupdate,org.eclipse.equinox.p2.examples.rcp.prestartupdate"/>
-</provider>
-</psf> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/incubator.psf b/org.eclipse.equinox.p2.releng/incubator.psf
deleted file mode 100644
index 93e876b3c..000000000
--- a/org.eclipse.equinox.p2.releng/incubator.psf
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.afterthefact,org.eclipse.equinox.p2.afterthefact"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.diagnostic,org.eclipse.equinox.p2.diagnostic"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.profile.recovery,org.eclipse.equinox.p2.profile.recovery"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.touchpoint.osgi,org.eclipse.equinox.p2.touchpoint.osgi"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/incubator/p2/bundles/org.eclipse.equinox.p2.weblistener,org.eclipse.equinox.p2.weblistener"/>
-</provider>
-</psf> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.cvsignore b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.cvsignore
deleted file mode 100644
index eb5a316cb..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-target
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.project b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.project
deleted file mode 100644
index 141b7adc7..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2-aggregator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml
deleted file mode 100644
index 8623236c5..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version>
- <relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2-aggregator</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <modules>
- <module>../ie.wombat.jbdiff</module>
- <module>../ie.wombat.jbdiff.test</module>
- <module>../org.eclipse.equinox.frameworkadmin</module>
- <module>../org.eclipse.equinox.frameworkadmin.equinox</module>
- <module>../org.eclipse.equinox.frameworkadmin.test</module>
- <module>../org.eclipse.equinox.p2.artifact.optimizers</module>
- <module>../org.eclipse.equinox.p2.artifact.processors</module>
- <module>../org.eclipse.equinox.p2.artifact.repository</module>
- <module>../org.eclipse.equinox.p2.console</module>
- <module>../org.eclipse.equinox.p2.core</module>
- <module>../org.eclipse.equinox.p2.director</module>
- <module>../org.eclipse.equinox.p2.director.app</module>
- <module>../org.eclipse.equinox.p2.directorywatcher</module>
- <module>../org.eclipse.equinox.p2.discovery</module>
- <module>../org.eclipse.equinox.p2.discovery.compatibility</module>
- <module>../org.eclipse.equinox.p2.engine</module>
- <module>../org.eclipse.equinox.p2.extensionlocation</module>
- <module>../org.eclipse.equinox.p2.garbagecollector</module>
- <module>../org.eclipse.equinox.p2.installer</module>
- <module>../org.eclipse.equinox.p2.jarprocessor</module>
- <module>../org.eclipse.equinox.p2.metadata</module>
- <module>../org.eclipse.equinox.p2.metadata.generator</module>
- <module>../org.eclipse.equinox.p2.metadata.repository</module>
- <module>../org.eclipse.equinox.p2.operations</module>
- <module>../org.eclipse.equinox.p2.publisher</module>
- <module>../org.eclipse.equinox.p2.ql</module>
- <module>../org.eclipse.equinox.p2.reconciler.dropins</module>
- <module>../org.eclipse.equinox.p2.repository</module>
- <module>../org.eclipse.equinox.p2.repository.tools</module>
- <module>../org.eclipse.equinox.p2.sar</module>
-<!-- <module>../org.eclipse.equinox.p2.tests</module>-->
- <module>../org.eclipse.equinox.p2.tests.ui</module>
- <module>../org.eclipse.equinox.p2.testserver</module>
- <module>../org.eclipse.equinox.p2.touchpoint.eclipse</module>
- <module>../org.eclipse.equinox.p2.touchpoint.natives</module>
- <module>../org.eclipse.equinox.p2.ui</module>
- <module>../org.eclipse.equinox.p2.ui.admin</module>
- <module>../org.eclipse.equinox.p2.ui.admin.rcp</module>
- <module>../org.eclipse.equinox.p2.ui.discovery</module>
- <module>../org.eclipse.equinox.p2.ui.sdk</module>
- <module>../org.eclipse.equinox.p2.ui.sdk.scheduler</module>
- <module>../org.eclipse.equinox.p2.updatechecker</module>
- <module>../org.eclipse.equinox.p2.updatesite</module>
- <module>../org.eclipse.equinox.p2.user.ui</module>
- <module>../org.eclipse.equinox.simpleconfigurator</module>
- <module>../org.eclipse.equinox.simpleconfigurator.manipulator</module>
- </modules>
-</project>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/.project b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/.project
deleted file mode 100644
index 06f02164b..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2-parent</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml
deleted file mode 100644
index 2da2b2c47..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent/pom.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <properties>
- <tycho-version>0.8.0</tycho-version>
- </properties>
- <repositories>
- <repository>
- <id>helios</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/eclipse/updates/3.6-I-builds</url>
- </repository>
- <repository>
- <id>galileoTest</id>
- <layout>p2</layout>
- <url>file:/Users/Pascal/Downloads/eclipse-testing/eclipse-junit-tests-I20100312-0800</url>
- </repository>
- </repositories>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
-
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <resolver>p2</resolver>
- <environments>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>osx</id>
- <activation>
- <property>
- <name>java.vendor.url</name>
- <value>http://www.apple.com/</value>
- </property>
- </activation>
- <properties>
- <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dosgi.ws=cocoa -XstartOnFirstThread</tycho.test.jvmArgs>
- <osgi.ws>cocoa</osgi.ws>
- </properties>
- </profile>
- </profiles>
-</project> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.project b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.project
deleted file mode 100644
index 7c3bbe5b7..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.equinox.p2.obr-aggregator</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.maven.ide.eclipse.maven2Nature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.settings/org.maven.ide.eclipse.prefs b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.settings/org.maven.ide.eclipse.prefs
deleted file mode 100644
index cfad75109..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/.settings/org.maven.ide.eclipse.prefs
+++ /dev/null
@@ -1,9 +0,0 @@
-#Mon Mar 15 12:27:44 EDT 2010
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-skipCompilerPlugin=true
-version=1
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/obr.target b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/obr.target
deleted file mode 100644
index 1b8b78cec..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/obr.target
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.6"?>
-
-<target name="p2">
-<locations>
-<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
-<unit id="org.eclipse.sdk.ide" version="3.6.0.I20100312-1448"/>
-<repository location="http://download.eclipse.org/eclipse/updates/3.6-I-builds"/>
-</location>
-</locations>
-<includeBundles>
-<plugin id="org.eclipse.ecf.filetransfer"/>
-<plugin id="org.sat4j.core"/>
-<plugin id="org.eclipse.core.net"/>
-<plugin id="org.eclipse.ecf.provider.filetransfer.ssl"/>
-<plugin id="org.eclipse.ecf.provider.filetransfer"/>
-<plugin id="org.eclipse.osgi"/>
-<plugin id="org.eclipse.osgi.services"/>
-<plugin id="org.eclipse.ecf"/>
-<plugin id="org.eclipse.core.jobs"/>
-<plugin id="org.eclipse.equinox.preferences"/>
-<plugin id="org.eclipse.ecf.ssl"/>
-<plugin id="org.eclipse.ecf.identity"/>
-<plugin id="org.eclipse.equinox.security"/>
-<plugin id="org.eclipse.equinox.common"/>
-<plugin id="org.eclipse.equinox.registry"/>
-<plugin id="org.sat4j.pb"/>
-<plugin id="org.eclipse.equinox.ds"/>
-<plugin id="org.eclipse.equinox.security.macosx"/>
-</includeBundles>
-</target>
diff --git a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/pom.xml b/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/pom.xml
deleted file mode 100644
index b3eddc4f4..000000000
--- a/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2.obr-aggregator/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <artifactId>org.eclipse.equinox.p2-parent</artifactId>
- <groupId>org.eclipse</groupId>
- <version>0.0.1-SNAPSHOT</version>
- <relativePath>../org.eclipse.equinox.p2-parent</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse</groupId>
- <artifactId>org.eclipse.equinox.p2.obr</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <resolver>p2</resolver>
- <target>
- <artifact>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- <classifier>obr</classifier>
- </artifact>
- </target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <modules>
- <module>../org.eclipse.equinox.p2.core</module>
- <module>../org.eclipse.equinox.p2.metadata</module>
- <module>../org.eclipse.equinox.p2.repository</module>
- <module>../org.eclipse.equinox.p2.planner</module>
- </modules>
-</project> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/p2_users_R_3_6_api_cleanup_projectSet.psf b/org.eclipse.equinox.p2.releng/p2_users_R_3_6_api_cleanup_projectSet.psf
deleted file mode 100644
index c86475bb6..000000000
--- a/org.eclipse.equinox.p2.releng/p2_users_R_3_6_api_cleanup_projectSet.psf
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/ui/org.eclipse.pde.core,org.eclipse.pde.core,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/ui/org.eclipse.pde.ui,org.eclipse.pde.ui,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/ui/org.eclipse.pde.ui.tests,org.eclipse.pde.ui.tests,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/build/org.eclipse.pde.build,org.eclipse.pde.build,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,pde/build/org.eclipse.pde.build.tests,org.eclipse.pde.build.tests,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.ui.ide,org.eclipse.ui.ide,HEAD"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/webtools,servertools/plugins/org.eclipse.wst.server.discovery,org.eclipse.wst.server.discovery,HEAD"/>
-</provider>
-</psf> \ No newline at end of file
diff --git a/org.eclipse.equinox.p2.releng/projectSet-extssh.psf b/org.eclipse.equinox.p2.releng/projectSet-extssh.psf
deleted file mode 100644
index e553a00ea..000000000
--- a/org.eclipse.equinox.p2.releng/projectSet-extssh.psf
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/ie.wombat.jbdiff,ie.wombat.jbdiff"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/ie.wombat.jbdiff.test,ie.wombat.jbdiff.test"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.frameworkadmin.equinox"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin,org.eclipse.equinox.frameworkadmin"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.test,org.eclipse.equinox.frameworkadmin.test"/>
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator,org.eclipse.equinox.p2-aggregator"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent,org.eclipse.equinox.p2-parent"/>
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.artifact.optimizers"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.processors"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.artifact.repository"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.console,org.eclipse.equinox.p2.console"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.core"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.director.app"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.directorywatcher"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery,org.eclipse.equinox.p2.discovery"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.discovery.compatibility"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.engine"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.extensionlocation"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.garbagecollector"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.installer,org.eclipse.equinox.p2.installer"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.jarprocessor,org.eclipse.equinox.p2.jarprocessor"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.metadata"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.metadata.generator"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.metadata.repository"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.operations,org.eclipse.equinox.p2.operations"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.publisher"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ql,org.eclipse.equinox.p2.ql"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.reconciler.dropins"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng,org.eclipse.equinox.p2.releng"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository,org.eclipse.equinox.p2.repository"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.repository.tools"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.sar,org.eclipse.equinox.p2.sar"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests,org.eclipse.equinox.p2.tests"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.discovery,org.eclipse.equinox.p2.tests.discovery"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.optimizers,org.eclipse.equinox.p2.tests.optimizers"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.ui,org.eclipse.equinox.p2.tests.ui"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.verifier,org.eclipse.equinox.p2.tests.verifier"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.testserver,org.eclipse.equinox.p2.testserver"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.eclipse"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.equinox.p2.touchpoint.natives"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui,org.eclipse.equinox.p2.user.ui"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui,org.eclipse.equinox.p2.ui"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.ui.discovery"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.admin"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.equinox.p2.ui.admin.rcp"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk,org.eclipse.equinox.p2.ui.sdk"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler,org.eclipse.equinox.p2.ui.sdk.scheduler"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatechecker,org.eclipse.equinox.p2.updatechecker"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.updatesite"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.simpleconfigurator.manipulator"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.simpleconfigurator"/>
-
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.core.tests.harness,org.eclipse.core.tests.harness"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.test.performance,org.eclipse.test.performance"/>
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http,org.eclipse.equinox.http"/>
-
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.core,org.sat4j.core_v2.2.0,v2_2_0"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.pb,org.sat4j.pb_v2.2.0,v2_2_0"/>
-<project reference="1.0,:extssh:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.easymock,org.easymock,v2_4"/>
-
-</provider>
-</psf>
diff --git a/org.eclipse.equinox.p2.releng/projectSet.psf b/org.eclipse.equinox.p2.releng/projectSet.psf
deleted file mode 100644
index 744b29086..000000000
--- a/org.eclipse.equinox.p2.releng/projectSet.psf
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<psf version="2.0">
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/ie.wombat.jbdiff,ie.wombat.jbdiff"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/ie.wombat.jbdiff.test,ie.wombat.jbdiff.test"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.equinox,org.eclipse.equinox.frameworkadmin.equinox"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin,org.eclipse.equinox.frameworkadmin"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.frameworkadmin.test,org.eclipse.equinox.frameworkadmin.test"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.optimizers,org.eclipse.equinox.p2.artifact.optimizers"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.processors,org.eclipse.equinox.p2.artifact.processors"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository,org.eclipse.equinox.p2.artifact.repository"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.console,org.eclipse.equinox.p2.console"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.core,org.eclipse.equinox.p2.core"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director,org.eclipse.equinox.p2.director"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.director.app,org.eclipse.equinox.p2.director.app"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.directorywatcher,org.eclipse.equinox.p2.directorywatcher"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery,org.eclipse.equinox.p2.discovery"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.discovery.compatibility"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.engine"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.extensionlocation,org.eclipse.equinox.p2.extensionlocation"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.garbagecollector,org.eclipse.equinox.p2.garbagecollector"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.installer,org.eclipse.equinox.p2.installer"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.jarprocessor,org.eclipse.equinox.p2.jarprocessor"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata,org.eclipse.equinox.p2.metadata"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.generator,org.eclipse.equinox.p2.metadata.generator"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.metadata.repository,org.eclipse.equinox.p2.metadata.repository"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.operations,org.eclipse.equinox.p2.operations"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.publisher,org.eclipse.equinox.p2.publisher"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ql,org.eclipse.equinox.p2.ql"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.reconciler.dropins,org.eclipse.equinox.p2.reconciler.dropins"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng,org.eclipse.equinox.p2.releng"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository,org.eclipse.equinox.p2.repository"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.repository.tools,org.eclipse.equinox.p2.repository.tools"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.sar,org.eclipse.equinox.p2.sar"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests,org.eclipse.equinox.p2.tests"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.discovery,org.eclipse.equinox.p2.tests.discovery"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.optimizers,org.eclipse.equinox.p2.tests.optimizers"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.ui,org.eclipse.equinox.p2.tests.ui"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.verifier,org.eclipse.equinox.p2.tests.verifier"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.testserver,org.eclipse.equinox.p2.testserver"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.eclipse"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.touchpoint.natives,org.eclipse.equinox.p2.touchpoint.natives"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui,org.eclipse.equinox.p2.ui"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin,org.eclipse.equinox.p2.ui.admin"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.admin.rcp,org.eclipse.equinox.p2.ui.admin.rcp"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.ui.discovery"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk,org.eclipse.equinox.p2.ui.sdk"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler,org.eclipse.equinox.p2.ui.sdk.scheduler"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatechecker,org.eclipse.equinox.p2.updatechecker"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.updatesite,org.eclipse.equinox.p2.updatesite"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-aggregator,org.eclipse.equinox.p2-aggregator"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/org.eclipse.equinox.p2-parent,org.eclipse.equinox.p2-parent"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/org.eclipse.equinox.p2.releng/buildtime-features/org.eclipse.equinox.p2.user.ui,org.eclipse.equinox.p2.user.ui"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator,org.eclipse.equinox.simpleconfigurator.manipulator"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/p2/bundles/org.eclipse.equinox.simpleconfigurator,org.eclipse.equinox.simpleconfigurator"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.core.tests.harness,org.eclipse.core.tests.harness"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/eclipse,org.eclipse.test.performance,org.eclipse.test.performance"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/rt,org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http,org.eclipse.equinox.http"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.core,org.sat4j.core_v2.2.0,v2_2_0"/>
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.sat4j.pb,org.sat4j.pb_v2.2.0,v2_2_0"/>
-
-<project reference="1.0,:pserver:dev.eclipse.org:/cvsroot/tools,org.eclipse.orbit/org.easymock,org.easymock,v2_4"/>
-
-</provider>
-</psf>

Back to the top